mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
fix(types): type the catalog snapshot and echo filter parameters as Mapping[str, object]
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
b59fd1090e
commit
65849225f6
2 changed files with 4 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ class GetModelCostMap:
|
|||
return cls._loaded_catalog
|
||||
|
||||
@classmethod
|
||||
def _snapshot_loaded_catalog(cls, model_cost: dict) -> None:
|
||||
def _snapshot_loaded_catalog(cls, model_cost: Mapping[str, object]) -> None:
|
||||
raw: Final = _CATALOG_ADAPTER.validate_python(model_cost)
|
||||
cls._loaded_catalog = MappingProxyType({key: MappingProxyType(entry) for key, entry in raw.items()})
|
||||
|
||||
|
|
|
|||
|
|
@ -3779,7 +3779,9 @@ def echoed_cost_map_pricing_fields(model_info: Mapping[str, Any]) -> tuple[str,
|
|||
return tuple(sorted(k for k in model_info if is_server_derived_pricing_key(k)))
|
||||
|
||||
|
||||
def echoed_cost_map_fields(model_info: Mapping[str, Any], *cost_map_entries: Mapping[str, Any]) -> tuple[str, ...]:
|
||||
def echoed_cost_map_fields(
|
||||
model_info: Mapping[str, object], *cost_map_entries: Mapping[str, object]
|
||||
) -> tuple[str, ...]:
|
||||
"""Fields a ``/model/info`` echo copied from the cost map unchanged.
|
||||
|
||||
Only ``litellm.get_model_info`` emits ``key``, so a blob carrying it is an echo of that
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue