Skip to content

feat: add client-side ModelInfo overrides#11404

Closed
sayan-oai wants to merge 7 commits intomainfrom
dev/sayan/client-modelinfo-overrides
Closed

feat: add client-side ModelInfo overrides#11404
sayan-oai wants to merge 7 commits intomainfrom
dev/sayan/client-modelinfo-overrides

Conversation

@sayan-oai
Copy link
Copy Markdown
Collaborator

@sayan-oai sayan-oai commented Feb 11, 2026

TLDR: add model_info_overrides so users can locally patch model metadata per slug from config.toml, including creating new model configs without backend changes.

Problem

Today Codex only supports a few global top-level model overrides.
There is no client-side way to patch arbitrary model metadata per slug.

Fix

  • Added model_info_overrides map in config (slug -> patch).
  • Overrides apply to both existing server models and custom/eval slugs.
  • Precedence is now:
    1. resolved model metadata (server /models or fallback)
    2. model_info_overrides[slug]
    3. existing top-level global overrides (model_context_window, model_supports_reasoning_summaries, etc.)
  • Updated docs with precedence + merge semantics + example config usage.

Tests

Added tests for:

  • patching an existing resolved model slug,
  • patching an unknown/fallback slug,
  • patching a requested slug when resolution uses a different base slug,
  • parity between runtime model resolution and offline helper behavior,
  • integration check that overrides affect outbound /responses request construction.
  • drift guard for ModelInfo changes without an explicit ModelInfoPatch change

@sayan-oai sayan-oai changed the title add client-side ModelInfo overrides feat: add client-side ModelInfo overrides Feb 11, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b0062cacb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/models_manager/manager.rs
Comment thread codex-rs/protocol/src/openai_models.rs
@sayan-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d1d354bd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/models_manager/model_info.rs
@sayan-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this


model.slug = model_key.to_string();

if let Some(display_name) = &model_info_patch.display_name {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the chain of if blocks is kinda gross, open to ideas here

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ebd0e51c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/protocol/src/openai_models.rs Outdated
@sayan-oai sayan-oai force-pushed the dev/sayan/client-modelinfo-overrides branch from d52d3b8 to 809248b Compare February 11, 2026 06:57
@sayan-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 809248bdd8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/models_manager/manager.rs
@sayan-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sayan-oai sayan-oai closed this Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant