Protocol: OpenAI-compatible
- Base URL:
https://api.orcarouter.ai/v1(includes/v1)
Install
Configure
Config file:~/.config/opencode/opencode.json.
google/gemini-2.5-flash or
anthropic/claude-opus-4.8. Model IDs always use the vendor/model format.
Run
OK.
Notes
- The base URL must include
/v1. - Model references use the
provider/modelformat. Because the provider is namedorcarouterand the model ID also carries avendorprefix, the reference is three segments:orcarouter/orcarouter/auto(ororcarouter/anthropic/claude-opus-4.8for a specific model).
VS Code extension: OpenCode’s official VS Code extension (
sst-dev.opencode)
runs the CLI inside the editor and shares the same opencode.json — there’s no
separate in-editor endpoint setting. Configure it once as above and the
extension picks it up.Enable thinking / reasoning
SetreasoningEffort in the model’s options:
reasoningEffort also sidesteps the temperature warning above —
with thinking enabled, temperature = 1 is legal, so the 400 disappears. For
Anthropic-native control, the @ai-sdk/anthropic provider accepts
thinking: { type: "enabled", budgetTokens: N }.