Repository navigation
Forward ANTHROPIC_BASE_URL to the Claude Adapter Review action - #45
Merged
Merged
Conversation
The ai-review job's Claude Code call fails authentication because the ANTHROPIC_API_KEY secret is a parity-gateway key (2077AI/New API), not a native Anthropic key, so it must be routed through ANTHROPIC_BASE_URL. The claude-code-action only forwards this var from the job/workflow-level env context (its internal run step's own env: block shadows anything set on the calling step), so it has to be declared at the job level here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Run 39882363469 (job 120233656017) failed the ai-review job on a bare GET /pulls/36 503 from the GitHub API, not rate limiting (4998/5000 remaining) or anything PR-specific — just a transient blip the actions/github-script step had no retry margin for (default retries: 0). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai-reviewjob's Claude Code call (run 39882363469 / job 120229028100) was failing authentication near-instantly ($0 cost,is_error: true) because theANTHROPIC_API_KEYsecret is a parity-gateway key (2077AI / New API), not a nativesk-ant-...key, so requests must be routed through a custom base URL instead ofapi.anthropic.com.claude-code-actiononly forwardsANTHROPIC_BASE_URLfrom the job/workflow-levelenv:context (its internal run step's ownenv:block shadows anything set on the calling step), so it's declared at the job level here.GET /pulls/36503 from the GitHub API — not rate limiting (4998/5000 remaining), just a transient blip. Thatactions/github-scriptstep hadretries: 0, so one blip killed the whole job. Setretries: 3so it survives these.Required follow-up (not part of this diff)
Set the
ANTHROPIC_BASE_URLsecret (or repo variable) on this repo to the parity gateway URL for the review job to actually succeed.Test plan
ANTHROPIC_BASE_URLsecret on the repo/review-adapteron an open adapter PR and confirm theai-reviewjob completes instead of failing with "Claude did not return structured_output"🤖 Generated with Claude Code