Skip to content

feat(claude): add llm-gateway authent capability#221

Open
lindmin wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
lindmin:main
Open

feat(claude): add llm-gateway authent capability#221
lindmin wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
lindmin:main

Conversation

@lindmin
Copy link
Copy Markdown

@lindmin lindmin commented May 8, 2026

Adds support to claude for llmgateway auth e.g LiteLLM via the env vars:
ANTHROPIC_BASE_URL & ANTHROPIC_AUTH_TOKEN

ref: https://code.claude.com/docs/en/llm-gateway

information: claude code sonnet 4.6 used for this PR.
i'm not familiar to PR on opensource project, I appreciate feedback :)

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 8, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for an LLM gateway (proxy) for Anthropic models, enabling the use of tools like LiteLLM. It adds AnthropicAuthToken and AnthropicBaseURL to the authentication configuration, updates environment variable handling, and implements the necessary logic for the llm-gateway authentication method across various harness components. Review feedback suggests refining the auto-detection logic to trigger primarily on the presence of ANTHROPIC_BASE_URL. This change would prevent false positives and avoid fatal errors in environments where ANTHROPIC_AUTH_TOKEN might be set for unrelated purposes.

Comment thread pkg/harness/auth.go Outdated
Comment thread pkg/harness/claude/embeds/config.yaml Outdated
Comment thread pkg/harness/claude_code.go Outdated
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.

1 participant