Support Anthropic subscription OAuth
This commit is contained in:
@@ -110,12 +110,14 @@ The gateway container needs:
|
||||
- Docker network
|
||||
- `claw_gateway`
|
||||
|
||||
- `ANTHROPIC_AUTH_TOKEN`
|
||||
- Claude subscription OAuth token such as `sk-ant-oat...`
|
||||
- the gateway now sends the extra Claude Code headers required for this path
|
||||
|
||||
- `ANTHROPIC_API_KEY`
|
||||
- standard Anthropic API key
|
||||
|
||||
Bearer-only auth is not currently supported by the Anthropic Messages API used by this runtime.
|
||||
If you pass only `ANTHROPIC_AUTH_TOKEN`, workers will fail with:
|
||||
|
||||
- `401 Unauthorized (authentication_error): OAuth authentication is currently not supported.`
|
||||
If you use `ANTHROPIC_AUTH_TOKEN`, the gateway workers add the Claude Code OAuth headers and agent identity prefix that `nanobot` also uses for subscription auth.
|
||||
|
||||
The gateway copies inherited auth env vars into worker containers according to `CLAW_GATEWAY_INHERITED_ENV`.
|
||||
|
||||
@@ -156,7 +158,7 @@ Example:
|
||||
"template_dir": "/unraid/templates-user",
|
||||
"template_file_prefix": "claw-worker-",
|
||||
"template_archive_dir": "/appdata/template-archive",
|
||||
"inherited_env": ["ANTHROPIC_API_KEY"]
|
||||
"inherited_env": ["ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_API_KEY"]
|
||||
},
|
||||
"worker_defaults": {
|
||||
"bind_port": 8080,
|
||||
|
||||
Reference in New Issue
Block a user