Skip to content

fix: Claude Code API credentials #7456

@wlshlad85

Description

@wlshlad85

Question

Problem

When using Anthropic credentials from Claude Code (the official Anthropic CLI), OpenCode displays:

"This credential is only authorized for use with Claude Code and cannot be used for other API requests."

This warning appears but doesn't guide users on what to do next.

Expected Behavior

Either:

  1. Detect Claude Code-specific keys and prompt users to enter a standard Anthropic API key instead
  2. Add documentation clarifying that Claude Code credentials won't work with OpenCode

Environment

  • Windows 11
  • OpenCode TUI
  • Model: Claude Opus 4.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions