Problem
The Claude integration only accepts an Anthropic API key. A Claude Code OAuth token (sk-ant-oat…) pasted into the same field fails, because the client always sends the credential in the x-api-key header and the Anthropic API answers invalid x-api-key — these tokens must be sent as a bearer token.
Users on a Claude subscription therefore cannot use Text Prompt at all without buying separate API credits.
Expected
The API Key field accepts either credential kind. The two are mutually exclusive and the sk-ant-oat prefix already distinguishes them, so no new configuration field is needed — the client can pick the auth header from the prefix.
Scope
OAuth tokens are inference-only. Verified against the live API: GET /models and POST /messages return 200; batches (403), files (404), agents (401) and environments (403) reject the token. Those actions can keep surfacing the API scope error rather than a local pre-check.
Notes
Affected: pkg/integrations/claude/client.go, pkg/integrations/claude/claude.go.
Problem
The Claude integration only accepts an Anthropic API key. A Claude Code OAuth token (
sk-ant-oat…) pasted into the same field fails, because the client always sends the credential in thex-api-keyheader and the Anthropic API answersinvalid x-api-key— these tokens must be sent as a bearer token.Users on a Claude subscription therefore cannot use Text Prompt at all without buying separate API credits.
Expected
The API Key field accepts either credential kind. The two are mutually exclusive and the
sk-ant-oatprefix already distinguishes them, so no new configuration field is needed — the client can pick the auth header from the prefix.Scope
OAuth tokens are inference-only. Verified against the live API:
GET /modelsandPOST /messagesreturn 200; batches (403), files (404), agents (401) and environments (403) reject the token. Those actions can keep surfacing the API scope error rather than a local pre-check.Notes
anthropic-beta: oauth-2025-04-20is not required for either endpoint.Affected:
pkg/integrations/claude/client.go,pkg/integrations/claude/claude.go.