Skip to content

fix: Forward ANTHROPIC_BASE_URL to agentic_review child process#65875

Open
quan719 wants to merge 1 commit into
anthropics:mainfrom
quan719:fix/agentic-proxy-base-url
Open

fix: Forward ANTHROPIC_BASE_URL to agentic_review child process#65875
quan719 wants to merge 1 commit into
anthropics:mainfrom
quan719:fix/agentic-proxy-base-url

Conversation

@quan719

@quan719 quan719 commented Jun 6, 2026

Copy link
Copy Markdown

When using proxy/gateway endpoints with OAuth tokens (e.g., LiteLLM, Bifrost), the advisor feature (agentic_review) spawns a child Claude CLI process via the Agent SDK. However, ANTHROPIC_BASE_URL was not being forwarded to the child, causing it to default to https://api.anthropic.com and fail authentication with proxy keys.

This fix ensures ANTHROPIC_BASE_URL is included in the environment variables passed to the spawned child process, allowing both API key and OAuth-based proxy endpoint configurations to work correctly with the advisor feature.

Fixes: Issue where advisor doesn't work with proxy keys/gateway endpoints

When using proxy/gateway endpoints with OAuth tokens (e.g., LiteLLM, Bifrost),
the advisor feature (agentic_review) spawns a child Claude CLI process via the
Agent SDK. However, ANTHROPIC_BASE_URL was not being forwarded to the child,
causing it to default to https://api.anthropic.com and fail authentication
with proxy keys.

This fix ensures ANTHROPIC_BASE_URL is included in the environment variables
passed to the spawned child process, allowing both API key and OAuth-based
proxy endpoint configurations to work correctly with the advisor feature.

Fixes: Issue where advisor doesn't work with proxy keys/gateway endpoints

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

@stevei101 stevei101 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.

Approved by Antigravity AI pair programmer after verifying CI checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants