mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
feat(models): add gpt-5.3-codex; bump opus to 4.6
This commit is contained in:
@@ -48,11 +48,40 @@ const ALL_TEXT_VERBOSITY: &[TextVerbosityConfig] = &[
|
||||
|
||||
static PRESETS: Lazy<Vec<ModelPreset>> = Lazy::new(|| {
|
||||
vec![
|
||||
ModelPreset {
|
||||
id: "gpt-5.3-codex".to_string(),
|
||||
model: "gpt-5.3-codex".to_string(),
|
||||
display_name: "gpt-5.3-codex".to_string(),
|
||||
description: "Latest frontier agentic coding model.".to_string(),
|
||||
default_reasoning_effort: ReasoningEffort::Medium,
|
||||
supported_reasoning_efforts: vec![
|
||||
ReasoningEffortPreset {
|
||||
effort: ReasoningEffort::Low,
|
||||
description: "Fast responses with lighter reasoning".to_string(),
|
||||
},
|
||||
ReasoningEffortPreset {
|
||||
effort: ReasoningEffort::Medium,
|
||||
description: "Balances speed and reasoning depth for everyday tasks".to_string(),
|
||||
},
|
||||
ReasoningEffortPreset {
|
||||
effort: ReasoningEffort::High,
|
||||
description: "Maximizes reasoning depth for complex problems".to_string(),
|
||||
},
|
||||
ReasoningEffortPreset {
|
||||
effort: ReasoningEffort::XHigh,
|
||||
description: "Extra high reasoning depth for complex problems".to_string(),
|
||||
},
|
||||
],
|
||||
supported_text_verbosity: &[TextVerbosityConfig::Medium],
|
||||
is_default: false,
|
||||
upgrade: None,
|
||||
show_in_picker: true,
|
||||
},
|
||||
ModelPreset {
|
||||
id: "gpt-5.2-codex".to_string(),
|
||||
model: "gpt-5.2-codex".to_string(),
|
||||
display_name: "gpt-5.2-codex".to_string(),
|
||||
description: "Latest frontier agentic coding model.".to_string(),
|
||||
description: "Frontier agentic coding model.".to_string(),
|
||||
default_reasoning_effort: ReasoningEffort::Medium,
|
||||
supported_reasoning_efforts: vec![
|
||||
ReasoningEffortPreset {
|
||||
@@ -401,7 +430,7 @@ pub fn builtin_model_presets(auth_mode: Option<AuthMode>) -> Vec<ModelPreset> {
|
||||
PRESETS
|
||||
.iter()
|
||||
.filter(|preset| match auth_mode {
|
||||
Some(AuthMode::ApiKey) => preset.id != "gpt-5.2-codex",
|
||||
Some(AuthMode::ApiKey) => preset.id != "gpt-5.2-codex" && preset.id != "gpt-5.3-codex",
|
||||
_ => true,
|
||||
})
|
||||
.filter(|preset| preset.show_in_picker)
|
||||
@@ -479,11 +508,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gpt_5_2_codex_hidden_for_api_key_auth() {
|
||||
fn gpt_5_codex_hidden_for_api_key_auth() {
|
||||
let presets = builtin_model_presets(Some(AuthMode::ApiKey));
|
||||
assert!(presets
|
||||
.iter()
|
||||
.all(|preset| preset.id != "gpt-5.2-codex"));
|
||||
.all(|preset| preset.id != "gpt-5.2-codex" && preset.id != "gpt-5.3-codex"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -36,7 +36,7 @@ pub const DEFAULT_AGENT_NAMES: &[&str] = &[
|
||||
// Frontline for moderate/challenging tasks
|
||||
"code-gpt-5.2",
|
||||
"code-gpt-5.2-codex",
|
||||
"claude-opus-4.5",
|
||||
"claude-opus-4.6",
|
||||
"gemini-3-pro",
|
||||
// Straightforward / cost-aware
|
||||
"code-gpt-5.1-codex-mini",
|
||||
@@ -150,7 +150,7 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
is_frontline: false,
|
||||
},
|
||||
AgentModelSpec {
|
||||
slug: "claude-opus-4.5",
|
||||
slug: "claude-opus-4.6",
|
||||
family: "claude",
|
||||
cli: "claude",
|
||||
read_only_args: CLAUDE_OPUS_READ_ONLY,
|
||||
@@ -158,7 +158,7 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[
|
||||
model_args: &["--model", "opus"],
|
||||
description: "Higher-capacity Claude model for complex reasoning; use when you want the strongest Claude.",
|
||||
enabled_by_default: true,
|
||||
aliases: &["claude-opus", "claude-opus-4.1"],
|
||||
aliases: &["claude-opus", "claude-opus-4.1", "claude-opus-4.5"],
|
||||
gating_env: None,
|
||||
is_frontline: true,
|
||||
},
|
||||
|
||||
@@ -5983,7 +5983,7 @@ mod resolve_agent_command_for_check_tests {
|
||||
|
||||
#[test]
|
||||
fn external_models_use_cli_for_command_checks() {
|
||||
let (cmd, is_builtin) = resolve_agent_command_for_check("claude-opus-4.5", None);
|
||||
let (cmd, is_builtin) = resolve_agent_command_for_check("claude-opus-4.6", None);
|
||||
assert_eq!(cmd, "claude");
|
||||
assert!(!is_builtin, "Claude should not be treated as a built-in family");
|
||||
}
|
||||
|
||||
@@ -148,7 +148,11 @@ pub(crate) fn upgrade_legacy_model_slugs(cfg: &mut ConfigToml) {
|
||||
}
|
||||
|
||||
fn upgrade_legacy_model_slug(slug: &str) -> Option<String> {
|
||||
if slug.starts_with("gpt-5.2") || slug.starts_with("test-gpt-5.2") {
|
||||
if slug.starts_with("gpt-5.2")
|
||||
|| slug.starts_with("test-gpt-5.2")
|
||||
|| slug.starts_with("gpt-5.3")
|
||||
|| slug.starts_with("test-gpt-5.3")
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
@@ -168,9 +172,10 @@ fn upgrade_legacy_model_slug(slug: &str) -> Option<String> {
|
||||
return Some(format!("gpt-5.1-codex{rest}"));
|
||||
}
|
||||
|
||||
// Upgrade Anthropic Opus 4.1 to 4.5
|
||||
if slug.eq_ignore_ascii_case("claude-opus-4.1") {
|
||||
return Some("claude-opus-4.5".to_string());
|
||||
// Upgrade Anthropic Opus 4.1/4.5 to 4.6
|
||||
if slug.eq_ignore_ascii_case("claude-opus-4.1") || slug.eq_ignore_ascii_case("claude-opus-4.5")
|
||||
{
|
||||
return Some("claude-opus-4.6".to_string());
|
||||
}
|
||||
|
||||
// Upgrade Gemini 2.5 Pro to Gemini 3 Pro (or preview alias)
|
||||
|
||||
@@ -87,6 +87,7 @@ pub(crate) fn base_instructions_override_for_personality(
|
||||
personality: Option<Personality>,
|
||||
) -> Option<String> {
|
||||
if !(model.starts_with("gpt-5.2-codex")
|
||||
|| model.starts_with("gpt-5.3-codex")
|
||||
|| model.starts_with("bengalfox")
|
||||
|| model.starts_with("exp-codex")
|
||||
|| model.starts_with("codex-1p"))
|
||||
@@ -251,6 +252,18 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
|
||||
max_output_tokens: Some(MAX_OUTPUT_DEFAULT),
|
||||
truncation_policy: TruncationPolicy::Tokens(10_000),
|
||||
)
|
||||
} else if slug.starts_with("gpt-5.3-codex") {
|
||||
// Same defaults as gpt-5.2-codex.
|
||||
model_family!(
|
||||
slug, slug,
|
||||
supports_reasoning_summaries: true,
|
||||
base_instructions: GPT_5_2_CODEX_INSTRUCTIONS.to_string(),
|
||||
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
|
||||
supports_parallel_tool_calls: true,
|
||||
context_window: Some(CONTEXT_WINDOW_272K),
|
||||
max_output_tokens: Some(MAX_OUTPUT_DEFAULT),
|
||||
truncation_policy: TruncationPolicy::Tokens(10_000),
|
||||
)
|
||||
} else if slug.starts_with("bengalfox") {
|
||||
model_family!(
|
||||
slug, slug,
|
||||
@@ -262,6 +275,18 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
|
||||
max_output_tokens: Some(MAX_OUTPUT_DEFAULT),
|
||||
truncation_policy: TruncationPolicy::Tokens(10_000),
|
||||
)
|
||||
} else if slug.starts_with("gpt-5.3") {
|
||||
model_family!(
|
||||
slug, "gpt-5.3",
|
||||
supports_reasoning_summaries: true,
|
||||
base_instructions: GPT_5_2_INSTRUCTIONS.to_string(),
|
||||
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
|
||||
default_reasoning_effort: Some(ReasoningEffort::Medium),
|
||||
supports_parallel_tool_calls: true,
|
||||
context_window: Some(CONTEXT_WINDOW_272K),
|
||||
max_output_tokens: Some(MAX_OUTPUT_DEFAULT),
|
||||
truncation_policy: TruncationPolicy::Bytes(10_000),
|
||||
)
|
||||
} else if slug.starts_with("gpt-5.2") {
|
||||
model_family!(
|
||||
slug, "gpt-5.2",
|
||||
|
||||
@@ -92,7 +92,11 @@ pub fn supported_reasoning_efforts_for_model(model: &str) -> &'static [Reasoning
|
||||
return GPT5_1_EFFORTS;
|
||||
}
|
||||
|
||||
if lower.starts_with("gpt-5.2") || lower.starts_with("test-gpt-5.2") {
|
||||
if lower.starts_with("gpt-5.2")
|
||||
|| lower.starts_with("test-gpt-5.2")
|
||||
|| lower.starts_with("gpt-5.3")
|
||||
|| lower.starts_with("test-gpt-5.3")
|
||||
{
|
||||
return GPT5_2_EFFORTS;
|
||||
}
|
||||
|
||||
@@ -164,4 +168,10 @@ mod tests {
|
||||
let clamped = clamp_reasoning_effort_for_model("gpt-5.2", ReasoningEffort::XHigh);
|
||||
assert_eq!(clamped, ReasoningEffort::XHigh);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gpt5_3_supports_xhigh() {
|
||||
let clamped = clamp_reasoning_effort_for_model("gpt-5.3", ReasoningEffort::XHigh);
|
||||
assert_eq!(clamped, ReasoningEffort::XHigh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2574,7 +2574,7 @@ fn agents_toggle_claude_opus_persists_via_slash_command() {
|
||||
let overlay_initial = normalize_output(render_chat_widget_to_vt100(&mut harness, 100, 28));
|
||||
assert!(overlay_initial.contains("Agents"), "Agents overlay did not open");
|
||||
|
||||
harness.show_agent_editor("claude-opus-4.5");
|
||||
harness.show_agent_editor("claude-opus-4.6");
|
||||
|
||||
let editor_frame = normalize_output(render_chat_widget_to_vt100(&mut harness, 100, 28));
|
||||
let editor_lower = editor_frame.to_lowercase();
|
||||
@@ -2593,7 +2593,7 @@ fn agents_toggle_claude_opus_persists_via_slash_command() {
|
||||
|
||||
let overview_after_save = normalize_output(render_chat_widget_to_vt100(&mut harness, 100, 28));
|
||||
let overview_lower = overview_after_save.to_lowercase();
|
||||
assert!(overview_lower.contains("claude-opus-4.5"));
|
||||
assert!(overview_lower.contains("claude-opus-4.6"));
|
||||
assert!(overview_lower.contains("disabled"));
|
||||
|
||||
harness.send_key(make_key(KeyCode::Esc, KeyModifiers::NONE));
|
||||
@@ -2603,7 +2603,7 @@ fn agents_toggle_claude_opus_persists_via_slash_command() {
|
||||
harness.send_key(make_key(KeyCode::Down, KeyModifiers::NONE));
|
||||
let overlay_reopen = normalize_output(render_chat_widget_to_vt100(&mut harness, 100, 28));
|
||||
let reopen_lower = overlay_reopen.to_lowercase();
|
||||
assert!(reopen_lower.contains("claude-opus-4.5"));
|
||||
assert!(reopen_lower.contains("claude-opus-4.6"));
|
||||
assert!(reopen_lower.contains("disabled"));
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ instructions = "Preamble added to this agent’s prompt"
|
||||
Field recap: `name` (slug/alias), `command` (absolute paths ok), `args*` (RO/RW lists override base), `env`, `read_only`, `enabled`, optional `description` and `instructions`.
|
||||
|
||||
### Built-in defaults
|
||||
If no `[[agents]]` are configured, Code advertises built-ins (gated by env `CODE_ENABLE_CLOUD_AGENT_MODEL` for cloud variants): `code-gpt-5.2`, `code-gpt-5.2-codex`, `claude-opus-4.5`, `gemini-3-pro`, `code-gpt-5.1-codex-mini`, `claude-sonnet-4.5`, `gemini-3-flash`, `claude-haiku-4.5`, `qwen-3-coder`, `cloud-gpt-5.1-codex-max`. Built-ins strip any user `--model/-m` flags to avoid conflicts and inject their own.
|
||||
If no `[[agents]]` are configured, Code advertises built-ins (gated by env `CODE_ENABLE_CLOUD_AGENT_MODEL` for cloud variants): `code-gpt-5.2`, `code-gpt-5.2-codex`, `claude-opus-4.6`, `gemini-3-pro`, `code-gpt-5.1-codex-mini`, `claude-sonnet-4.5`, `gemini-3-flash`, `claude-haiku-4.5`, `qwen-3-coder`, `cloud-gpt-5.1-codex-max`. Built-ins strip any user `--model/-m` flags to avoid conflicts and inject their own.
|
||||
|
||||
Tip: `gemini` resolves to `gemini-3-flash` (fast/cheap). Use `gemini-3-pro` when you want the higher-capacity Gemini option.
|
||||
|
||||
@@ -28,7 +28,7 @@ Tip: `gemini` resolves to `gemini-3-flash` (fast/cheap). Use `gemini-3-pro` when
|
||||
[[subagents.commands]]
|
||||
name = "plan" # slash name (/plan, /solve, /code, or custom)
|
||||
read_only = true # default plan/solve=true, code=false
|
||||
agents = ["code-gpt-5.2-codex", "claude-opus-4.5"] # falls back to enabled agents or built-ins
|
||||
agents = ["code-gpt-5.2-codex", "claude-opus-4.6"] # falls back to enabled agents or built-ins
|
||||
orchestrator_instructions = "Guidance for Code before spawning agents"
|
||||
agent_instructions = "Preamble added to each spawned agent"
|
||||
```
|
||||
@@ -84,7 +84,7 @@ enabled = true
|
||||
[[subagents.commands]]
|
||||
name = "context"
|
||||
read_only = true
|
||||
agents = ["code-gpt-5.2-codex", "claude-opus-4.5"]
|
||||
agents = ["code-gpt-5.2-codex", "claude-opus-4.6"]
|
||||
orchestrator_instructions = "Have each agent summarize the most relevant files and tests."
|
||||
agent_instructions = "Return paths plus 1–2 sentence rationale; do not edit files."
|
||||
```
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ env_key = "MISTRAL_API_KEY"
|
||||
Or a proxy that converts OpenAI-compatible requests to another vendor (e.g., Anthropic or Gemini):
|
||||
|
||||
```toml
|
||||
model = "claude-opus-4.5"
|
||||
model = "claude-opus-4.6"
|
||||
model_provider = "claude-proxy"
|
||||
|
||||
[model_providers.claude-proxy]
|
||||
@@ -449,7 +449,7 @@ tool_timeout_sec = 30
|
||||
|
||||
Sub-agents are orchestrated helper workflows you can trigger with slash commands (for example `/plan`, `/solve`, `/code`). Each entry under `[[subagents.commands]]` defines the slash command name, whether spawned agents run in read-only mode, which `agents` to launch, and extra guidance for both the orchestrator (Code) and the individual agents.
|
||||
|
||||
By default (when no `[[agents]]` are configured) Code advertises these model slugs for multi-agent runs: `code-gpt-5.2`, `code-gpt-5.2-codex`, `claude-opus-4.5`, `gemini-3-pro`, `code-gpt-5.1-codex-mini`, `claude-sonnet-4.5`, `gemini-3-flash`, `claude-haiku-4.5`, and `qwen-3-coder`. The cloud counterpart, `cloud-gpt-5.1-codex-max`, only appears when `CODE_ENABLE_CLOUD_AGENT_MODEL=1` is set. (`gemini` resolves to `gemini-3-flash`.) You can override the list by defining `[[agents]]` entries or by specifying `agents = [ … ]` on a given `[[subagents.commands]]` entry.
|
||||
By default (when no `[[agents]]` are configured) Code advertises these model slugs for multi-agent runs: `code-gpt-5.2`, `code-gpt-5.2-codex`, `claude-opus-4.6`, `gemini-3-pro`, `code-gpt-5.1-codex-mini`, `claude-sonnet-4.5`, `gemini-3-flash`, `claude-haiku-4.5`, and `qwen-3-coder`. The cloud counterpart, `cloud-gpt-5.1-codex-max`, only appears when `CODE_ENABLE_CLOUD_AGENT_MODEL=1` is set. (`gemini` resolves to `gemini-3-flash`.) You can override the list by defining `[[agents]]` entries or by specifying `agents = [ … ]` on a given `[[subagents.commands]]` entry.
|
||||
|
||||
```toml
|
||||
[[subagents.commands]]
|
||||
|
||||
@@ -116,7 +116,7 @@ Implementation Notes
|
||||
`code-rs/core/src/slash_commands.rs`.
|
||||
When no `[[agents]]` are configured, the orchestrator advertises the
|
||||
following model slugs to the LLM for multi-agent runs: `code-gpt-5.2`,
|
||||
`code-gpt-5.2-codex`, `claude-opus-4.5`, `gemini-3-pro`,
|
||||
`code-gpt-5.2-codex`, `claude-opus-4.6`, `gemini-3-pro`,
|
||||
`code-gpt-5.1-codex-mini`, `claude-sonnet-4.5`, `gemini-3-flash`,
|
||||
`claude-haiku-4.5`, and `qwen-3-coder` (with
|
||||
`cloud-gpt-5.1-codex-max` gated by `CODE_ENABLE_CLOUD_AGENT_MODEL`). (`gemini`
|
||||
|
||||
Reference in New Issue
Block a user