feat(catalog): durable display names for discovered models (#2201, carry of #2715) - #3212
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (29)
📝 WalkthroughWalkthroughAdds durable, provider-scoped display names for discovered models. Configuration validation, catalog precedence, management API mutations, persistence, refresh handling, documentation, and focused tests are included. Routing slugs, native model IDs, and upstream request models remain unchanged. ChangesDiscovered model display names
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant ManagementAPI
participant Config
participant Catalog
Operator->>ManagementAPI: Set or reset model display name
ManagementAPI->>Config: Validate and persist override
ManagementAPI->>Catalog: Clear cache and converge catalog
Catalog-->>ManagementAPI: Return refresh result
ManagementAPI-->>Operator: Return effective name and source
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 512d874fc7
ℹ️ 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".
| : (configuredCap ?? (providerCap !== undefined ? resolveUnknownRoutedContextWindow(providerCap) : undefined)); | ||
| const hinted = { | ||
| ...modelWithoutServiceTier, | ||
| ...(displayName !== undefined ? { displayName } : {}), |
There was a problem hiding this comment.
Reapply labels after trusted OpenAI API augmentation
For the reserved openai-apikey provider, gatherRoutedModelsUncached invokes augmentRoutedModelsWithCapturedOpenAiApiRows after this hint pass; that helper replaces every provider row with a newly constructed trusted row that omits displayName, and no subsequent step reapplies applyProviderConfigHints. Consequently, modelDisplayNames appears correctly in /api/models because the management projection independently rereads the config, but the generated Codex catalog ignores the override for all official OpenAI API models. Apply the configured label while constructing the trusted rows or rerun the canonical hint derivation after augmentation, and cover this provider path with a regression test.
AGENTS.md reference: src/AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
리뷰 · 우선순위 70 / 80이 PR은 이슈 #2201의 핵심 조각입니다. 지금 넣는 값은 공급자마다 따로 두는 이미 라인 172 ( 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
dev, authorship preserved), the core slice of [Feature] configurable human-readable display names for discovered provider models #2201 that the reviewer asked for before any dashboard work: a validated per-providermodelDisplayNamesmap (exact upstream model id → label) with a fixed precedence chain — operator override → discovery metadata → routed slug fallback — carried through the management catalog,/api/providers,PUT /api/providers/:name/model-display-names, and the OpenCode export.configuredModelDisplayNameandeffectiveManagementDisplayNamekey strictly by native id). Validation (plain object, prototype guards, 2,000-entry cap, non-blank trimmed ≤128 chars, no/or control characters) applies at config load, POST, and PUT;nullresets one id deterministically.devseveral times and an earlier head passed all 23 checks, but each refresh needed fork-workflow approval and never got one. Two conflicts with the recently landedretainModelsfeature (feat(catalog): per-provider retainModels opt-in (#1690, carries #2860) #3206) were resolved here (POST carry-over block; providers.md row), keeping both.Closes #2201
Verification
bun x tsc --noEmitclean;bun run privacy:scanpassed.bun teston model-display-names-management-api, provider-config-validation, config-load-degrade, config-user-edits, opencode-cli, codex-convergence-contract, management-client-config-route, codex-catalog, management-provider-validation, catalog-retain-models, core-lab-boundary, provider-key-store → 552 pass / 0 fail.Checklist
Summary by CodeRabbit
New Features
Documentation
Bug Fixes