Skip to content

Claude integration rejects Claude Code OAuth tokens (sk-ant-oat…) #6487

Description

@strelov1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions