fix(codex): scope provider models and suppress false capabilities - #8649
fix(codex): scope provider models and suppress false capabilities#8649only21mil wants to merge 2 commits into
Conversation
Signed-off-by: Victor Vogel <263261067+only21mil@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
| name: slug, | ||
| isCustom: true, | ||
| capabilities: fallbackCapabilities, | ||
| capabilities: null, |
There was a problem hiding this comment.
🟠 High Layers/CodexProvider.ts:265
A namespaced custom model that disappears from a later model/list continues exposing its previous nonempty capabilities after the snapshot update. This fallback sets capabilities: null at line 265, but mergeProviderModels preserves the prior capabilities whenever the incoming model has none, so stale unsupported controls remain visible; update the merge logic to clear capabilities for this fallback case.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/provider/Layers/CodexProvider.ts around line 265:
A namespaced custom model that disappears from a later `model/list` continues exposing its previous nonempty `capabilities` after the snapshot update. This fallback sets `capabilities: null` at line 265, but `mergeProviderModels` preserves the prior capabilities whenever the incoming model has none, so stale unsupported controls remain visible; update the merge logic to clear capabilities for this fallback case.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a focused Codex model-catalog and instance-isolation fix with localized runtime effects, backward-compatible handling for existing non-namespaced models, and targeted tests. An unresolved high-severity finding identifies possible stale capabilities for configured models missing from a later catalog refresh. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
|
Maintainer action requested: please approve the waiting fork workflows so protected CI can run on exact head |
|
Superseded by #8655 at the exact reviewed squash |
CI-only mirror of the canonical Buzz provider candidate
Buzz is the repository of record. This GitHub pull request exists only to run the upstream protected checks on the exact canonical candidate. Do not merge it on GitHub.
The original correction scopes provider-namespaced Codex model catalogs to the active T3 provider instance. The follow-up commit removes a false capability inference: when a configured custom model is absent from the live catalog, T3 now reports
capabilities: nullinstead of copying reasoning and service-tier controls from an unrelated model such as Sol. That prevents unsupported Sol controls from appearing onz-ai/glm-5.3-flash.Exact candidate:
018d7f2775daabd2ef07898af29586915a0b7f67b2d8208a2bd340bcb3de8df3509a9bcba2b8c935a9b86eaf555f99e6b9c32e551980751c9379cb26c27f09695aa8b17487973baf650dbbc33c1d5a95mainobserved at publication:053affbed2659f90cd1b1efaaa7a75865c4131c7Focused checks:
CodexProvider.test.ts: 9 tests passedCanonical Buzz records:
30617:4a34c131ec5cb5dd9a200bac619bbd103c0793e068fad278d1de59203d05b97d:t3code0fe7a67b68001356dfe2bc49a5a6bee12eef704c6f25e79acfc67c02cd6f1bba37293d0ac0d54ce13fadb87070e98f0d2653858fb7ea17e0b27851e00aa43767refs/heads/buzz/provider-scoped-custom-models-rebase-018d7f2Model/harness: GPT-5.6 Sol via Codex CLI.
Note
Medium Risk
Changes Codex model catalog exposure, cache merge, and session validation; misconfiguration could hide models users expect, but the behavior is intentional and covered by new tests.
Overview
Codex model lists and sessions are now tied to each instance’s declared custom models, so slugs like
z-ai/glm-5.3-flashfrom a shared Codex home catalog are not treated as runnable on that instance unless they appear in settings.scopeCodexModelsToInstancereplaces the old “append all custom slugs” behavior: provider-namespaced catalog entries (detected viaisProviderNamespacedModelSlug, i.e. a/in the slug) are dropped unless listed incustomModels; when allowed, they are exposed as custom models. Slugs declared in settings but missing from the live catalog are still added withcapabilities: null, so reasoning/service-tier UI is not copied from an unrelated first-party model.Runtime and snapshot hygiene block stale or undeclared namespaced models:
CodexAdapterrejectsstartSession/sendTurnwhen a namespaced model is not configured on the bound instance;ProviderRegistrymerge andproviderStatusCachehydration no longer retain or rehydrate undeclared namespaced Codex models from older snapshots.Reviewed by Cursor Bugbot for commit b2d8208. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Scope Codex provider models to instance and suppress inferred capabilities
scopeCodexModelsToInstancein CodexProvider.ts to filter the Codex model catalog per instance: provider-namespaced slugs (those containing/) are included only if declared incustomModels, markedisCustom, and givennullcapabilities when absent from the catalog.validateModelSelectionin CodexAdapter.ts sostartSessionandsendTurnreject provider-namespaced slugs that are not declared as custom models on the bound instance.mergeProviderModelsin ProviderRegistry.ts and providerStatusCache.ts to exclude provider-namespaced slugs for the Codex driver when retaining previous models on empty refresh or cache hydration.startSessionorsendTurnfail withProviderAdapterValidationError.📊 Macroscope summarized b2d8208. 5 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues