Skip to content

feat(codex): add account-qualified catalog entries - #949

Open
chrisae9 wants to merge 9 commits into
lidge-jun:devfrom
chrisae9:split/426-03-account-catalog
Open

feat(codex): add account-qualified catalog entries#949
chrisae9 wants to merge 9 commits into
lidge-jun:devfrom
chrisae9:split/426-03-account-catalog

Conversation

@chrisae9

@chrisae9 chrisae9 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Part of Expose Codex accounts as model namespaces in the picker #425 and layer 3 of the split requested in feat(codex): add account-qualified model namespaces #426. The namespace foundation and exact-account routing are already on dev; this layer adds the catalog, discovery, and subagent projection that make those selectors usable from model pickers.
  • Generate one native GPT row per eligible public account selector. Selector labels are arbitrary user-chosen identifiers with no built-in account-role meaning; selecting a qualified row pins the request to exactly its mapped account without changing Pool selection or falling back to another account.
  • Hide bare native rows in the Codex picker while qualified rows are active, while preserving bare routing and raw /v1/models availability. Missing stored-account targets are not advertised, and stored ids, aliases, and email addresses never enter public model metadata.
  • Reconcile only trusted generated rows, preserve the complete native metadata and reasoning contract, and keep account-row recovery independent from routed-provider discovery outages.
  • Honor exact-account cooldowns when account-qualified models appear as subagent fallback candidates, without borrowing Pool probe leases, including model-scoped quota groups.
  • Make disabledModels consistent: a bare native id hides that model for every selector, while an account-qualified id hides only the matching selector row.
  • Keep custom subagent prompts fail-closed for ambiguous bare native models: {{model}} is blank unless the request resolves a unique/current-route candidate, while explicit routed or account-qualified ids retain their existing raw fallback.
  • Update the English, Russian, Korean, Japanese, and Chinese reference, App-picker, model-ordering, and subagent guidance docs. This layer does not add account lifecycle mutations, settings endpoints, or new dashboard controls.

Verification

  • Current head a88b3c70: TypeScript typecheck, privacy scan, git diff --check, and the 216-page documentation build passed.
  • Current head a88b3c70: the combined catalog/discovery/restore, exact-account routing, subagent fallback, and upstream retry integration matrix passed with 371 passed, 2 platform-only skipped, 0 failed, and 5,418 assertions across 15 files.
  • The full 529-file run reached 8,163 passed and 10 skipped with one load-sensitive native-profile sideband-close assertion. That same test file then passed 20/20 repeated runs in isolation: 60 tests and 600 assertions.
  • Rebased onto dev at eb2ceb2f; git range-diff confirms all nine patches are unchanged, and all nine commits have valid GPG signatures.
  • Independent post-rebase integration review found no conflict with the new same-target 429 retry path: exact-account routes remain fixed, fail closed, and cannot rotate or fall back to another account.
  • Independent code-quality, security/privacy, test-partition, and localized-documentation reviews found no remaining blockers.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I fixed all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds account-qualified native Codex models. It filters selectors, generates and reconciles account-bound catalog rows, updates discovery and parsing, applies provider-aware visibility, and scopes multi-agent guidance by account namespace.

Changes

Account-bound native catalog

Layer / File(s) Summary
Catalog contracts and native visibility
src/codex/catalog.ts, src/codex/catalog/account-models.ts, src/codex/catalog/metadata.ts, tests/native-model-toggle.test.ts
Adds selector filtering, display-name formatting, trusted slug validation, account-qualified slug generation, and provider-aware native visibility.
Catalog synchronization and model discovery
src/codex/catalog/sync.ts, src/codex/catalog/aggregation.ts, src/server/index.ts, tests/claude-models-discovery.test.ts, tests/codex-catalog-sync-hardening.test.ts, tests/grok-models-effort-list.test.ts
Generates and reconciles account-bound rows, applies priorities and collision warnings, and exposes rows through Codex and OpenAI discovery.
Native slug parsing and restoration
src/codex/catalog/parsing.ts
Uses trusted account-bound slugs for native context overrides and multi-agent mode restoration.
Account-aware multi-agent guidance
src/server/responses/collaboration.ts, src/server/responses/core.ts, tests/multi-agent-compat.test.ts
Passes the account namespace into guidance and resolves namespaced rosters within the effective catalog window.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ModelDiscovery
  participant CatalogSync
  participant CatalogStore
  participant MultiAgentGuidance
  Client->>ModelDiscovery: Request model listings
  ModelDiscovery->>CatalogSync: Provide provider state and account selectors
  CatalogSync->>CatalogStore: Generate and reconcile account-bound rows
  CatalogStore-->>ModelDiscovery: Return visible catalog entries
  ModelDiscovery-->>Client: Return Codex and OpenAI model listings
  Client->>MultiAgentGuidance: Request guidance with account namespace
  MultiAgentGuidance-->>Client: Return namespace-filtered model guidance
Loading

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun, wibias

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding account-qualified catalog entries for Codex.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 3, 2026
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 2bf0a71 to f9bbc72 Compare August 3, 2026 18:54
@chrisae9
chrisae9 marked this pull request as ready for review August 3, 2026 18:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/codex/catalog/account-models.ts`:
- Around line 15-28: In src/codex/catalog/account-models.ts lines 15-28, ensure
visibleCodexAccountSelectors returns only non-empty keys without “/”; if
configuration validation already guarantees this, document that contract in the
account-models doc comment and make no filtering change. In
src/codex/catalog/account-models.ts lines 54-61, make no direct change because
filtering fixes the propagated values. In src/server/responses/collaboration.ts
lines 270-285, align both guards around codexAccountNamespace to use the same
empty-string predicate.

In `@src/codex/catalog/parsing.ts`:
- Around line 248-251: Add direct regression tests for
applyNativeOpenAiContextOverride covering trusted account-qualified slugs,
malformed account-qualified slugs, and unmarked slugs. Use selector/gpt-5.6-luna
to verify multi_agent_version restoration; do not use gpt-5.5 for that
assertion, and leave existing bare-native and routed-entry tests unchanged.

In `@src/codex/catalog/sync.ts`:
- Around line 542-553: Update the account-slug collision handling around
finalRoutedEntries and alignedAccountBoundEntries to issue a once-only warning
when a freshly gathered routed provider row is removed because its slug matches
a generated account slug, while preserving silent handling for stale disk rows.
Add the warning helper beside warnComboMasqueradeCollisionOnce in aggregation.ts
and invoke it with the colliding slug before filtering.

In `@src/server/index.ts`:
- Around line 621-628: Gate bare native catalog rows with
shouldIncludeNativeOpenAi(config) in the buildCatalogEntries flow, matching the
existing includeAccountRows policy and the on-disk catalog behavior; pass an
empty native-slug collection when native OpenAI is unavailable while preserving
current behavior when enabled. Add a regression assertion in the Claude model
discovery test that no bare gpt- model IDs are returned without a canonical
OpenAI provider.

In `@src/server/responses/collaboration.ts`:
- Around line 255-265: Cache the catalog used by multiAgentGuidanceText so
repeated resolveRoster calls reuse one request-scoped snapshot or valid
path/mtime-cached result instead of re-reading and reparsing it. Apply the cache
through readCatalog or the surrounding guidance flow while preserving the
separate roster projections for subagentEffective and preferredEffective.

In `@tests/claude-models-discovery.test.ts`:
- Around line 200-201: The privacy tests do not assert that stored account
aliases are excluded from serialized discovery output. In
tests/claude-models-discovery.test.ts lines 200-201, add alias-absence
assertions for both catalog and plain using the configured “Private Display
Name”; in tests/codex-catalog-sync-hardening.test.ts lines 294-295, add the
corresponding rows assertion. Keep the existing id and email checks unchanged.

In `@tests/codex-catalog-sync-hardening.test.ts`:
- Around line 252-264: Update the idempotency test around the captured firstRows
and subsequent rows to compare the complete sync snapshots directly, asserting
they are equal before the existing targeted context-window checks. Preserve the
current parity and duplicate assertions while ensuring any ordering, priority,
or display-name drift causes the test to fail.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3d492bc3-66d1-4449-b8c1-d940a970e47f

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1c803 and f9bbc72.

📒 Files selected for processing (12)
  • src/codex/catalog.ts
  • src/codex/catalog/account-models.ts
  • src/codex/catalog/metadata.ts
  • src/codex/catalog/parsing.ts
  • src/codex/catalog/sync.ts
  • src/server/index.ts
  • src/server/responses/collaboration.ts
  • src/server/responses/core.ts
  • tests/claude-models-discovery.test.ts
  • tests/codex-catalog-sync-hardening.test.ts
  • tests/multi-agent-compat.test.ts
  • tests/native-model-toggle.test.ts

Comment thread src/codex/catalog/account-models.ts
Comment thread src/codex/catalog/parsing.ts
Comment thread src/codex/catalog/sync.ts
Comment thread src/server/index.ts Outdated
Comment thread src/server/responses/collaboration.ts
Comment thread tests/claude-models-discovery.test.ts Outdated
Comment thread tests/codex-catalog-sync-hardening.test.ts

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

Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/server/responses/collaboration.ts Outdated
Comment on lines +280 to +288
const preferred = injectionModel?.includes("/")
? preferredCandidates[0]
: codexAccountNamespace
? preferredCandidates.find(candidate =>
candidate.model.startsWith(`${codexAccountNamespace}/`)
)
: preferredCandidates.length === 1 && !preferredCandidates[0]!.model.includes("/")
? preferredCandidates[0]
: undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pass the projected account model to custom prompts

When a request is routed through an account-qualified native model and injectionModel is configured as the bare native slug, this new projection can resolve a usable preferred such as team/gpt-5.6-sol, but the custom injectionPrompt branch still substitutes the original bare injectionModel via {{model}}. In catalogs with account selectors the bare native rows are hidden, so a custom prompt like Use {{model}} tells the model to spawn an override Codex will reject; pass the projected preferred.model (when present) into the placeholder instead of the raw bare id.

Useful? React with 👍 / 👎.

Comment thread src/server/responses/collaboration.ts Outdated
Comment on lines +282 to +285
: codexAccountNamespace
? preferredCandidates.find(candidate =>
candidate.model.startsWith(`${codexAccountNamespace}/`)
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve bare preferred models on account routes

When the parent request is account-qualified but injectionModel names a bare non-account catalog entry (for example a combo alias or user-native row like local-fast), this branch now only accepts preferred candidates under the current account namespace. That makes the configured bare injection model disappear from guidance, and with no subagentModels the guidance becomes entirely silent, even though the candidate is in Codex's spawn window; apply the namespace projection only for bare native OpenAI slugs and keep exact bare matches otherwise.

Useful? React with 👍 / 👎.

Comment thread src/codex/catalog/sync.ts Outdated
const accountBoundEntries = includeNativeOpenAi && accountSelectors.length > 0
? buildCatalogEntries(
template ? JSON.parse(JSON.stringify(template)) : null,
nativeOpenAiSlugs(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Seed account rows from hidden native slugs too

Building generated account rows from nativeOpenAiSlugs() misses supported native slugs that are currently hidden in the on-disk catalog. If a user disabled gpt-5.5 before adding account selectors, then later re-enables it, this call still won't create team/gpt-5.5, while the merge hides the bare row because account rows exist for other natives; the model remains absent from the picker. Use the merged native set (including hidden supported rows) or the static supported list as the source for account-bound clones.

Useful? React with 👍 / 👎.

Comment thread src/codex/catalog/sync.ts Outdated
const hasPhysicalComboProvider = Object.hasOwn(config.providers, COMBO_NAMESPACE);
const goEntries = buildCatalogEntries(template ? JSON.parse(JSON.stringify(template)) : null, [], orderedGoModels, featured, websocketsEnabled(config), multiAgentMode, exactComboSlugs);
const includeNativeOpenAi = shouldIncludeNativeOpenAi(config);
const accountSelectors = includeNativeOpenAi ? visibleCodexAccountSelectors(config) : [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Skip account rows when OpenAI is disabled

With account selectors configured, this enables account-bound rows even when every provider is disabled, such as providers.openai.disabled = true with no other enabled providers, because shouldIncludeNativeOpenAi returns true for the bootstrap case. routeModel still rejects account-qualified models unless the canonical openai provider exists and is enabled, so sync/live discovery can advertise team/gpt-5.5 rows that cannot be served; gate account selectors on an enabled canonical OpenAI provider instead of the bare-native bootstrap predicate.

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from f9bbc72 to 2b84389 Compare August 3, 2026 19:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/codex/catalog/account-models.ts (1)

8-29: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Confirm that config validation really rejects empty or slash-containing selector keys.

The doc comment now asserts an upstream contract: "Selector keys have already passed config's nonempty, single-segment namespace validation." This function relies on that contract instead of filtering. The consequence of a broken contract is asymmetric:

  • src/codex/catalog/sync.ts Line 668 keeps only entries that satisfy trustedAccountBoundNativeCatalogSlug, so a key containing / produces a/b/gpt-5.5 and is dropped from the on-disk catalog.
  • accountBoundNativeModelSlugs at Line 55-62 has no such filter, so src/server/index.ts Line 669-671 still advertises the same malformed id in /v1/models, and id.slice(id.indexOf("/") + 1) then yields b/gpt-5.5, which loses the reasoning ladder.

Verify the validation exists on every write path that can set codexAccountNamespaces (management API, config load/migration, hand-edited config.json). If any path can persist an unvalidated key, filter here instead of documenting the assumption.

#!/bin/bash
# Find every read/write of codexAccountNamespaces and any key validation for it.
rg -nP --type=ts -C4 'codexAccountNamespaces' src | head -200
# Look for namespace/selector key validators (single-segment, nonempty).
rg -nP --type=ts -C4 '(namespace|selector)[A-Za-z]*\s*(=|:)?.*(includes\("/"\)|/\^\[|test\()' src/config.ts src/codex | head -120
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/codex/catalog/account-models.ts` around lines 8 - 29, Verify that every
write path for codexAccountNamespaces, including management APIs, config loading
or migration, and hand-edited config handling, rejects empty or slash-containing
selector keys. If any path can persist invalid keys, update
visibleCodexAccountSelectors to filter selectors to nonempty single-segment
values so malformed entries cannot reach accountBoundNativeModelSlugs or
/v1/models. Preserve valid main-account and stored-pool-account filtering
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/server/responses/collaboration.ts`:
- Around line 260-302: Update the preferred selection logic in the
response-building flow so the activeAccountNamespace branch first prefers a
matching namespaced candidate, then falls back to the sole bare candidate when
preferredCandidates contains exactly one bare model. Preserve existing behavior
for account-qualified injection models and add a focused regression test in the
multi-agent compatibility tests covering a real namespace with one unrelated
bare injectionModel and asserting the Preferred sub-agent text appears.

In `@tests/multi-agent-compat.test.ts`:
- Around line 205-286: The existing tests lack coverage for selecting a truly
bare preferred candidate when an active codexAccountNamespace is set. Add a
focused test near the current multiAgentGuidanceText cases with one bare
non-account catalog entry and one account-bound family, set
codexAccountNamespace and injectionModel to the bare entry, and assert the
result contains the “Preferred sub-agent” text.

---

Duplicate comments:
In `@src/codex/catalog/account-models.ts`:
- Around line 8-29: Verify that every write path for codexAccountNamespaces,
including management APIs, config loading or migration, and hand-edited config
handling, rejects empty or slash-containing selector keys. If any path can
persist invalid keys, update visibleCodexAccountSelectors to filter selectors to
nonempty single-segment values so malformed entries cannot reach
accountBoundNativeModelSlugs or /v1/models. Preserve valid main-account and
stored-pool-account filtering behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f7bb71a5-6b2a-45dd-909a-26273884bd00

📥 Commits

Reviewing files that changed from the base of the PR and between f9bbc72 and 2b84389.

📒 Files selected for processing (14)
  • src/codex/catalog.ts
  • src/codex/catalog/account-models.ts
  • src/codex/catalog/aggregation.ts
  • src/codex/catalog/metadata.ts
  • src/codex/catalog/parsing.ts
  • src/codex/catalog/sync.ts
  • src/server/index.ts
  • src/server/responses/collaboration.ts
  • src/server/responses/core.ts
  • tests/claude-models-discovery.test.ts
  • tests/codex-catalog-sync-hardening.test.ts
  • tests/grok-models-effort-list.test.ts
  • tests/multi-agent-compat.test.ts
  • tests/native-model-toggle.test.ts

Comment thread src/server/responses/collaboration.ts Outdated
Comment thread tests/multi-agent-compat.test.ts
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 2b84389 to 0f24517 Compare August 3, 2026 19:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/codex/catalog/metadata.ts`:
- Around line 211-217: Expand the comment above the accountBound branch in
nativeOpenAiSlugs to document that it intentionally bypasses the visibility
filter: applyNativeVisibility may hide bare native rows when qualified
account-bound rows are active, so retaining trusted account-bound slugs prevents
the next sync from shrinking the native slug set. Keep the existing
documented-additions explanation as well.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e5bab1a1-5a9a-4af3-a4d2-63da0c1c9501

📥 Commits

Reviewing files that changed from the base of the PR and between 2b84389 and 0f24517.

📒 Files selected for processing (14)
  • src/codex/catalog.ts
  • src/codex/catalog/account-models.ts
  • src/codex/catalog/aggregation.ts
  • src/codex/catalog/metadata.ts
  • src/codex/catalog/parsing.ts
  • src/codex/catalog/sync.ts
  • src/server/index.ts
  • src/server/responses/collaboration.ts
  • src/server/responses/core.ts
  • tests/claude-models-discovery.test.ts
  • tests/codex-catalog-sync-hardening.test.ts
  • tests/grok-models-effort-list.test.ts
  • tests/multi-agent-compat.test.ts
  • tests/native-model-toggle.test.ts

Comment thread src/codex/catalog/metadata.ts
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch 2 times, most recently from 2308180 to 18aedec Compare August 3, 2026 20:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/codex/catalog/sync.ts`:
- Around line 661-672: Validate account selectors in
visibleCodexAccountSelectors so empty keys and keys containing “/” are rejected
consistently before catalog generation. Update src/codex/catalog/sync.ts lines
661-672 to rely on that validated list (or emit a single warning before
filtering), and update src/server/index.ts lines 670-676 to derive the metadata
id from the same validated selectors rather than splitting the id at the first
slash.

In `@tests/codex-catalog-sync-hardening.test.ts`:
- Around line 409-445: Update the test around syncCatalogModels to configure
gpt-5.5 as disabled via the supported disabledModels input, then assert the
generated team/gpt-5.5 row is hidden while retaining the existing
account-selector metadata assertion. Keep the bare gpt-5.5 assertion only if it
still represents the intended persisted visibility behavior, and ensure the test
explicitly exercises applyNativeVisibility’s disabled-native handling rather
than relying on the on-disk hide flag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 616c1b69-9956-478f-a622-cd84b735a40e

📥 Commits

Reviewing files that changed from the base of the PR and between 2308180 and 18aedec.

📒 Files selected for processing (14)
  • src/codex/catalog.ts
  • src/codex/catalog/account-models.ts
  • src/codex/catalog/aggregation.ts
  • src/codex/catalog/metadata.ts
  • src/codex/catalog/parsing.ts
  • src/codex/catalog/sync.ts
  • src/server/index.ts
  • src/server/responses/collaboration.ts
  • src/server/responses/core.ts
  • tests/claude-models-discovery.test.ts
  • tests/codex-catalog-sync-hardening.test.ts
  • tests/grok-models-effort-list.test.ts
  • tests/multi-agent-compat.test.ts
  • tests/native-model-toggle.test.ts

Comment thread src/codex/catalog/sync.ts
Comment thread tests/codex-catalog-sync-hardening.test.ts
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 18aedec to 1d737c2 Compare August 3, 2026 20:51
@Wibias
Wibias marked this pull request as draft August 3, 2026 20:51
@chrisae9
chrisae9 marked this pull request as ready for review August 3, 2026 21:34

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

Copy link
Copy Markdown

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: 1d737c22b4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/server/index.ts
const { accountBoundNativeModelSlugs, applyNativeVisibility, buildCatalogEntries, disabledNativeSlugs, exactComboCatalogSlugs, loadCatalogTemplate, nativeOpenAiSlugs, nativeReasoningEfforts, nativeDefaultReasoningEffort, orderForSubagents, filterCatalogVisibleModels, shouldIncludeAccountBoundNativeOpenAi, shouldIncludeNativeOpenAi, uniqueCatalogModelsForRawPublicList, visibleCodexAccountSelectors, visibleNativeSlugs, desktopVisibleNativeSlugs } = await import("../codex/catalog");
const includeNativeOpenAi = shouldIncludeNativeOpenAi(config);
const includeAccountBoundNativeOpenAi = shouldIncludeAccountBoundNativeOpenAi(config);
const nativeSlugs = includeNativeOpenAi ? nativeOpenAiSlugs() : [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Seed live account rows from hidden natives

Fresh evidence beyond the earlier sync finding is that the live client_version discovery path still seeds account-qualified clones from nativeOpenAiSlugs(), which ignores supported bare rows whose on-disk visibility is hide whenever any other native is visible. In a custom/previously-synced catalog where gpt-5.5 was disabled before account selectors were enabled and is later re-enabled without running sync first, this endpoint never passes gpt-5.5 into buildCatalogEntries, so team/gpt-5.5 remains absent from the Codex picker even though exact routing can serve it; use the hidden-inclusive/static supported native set for account-clone generation here as well.

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 1d737c2 to c6c9e7e Compare August 3, 2026 22:06
@Wibias

Wibias commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Please put your Pull-Request on Ready for Review, once you are finished.

@Wibias
Wibias marked this pull request as draft August 3, 2026 22:36
@chrisae9
chrisae9 marked this pull request as ready for review August 3, 2026 22:38

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

Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/codex/catalog/sync.ts
Comment on lines +661 to +665
const accountBoundEntries = includeAccountBoundNativeOpenAi && accountSelectors.length > 0
? buildCatalogEntries(
template ? JSON.parse(JSON.stringify(template)) : null,
NATIVE_OPENAI_MODELS,
[],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept account selectors in fallback routing

When these account-qualified rows are written into the Codex catalog, a spawned sub-agent can legitimately request a model like team/gpt-5.5. In installs with subagentModelFallback or role fallback enabled, isRoutableFallbackModel in src/codex/subagent-model-fallback.ts rejects any slash prefix that is not a configured/known provider before routeModel gets a chance to resolve codexAccountNamespaces, so the requested account model is treated as stale and skipped or rewritten even though exact routing supports it. Please teach the fallback routability gate about account selectors before advertising these rows.

Useful? React with 👍 / 👎.

Comment thread src/server/index.ts Outdated
Comment on lines +678 to +680
...(includeAccountBoundNativeOpenAi
? accountBoundNativeModelSlugs(config, visibleNatives)
: []).map(id =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Seed raw account models from supported natives

The Codex-catalog branch above now uses the hidden-inclusive supported set, but the raw OpenAI /v1/models branch still builds account rows from visibleNatives, which comes from visibility-filtered bare rows. With a custom/cache-backed catalog where gpt-5.5 was hidden before account selectors were added or re-enabled, this list omits both gpt-5.5 and team/gpt-5.5 until a sync creates an account row, even though exact routing can serve team/gpt-5.5; use the same supported/hidden-inclusive native source for the account-qualified raw list.

Useful? React with 👍 / 👎.

Comment thread src/codex/catalog/sync.ts
Comment on lines +588 to +590
return applyMultiAgentMode(
applyNativeVisibility(mergedEntries, disabledNative, alignedAccountBoundEntries.length > 0),
multiAgentMode,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore bare native visibility when account rows are removed

When account selectors are active this persists every bare native row with visibility: "hide", but restoreCodexCatalog() has fallback paths that simply remove slash rows and keep the remaining native objects as-is when the pristine backup is missing or lacks a later-added native. In that scenario, running restore removes the account-qualified rows but leaves the bare GPT rows hidden, so the picker stays empty for those models; restore needs to unhide supported natives (respecting disabled natives) or avoid relying on persisted hide flags as the only copy.

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 marked this pull request as draft August 3, 2026 22:56
@Wibias

Wibias commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

[GD] Verdict: changes-requested

TLDR

  • PR: feat(codex): add account-qualified catalog entries #949 — feat(codex): add account-qualified catalog entries
  • Head: c6c9e7e76 on dev (mergeStateStatus: UNSTABLE)
  • Decision: useful and close to ready, but one confirmed correctness regression must be fixed in-PR: with account selectors configured, bare native models (gpt-5.5, gpt-5.4, gpt-5.4-mini) and their qualified clones disappear from the plain /v1/models availability list, contradicting the PR's own "without removing bare routing or raw availability" contract and failing required CI on Linux and macOS.
  • Usefulness: high — layer 3 of the feat(codex): add account-qualified model namespaces #426 split; delivers catalog/discovery for account-qualified picker rows with strong hardening.
  • Bugs: 1 blocking — plain-list native availability regression (src/server/index.ts + src/codex/catalog/metadata.ts); reproduced locally and on two CI platforms.
  • Security: none confirmed; privacy-safe selectors verified; coverage matrix done.
  • Spec / standards: spec feat(codex): add account-qualified model namespaces #426/Expose Codex accounts as model namespaces in the picker #425; raw-availability requirement violated by the bug; layer scope matches.
  • Reviews: CodeRabbit threads addressed (per bot); Codex bot thread at src/server/index.ts:577 partially addressed — fix the remaining surface and reply; existing comment by @Wibias asks for ready-for-review.
  • Base / CI: base current (dev@a088e4b1 = PR base); required CI red on test 4/4, macos, and the ci aggregator — all one PR-only test failure (fix_in_pr).
  • Owner actions (foreign PR): fix the plain-list availability path (hidden-inclusive set), make CI green, reply to the open bot thread, apply simplification candidates S1/S2 below. Nothing was edited or pushed by this review.
  • Bottom line: ship after the availability fix and green CI.
Full verdict

Semantic propagation

  • Concepts audited: native-model availability list; account-qualified catalog rows; provider-inclusion gating; subagent roster projection; picker priority ordering.
  • Authoritative sources: src/codex/catalog/metadata.ts (NATIVE_OPENAI_MODELS, SUPPORTED_NATIVE_OPENAI_SLUGS, applyNativeVisibility, listCatalogNativeSlugs/nativeOpenAiSlugs); selector-key/target contract in src/config.ts (isValidProviderName keys, valid targets).
  • Producers and consumers checked: buildCatalogEntries/mergeCatalogEntriesForSync/syncCatalogModels; src/server/index.ts catalog + plain discovery; src/server/responses/collaboration.ts (multiAgentGuidanceText, effectiveSubagentRoster); plus sibling consumers of visibleNativeSlugs/desktopVisibleNativeSlugs/nativeOpenAiSlugs/listCatalogNativeSlugs — Claude Desktop export (cli/claude-desktop.ts), grok/sync.ts, server/system-env.ts, server/management/*, cli/index.ts, cli/opencode.ts, provider-fetch.ts jawcode augmentation.
  • Public/derived representations checked: /v1/models plain list, Codex catalog (client_version), Claude Desktop discovery, management model lists, CLI exports.
  • Material variant partitions checked: bare vs account-qualified rows; disabled vs enabled natives; selectors active vs inactive; canonical OpenAI present/absent; multiple selectors; missing-account mappings.
  • Positive and negative assertions checked: sync reconcile idempotency, hidden-native reseeding, privacy absence, five-model window, disabled mirroring, missing-account exclusion (all green in isolation).
  • Unmapped surfaces: none — see representation mismatch below.
  • Unproven equivalence assumptions: none.
  • Representation mismatches: plain /v1/models drops hidden bare natives and their qualified clones when selectors are active (only DOCUMENTED_NATIVE_OPENAI_ADDITIONS survive); sibling consumers of visibleNativeSlugs/desktopVisibleNativeSlugs inherit the same drop and have no selectors-active coverage.
  • Variant coverage gaps: the selectors-active state is not covered for Claude Desktop discovery, management model lists, Grok sync, or context-window surfaces.
  • Axis verdict: blocked (one confirmed mismatch + sibling-surface coverage gap).

Usefulness

Delivers the layer-3 catalog/discovery behavior for #426/#425: per-selector native rows, stale-row reconciliation independent of routed-provider discovery outages, hidden-native reseeding, privacy-safe selectors, preservation of Codex's five-model spawn window, and account-aware subagent projection. Meaningful, well-tested work.

Bugs / correctness

  • Method: bug-review.md — Bugbot: n/a (Codex host); complementary: done (silent_failures/resource_leaks/edge_cases + api_compatibility, boundary_conditions, filesystem_atomicity, parsing_serialization, state_consistency, retry_idempotency, error_propagation).
  • Confirmed High — bare native availability regression. With codexAccountNamespaces active, sync writes bare natives as visibility: "hide"; listCatalogNativeSlugs() then drops hidden bare natives from the reported slug set (only DOCUMENTED_NATIVE_OPENAI_ADDITIONS are re-added), so visibleNativeSlugs() and the plain /v1/models list omit gpt-5.5, gpt-5.4, gpt-5.4-mini and their qualified clones. Violates the PR's stated contract and fails the new test configured account selectors appear in OpenAI and Codex discovery without private ids on Linux and macOS CI. Reproduced locally: the plain response lacks gpt-5.5 while the test asserts it. Fix direction: use the hidden-inclusive supported set for the plain-list bare rows and the account-bound projection (the catalog path already does this via NATIVE_OPENAI_MODELS); the root fix belongs in listCatalogNativeSlugs/visibleNativeSlugs so sibling consumers stop dropping hidden natives too.
  • Needs verification: none beyond the above.
  • Test hygiene: server.stop(true) is not awaited in the failing test's finally, which produces the Windows EBUSY teardown flake (two sibling tests flaked locally with the same EBUSY cleanup).
  • Local evidence: bun run typecheck green; focused suites 83 pass / 4 fail (1 real assertion + 2 Windows EBUSY teardown + 1 load timeout that passes in isolation); full bun run test aborted by a Bun runtime panic on Windows in an unrelated storage-policy file; privacy:scan green; build:gui green; lint:gui not runnable in a fresh checkout (gui eslint binary absent; CI gates correctly skip GUI lint for this no-GUI-change PR).

Security

  • Scope reviewed: full (12 required surfaces), ai-agent-security loaded per scope; deps audit n/a (no manifest changes); secrets scan n/a (no credentials in the diff; privacy tests assert no account id/email/alias in serialized discovery output).
  • Findings: none confirmed. Residual: selector-key shape relies on the config validation contract (verified present in src/config.ts for both load and management write paths) — keep enforcing it on any future selector write path.
  • Fixed this session: none (foreign PR).

Spec / standards

  • Spec source: feat(codex): add account-qualified model namespaces #426 (closes Expose Codex accounts as model namespaces in the picker #425), layer 3 of the split per the PR body.
  • Gaps: the raw-availability requirement ("Plain GPT IDs are not removed from routing") is violated for the plain availability list by the confirmed bug. Layer scope (no GUI/settings/docs in this PR) matches the split. The PR body validation claim (7,922 passed, 0 failed) refers to an older head — the current head's CI is red; please refresh the validation note on the final head.
  • Standards: src/AGENTS.md respected (public exports preserved, subsystem boundaries, focused regression tests, privacy scan). Advisory smells: none requiring action beyond the Simplification candidates.

Reviews

  • CodeRabbit: threads marked ✅ addressed and resolved/outdated; latest run covered an older head.
  • Codex bot (chatgpt-codex-connector): 1 open thread at src/server/index.ts:577 ("Seed live account rows from hidden natives") — the catalog-path part appears fixed in c6c9e7e (catalogNativeSlugs uses NATIVE_OPENAI_MODELS when selectors are active), but the plain-discovery surface of the same root cause is still broken; fix it, then reply on the thread.
  • Human: @Wibias asked to mark the PR ready for review — the PR is not draft; please confirm the branch is ready.

Base / CI

  • Behind/conflicts: base is current (dev@a088e4b1 = PR baseRefOid); mergeable: MERGEABLE; no base sync needed.
  • Required checks: red on test 4/4 (linux), macos, and the ci aggregator — all caused by the single PR-only test failure (baseHealth: prOnlyFailure, scopeRecommendation: fix_in_pr). Not a flake: reproduced locally on Windows and on both CI platforms.
  • Local tip compile/tests: typecheck green; focused suites mostly green; full local suite blocked by a Bun runtime panic on Windows (unrelated file).

Simplification (for the PR owner)

Nothing was edited or pushed (foreign PR). Bounded candidates:

  • S1 (low risk)src/codex/catalog/sync.ts, effectiveSubagentRoster: compute matchingEntries once and derive all excluded branches from it instead of the ordered.some(...) + entries.filter(...) double scan. Provably equivalent because configuredSubagentModelMatchesEntry already rejects slug-less entries. Validation: existing + new multi-agent projection tests.
  • S2 (medium risk; recommended to fold into the bug fix)src/server/index.ts plain-list branch: stop deriving the metadata id via id.slice(id.indexOf("/") + 1); build (id, metadataId) pairs from the validated selector × native set so availability rows and their reasoning metadata stay aligned. Validation: the discovery tests above.
  • S3 (skip) — priority arithmetic and the collision-warning helpers are already tested and documented; restructuring them would not reduce maintenance risk.

Gate

None (not draft, no WIP markers, mergeable) — but merge-ready is blocked by the confirmed bug, the red required CI, and the open bot thread.

Bottom line

Useful layer-3 catalog/discovery work with strong hardening and good coverage. One confirmed correctness regression (plain availability loses hidden bare natives and their qualified clones when selectors are active) must be fixed in-PR, required CI must go green, and the open Codex bot thread should be answered. Since this is a foreign PR, the owner applies the fix and the optional simplification candidates; this review changed nothing.

@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from c6c9e7e to c2132f0 Compare August 4, 2026 00:01
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 00:02
@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 00:04

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

Copy link
Copy Markdown

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: 42f2782c33

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/server/responses/collaboration.ts Outdated
if (!injectionModel && roster === "" && fallbackGuidance === "") return null;
if (injectionPrompt) {
return `<multi_agent_mode>${applyInjectionPlaceholders(injectionPrompt, injectionModel, injectionEffort, roster, fallbackGuidance)}</multi_agent_mode>`;
return `<multi_agent_mode>${applyInjectionPlaceholders(injectionPrompt, preferred?.model ?? injectionModel, injectionEffort, roster, fallbackGuidance)}</multi_agent_mode>`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update custom prompt docs for projected model

When an account-qualified request projects a bare injectionModel, {{model}} now expands to the effective selector-qualified model (for example team/gpt-5.6-sol) instead of the configured value, but the public sub-agent docs and the OcxConfig comment still describe it as the configured injectionModel. Users with custom injectionPrompt templates will see different prompt text without documentation of why; update the affected docs/type comment to describe the effective/projected model behavior.

Useful? React with 👍 / 👎.

Comment thread src/server/index.ts
const catalogNativeSlugs = accountSelectors.length > 0
? NATIVE_OPENAI_MODELS
: nativeSlugs;
const entries = buildCatalogEntries(loadCatalogTemplate(), catalogNativeSlugs, goOrdered, config.subagentModels, websocketsEnabled(config), maMode as "v1" | "default" | "v2", exactComboCatalogSlugs(config), accountSelectors);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply sub-agent fallback to exact account primaries

Once this advertises selector-qualified models, Codex can spawn a child whose requested primary is team/gpt-5.5; however the response path only calls applySubagentModelFallback when the initial route has no codexAccountId, so an exhausted or paused team account fails auth before the configured role/global fallback chain is considered. If exact account rows are spawnable, thread-spawn fallback needs to run for those primaries too (still treating the fixed account candidate as unavailable when cooled).

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 42f2782 to ee2c541 Compare August 4, 2026 03:11
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 03:29

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

Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/server/index.ts
const catalogNativeSlugs = accountSelectors.length > 0
? NATIVE_OPENAI_MODELS
: nativeSlugs;
const entries = buildCatalogEntries(loadCatalogTemplate(), catalogNativeSlugs, goOrdered, config.subagentModels, websocketsEnabled(config), maMode as "v1" | "default" | "v2", exactComboCatalogSlugs(config), accountSelectors);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the App picker guide for selector rows

Fresh evidence after the prior docs fix is that this path now makes Codex clients receive selector-qualified picker rows and hidden bare native rows, but docs-site/src/content/docs/guides/codex-app-models.md still describes the Codex-login picker ids as bare gpt-5.6-* rows only and says account selection does not change picker ids. Users using the App picker guide will miss that codexAccountNamespaces changes the displayed ids to <selector>/<native-openai-model>; please update that page and its translations alongside the configuration reference.

AGENTS.md reference: AGENTS.md:L224-L225

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 03:42
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from cc45282 to a0d0957 Compare August 4, 2026 04:08
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 04:10
@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 04:18
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from a0d0957 to bf7b132 Compare August 4, 2026 04:21
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 04:23
@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 04:37
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from bf7b132 to 72ed0ed Compare August 4, 2026 04:39

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

Copy link
Copy Markdown

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +143 to +145
`spawn_agent` model overrides. Pick up to five bare native ids, account-qualified
`<selector>/<native-openai-model>` ids, or routed `provider/model` ids through `subagentModels` or
the dashboard Subagents page. opencodex assigns low catalog priorities in the selected order; when

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop promising exact-account picks in the dashboard

With account selectors configured, this says the dashboard Subagents page can pick exact <selector>/<native-openai-model> ids, but the GET backing that page (src/server/management/agent-settings-routes.ts 497-511) builds available only from bare listCatalogNativeSlugs() plus routed provider slugs, and the GUI filters chosen values against that list before rendering/saving. As a result exact selector rows never appear in the dashboard and existing exact selections are dropped from the UI; either add account-bound slugs to that management API or limit this statement to hand-edited subagentModels.

AGENTS.md reference: docs-site/AGENTS.md:L7-L10

Useful? React with 👍 / 👎.

Comment on lines +143 to +145
`spawn_agent` model overrides. Pick up to five bare native ids, account-qualified
`<selector>/<native-openai-model>` ids, or routed `provider/model` ids through `subagentModels` or
the dashboard Subagents page. opencodex assigns low catalog priorities in the selected order; when

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop promising exact-account picks in the dashboard

With account selectors configured, this says the dashboard Subagents page can pick exact <selector>/<native-openai-model> ids, but the GET backing that page (src/server/management/agent-settings-routes.ts 497-511) builds available only from bare listCatalogNativeSlugs() plus routed provider slugs, and the GUI filters chosen values against that list before rendering/saving. As a result exact selector rows never appear in the dashboard and existing exact selections are dropped from the UI; either add account-bound slugs to that management API or limit this statement to hand-edited subagentModels.

Useful? React with 👍 / 👎.

Comment on lines +94 to +95
- Account-qualified native ids use `<selector>/<native-openai-model>`. Disabling one hides only that
selector row.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop claiming Models can toggle selector rows

This says the dashboard Models page can disable an account-qualified native id, but the page is fed by /api/models, whose row builder only returns bare nativeModelRows(config) plus routed models, and /api/model-visibility validates native targets against that same bare native set. A <selector>/gpt-... row therefore never appears in the Models page and is rejected by the toggle API, so users cannot hide just one selector row there without hand-editing disabledModels; either surface selector rows in the management model APIs or remove the dashboard claim.

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 72ed0ed to 3d67eb2 Compare August 4, 2026 05:04
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 05:07

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

Copy link
Copy Markdown

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: 3d67eb29a4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/server/responses/collaboration.ts Outdated
if (!injectionModel && roster === "" && fallbackGuidance === "") return null;
if (injectionPrompt) {
return `<multi_agent_mode>${applyInjectionPlaceholders(injectionPrompt, injectionModel, injectionEffort, roster, fallbackGuidance)}</multi_agent_mode>`;
return `<multi_agent_mode>${applyInjectionPlaceholders(injectionPrompt, preferred?.model ?? injectionModel, injectionEffort, roster, fallbackGuidance)}</multi_agent_mode>`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid injecting ambiguous bare model into custom prompts

When account selectors are active but the parent request is still a bare native route, a bare injectionModel can resolve to multiple selector-qualified spawn candidates, leaving preferred undefined; this fallback then expands {{model}} to the raw bare id. Since the catalog hides bare native rows in that configuration, a custom prompt like Use {{model}} tells the agent to pass a model override that the v2 spawn surface will reject. The remaining case is the bare-parent ambiguity; only substitute a model when a unique/current-route preferred was found, or blank/suppress the placeholder as the built-in branch does.

Useful? React with 👍 / 👎.

@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 05:18
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 05:44
@chrisae9
chrisae9 marked this pull request as draft August 4, 2026 06:14
@chrisae9
chrisae9 force-pushed the split/426-03-account-catalog branch from 93c8284 to a88b3c7 Compare August 4, 2026 06:25
@chrisae9
chrisae9 marked this pull request as ready for review August 4, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants