fix(score): strip ANTHROPIC_API_KEY from CLI subprocess env #3

Merged
hjess merged 1 commits from fix/cli-oauth-env into main 2026-10-29 22:15:22 +01:00
Owner

With ANTHROPIC_API_KEY also present in the environment, the claude CLI does
API-key auth and ignores CLAUDE_CODE_OAUTH_TOKEN, failing with 401 Invalid API
key when that key is invalid/out of credit. Strip it from the subprocess env so
the subscription token is used; the api backend still reads it from os.environ.

With ANTHROPIC_API_KEY also present in the environment, the claude CLI does API-key auth and ignores CLAUDE_CODE_OAUTH_TOKEN, failing with 401 Invalid API key when that key is invalid/out of credit. Strip it from the subprocess env so the subscription token is used; the api backend still reads it from os.environ.
hjess added 1 commit 2026-10-29 22:15:19 +01:00
With ANTHROPIC_API_KEY also present in the environment, the claude CLI does
API-key auth and ignores CLAUDE_CODE_OAUTH_TOKEN, failing with 401 Invalid API
key when that key is invalid/out of credit. Strip it from the subprocess env so
the subscription token is used; the api backend still reads it from os.environ.
hjess merged commit d6806f386f into main 2026-10-29 22:15:22 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hjess/BlaaAI#3