mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(aiand): stay within the basedpyright reportUnknownArgumentType ceiling
- derive exception_provider as the AiandException literal at the aiand dispatch (the branch is unreachable for any other provider, so the value is unchanged) and narrow model with an isinstance Final, so the call stops feeding legacy untyped locals into the typed mapper - annotate aiand_models as Set[str]
This commit is contained in:
parent
bb22beacec
commit
ff632d868c
2 changed files with 4 additions and 3 deletions
|
|
@ -686,7 +686,7 @@ qwencloud_models: Set = set()
|
|||
qwen_ai_platform_models: Set = set()
|
||||
moonshot_models: Set = set()
|
||||
publicai_models: Set = set()
|
||||
aiand_models: Set = set()
|
||||
aiand_models: Set[str] = set()
|
||||
darkbloom_models: Set = set()
|
||||
v0_models: Set = set()
|
||||
morph_models: Set = set()
|
||||
|
|
|
|||
|
|
@ -2529,13 +2529,14 @@ def exception_type(
|
|||
body=getattr(original_exception, "body", None),
|
||||
)
|
||||
if custom_llm_provider == "aiand":
|
||||
_aiand_model: Final = model if isinstance(model, str) else ""
|
||||
_map_aiand_exception(
|
||||
model=model,
|
||||
model=_aiand_model,
|
||||
original_exception=mappable_exception,
|
||||
custom_llm_provider=custom_llm_provider,
|
||||
error_str=error_str,
|
||||
exception_type=exception_type,
|
||||
exception_provider=exception_provider,
|
||||
exception_provider="AiandException",
|
||||
extra_information=extra_information,
|
||||
)
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue