fix(providers): support anthropic proxy v1 endpoints
This commit is contained in:
@@ -113,6 +113,15 @@ class TestBuildAnthropicClient:
|
||||
"anthropic-beta": "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14"
|
||||
}
|
||||
|
||||
def test_custom_base_url_strips_trailing_v1(self):
|
||||
with patch("agent.anthropic_adapter._anthropic_sdk") as mock_sdk:
|
||||
build_anthropic_client(
|
||||
"sk-ant-api03-x",
|
||||
base_url="https://proxy.example.com/anthropic/v1",
|
||||
)
|
||||
kwargs = mock_sdk.Anthropic.call_args[1]
|
||||
assert kwargs["base_url"] == "https://proxy.example.com/anthropic"
|
||||
|
||||
def test_azure_anthropic_endpoint_keeps_context_1m_beta(self):
|
||||
with patch("agent.anthropic_adapter._anthropic_sdk") as mock_sdk:
|
||||
build_anthropic_client(
|
||||
|
||||
Reference in New Issue
Block a user