add client-side ModelInfo overrides

This commit is contained in:
Sayan Sisodiya
2026-02-10 22:56:39 -08:00
parent 476c1a7160
commit a5d2b31065
8 changed files with 723 additions and 9 deletions
+26
View File
@@ -28,6 +28,32 @@ Codex can run a notification hook when the agent finishes a turn. See the config
The generated JSON Schema for `config.toml` lives at `codex-rs/core/config.schema.json`.
## `model_info_overrides` precedence
`model_info_overrides` lets you patch metadata for specific model slugs in `config.toml`.
The patch is merge-only: only fields you set are overridden, and omitted fields keep their
resolved value.
Precedence for model metadata is:
1. Resolved model metadata (remote `/models` when available, otherwise built-in fallback)
2. `model_info_overrides[<slug>]`
3. Existing top-level config overrides (for example `model_context_window`,
`model_auto_compact_token_limit`, `model_supports_reasoning_summaries`, and
`tool_output_token_limit`)
This means top-level overrides still win for their specific fields after per-model patching.
Example:
```toml
[model_info_overrides.gpt-fake]
display_name = "gpt-fake-dev"
context_window = 400000
supports_parallel_tool_calls = true
base_instructions = "Custom model instructions"
```
## Notices
Codex stores "do not show again" flags for some UI prompts under the `[notice]` table.