storkit: merge 345_story_gemini_agent_backend_via_google_ai_api
This commit is contained in:
@@ -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#"
|
||||
|
||||
Reference in New Issue
Block a user