Repository navigation
feat(review): keep the reviewer's gateway and cloud-provider routing - #424
Conversation
Quest-Claim: ca7b91faf0d78a1c
quest review now passes the variables that connect the reviewer CLI to its model: ANTHROPIC_BASE_URL, ANTHROPIC_CUSTOM_HEADERS, and Claude Code's cloud provider switches and settings, and Codex's CODEX_CA_CERTIFICATE. While a gateway or provider is set, the credential meant for it passes too, so a review goes where the user's own CLI sessions do. CODEX_ACCESS_TOKEN joins CODEX_API_KEY as a Codex credential. A stored login the API rejects names a credential quest review stripped beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
ANTHROPIC_AWS_API_KEY, ANTHROPIC_FOUNDRY_API_KEY, and ANTHROPIC_FOUNDRY_AUTH_TOKEN passed on every turn as connection settings, so an unused provider secret reached the reviewer and its subprocesses. They are now route credentials: passed only while a gateway or provider is set. A shell holding only such a key, with no stored login and no route, still fails fast as logged out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
quest land watch: the merge queue removed this pull request at 1e4ec9b because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
quest land watch: armed auto-merge on this pull request at 23a13a1, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
Completes
quest/m0/review-gateway.md:quest reviewnow works when the reviewer CLI reaches its model through a gateway such as CLIProxyAPI, or through a cloud provider, instead of stripping the routing and reporting the reviewer as logged out.Changes
src/cli/review.ts: each reviewer declares aconnectionallowlist that always passes, alongside itscredentialsand itsroutes(which replacereroutes).ANTHROPIC_BASE_URL,ANTHROPIC_CUSTOM_HEADERS, theCLAUDE_CODE_USE_*andCLAUDE_CODE_SKIP_*_AUTHswitches for Bedrock, Vertex, Foundry, Mantle, Claude Platform on AWS, and Google Cloud, and those providers' endpoint, project, region, workspace, and key settings. I took the names from the Claude Code 2.1.316 binary.CODEX_CA_CERTIFICATE, andCODEX_ACCESS_TOKENis now a Codex credential next toCODEX_API_KEY.ANTHROPIC_AUTH_TOKEN,ANTHROPIC_API_KEY,CLAUDE_CODE_OAUTH_TOKEN) passes even over a stored login, as it would for the user's own CLI. Without a route, the 2026-10-30 rule still holds: a stored login wins over a shell's key.quest reviewstripped beside it, instead of only saying "not logged in".ANTHROPIC_MODEL,ANTHROPIC_DEFAULT_*), plugin, permission, and effort variables, other harnesses' keys, and secret-manager tokens stay stripped.quest agent's and the runner's isolation (strippedEnvironment) are unchanged.test/review.test.ts: reuses the gateway and cloud-routing tests from closed moq-dev/quest#316, covering both rounds, every provider, the error messages, and Codex's variables. It replaces the tests for the old reroute-blocking behavior.README.mdandquest review --helpdescribe the new behavior.quest/m0/README.mdandquest/m0/agent-stalls.md.Choices made without asking
ANTHROPIC_BASE_URLwith its token".CLAUDE_CODE_USE_ANTHROPIC_AWS), and Google Cloud are switched on the same way as Bedrock, Vertex, and Foundry, andclaude auth statusreports each as a third-party provider. Handling only three would leave the rest half-stripped.ANTHROPIC_FOUNDRY_API_KEY,ANTHROPIC_AWS_API_KEY,ANTHROPIC_FOUNDRY_AUTH_TOKEN, nowrouteCredentials). At first they always passed. CodeRabbit flagged that this let an unused provider secret reach the reviewer. Unlike its suggested patch, they do not go intocredentials. That list also passes with no stored login and no route, where Claude Code ignores these keys: the review would start and then blame the key instead of failing fast as logged out.CLAUDE_CODE_USE_GATEWAYstays stripped. It is undocumented, and it does not changeapiProviderinclaude auth status.OPENAI_BASE_URLwas never stripped.CODEX_ACCESS_TOKENfollows the stored-login-wins rule, likeCODEX_API_KEY.Validation
just checkandjust testpass on 1e4ec9b, after merging main.origin/main(d7ef15e), including moq-dev/quest#421 and moq-dev/quest#426, which also editsrc/cli/review.ts. The conflicts were inprepare()and the fake Codex CLI. The resolution keeps both sides. Main's abortsignalis now passed to the routed and stored-login status checks and returned on everyCli, and the fake CLI keeps both main'sFAKE_HANGmode and this PR'sCODEX_ACCESS_TOKENlogin. Main's newreviewerEnvironment()is used only by the live sandbox test, and it now returns the same routed environment as a review.claude auth statusexits 1 with onlyANTHROPIC_BASE_URL, and 0 with a token or a provider switch.codex login statusreadsCODEX_ACCESS_TOKENbut notCODEX_API_KEY.Review
mechanical fix by codex / Codex:
Merged base and preserved both sides' completed quest deletions; passed bun install --frozen-lockfile, bun run build, bun run test (1010 passed, 2 skipped), bun run check, bun run --silent quest check, and bun run --silent quest --root examples/export check.(head 23a13a1)gpt-6.1-sol, medium effort (quest review). Earlier rounds used session01a19f87-e27a-7362-bdd5-0c3dc93ce3fb.src/cli/review.ts:246, "Preserve the Google Cloud location setting": fixed in 1b2dc7b.ANTHROPIC_GOOGLE_CLOUD_LOCATIONwas added and is now tested.src/cli/review.ts:234, "Move provider API keys to thecredentialslist": fixed in e7cb662, as route-only credentials (see Choices).01a1a1ef-3a8e-7c43-b7a2-f29a1f06de8f, round 1 at e7cb662: no findings. The session was fresh because the PR branch was checked out in another worktree.01a19f87-e27a-7362-bdd5-0c3dc93ce3fb, round 3 at 1e4ec9b (the merge of main): no findings. The merged diff differs from e7cb662's only where main'ssignalwas threaded through, so this round was needed.Follow-ups
claude-opus-5-5) has not been checked on Bedrock, Vertex, or Foundry, where model IDs differ.ANTHROPIC_MODELandANTHROPIC_DEFAULT_*_MODELstay stripped, so a provider that cannot resolve the pin needs--model. This belongs with the in-flight review-harness quest (model pins), not here.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)