opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Add support for LLM Gateway w/ Anthropic

Open Karrq opened this issue 6 months ago • 1 comments

This PR adds support for LLM Gateways as described in anthropic docs https://docs.anthropic.com/en/docs/claude-code/llm-gateway

Karrq avatar Jul 12 '25 19:07 Karrq

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"
            }
        }
    }

Karrq avatar Jul 17 '25 13:07 Karrq