From ee45a48410ff234461873ad0094614bf2c7309e8 Mon Sep 17 00:00:00 2001 From: Chris Busillo Date: Mon, 1 Jun 2026 21:35:52 -0400 Subject: [PATCH] docs(agents): clarify GPT-5.4 context cost --- code-rs/core/src/agent_defaults.rs | 2 +- docs/agents.md | 2 ++ docs/config.md | 4 ++++ docs/example-config.md | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code-rs/core/src/agent_defaults.rs b/code-rs/core/src/agent_defaults.rs index f5e92b4be33..b482edd539e 100644 --- a/code-rs/core/src/agent_defaults.rs +++ b/code-rs/core/src/agent_defaults.rs @@ -123,7 +123,7 @@ const AGENT_MODEL_SPECS: &[AgentModelSpec] = &[ read_only_args: CODE_GPT5_READ_ONLY, write_args: CODE_GPT5_WRITE, model_args: &["--model", "gpt-5.4"], - description: "Highest-capacity GPT option for tricky reasoning; use when correctness matters most.", + description: "Highest-capacity GPT option for tricky reasoning and large-context work. In Every Code, GPT-5.4 defaults to the expensive 1m context path, so use when correctness or history preservation is worth the added cost.", enabled_by_default: true, aliases: &[ "gpt-5.4", diff --git a/docs/agents.md b/docs/agents.md index e1d1950462d..2a46bd78abc 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -21,6 +21,8 @@ Field recap: `name` (slug/alias), `command` (absolute paths ok), `args*` (RO/RW ### Built-in defaults If no `[[agents]]` are configured, Every Code advertises built-in agent/model selectors (gated by env `CODE_ENABLE_CLOUD_AGENT_MODEL` for cloud variants): `code-gpt-5.5`, `code-gpt-5.4`, `code-gpt-5.4-mini`, `claude-opus-4.8`, `antigravity`, `claude-sonnet-4.6`, `claude-haiku-4.5`, `qwen3-coder-plus`, `cloud-gpt-5.1-codex-max`. Built-ins strip any user `--model/-m` flags to avoid conflicts and inject their own when the target CLI supports model flags. +`code-gpt-5.4` is the GPT selector to reach for when correctness or very large context matters. In Every Code, GPT-5.4 defaults to the expensive 1m-token context path (`context_mode = "auto"`) so long histories and broad repository sweeps can survive. Suggest it only when preserving that context is worth the added cost; use `context_mode = "disabled"` to keep GPT-5.4 on its standard context window. + Tip: `antigravity` uses Google's Antigravity CLI (`agy`) as the Google/Gemini-family agent path. Gemini/Google intent can resolve to `antigravity`, but AGY uses its configured model rather than a per-run Gemini Pro/Flash flag. Consumer Gemini CLI is no longer a built-in default; configure it manually only when you intentionally rely on enterprise/API-key Gemini CLI access. ## Subagents (`[[subagents.commands]]`) diff --git a/docs/config.md b/docs/config.md index 678898da56a..b6b209f65fd 100644 --- a/docs/config.md +++ b/docs/config.md @@ -476,6 +476,8 @@ Sub-agents are orchestrated helper workflows you can trigger with slash commands By default (when no `[[agents]]` are configured) Code advertises these agent/model selectors for multi-agent runs: `code-gpt-5.5`, `code-gpt-5.4`, `code-gpt-5.4-mini`, `claude-opus-4.8`, `antigravity`, `claude-sonnet-4.6`, `claude-haiku-4.5`, and `qwen3-coder-plus`. The cloud counterpart, `cloud-gpt-5.1-codex-max`, only appears when `CODE_ENABLE_CLOUD_AGENT_MODEL=1` is set. You can override the list by defining `[[agents]]` entries or by specifying `agents = [ … ]` on a given `[[subagents.commands]]` entry. Consumer Gemini CLI is not a built-in default; add a custom `[[agents]]` block only when you intentionally rely on enterprise/API-key Gemini CLI access. Legacy Gemini-style agent selectors are treated as Google-family intent and resolve to `antigravity`, which still uses AGY's configured model. +`code-gpt-5.4` is the GPT selector for tasks where correctness or very large context matters. In Every Code, GPT-5.4 defaults to the more expensive 1m-token context path (`context_mode = "auto"`) so preserving a large history, sweeping a broad repository, or recovering from a context-window failure works without extra setup. Use it when that context is worth the added cost; set `context_mode = "disabled"` to keep GPT-5.4 on its standard context window. + ```toml [[subagents.commands]] name = "context" @@ -915,6 +917,8 @@ The size of the context window for the model, in tokens. In general, Code knows the context window for the most common OpenAI models, but if you are using a new model with an old version of the Code CLI, then you can use `model_context_window` to tell Code what value to use to determine how much context is left during a conversation. +For GPT-5.4, prefer `context_mode` over a manual `model_context_window` override. `context_mode = "auto"` is the default and expands GPT-5.4 to the 1m context path; `context_mode = "1m"` forces that same extended mode explicitly. Use `context_mode = "disabled"` for normal-cost GPT-5.4 sessions that should stay on the standard context window. + ## model_max_output_tokens This is analogous to `model_context_window`, but for the maximum number of output tokens for the model. diff --git a/docs/example-config.md b/docs/example-config.md index 1484a50c633..c7c335639fe 100644 --- a/docs/example-config.md +++ b/docs/example-config.md @@ -31,6 +31,7 @@ model_provider = "openai" # Uncomment to force values. # model_context_window = 128000 # tokens; default: auto for model # model_auto_compact_token_limit = 0 # disable/override auto; default: model family specific +# context_mode = "disabled" # GPT-5.4: avoid default 1m context cost # tool_output_token_limit = 10000 # tokens stored per tool output ################################################################################