Add OpenRouter Claude provider config to OpenCode #7

Closed
opened 2026-04-17 05:11:09 +00:00 by bryan · 0 comments
Owner

Summary

Reintroduce Claude-class models to OpenCode through OpenRouter instead of restoring the old direct Anthropic auth path.

Why

The repo used to be Claude-first, but the old setup depended on direct Anthropic wiring that we do not want to bring back. OpenCode now supports OpenAI-compatible custom providers, so this should be expressed as a new OpenRouter provider migration rather than a revert.

Scope

  • Add an explicit OpenRouter provider in dot-config/opencode/opencode.json
  • Point it at https://openrouter.ai/api/v1 using @ai-sdk/openai-compatible
  • Add the Claude model IDs we actually want to use
  • Keep any remaining OpenAI/Codex-specific auth only where still needed
  • Do not restore opencode-claude-auth

Acceptance criteria

  • opencode.json has a dedicated OpenRouter provider block
  • Claude models are selectable through that provider
  • OpenAI-only provider options are not blindly copied onto the OpenRouter provider
  • The config documents or encodes the intended default Claude model(s)
## Summary Reintroduce Claude-class models to OpenCode through OpenRouter instead of restoring the old direct Anthropic auth path. ## Why The repo used to be Claude-first, but the old setup depended on direct Anthropic wiring that we do not want to bring back. OpenCode now supports OpenAI-compatible custom providers, so this should be expressed as a new OpenRouter provider migration rather than a revert. ## Scope - Add an explicit OpenRouter provider in `dot-config/opencode/opencode.json` - Point it at `https://openrouter.ai/api/v1` using `@ai-sdk/openai-compatible` - Add the Claude model IDs we actually want to use - Keep any remaining OpenAI/Codex-specific auth only where still needed - Do not restore `opencode-claude-auth` ## Acceptance criteria - `opencode.json` has a dedicated OpenRouter provider block - Claude models are selectable through that provider - OpenAI-only provider options are not blindly copied onto the OpenRouter provider - The config documents or encodes the intended default Claude model(s)
bryan closed this issue 2026-04-18 04:36:19 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/dotfiles#7
No description provided.