Skip to content

fix(xai): scope Fast-tier catalog copy to key-auth pricing (carry of #4077) - #4474

Merged
lidge-jun merged 2 commits into
devfrom
codex/260913-carry-4077
Sep 13, 2026
Merged

fix(xai): scope Fast-tier catalog copy to key-auth pricing (carry of #4077)#4474
lidge-jun merged 2 commits into
devfrom
codex/260913-carry-4077

Conversation

@lidge-jun

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

Copy link
Copy Markdown
Owner

Summary

  • Maintainer carry of the residue of #4077 by @laerad777. The source head is three commits; only the Fast catalog copy is still unlanded.
  • #4431 already opened Grok OAuth subscription rows to Fast. Those rows have no per-token price, so the shared fastTierDescription still advertised "Priority processing, 2x token price" where that claim is false.
  • New copy: "Priority processing; tier pricing applies on key auth only". Priority processing stays; the token-price claim is scoped to key auth. The pins that read this string moved with it: src/providers/registry.ts, tests/service/service-tier-capability.test.ts, and tests/codex-integration/codex-catalog.test.ts. docs-site/ has no pin.
  • Not carried: the source's forwardCallerServiceTier flips, including grok-4.20-multi-agent-0309 to true. Live origin/dev keeps that model excluded after the 2026-09-13 probe recorded the gateway answering service_tier: "default" when sent "priority". Cherry-picking fix(provider): enable service_tier priority on the xAI OAuth Responses lane #4077 would re-break that evidence-based exclusion.
  • fix(responses): gracefully handle code-mode view_image calls via unified exec #4171 is a different duplicate, owned by lane R's fix(responses): execute code-mode view_image through unified exec #4455 carry. This PR does not carry or close it.

Co-authored-by: Jerome 221477575+laerad777@users.noreply.github.com

Verification

  • bun test tests/service/service-tier-capability.test.ts tests/codex-integration/codex-catalog.test.ts374 pass, 0 fail
  • bun run typecheck → exit 0
  • Confirmed rg "2x token price" is empty under src/, tests/, docs-site/, gui/, and structure/
  • Confirmed grok-4.20-multi-agent-0309 remains absent from modelSupportsServiceTier and still pins forwardCallerTier: false
  • Local product suite, build and install: NOT RUN
  • Hosted exact-head CI on this PR is the lane-tip merge proof

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

  • Documentation
    • Updated the xAI Fast-tier description to clarify that tier pricing applies only when using key-based authentication.
    • Removed the implication that Fast-tier usage always costs twice as much per token.

#4431 opened Grok OAuth subscription rows to Fast. Those rows have no
per-token price, so the shared catalog string advertised a 2x token
price where it is false. Keep the priority-processing claim and scope
the token-price claim to key auth.

Residue of #4077 only. The source branch's forwardCallerServiceTier
flips are not carried: live origin/dev keeps grok-4.20-multi-agent-0309
excluded after a 2026-09-13 probe recorded a default-tier downgrade.

Co-authored-by: Jerome <221477575+laerad777@users.noreply.github.com>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 13, 2026 06:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 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-09-13T07:01:58.520696Z 83be41f 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

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 39bbe4e3-e342-46f5-81c4-4bc274d936b5

📥 Commits

Reviewing files that changed from the base of the PR and between 83be41f and 3faf338.

📒 Files selected for processing (1)
  • src/providers/registry.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dbda016d-73ea-40c8-a820-a3495fba58f4

📥 Commits

Reviewing files that changed from the base of the PR and between b4dec34 and 83be41f.

📒 Files selected for processing (3)
  • src/providers/registry.ts
  • tests/codex-integration/codex-catalog.test.ts
  • tests/service/service-tier-capability.test.ts

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


📝 Walkthrough

Walkthrough

The xAI Fast-tier description now states that tier pricing applies only to key authentication. A comment explains the OAuth pricing distinction. Related service and catalog tests now expect the revised description.

Changes

xAI Fast-tier description

Layer / File(s) Summary
Provider metadata and test expectations
src/providers/registry.ts, tests/service/service-tier-capability.test.ts, tests/codex-integration/codex-catalog.test.ts
The registry changes the description to “Priority processing; tier pricing applies on key auth only” and documents the key-auth scope. Service and catalog assertions now use the same text for key-auth and OAuth cases.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 83be4

This narrowly scoped catalog wording update is ready to merge with no identified user or production risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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: limiting the xAI Fast-tier catalog wording to key-auth pricing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260913-carry-4077

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.

@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: 83be41fc00

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

Comment thread src/providers/registry.ts
fastTierDescription: "Priority processing, 2x token price",
// Shared across key and OAuth catalog rows. OAuth subscription has no
// per-token price, so the 2x claim is scoped to key auth.
fastTierDescription: "Priority processing; tier pricing applies on key auth only",

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 Update the xAI pricing guide to match the auth scope

For users authenticated through ocx login xai, this catalog text now correctly says that tier pricing applies only to key auth, but docs-site/src/content/docs/reference/configuration/providers.md:443-446 still states without that qualification that xAI charges 2× and applies the premium whenever priority is echoed—which the OAuth gateway does. Update that section to scope the billing claim to API-key requests and clarify any intentionally retained API-reference estimates so OAuth subscribers are not told they incur per-token charges.

AGENTS.md reference: src/AGENTS.md:L29-L29

Useful? React with 👍 / 👎.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 55 / 80

설명
이 PR은 #4077(@laerad777) 잔여분만 tip으로 옮긴다. #4431이 Grok OAuth 구독 행에도 Fast를 연 뒤, 공유 fastTierDescription이 여전히 “2x token price”를 말해 OAuth(토큰 단가 없음) 사용자에게 잘못된 가격 힌트를 준다. 키 인증 레인만 2x가 맞다.

변경은 src/providers/registry.ts xAI 엔트리의 설명 문자열 하나와, 그걸 기대하는 catalog/service-tier 테스트 문구 갱신이다. Fast 능력 자체·forward 정책·#4431 동작은 건드리지 않는다. tip b4dec3469 / 2.53.0 기준, types/config 분할 무관.

우선순위 55는 런타임 버그가 아니라 카탈로그 카피 정확도 문제라서다. 그래도 OAuth Fast를 켠 뒤에는 반드시 고쳐야 하는 residue다.

src/providers/registry.ts fastTierDescription - “Priority processing; tier pricing applies on key auth only”로 범위를 키 인증에 한정.

tests/codex-integration/codex-catalog.test.ts / tests/service/service-tier-capability.test.ts - key·oauth 카탈로그 description 기대값 동기화.

심볼 #4077 residue / #4431 - 본문이 말한 “세 커밋 중 Fast 카피만 남음”과 diff 범위가 일치한다.

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

  • OAuth 행에 별도 description을 둘지, 공유 문자열 완화로 충분한지(이번 PR은 후자).
  • #4077을 이 캐리 후 완전히 닫을지.

너의 추천
문구·테스트만 보면 바로 머지하세요. 이어서 #4077 잔여를 닫으세요.

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

@lidge-jun
lidge-jun merged commit 2296e48 into dev Sep 13, 2026
27 checks passed
@lidge-jun
lidge-jun deleted the codex/260913-carry-4077 branch September 13, 2026 07:54
FacuM pushed a commit to FacuM/opencodex that referenced this pull request Sep 13, 2026
…work

lidge-jun#4077 proposed opening the Grok OAuth lane to service_tier priority and
correcting the Fast-tier catalog copy. The registry half landed independently
through lidge-jun#4431 with a narrower, live-probed scope and no reference to the
proposal; the copy correction landed later through lidge-jun#4474 with a trailer. The
first half is recorded as an acknowledgement rather than as carried code.

Also records the gate's false-positive mode: a description that merely talks
about a carry train fails missing_coauthor_credit even with no source author,
which lidge-jun#4499 hit. Writing around it is cheaper than loosening the matcher.
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