mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-17 04:34:25 +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. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4981dba25e
commit
fa56dde927
1 changed files with 1 additions and 1 deletions
|
|
@ -1223,7 +1223,7 @@ def responses(
|
|||
)
|
||||
|
||||
# get llm provider logic
|
||||
litellm_params: Final = GenericLiteLLMParams(**kwargs)
|
||||
litellm_params: Final = GenericLiteLLMParams.model_validate(kwargs)
|
||||
try:
|
||||
effective_extra_headers: Final = (
|
||||
add_provider_affinity_header(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue