mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
feat(agents): add gemini-3-pro and default to codex-max (closes #423)
This commit is contained in:
@@ -50,7 +50,7 @@ agent {
|
||||
"task": "Implement JWT middleware (RS256) with key rotation and unit/integration tests. Preserve existing OAuth flows. Provide README usage snippet.",
|
||||
"context": "Service: services/api (Rust Axum). Secrets via env. CI: `cargo test --all`.",
|
||||
"files": ["services/api", "services/api/src", "services/api/Cargo.toml"],
|
||||
"models": ["claude-sonnet-4.5","code-gpt-5.1-codex","gemini-2.5-pro"],
|
||||
"models": ["claude-sonnet-4.5","code-gpt-5.1-codex-max","gemini-3-pro"],
|
||||
"output": "Middleware + passing tests + README snippet",
|
||||
"write": true // Allow changes - will launch every agent in a separate worktree
|
||||
}
|
||||
|
||||
@@ -34,15 +34,16 @@ const CLOUD_GPT5_CODEX_WRITE: &[&str] = &[];
|
||||
/// CLI-name lookups.
|
||||
pub const DEFAULT_AGENT_NAMES: &[&str] = &[
|
||||
"code-gpt-5.1-codex-mini",
|
||||
"code-gpt-5.1-codex",
|
||||
"code-gpt-5.1-codex-max",
|
||||
"code-gpt-5.1",
|
||||
"claude-sonnet-4.5",
|
||||
"claude-opus-4.1",
|
||||
"claude-haiku-4.5",
|
||||
"gemini-3-pro",
|
||||
"gemini-2.5-pro",
|
||||
"gemini-2.5-flash",
|
||||
"qwen-3-coder",
|
||||
"cloud-gpt-5.1-codex",
|
||||
"cloud-gpt-5.1-codex-max",
|
||||
];
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -95,15 +96,15 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
gating_env: None,
|
||||
},
|
||||
AgentModelSpec {
|
||||
slug: "code-gpt-5.1-codex",
|
||||
slug: "code-gpt-5.1-codex-max",
|
||||
family: "code",
|
||||
cli: "coder",
|
||||
read_only_args: CODE_GPT5_CODEX_READ_ONLY,
|
||||
write_args: CODE_GPT5_CODEX_WRITE,
|
||||
model_args: &["--model", "gpt-5.1-codex"],
|
||||
description: "Backup for complex coding tasks (along with claude-opus-4.1). Slower and more expensive, but slightly more capable if code-gpt-5.1-codex-mini did not succeed.",
|
||||
model_args: &["--model", "gpt-5.1-codex-max"],
|
||||
description: "Flagship coding agent. Use when you want maximum reasoning depth and fidelity; falls back to this when older code-gpt-5.1-codex is requested.",
|
||||
enabled_by_default: true,
|
||||
aliases: &["code-gpt-5-codex", "coder", "code", "codex"],
|
||||
aliases: &["code-gpt-5.1-codex", "code-gpt-5-codex", "coder", "code", "codex"],
|
||||
gating_env: None,
|
||||
},
|
||||
AgentModelSpec {
|
||||
@@ -137,7 +138,7 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
read_only_args: CLAUDE_OPUS_READ_ONLY,
|
||||
write_args: CLAUDE_OPUS_WRITE,
|
||||
model_args: &["--model", "opus"],
|
||||
description: "Backup for complex coding tasks (along with code-gpt-5.1-codex). Slower and more expensive, but slightly more capable if claude-sonnet-4.5 did not succeed.",
|
||||
description: "Backup for complex coding tasks (along with code-gpt-5.1-codex-max). Slower and more expensive, but slightly more capable if claude-sonnet-4.5 did not succeed.",
|
||||
enabled_by_default: true,
|
||||
aliases: &["claude-opus"],
|
||||
gating_env: None,
|
||||
@@ -154,6 +155,18 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
aliases: &["claude-haiku"],
|
||||
gating_env: None,
|
||||
},
|
||||
AgentModelSpec {
|
||||
slug: "gemini-3-pro",
|
||||
family: "gemini",
|
||||
cli: "gemini",
|
||||
read_only_args: GEMINI_PRO_READ_ONLY,
|
||||
write_args: GEMINI_PRO_WRITE,
|
||||
model_args: &["--model", "gemini-3-pro-preview"],
|
||||
description: "Gemini 3 Pro via the Gemini app CLI. Use for newest Gemini capabilities; mapped from the preview model name under the hood.",
|
||||
enabled_by_default: true,
|
||||
aliases: &["gemini-3-pro-preview", "gemini-3", "gemini3"],
|
||||
gating_env: None,
|
||||
},
|
||||
AgentModelSpec {
|
||||
slug: "gemini-2.5-pro",
|
||||
family: "gemini",
|
||||
@@ -191,15 +204,15 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
gating_env: None,
|
||||
},
|
||||
AgentModelSpec {
|
||||
slug: "cloud-gpt-5.1-codex",
|
||||
slug: "cloud-gpt-5.1-codex-max",
|
||||
family: "cloud",
|
||||
cli: "cloud",
|
||||
read_only_args: CLOUD_GPT5_CODEX_READ_ONLY,
|
||||
write_args: CLOUD_GPT5_CODEX_WRITE,
|
||||
model_args: &["--model", "gpt-5.1-codex"],
|
||||
description: "Cloud-hosted gpt-5.1-codex agent. Requires the CODE_ENABLE_CLOUD_AGENT_MODEL flag and carries the latency of a remote run.",
|
||||
model_args: &["--model", "gpt-5.1-codex-max"],
|
||||
description: "Cloud-hosted gpt-5.1-codex-max agent. Requires the CODE_ENABLE_CLOUD_AGENT_MODEL flag and carries the latency of a remote run.",
|
||||
enabled_by_default: false,
|
||||
aliases: &["cloud-gpt-5-codex", "cloud"],
|
||||
aliases: &["cloud-gpt-5.1-codex", "cloud-gpt-5-codex", "cloud"],
|
||||
gating_env: Some(CLOUD_MODEL_ENV_FLAG),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1310,7 +1310,7 @@ pub fn create_agent_tool(allowed_models: &[String]) -> OpenAiTool {
|
||||
},
|
||||
}),
|
||||
description: Some(
|
||||
"Optional array of model names (e.g., ['claude-sonnet-4.5','code-gpt-5.1-codex','code-gpt-5.1-codex-mini','gemini-2.5-pro'])".to_string(),
|
||||
"Optional array of model names (e.g., ['claude-sonnet-4.5','code-gpt-5.1-codex-max','code-gpt-5.1-codex-mini','gemini-3-pro'])".to_string(),
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
@@ -2426,7 +2426,7 @@ impl Config {
|
||||
|| agent.name.eq_ignore_ascii_case("cloud")
|
||||
{
|
||||
tracing::warn!(
|
||||
"legacy agent name '{}' detected; update config to use model slugs (e.g., code-gpt-5.1-codex)",
|
||||
"legacy agent name '{}' detected; update config to use model slugs (e.g., code-gpt-5.1-codex-max)",
|
||||
agent.name
|
||||
);
|
||||
}
|
||||
@@ -3879,8 +3879,9 @@ model_verbosity = "high"
|
||||
.map(|agent| agent.name.to_ascii_lowercase())
|
||||
.collect();
|
||||
|
||||
assert!(enabled_names.contains("code-gpt-5.1-codex"));
|
||||
assert!(enabled_names.contains("code-gpt-5.1-codex-max"));
|
||||
assert!(enabled_names.contains("claude-sonnet-4.5"));
|
||||
assert!(enabled_names.contains("gemini-3-pro"));
|
||||
assert!(enabled_names.contains("gemini-2.5-pro"));
|
||||
assert!(enabled_names.contains("qwen-3-coder"));
|
||||
Ok(())
|
||||
|
||||
@@ -242,7 +242,7 @@ mod tests {
|
||||
assert!(plan_prompt.contains("final, comprehensive plan"));
|
||||
// Default agents list should include non-Codex providers when no [[agents]] configured
|
||||
assert!(plan_prompt.contains("code-gpt-5.1"));
|
||||
assert!(!plan_prompt.contains("cloud-gpt-5.1-codex"));
|
||||
assert!(!plan_prompt.contains("cloud-gpt-5.1-codex-max"));
|
||||
|
||||
// Test /solve command
|
||||
let result = handle_slash_command("/solve fix the bug in authentication", None);
|
||||
|
||||
@@ -2,6 +2,9 @@ use code_core::agent_defaults::agent_model_spec;
|
||||
|
||||
#[test]
|
||||
fn gemini_specs_use_long_model_flag() {
|
||||
let latest = agent_model_spec("gemini-3-pro").expect("spec present");
|
||||
assert_eq!(latest.model_args, ["--model", "gemini-3-pro-preview"]);
|
||||
|
||||
let pro = agent_model_spec("gemini-2.5-pro").expect("spec present");
|
||||
assert_eq!(pro.model_args, ["--model", "gemini-2.5-pro"]);
|
||||
|
||||
|
||||
@@ -26058,7 +26058,7 @@ mod tests {
|
||||
|
||||
chat.auto_on_assistant_final();
|
||||
|
||||
// With cloud-gpt-5.1-codex gated off, the review request is still queued but
|
||||
// With cloud-gpt-5.1-codex-max gated off, the review request is still queued but
|
||||
// may be processed synchronously; ensure the review slot was populated.
|
||||
if chat.auto_state.awaiting_review() {
|
||||
// Review remains pending; nothing else to assert.
|
||||
|
||||
Reference in New Issue
Block a user