test(bedrock): type the probe credential overrides

This commit is contained in:
mateo-berri 2026-09-09 16:14:00 -07:00
parent d644e4970f
commit e27a549aa9
2 changed files with 10 additions and 2 deletions

View file

@ -3,6 +3,7 @@ from unittest.mock import AsyncMock
import httpx
import pytest
from botocore.credentials import RefreshableCredentials
from litellm.llms.bedrock.count_tokens.handler import BedrockCountTokensHandler
from 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()

View file

@ -7,6 +7,7 @@ from unittest.mock import AsyncMock, Mock, patch
import httpx
import pytest
from botocore.credentials import RefreshableCredentials
import litellm
from 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()