From 63a807d1a56bcee78acf9b4510c12a4d068bc5ad Mon Sep 17 00:00:00 2001 From: "foo@b.ar" Date: Tue, 19 May 2026 00:36:21 +0200 Subject: [PATCH] feat: add CLAUDE_CODE_OAUTH_TOKEN support for subscription auth Allows users with Claude Code subscriptions to authenticate via their OAuth token instead of requiring an API key. Token is passed through docker-compose from .env and documented in .env.example. Co-Authored-By: Claude Opus 4.6 --- .env.example | 4 ++++ docker-compose.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.env.example b/.env.example index 0779bd0..cb6e09c 100644 --- a/.env.example +++ b/.env.example @@ -43,6 +43,10 @@ CORS_ORIGINS=["*"] # fallback list. # ANTHROPIC_API_KEY=sk-ant-... +# OAuth token for Claude Code subscription auth (CLI login). +# Use this instead of ANTHROPIC_API_KEY if you authenticate via `claude auth`. +# CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-... + # Pin the advertised model list. Takes precedence over both live and static. # CLAUDE_MODELS_OVERRIDE=claude-sonnet-4-6,claude-opus-4-6 diff --git a/docker-compose.yml b/docker-compose.yml index 6d0d141..629269e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: # - ./workspace:/workspace environment: - PORT=8000 + - CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN} # Optional: Set Claude's working directory (defaults to isolated temp dir) # Uncomment and modify the line below to set a custom working directory # - CLAUDE_CWD=/workspace