Add configurable Anthropic API base URL#589
Conversation
|
Is there an ETA when this feature will be merged? |
Introduces anthropic_api_base configuration option to allow users to specify custom Anthropic API endpoints. This enables support for proxies, custom deployments, and alternative Anthropic-compatible services. Also fixes URL path formatting in chat and models endpoints by removing redundant leading slashes.
280acc7 to
4c2e17c
Compare
|
@michaelwapp I've just rebased it. Hopefully, someone will pick it up. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #589 +/- ##
=======================================
Coverage 80.89% 80.89%
=======================================
Files 113 113
Lines 5098 5098
Branches 1309 1309
=======================================
Hits 4124 4124
Misses 974 974 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for the contribution. I’m going to move this forward to keep momentum and handle the small docs/process follow-up on maintainer side. For your next PR, please use the repository PR template and include the required new-feature process items (especially linked pre-approved issue + checklist completion) so review can proceed without back-and-forth. |
Summary
Adds support for configurable Anthropic API base URL through a new
anthropic_api_baseconfiguration option. This allows users to point to custom endpoints such as proxies, custom deployments, or alternative Anthropic-compatible services.Changes
anthropic_api_baseconfiguration attributehttps://api.anthropic.comANTHROPIC_BASE_URLenvironment variableUse Cases
This enhancement enables:
Configuration Example
Or via environment variable:
Backward Compatibility
✅ Fully backward compatible - defaults to official Anthropic API endpoint when not configured