Repository navigation
fix(catalog): keep Codex's auto-review model so reviews stop falling back to the task model #6727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a71a0ca
fix(catalog): keep Codex's auto-review model so reviews stop falling …
lidge-jun d0dc6e2
fix(catalog): skip the reviewer row when the pin lacks it
lidge-jun 29626d4
fix(catalog): gate and version the hidden auto-review row
lidge-jun 0fe19a4
test(layout): compact two registrations to restore layout.json headroom
lidge-jun 0bf5eab
Merge remote-tracking branch 'origin/dev' into codex/6712-keep-auto-r…
lidge-jun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { CODEX_INTERNAL_OPENAI_MODELS, isCodexControlPlaneModel } from "../control-plane-models"; | ||
| import { COMBO_NAMESPACE } from "../../combos"; | ||
| import { CODEX_NATIVE_ALIAS_CATALOG_KIND } from "./kinds"; | ||
| import { NATIVE_RESERVE_MODEL, SUPPORTED_NATIVE_OPENAI_SLUGS } from "./native-models"; | ||
| import { isReserveCatalogProjection } from "./reserve"; | ||
| import { pinnedNativeModelRows } from "./pinned-models"; | ||
| import type { RawEntry } from "./parsing"; | ||
|
|
||
| /** Hidden ordinary natives qualify; Reserve, account choices and routed aliases do not. */ | ||
| export function hasOrdinaryNativeOpenAiRow(entries: readonly RawEntry[]): boolean { | ||
| return entries.some(entry => typeof entry.slug === "string" | ||
| && !entry.slug.includes("/") | ||
| && SUPPORTED_NATIVE_OPENAI_SLUGS.has(entry.slug) | ||
| && entry.slug !== NATIVE_RESERVE_MODEL | ||
| && !isReserveCatalogProjection(entry) | ||
| && entry.opencodex_catalog_kind !== CODEX_NATIVE_ALIAS_CATALOG_KIND | ||
| && entry.owned_by !== COMBO_NAMESPACE); | ||
| } | ||
|
|
||
| /** Keep internal reviewer metadata separate from native synthesis, picker ordering and account clones. */ | ||
| export function withCodexControlPlaneRows( | ||
| entries: RawEntry[], | ||
| sourceRows: readonly RawEntry[], | ||
| includeNativeOpenAi: boolean, | ||
| wsEnabled: boolean, | ||
| ): RawEntry[] { | ||
| const models = entries.filter(entry => !isCodexControlPlaneModel(entry.slug)); | ||
| if (!includeNativeOpenAi || !hasOrdinaryNativeOpenAiRow(models)) return models; | ||
| for (const slug of CODEX_INTERNAL_OPENAI_MODELS) { | ||
| const source = sourceRows.find(entry => entry.slug === slug) | ||
| ?? pinnedNativeModelRows().find(entry => entry.slug === slug); | ||
| // A pin without the row degrades to Codex's own task-model fallback rather than failing the | ||
| // whole catalog write. | ||
| if (!source) continue; | ||
| const row: RawEntry = structuredClone(source); | ||
| row.visibility = "hide"; | ||
| if (wsEnabled) row.supports_websockets = true; | ||
| else { | ||
| delete row.supports_websockets; | ||
| delete row.prefer_websockets; | ||
| } | ||
| models.push(row); | ||
| } | ||
| return models; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /** Exact Codex control-plane ids routed to canonical OpenAI, outside the public native roster. */ | ||
| export const CODEX_INTERNAL_OPENAI_MODELS: ReadonlySet<string> = new Set(["codex-auto-review"]); | ||
|
|
||
| export function isCodexControlPlaneModel(slug: unknown): boolean { | ||
| return typeof slug === "string" && CODEX_INTERNAL_OPENAI_MODELS.has(slug); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 25802
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 17259
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 2010
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 35870
Preserve
codex-auto-review’sv1pin in default multi-agent mode.codex-auto-reviewis not a reserve projection, soisReserveCatalogProjectiondoes not preserve it. The row reaches the default fallback inapplyMultiAgentMode, wheremultiAgentV2Enabledchanges its existingv1pin tov2.Extend the preservation callback for this control-plane row. Do not add it to
UPSTREAM_NATIVE_ENTRIES; that map authorizes persisted native-row replacement.🐛 Suggested fix
Add a default-mode assertion beside the explicit-mode tests.
🤖 Prompt for AI Agents