Tests for ANTHROPIC_PROXY_API_VERSION env var.
| 213 | |
| 214 | |
| 215 | class TestApiVersionConfiguration: |
| 216 | """Tests for ANTHROPIC_PROXY_API_VERSION env var.""" |
| 217 | |
| 218 | def test_default_api_version(self, monkeypatch: pytest.MonkeyPatch) -> None: |
| 219 | monkeypatch.delenv("ANTHROPIC_PROXY_API_VERSION", raising=False) |
| 220 | assert _get_api_version() == "vertex-2023-10-16" |
| 221 | |
| 222 | def test_custom_api_version(self, monkeypatch: pytest.MonkeyPatch) -> None: |
| 223 | monkeypatch.setenv("ANTHROPIC_PROXY_API_VERSION", "bedrock-2023-05-31") |
| 224 | assert _get_api_version() == "bedrock-2023-05-31" |
| 225 | |
| 226 | def test_empty_string_falls_back_to_default(self, monkeypatch: pytest.MonkeyPatch) -> None: |
| 227 | monkeypatch.setenv("ANTHROPIC_PROXY_API_VERSION", " ") |
| 228 | assert _get_api_version() == DEFAULT_API_VERSION |
| 229 | |
| 230 | |
| 231 | class TestProviderSelection: |
nothing calls this directly
no outgoing calls
no test coverage detected