|
45 | 45 | resolve_provider_credentials, |
46 | 46 | use_provider, |
47 | 47 | ) |
48 | | -from skillspector.providers.anthropic import ANTHROPIC_BASE_URL, AnthropicProvider |
| 48 | +from skillspector.providers.anthropic import AnthropicProvider |
49 | 49 | from skillspector.providers.antigravity_cli import AntigravityCLIProvider |
50 | 50 | from skillspector.providers.chat_models import create_openai_compatible_chat_model |
51 | 51 | from skillspector.providers.claude_cli import ClaudeCLIProvider |
@@ -118,7 +118,6 @@ def _clean_provider_env(monkeypatch: pytest.MonkeyPatch): |
118 | 118 | monkeypatch.delenv("OPENAI_PROJECT_ID", raising=False) |
119 | 119 | monkeypatch.delenv("SKILLSPECTOR_REASONING_EFFORT", raising=False) |
120 | 120 | monkeypatch.delenv("ANTHROPIC_API_KEY", raising=False) |
121 | | - monkeypatch.delenv("ANTHROPIC_BASE_URL", raising=False) |
122 | 121 | monkeypatch.delenv("SKILLSPECTOR_MODEL", raising=False) |
123 | 122 | monkeypatch.delenv("SKILLSPECTOR_MODEL_REGISTRY", raising=False) |
124 | 123 | monkeypatch.delenv("SKILLSPECTOR_PROVIDER", raising=False) |
@@ -301,31 +300,14 @@ def test_resolves_anthropic_api_key_without_openai_endpoint( |
301 | 300 | ) -> None: |
302 | 301 | monkeypatch.setenv("ANTHROPIC_API_KEY", "sk-ant-x") |
303 | 302 | creds = AnthropicProvider().resolve_credentials() |
304 | | - assert creds == ("sk-ant-x", None) # None → ChatAnthropic uses api.anthropic.com |
305 | | - |
306 | | - def test_honors_anthropic_base_url_override(self, monkeypatch: pytest.MonkeyPatch) -> None: |
307 | | - monkeypatch.setenv("ANTHROPIC_API_KEY", "sk-ant-x") |
308 | | - monkeypatch.setenv("ANTHROPIC_BASE_URL", "http://localhost:8787") |
309 | | - creds = AnthropicProvider().resolve_credentials() |
310 | | - assert creds == ("sk-ant-x", "http://localhost:8787") |
| 303 | + assert creds == ("sk-ant-x", None) |
311 | 304 |
|
312 | 305 | def test_creates_native_chat_anthropic(self, monkeypatch: pytest.MonkeyPatch) -> None: |
313 | 306 | monkeypatch.setenv("ANTHROPIC_API_KEY", "sk-ant-x") |
314 | 307 | llm = AnthropicProvider().create_chat_model("claude-opus-4-6", max_tokens=123) |
315 | 308 | assert isinstance(llm, ChatAnthropic) |
316 | 309 | assert llm.model == "claude-opus-4-6" |
317 | 310 | assert llm.max_tokens == 123 |
318 | | - # No override → ChatAnthropic points at the default Anthropic endpoint. |
319 | | - assert str(llm.anthropic_api_url).rstrip("/") == ANTHROPIC_BASE_URL.rstrip("/") |
320 | | - |
321 | | - def test_create_chat_model_honors_base_url_override( |
322 | | - self, monkeypatch: pytest.MonkeyPatch |
323 | | - ) -> None: |
324 | | - monkeypatch.setenv("ANTHROPIC_API_KEY", "sk-ant-x") |
325 | | - monkeypatch.setenv("ANTHROPIC_BASE_URL", "http://localhost:8787") |
326 | | - llm = AnthropicProvider().create_chat_model("claude-opus-4-6", max_tokens=123) |
327 | | - assert isinstance(llm, ChatAnthropic) |
328 | | - assert str(llm.anthropic_api_url).rstrip("/") == "http://localhost:8787" |
329 | 311 |
|
330 | 312 | @pytest.mark.parametrize("effort", ["provider-specific-value"]) |
331 | 313 | def test_reasoning_effort_passthrough( |
|
0 commit comments