opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: Claude Code API credentials

Open wlshlad85 opened this issue 6 days ago • 26 comments

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

wlshlad85 avatar Jan 09 '26 10:01 wlshlad85