storkit: merge 345_story_gemini_agent_backend_via_google_ai_api

This commit is contained in:
Dave
2026-03-20 22:51:16 +00:00
parent c930c537bc
commit 79ee6eb0dc
4 changed files with 849 additions and 4 deletions

View File

@@ -378,10 +378,10 @@ fn validate_agents(agents: &[AgentConfig]) -> Result<(), String> {
}
if let Some(ref runtime) = agent.runtime {
match runtime.as_str() {
"claude-code" => {}
"claude-code" | "gemini" => {}
other => {
return Err(format!(
"Agent '{}': unknown runtime '{other}'. Supported: 'claude-code'",
"Agent '{}': unknown runtime '{other}'. Supported: 'claude-code', 'gemini'",
agent.name
));
}
@@ -835,6 +835,18 @@ runtime = "claude-code"
);
}
#[test]
fn runtime_gemini_accepted() {
let toml_str = r#"
[[agent]]
name = "coder"
runtime = "gemini"
model = "gemini-2.5-pro"
"#;
let config = ProjectConfig::parse(toml_str).unwrap();
assert_eq!(config.agent[0].runtime, Some("gemini".to_string()));
}
#[test]
fn runtime_unknown_rejected() {
let toml_str = r#"