opencode
opencode copied to clipboard
Add support for LLM Gateway w/ Anthropic
This PR adds support for LLM Gateways as described in anthropic docs https://docs.anthropic.com/en/docs/claude-code/llm-gateway
For others here, I found that I can have the same functionality without these changes, simply by overriding the provider options in the opencode config:
"provider": {
"anthropic": {
"models": {},
"options": {
"apiKey": "{env:ANTHROPIC_AUTH_TOKEN}",
"baseURL": "{env:ANTHROPIC_BASE_URL}/v1"
}
}
}