Skip to content

[codex] Dedupe fallback model metadata warnings#21090

Merged
canvrno-oai merged 7 commits into
mainfrom
codex/dedupe-model-metadata-warning
May 6, 2026
Merged

[codex] Dedupe fallback model metadata warnings#21090
canvrno-oai merged 7 commits into
mainfrom
codex/dedupe-model-metadata-warning

Conversation

@canvrno-oai

Copy link
Copy Markdown
Contributor

Fixes #21070.

This is a small cleanup around model metadata handling for gateway/provider model names. It follows the report and proposed direction from @dkbush by keeping the fallback metadata warning useful without repeating it every turn, and by tightening the existing provider-prefix lookup path.

  • Track fallback metadata warning slugs in session state so each unresolved model warns once per session.
  • Keep warning emission outside the session-state lock and preserve the existing warning text.
  • Allow one-segment provider prefixes with hyphenated provider IDs, while preserving the multi-segment rejection behavior.
  • Add focused coverage for warning dedupe and hyphenated provider-prefix metadata matching.

Testing:

  • Ran just fmt.
  • Ran git diff --check.
  • Added tests for the new warning dedupe and provider-prefix lookup behavior.

@canvrno-oai canvrno-oai changed the title Dedupe fallback model metadata warnings [codex] Dedupe fallback model metadata warnings May 4, 2026
@canvrno-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@canvrno-oai canvrno-oai marked this pull request as ready for review May 5, 2026 00:18
@canvrno-oai canvrno-oai requested a review from a team as a code owner May 5, 2026 00:18
@canvrno-oai canvrno-oai marked this pull request as draft May 5, 2026 22:22
@canvrno-oai

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: d6a6e3f8f5

ℹ️ 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/tui/src/chatwidget.rs
Comment thread codex-rs/tui/src/chatwidget.rs
@canvrno-oai canvrno-oai requested a review from fcoury-oai May 5, 2026 23:33
@canvrno-oai canvrno-oai marked this pull request as ready for review May 5, 2026 23:33

@fcoury-oai fcoury-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Smoke tested the branch locally:

  • Started the TUI with an unknown model slug and sent two turns in the same session. Confirmed the fallback metadata warning appeared only once for that model slug.
  • Restarted with a hyphenated provider-prefixed known model (openai-codex/gpt-5.4). Confirmed no fallback metadata warning was shown.
  • Restarted with a multi-segment namespace (team/openai-codex/gpt-5.4). Confirmed the fallback metadata warning still appears, so the new matching stays limited to one provider-prefix segment.

One remark: this only dedupes repeated warnings on the TUI surface. Codex App may still show repeated warnings even thought I did not test that path. Calling it out in case you didn't think of it.

Code looks good, approved 👍

@canvrno-oai

Copy link
Copy Markdown
Contributor Author

@fcoury-oai fair point, and yes I did consider this limitation. In the interest of keeping the changes isolated to the TUI I accepted this, if we see any reports of this happening in the App we should consider core changes versus deduping in that client.

@canvrno-oai canvrno-oai merged commit d5f0b6d into main May 6, 2026
26 checks passed
@canvrno-oai canvrno-oai deleted the codex/dedupe-model-metadata-warning branch May 6, 2026 20:11
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeated “model metadata not found” warning with gateway model IDs (openai/gpt-5.3-codex) should be deduplicated per session

2 participants