Skip to content

fix(subagents): accept visible bare native ids in pickerOrder - #6346

Merged
lidge-jun merged 1 commit into
devfrom
codex/fix-6338-picker-order-native-ids
Oct 1, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/fix-6338-picker-order-native-ids

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

PUT /api/subagent-models validated every pickerOrder entry against visible routed slugs only. It rejected the bare native id that the documented complete-picker ordering requires (docs-site/src/content/docs/guides/model-ordering.md), so that ordering could only be created by hand-editing config. Enabled native catalog rows from nativeModelRows(config) are now accepted alongside visible routed models. Disabled and unknown native ids are still rejected.

Closes #6338

Verification

  • tests/routing/subagent-roster-retention.test.ts: the new case (visible native id saves; disabled native id is rejected without mutation) fails before the fix (25 pass / 1 fail) and passes after (26 pass / 0 fail). The invalid-body table now uses an unknown native id in place of gpt-5.5.
  • bun x tsc --noEmit passes; subagent-roster-migration, test-layout and file-size guards pass. Two combo-management-api "response-path strategy accounting" cases fail locally with and without this change; they are pre-existing in this environment.
  • Cross-platform CI for this head is deferred by the owner's instruction to one run on the final dev tip before release.

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.

Summary by CodeRabbit

  • Bug Fixes
    • Subagent model picker order now accepts visible native model IDs. Disabled, invalid, or invisible IDs remain rejected, and invalid requests leave configuration unchanged.

PUT /api/subagent-models validated pickerOrder against visible routed slugs only, so the
documented complete-picker ordering (a bare native id such as gpt-5.6-sol) could not be saved
through the API. Visible, enabled native catalog rows are now accepted; disabled and unknown
native ids are still rejected.

Closes #6338
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 1, 2026 02:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T02:34:51.570340Z 8b51052 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e83b5346-c805-45d4-b92b-5c92c1fdd3fb

📥 Commits

Reviewing files that changed from the base of the PR and between 8ad261e and 8b51052.

📒 Files selected for processing (2)
  • src/server/management/agent-settings-routes.ts
  • tests/routing/subagent-roster-retention.test.ts
 ____________________
< Expecto bugtronum! >
 --------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev by @lidge-jun. Independent review: pass (enabled native rows only; account-gated, shadowed, disabled and unknown ids still rejected; matches applyFullModelPickerOrder and the documented contract; reviewer ran retention and catalog-full-picker-order tests, 58 pass). The dashboard editor still locks native-containing orders, which is an existing, documented limitation. Cross-platform CI for this head is deferred by the owner's instruction to one run on the final dev tip before release; scripts/ci/assert-mergeable-review.sh --maintainer-integration OK at this head.

@lidge-jun
lidge-jun merged commit 09a86e1 into dev Oct 1, 2026
22 of 31 checks passed
@lidge-jun
lidge-jun deleted the codex/fix-6338-picker-order-native-ids branch October 1, 2026 02:33

@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: 8b51052460

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

// Evaluate visibility AFTER discovery: a concurrent visibility write may have completed.
const visible = new Set(filterCatalogVisibleModels(models, config).map(catalogModelSlug).filter(slug => slug.includes("/")));
// A bare native id orders the complete picker (docs: guides/model-ordering.md).
for (const row of nativeModelRows(config)) if (!row.disabled) visible.add(row.slug);

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 Gate native IDs on native passthrough availability

When the configuration has an enabled non-OpenAI provider, or providers.openai uses key auth/noncanonical URL, shouldIncludeNativeOpenAi() returns false and catalog convergence omits every bare native row, but nativeModelRows(config) still returns its enabled static rows. This therefore accepts and persists an unavailable bare ID such as gpt-5.5; because any bare ID activates complete-picker ordering, it can also reorder the remaining routed catalog even though the requested target never appears. Apply the same native-inclusion predicate used by catalog convergence before adding these rows to visible, and cover a key-auth or non-OpenAI-only configuration.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant