Describe the issue
While debugging prompt caching for Cline+Anthropic, we noticed that we aren't actually passing the Anthropic base URL from config / CLI flags to the litellm AnthropicCompletion class.
e.g. poetry run codegate serve --anthropic-url=http://127.0.0.1:8080/
e.g. CODEGATE_PROVIDER_ANTHROPIC_URL=http://127.0.0.1:8080/ poetry run codegate serve
You can workaround this by setting ANTHROPIC_BASE_URL, which is an in-built behaviour of litellm (and also undocumented). @kantord figured this out from this docs link for langsmith
Steps to Reproduce
- export a
CODEGATE_PROVIDER_ANTHROPIC_URL (as mentioned in config.yaml.example
OR
- start the server with
--anthropic-url flag
If, for example, you've pointed the URL at something like mitmproxy, you should notice that the requests pass straight through to anthropic, without respecting your config.
Operating System
Linux (Intel)
IDE and Version
VS CODE 1.9.5.3
Extension and Version
Cline v3.2.12
Provider
Anthropic
Model
claude-3-5-sonnet
Codegate version
CodeGate 0.1.7 (as returned by codegate version), 0ed1365
Logs
No response
Additional Context
No response