Skip to content

feat(catalog): support native OpenAI display name overrides - #3627

Draft
everton-dgn wants to merge 1 commit into
lidge-jun:devfrom
everton-dgn:feat/native-model-display-names
Draft

feat(catalog): support native OpenAI display name overrides#3627
everton-dgn wants to merge 1 commit into
lidge-jun:devfrom
everton-dgn:feat/native-model-display-names

Conversation

@everton-dgn

@everton-dgn everton-dgn commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Allow providers.openai.modelDisplayNames to label supported bare native GPT rows in the local Codex catalog. For example, "gpt-6-astra": "GPT 6 Astra" changes the picker label while keeping the model ID and capabilities intact.

Both retained synchronization and catalog convergence apply the configured labels. A small catalog marker preserves the original name so removing an override restores it before native metadata normalization. Template-derived rows discard this marker. Combo aliases, account-qualified rows, virtual *-pro rows, and HTTP model listings remain outside this local catalog feature.

Verification

  • bun test tests/codex-integration/codex-catalog.test.ts: 278 passed, 0 failed. Covers replacement, removal, blank labels, repeated serialization, pinned metadata upgrades, external label changes, combo isolation, and template marker isolation.
  • bun run typecheck: passed on the final code.
  • bun run privacy:scan and git diff --check: passed.
  • cd docs-site && bun install --frozen-lockfile && bun run build: passed, 425 pages.
  • bun run test:changed: 10,913 passed, 3 skipped, 2 failed. The final template cleanup and pinned-name test were then validated by the complete catalog test file above.
  • Rechecked both broader-suite failures with the catalog tests: the request-body-size test passed; tests/usage/quota-reset-notify.test.ts:515 still fails because its HTTP webhook fixture is rejected by the HTTPS-only schema at src/config.ts:1049. Both files are unchanged from base commit 55395a9dc8a252a01f606b7b65859579e4f2e53d.

This PR remains a draft. The broader suite is not fully green, and the repository-wide review-readiness gate has not been attested.

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. No security boundary is changed; privacy scan passed.

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 resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 github-actions Bot added the enhancement New feature or request label Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 54 / 80

이 PR은 이미 있는 providers.openai.modelDisplayNames 설정을 로컬 Codex 카탈로그의 bare native GPT 행에도 적용한다. 예: gpt-6-astra 키에 GPT 6 Astra를 넣으면 피커 라벨만 바뀌고, 모델 ID·능력·정렬·라우팅은 그대로다. 지금 dev HEAD는 be81013fa(package 2.43.0)이고, 이 브랜치는 dev를 베이스로 한다. 예전에 들어온 #3212(discovered display names) / management modelDisplayNames 경로와 같은 “표시만 바꾸는” 축을 catalog sync·convergence까지 이어 준 패치다.

핵심은 src/codex/catalog/sync.ts다. mergeCatalogEntriesFromObservedStatenativeDisplayNames를 받고, recoverableNativeSlug로 잡히는 bare native 행에만 라벨을 덮어쓴다. 덮어쓸 때 opencodex_native_display_name 마커에 slug / original / applied를 남겨 둔다. 다음 merge 전에 restoreNativeDisplayName이 마커를 풀어 원본을 되돌린 뒤 정규화를 다시 돌리므로, 오버레이를 지우거나 빈 문자열만 남기면 native 이름이 복구된다. 템플릿에서 파생되는 행은 deriveEntry와 versioned 루프에서 마커를 지워서 누수를 막는다. combo alias·account-bound·HTTP listing·가상 *-pro는 의도적으로 밖으로 둔다.

테스트(tests/codex-integration/codex-catalog.test.ts)가 이 계약을 잘 잠가 두었다. 반복 merge 후에도 메타데이터는 같고 라벨만 유지되는지, 외부에서 display_name을 바꾼 뒤 오버레이를 끄면 그 외부 값이 살아남는지, pinned slug 복원, 템플릿 마커 격리, native slug를 차지한 routed combo는 안 바뀌는지까지 있다. catalog 파일 단독으로는 278 통과를 주장한다. 다만 PR 본문이 말하듯 더 넓은 test:changed는 완전 초록이 아니고 draft로 남아 있다. 문서도 영어 providers.md만 추가되어, 다국어 docs-site와 어긋난다.

지금 dev가 최적화하는 방향(카탈로그 수렴·표시명 내구성·네이티브 메타데이터 정규화)과 충돌하지 않는다. types/config 분할 캠페인으로 무효화될 종류의 큰 스키마 분열도 아니다. 새 설정 키를 만들지 않고 기존 modelDisplayNames를 catalog writer 두 곳(retained sync + convergence prepareCatalog)에만 꽂는다. 위험은 작지만, 로컬 카탈로그만 라벨이 바뀌고 HTTP /v1/models·GUI 일부 경로는 그대로일 수 있어서 “설정했는데 어디는 옛 이름” 혼란이 생길 여지는 있다. 작성자가 그 경계를 문서에 적어 둔 점은 좋다.

라인 src/codex/catalog/sync.ts restoreNativeDisplayName - display_name === applied일 때만 original로 되돌린다. 외부/업스트림이 라벨을 바꾼 경우를 보호하는 설계는 맞다. 다만 applied와 현재 값이 공백 trim 차이로 어긋나면 원본 복구가 스킵될 수 있으니, trim 정책을 한쪽으로 맞출지 확인하라.
라인 src/codex/catalog/sync.ts opencodex_native_display_name - RawEntry 가방에 비공식 마커를 심는다. 타입/문서 한 줄이 없으면 이후 normalizer가 필드를 직렬화·비교에 넣기 쉽다. 허용 키 목록이나 scrub 지점을 명시하는 편이 안전하다.
라인 src/codex/catalog/sync.ts nativeDisplayNames: config.providers[OPENAI_CODEX_PROVIDER_ID]?.modelDisplayNames - openai 프로바이더 맵만 읽는다. 의도된 범위지만, 다른 프로바이더 modelDisplayNames는 HTTP/management에만 먹고 catalog bare native에는 안 먹는다는 점을 GUI/문서에서 더 분명히 하라.
경로 docs-site/.../reference/configuration/providers.md - 영어만 갱신됨. ko/ja/zh 등 형제 문서와 drift가 난다. 랜딩 전에 맞추거나 “EN first, locales follow”를 이슈로 남겨라.
경로 PR draft / test:changed - 작성자 스스로 레포 전체 readiness를 아직 안 붙였다. catalog 스위트만으로 merge 게이트를 열지 말지 판단이 필요하다.

메인테이너의 판단이 필요한 지점

  • draft를 유지한 채 catalog CI만 초록이면 머지할지, 전체 test:changed 재확인까지 기다릴지
  • HTTP listing·가상 *-pro·account-bound까지 같은 오버레이를 후속으로 맞출지, 로컬 카탈로그만으로 끝낼지
  • 다국어 docs를 이 PR에 묶을지 후속 이슈로 뺄지
  • opencodex_native_display_name 마커를 공식 extension 필드로 문서화할지

너의 추천
지금은 draft 유지. catalog 테스트·범위·기존 modelDisplayNames 재사용은 좋다. exact-head에서 catalog 관련 CI가 초록이고, 영어 외 docs drift를 고치거나 의도적으로 EN-only로 남긴다는 한 줄을 단 뒤에 Ready로 올린 다음 머지하라. 기능 자체는 dev 방향과 잘 맞고 우선 충돌도 없다.

이 댓글은 grok-bot이 작성했습니다

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

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