[WRONG BRANCH] fix(claude): avoid leaking main ChatGPT credential to non-canonical openai-responses providers - #162
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
/v1/responsesreplays whenever the selected route used theopenai-responsesadapter, which could expose the main token to custom forward-mode providers.openai-responsesgateways configured by users.Description
isCanonicalOpenAiForwardProviderand a localallowMainAccountEnrichmentflag so main-account enrichment is only enabled for the canonical ChatGPT forward provider; otheropenai-responsesforward providers are excluded. (changedsrc/server/claude-messages.ts).allowMainAccountEnrichment && tryClaimNativeMainProfileForTurn(...), so the credential is not attached to custom forward-modeopenai-responsesroutes. (changedsrc/server/claude-messages.ts).openai-responsesprovider withauthMode: "forward"and a storedauth.json, and verifies that the upstream does not receiveAuthorizationorchatgpt-account-id. (new test intests/claude-messages-endpoint.test.ts).Testing
bun run typecheckandbun run privacy:scan, both completed successfully.tests/claude-messages-endpoint.test.ts, which passed and verifies the credential is not leaked to a custom forward provider.bun run test; the focused Claude endpoint tests (including the new regression) passed; there were earlier environment-specific CLI expectations and Bun-version artifacts during an isolated run, but the repository's standard test run exercised the Claude endpoints and confirmed the fix.Codex Task