Skip to content

fix(cursor): keep the cursor/ slug in the picker for unbranded rows - #3330

Merged
lidge-jun merged 1 commit into
devfrom
codex/cursor-picker-prefix
Sep 3, 2026
Merged

fix(cursor): keep the cursor/ slug in the picker for unbranded rows#3330
lidge-jun merged 1 commit into
devfrom
codex/cursor-picker-prefix

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restores the cursor/<id> prefix in the Codex model picker for Cursor rows. feat(cursor): derive the picker seed from the capability table and label every row #3222 seeded a display label for every Cursor row, so cursor/kimi-k3 rendered as "Kimi K3" and cursor/claude-opus-5 as "Claude Opus 5", indistinguishable from the same model under another provider.
  • Only labels that carry Cursor's own product name (Cursor Grok 4.5, Cursor Grok 4.6) are published now; every other row falls back to the routed slug like sibling providers do. cursorModelDisplayNames() filters through the new isCursorBrandedLabel helper.
  • Operator modelDisplayNames entries still win; enrichProviderFromRegistry stays per-model fill-only, so an existing install just stops receiving the unbranded labels.

Verification

  • bun test tests/cursor-display-names.test.ts tests/cursor-umbrella-rows.test.ts (19 pass) on the changed subsystem.
  • Full typecheck and suite are left to CI on this head per the no-local-suite rule.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (no doc change: the modelDisplayNames reference already describes the fallback-to-slug behavior).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults (display-only, no auth/routing/wire change).

Summary by CodeRabbit

  • Bug Fixes
    • Updated Cursor model picker labels to display only for Cursor-branded models.
    • Unbranded and third-party models now retain their routed cursor/<id> identifiers instead of receiving misleading display names.

#3222 seeded a display label for every Cursor row, so the Codex picker lost the
cursor/ prefix: cursor/kimi-k3 rendered as "Kimi K3", indistinguishable from
the same model under another provider. Publish only the labels that carry
Cursor's own product name (Cursor Grok 4.5/4.6); every other row keeps the
routed cursor/<id> slug like its siblings from other providers.

Operator modelDisplayNames still win; enrich remains per-model fill-only.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 3, 2026 05:30
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: acca8338-0233-414a-84e7-ae07c8ccdae6

📥 Commits

Reviewing files that changed from the base of the PR and between ff1ac6b and d957c08.

📒 Files selected for processing (2)
  • src/adapters/cursor/discovery.ts
  • tests/cursor-display-names.test.ts

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


📝 Walkthrough

Walkthrough

The Cursor adapter now publishes display names only for Cursor-branded labels. Unbranded models retain their routed cursor/<id> slugs. Tests cover registry labels, configured names, and enrichment behavior.

Changes

Cursor display-name filtering

Layer / File(s) Summary
Branding predicate and label filtering
src/adapters/cursor/discovery.ts
Adds exported isCursorBrandedLabel and filters cursorModelDisplayNames() to labels matching Cursor's product-name format.
Branded and unbranded model tests
tests/cursor-display-names.test.ts
Verifies Cursor labels for grok-4.6 and grok-4.5, and verifies that unbranded rows keep routed slugs without configured display names.

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

Merge Risk: ⚪ Minimal · up to d957c

Cursor-branded models retain friendly picker labels, while unbranded Cursor-routed models display their cursor/ slugs. The covered behavior has no remaining merge-blocking risk.

Suggested reviewers: wibias

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 the cursor/ slug for unbranded rows in the model picker.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cursor-picker-prefix

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

리뷰 · 우선순위 74 / 80

이 PR은 Codex 모델 피커에서 Cursor 행이 다른 프로바이더와 헷갈리지 않게 고치는 표시(display) 전용 수정이다. 지금 dev HEAD는 ff1ac6b8c(Meta Model API meta-model 직결 #3321)이고, 그 직전에 Cursor 쪽은 #3222+#3225+#3233 unified identity 패스트트레인과 Private Inference·bundle effort 스택이 이미 올라가 있다. 그중 #3222는 capability 테이블에서 피커 시드를 만들고 모든 Cursor 행에 modelDisplayNames 라벨을 넣었다. 그 결과 routedDisplayName( src/codex/catalog/sync.ts )이 넘기는 cursor/<id> 슬러그 대신 "Kimi K3", "Claude Opus 5" 같은 마케팅 이름만 보였다. 같은 모델이 anthropic·다른 경로에도 있으면 피커에서 구분이 안 된다. 이 PR은 cursorModelDisplayNames()가 내보내는 맵을 Cursor 제품명이 들어간 라벨만 남기도록 줄인다.

코드 경로는 짧다. src/adapters/cursor/discovery.tscursorModelDisplayNames()가 예전처럼 라우터·umbrella·product·real-id 예외를 다 모은 뒤, 새 헬퍼 isCursorBrandedLabel로 필터한다. 헬퍼는 라벨 trim 후 /^cursor\b/i로 "Cursor …"로 시작하는지 본다. 현재 devcursorUmbrellaRows() displayName 기준으로 브랜드에 걸리는 건 사실상 Cursor Grok 4.5 / Cursor Grok 4.6 두 줄뿐이고, Auto·Kimi K3·Claude Opus 5·Composer 2.5 같은 나머지는 맵에서 빠진다. 맵에 없으면 configuredModelDisplayName( src/codex/catalog/provider-fetch.ts )이 undefined를 주고, 피커는 다시 cursor/<id> 슬러그를 쓴다. 다른 프로바이더 행과 같은 규칙이다.

기존 설치 동작도 PR 설명과 enrichProviderFromRegistry( src/providers/derive.ts )가 맞물린다. enrich는 modelDisplayNames{ ...seed, ...기존 }으로 합친다. 시드에 없는 키는 새로 안 채워지고, 이미 디스크에 남은 "Kimi K3" 같은 값은 운영자/이전 enrich 값으로 남는다. 새 설치·빈 맵은 바로 슬러그로 돌아가고, 예전에 #3222로 채워진 설치는 수동으로 지우기 전까지 옛 라벨이 남을 수 있다. 라우팅·인증·와이어 포맷은 건드리지 않아서 위험 면적은 작다. 테스트 tests/cursor-display-names.test.ts는 브랜드만 남는지, 비브랜드 id는 맵에 없는지, enrich 후에도 운영자 rename과 브랜드 행만 살아 있는지를 본다. PR 본문 기준 관련 스위트 19개 통과, 전체 스위트는 CI에 맡긴다.

현재 dev가 Cursor 피커·identity·Private Inference를 막 정리한 직후라, #3222가 만든 "라벨은 친절하지만 제공자 구분이 사라진" 회귀를 같은 열차 안에서 바로 되돌리는 값이다. types/config 대분할에 걸려 무효화될 종류도 아니다. 우선순위 74는 (1) 회귀가 분명하고 (2) 범위가 display-only로 좁으며 (3) 메인테이너 본인 PR이라 의도가 코드와 일치하고 (4) 다만 기존 설치 sticky 라벨·Auto/Composer 슬러그화는 제품 확인이 남아서 80까지는 안 올린 점수다.

라인 24 - isCursorBrandedLabel/^cursor\b/i는 영어 단어 경계라 "Cursor Grok 4.6"만 통과한다. 의도된 범위로 보이지만, 나중에 "Cursor"가 아닌 자사 브랜드 표기(예: 로컬라이즈·약어)가 생기면 헬퍼를 같이 고쳐야 한다.
라인 - enrichProviderFromRegistry의 modelDisplayNames 병합 - 시드에서 빠진 비브랜드 키를 삭제하지는 않는다. #3222 이후 한 번이라도 enrich된 설치에는 "Kimi K3" 등이 그대로 남을 수 있다. PR 본문의 "stops receiving"은 신규 fill 기준이고, 이미 저장된 값 정리는 없다.
경로 CURSOR_ROUTER_DISPLAY_NAMES / Auto 행 - "Auto", "Auto (Cost)" 등도 브랜드가 아니라서 맵에서 빠지고 cursor/auto 슬러그로 돌아간다. 라우터 행까지 슬러그로 통일할지는 제품 취향 문제다.
경로 테스트 - 브랜드 양성·비브랜드 음성·enrich rename 보존은 잘 잡혀 있다. 기존 설치에 남은 stale 비브랜드 라벨이 피커에 남는 회귀를 막는 테스트는 없다(코드도 안 지우므로 당연하다).

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

  • Auto / Composer / 서드파티 모델 행을 전부 cursor/<id>로 되돌리는 UX가 최종 의도인지, 아니면 "Auto" 정도만 짧은 라벨로 남길지
  • 이미 저장된 비브랜드 providers.cursor.modelDisplayNames 값을 한 번 청소(시드에 없는 키 중 옛 시드 값과 일치하면 삭제)할 follow-up을 넣을지, 문서/릴리즈 노트에 "원하면 해당 키 지우기"만 적을지
  • CI 전체 스위트 초록을 merge 게이트로 둘지(본문은 서브시스템 19패스 + CI 위임)

너의 추천

  • CI 초록이면 merge. display-only이고 feat(cursor): derive the picker seed from the capability table and label every row #3222 회귀를 같은 Cursor identity 열차에서 닫는 패치다.
  • 기존 설치 sticky 라벨이 거슬리면 merge 직후 작은 follow-up으로 "시드에 없고 isCursorBrandedLabel도 아닌 cursor displayName 키 정리"만 따로 다루는 걸 추천한다. 이 PR 범위에 억지로 넣진 말고.
  • 3328/3326 같은 콤보 UI 중복과는 무관. 라벨 교체·types split close-don't-rebase 대상 아님.

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

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