Skip to content

Commit 686324b

Browse files
micheleRPclaude
andcommitted
fix Claude Code LLM routing to use environment variables
Replace non-existent claude config set flags with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN environment variables. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent c13ba03 commit 686324b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/ai-agents/partials/integrations/claude-code-user.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,15 @@ This command configures the HTTP transport for MCP, which allows Claude Code to
7171

7272
=== Configure LLM routing through gateway
7373

74-
To route Claude Code's LLM requests through the gateway instead of directly to Anthropic:
74+
To route Claude Code's LLM requests through the gateway instead of directly to Anthropic, set the following environment variables:
7575

7676
[,bash]
7777
----
78-
claude config set \
79-
--api-provider redpanda \
80-
--base-url <your-gateway-endpoint>
78+
export ANTHROPIC_BASE_URL=<your-gateway-endpoint>
79+
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
8180
----
8281

83-
This routes all Claude model requests through your gateway, giving you centralized observability and policy enforcement.
82+
This routes all Claude model requests through your gateway, giving you centralized observability and policy enforcement. To persist these values, add them to your shell profile or store them in the Claude settings JSON (`~/.claude.json`).
8483

8584
== Configure using configuration file
8685

0 commit comments

Comments
 (0)