mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
fix(responses): validate litellm params without unpacking untyped kwargs
Adding xai_oauth_token_file to GenericLiteLLMParams adds one unknown argument at every GenericLiteLLMParams(**kwargs) call site. Building the params in responses() with model_validate, which behaves the same for a model without a custom __init__, keeps the basedpyright total below base.
This commit is contained in:
parent
cdeb862da2
commit
be312eb160
1 changed files with 1 additions and 1 deletions
|
|
@ -1467,7 +1467,7 @@ def responses(
|
|||
)
|
||||
|
||||
# get llm provider logic
|
||||
litellm_params: Final = GenericLiteLLMParams(**kwargs)
|
||||
litellm_params: Final = GenericLiteLLMParams.model_validate(kwargs)
|
||||
affinity_api_base: Final = (
|
||||
get_openai_credentials(api_base=litellm_params.api_base).api_base
|
||||
if custom_llm_provider == "openai"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue