(client_cls: type[Client])
| 100 | |
| 101 | @pytest.mark.parametrize("client_cls", [BedrockOpenAI, AsyncBedrockOpenAI]) |
| 102 | def test_region_derived_base_url(client_cls: type[Client]) -> None: |
| 103 | with update_env(AWS_BEDROCK_BASE_URL=Omit(), AWS_REGION="us-east-1", AWS_DEFAULT_REGION=Omit()): |
| 104 | client = ( |
| 105 | make_sync_client(api_key="token") if client_cls is BedrockOpenAI else make_async_client(api_key="token") |
| 106 | ) |
| 107 | |
| 108 | assert client.base_url == URL("https://bedrock-mantle.us-east-1.api.aws/openai/v1/") |
| 109 | |
| 110 | |
| 111 | @pytest.mark.parametrize("client_cls", [BedrockOpenAI, AsyncBedrockOpenAI]) |
nothing calls this directly
no test coverage detected