mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(bedrock): type the probe credential overrides
This commit is contained in:
parent
d644e4970f
commit
e27a549aa9
2 changed files with 10 additions and 2 deletions
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue