The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(bedrock): type the probe credential overrides
mateo-berrie27a549aa919
diff --git a/tests/test_litellm/llms/bedrock/count_tokens/test_bedrock_count_tokens_handler.py b/tests/test_litellm/llms/bedrock/count_tokens/test_bedrock_count_tokens_handler.pyindex 31e65bb6e27..3622ce7f212 100644--- a/tests/test_litellm/llms/bedrock/count_tokens/test_bedrock_count_tokens_handler.py+++ b/tests/test_litellm/llms/bedrock/count_tokens/test_bedrock_count_tokens_handler.py@@ -3,6 +3,7 @@ from unittest.mock import AsyncMockimport httpximport pytest+from botocore.credentials import RefreshableCredentialsfrom litellm.llms.bedrock.count_tokens.handler import BedrockCountTokensHandlerfrom litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler@@ -14,7 +15,10 @@ class _ProbedCountTokensHandler(BedrockCountTokensHandler):super().__init__()self._probe = probe- def get_credentials(self, **kwargs):+ def get_credentials(+ self,+ **kwargs: object, # kwargs-ok: mirrors the base resolver's keyword contract, which the probe ignores+ ) -> RefreshableCredentials:return self._probe.credentials()diff --git a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.pyindex b5eb98c4ce6..1140090f9cf 100644--- a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py+++ b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py@@ -7,6 +7,7 @@ from unittest.mock import AsyncMock, Mock, patchimport httpximport pytest+from botocore.credentials import RefreshableCredentialsimport litellmfrom litellm._logging import verbose_logger@@ -822,7 +823,10 @@ class _ProbedBedrockMessagesConfig(AmazonAnthropicClaudeMessagesConfig):super().__init__()self._probe = probe- def get_credentials(self, **kwargs):+ def get_credentials(+ self,+ **kwargs: object, # kwargs-ok: mirrors the base resolver's keyword contract, which the probe ignores+ ) -> RefreshableCredentials:return self._probe.credentials()