Skip to content

fix(catalog): preserve OpenAI API display name overrides - #7259

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
jdeurt:juan/preserve-openai-api-display-names
Oct 17, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
jdeurt:juan/preserve-openai-api-display-names

Conversation

@jdeurt

@jdeurt jdeurt commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Trusted OpenAI API catalog reconstruction replaces discovered rows and drops configured modelDisplayNames, so openai-apikey/gpt-6.1-sol appears by its slug instead of a label such as 6.1 Sol after sync.
  • Reapply the exact provider display name while retaining registry-owned context, reasoning levels, output limits, routing, and pricing behavior. No custom model rows are added.
  • Clarify the provider docs and cover the emitted Codex catalog, duplicate avoidance, and label reset in an integration test.

Verification

  • bun run test tests/codex-integration/model-display-names-management-api.test.ts with OCX_TEST_RUNNER_BUN set to Bun 1.4.3: 14 passed, 0 failed.
  • bun run test tests/codex-integration/codex-catalog.test.ts with the same runner: 338 passed, 0 failed.
  • bun run test with the same runner: 48,664 passed, 120 skipped, 1 failed in the parallel phase (2,437 files); the serial phase passed. The failure is connected Desktop uses hub IDs across a cold restart (stored profile=false) in tests/claude-integration/claude-desktop-remote-hub.test.ts:249: identical native model entries arrive in a different order. The same test fails with the same mismatch when run alone on this branch and on an untouched origin/dev worktree. This pre-existing failure is the full-suite exception; the focused OpenAI catalog tests above passed.
  • bun run test:changed: stopped after 190 seconds because its import-graph selection included most of the already-run full suite; no passing result is claimed for this run.
  • bun run typecheck: passed.
  • bun run structure:check: passed.
  • bun run privacy:scan: passed.
  • cd docs-site && bun install --frozen-lockfile && bun run build: passed (577 pages; internal links checked).
  • git diff --check: passed.
  • Live Codex client catalog check: generated a catalog from this branch in an isolated CODEX_HOME with a dummy API key, then sent initialize and model/list to the ChatGPT-bundled Codex 0.163.0-alpha.10.2 app-server. It returned one row each for openai-apikey/gpt-6-astra, openai-apikey/gpt-6-luna, and openai-apikey/gpt-6.1-sol, with displayName values 6 Astra, 6 Luna, and 6.1 Sol.

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:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Improvements
    • Configured display names for built-in OpenAI API models now appear in the model catalog and persist across catalog refreshes.
    • Updated the provider configuration reference with instructions for setting these labels.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1f368ec2-99ea-4fbb-bc4b-330a6c5cf2b6
📥 Commits

Reviewing files that changed from the base of the PR and between 2a3fd00 and e26fce0.

📒 Files selected for processing: 3
  • docs-site/src/content/docs/reference/configuration/providers.md
  • src/codex/catalog/routed-gather.ts
  • tests/codex-integration/model-display-names-management-api.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

Trusted OpenAI API catalog rows now include configured display names when available. The integration test checks the labels and compares catalog entries after removing the overrides. Configuration documentation identifies the setting and states that labels survive catalog refreshes.

Changes: OpenAI display-name preservation

Layer / File(s) Summary
Apply and verify configured catalog labels
src/codex/catalog/routed-gather.ts, tests/codex-integration/model-display-names-management-api.test.ts, docs-site/src/content/docs/reference/configuration/providers.md
Trusted OpenAI API rows include configured display names when available. The integration test checks labels and compares entries after removing the overrides. The documentation identifies providers.openai-apikey.modelDisplayNames and states that labels survive catalog refreshes.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e26fc

Configured display names for OpenAI API models are now preserved when the catalog is rebuilt. No merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preserving configured OpenAI API display-name overrides in the catalog.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

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

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu

@github-actions
github-actions Bot marked this pull request as ready for review October 16, 2026 19:33
@jdeurt
jdeurt force-pushed the juan/preserve-openai-api-display-names branch from 65f50af to e26fce0 Compare October 16, 2026 19:37
@github-actions
github-actions Bot marked this pull request as draft October 16, 2026 19:37
@github-actions
github-actions Bot marked this pull request as ready for review October 16, 2026 19:59
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev (MAINTAINERS.md maintainer-integration exception) for the 2.88.0 train.

Exact head e26fce0c8d3e3c903c5691dbdaa20acaf1cf8f29: the PR's CI on this head completed successfully (gates, test 1/4-4/4, aggregate ci). Reviewed the diff: the trusted OpenAI API catalog reconstruction now applies modelDisplayNames labels, with a regression test proving the rest of each row is unchanged. Changed files are not tracked by the file-size ratchet, and the only change on dev since the run was docs-only (#7227).

@lidge-jun
lidge-jun merged commit 7a29b53 into lidge-jun:dev Oct 17, 2026
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants