Skip to content

Commit 876840e

Browse files
committed
Update pydantic code to fix warnings
Before: ```shell $ env -i PATH=$PATH poetry run pytest litellm/tests/test_proxy_server.py ====================================== test session starts ====================================== platform darwin -- Python 3.12.3, pytest-7.4.4, pluggy-1.5.0 rootdir: /Users/abramowi/Code/OpenSource/litellm plugins: anyio-4.3.0, asyncio-0.23.6, mock-3.14.0 asyncio: mode=Mode.STRICT collected 12 items litellm/tests/test_proxy_server.py s..........s [100%] ======================================= warnings summary ======================================== ../../../Library/Caches/pypoetry/virtualenvs/litellm-Fe7WjZrx-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:284: 25 warnings /Users/abramowi/Library/Caches/pypoetry/virtualenvs/litellm-Fe7WjZrx-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:284: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning) litellm/proxy/_types.py:225 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:225: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:312 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:312: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ extra = Extra.allow # Allow extra fields litellm/proxy/_types.py:315 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:315: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:344 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:344: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:391 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:391: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:460 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:460: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:480 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:480: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:493 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:493: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:538 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:538: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:575 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:575: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:870 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:870: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:897 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:897: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/proxy/_types.py:918 /Users/abramowi/Code/OpenSource/litellm/litellm/proxy/_types.py:918: PydanticDeprecatedSince20: Pydantic V1 style `@root_validator` validators are deprecated. You should migrate to Pydantic V2 style `@model_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ @root_validator(pre=True) litellm/utils.py:43 /Users/abramowi/Code/OpenSource/litellm/litellm/utils.py:43: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources # type: ignore litellm/tests/test_proxy_server.py::test_bedrock_embedding litellm/tests/test_proxy_server.py::test_chat_completion litellm/tests/test_proxy_server.py::test_chat_completion_azure litellm/tests/test_proxy_server.py::test_chat_completion_optional_params litellm/tests/test_proxy_server.py::test_embedding litellm/tests/test_proxy_server.py::test_engines_model_chat_completions litellm/tests/test_proxy_server.py::test_health litellm/tests/test_proxy_server.py::test_img_gen litellm/tests/test_proxy_server.py::test_openai_deployments_model_chat_completions_azure /Users/abramowi/Library/Caches/pypoetry/virtualenvs/litellm-Fe7WjZrx-py3.12/lib/python3.12/site-packages/httpx/_client.py:680: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead. warnings.warn(message, DeprecationWarning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================== 10 passed, 2 skipped, 48 warnings in 9.83s =========================== ``` After: ```shell $ env -i PATH=$PATH poetry run pytest litellm/tests/test_proxy_server.py ====================================== test session starts ====================================== platform darwin -- Python 3.12.3, pytest-7.4.4, pluggy-1.5.0 rootdir: /Users/abramowi/Code/OpenSource/litellm plugins: anyio-4.3.0, asyncio-0.23.6, mock-3.14.0 asyncio: mode=Mode.STRICT collected 12 items litellm/tests/test_proxy_server.py s..........s [100%] ======================================= warnings summary ======================================== litellm/utils.py:43 /Users/abramowi/Code/OpenSource/litellm/litellm/utils.py:43: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources # type: ignore litellm/tests/test_proxy_server.py::test_bedrock_embedding litellm/tests/test_proxy_server.py::test_chat_completion litellm/tests/test_proxy_server.py::test_chat_completion_azure litellm/tests/test_proxy_server.py::test_chat_completion_optional_params litellm/tests/test_proxy_server.py::test_embedding litellm/tests/test_proxy_server.py::test_engines_model_chat_completions litellm/tests/test_proxy_server.py::test_health litellm/tests/test_proxy_server.py::test_img_gen litellm/tests/test_proxy_server.py::test_openai_deployments_model_chat_completions_azure /Users/abramowi/Library/Caches/pypoetry/virtualenvs/litellm-Fe7WjZrx-py3.12/lib/python3.12/site-packages/httpx/_client.py:680: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead. warnings.warn(message, DeprecationWarning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================== 10 passed, 2 skipped, 10 warnings in 9.62s =========================== ```
1 parent b1bf49f commit 876840e

File tree

8 files changed

+84
-99
lines changed

8 files changed

+84
-99
lines changed

litellm/integrations/slack_alerting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class DeploymentMetrics(LiteLLMBase):
5050
failed_request: bool
5151
"""did it fail the request?"""
5252

53-
latency_per_output_token: Optional[float]
53+
latency_per_output_token: Optional[float] = None
5454
"""latency/output token of deployment"""
5555

5656
updated_at: dt

litellm/proxy/_types.py

+58-44
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from pydantic import BaseModel, Extra, Field, root_validator, Json, validator
2-
from dataclasses import fields
1+
from pydantic import BaseModel, Field, model_validator, Json
32
import enum
43
from typing import Optional, List, Union, Dict, Literal, Any
54
from datetime import datetime
6-
import uuid, json, sys, os
5+
import uuid
6+
import json
77
from litellm.types.router import UpdateRouterConfig
88

99

@@ -35,8 +35,9 @@ def fields_set(self):
3535
# if using pydantic v1
3636
return self.__fields_set__
3737

38-
class Config:
39-
protected_namespaces = ()
38+
model_config = dict(
39+
protected_namespaces = (),
40+
)
4041

4142

4243
class LiteLLM_UpperboundKeyGenerateParams(LiteLLMBase):
@@ -216,7 +217,7 @@ class LiteLLMPromptInjectionParams(LiteLLMBase):
216217
llm_api_system_prompt: Optional[str] = None
217218
llm_api_fail_call_string: Optional[str] = None
218219

219-
@root_validator(pre=True)
220+
@model_validator(mode="before")
220221
def check_llm_api_params(cls, values):
221222
llm_api_check = values.get("llm_api_check")
222223
if llm_api_check is True:
@@ -274,8 +275,9 @@ class ProxyChatCompletionRequest(LiteLLMBase):
274275
deployment_id: Optional[str] = None
275276
request_timeout: Optional[int] = None
276277

277-
class Config:
278-
extra = "allow" # allow params not defined here, these fall in litellm.completion(**kwargs)
278+
model_config = dict(
279+
extra = "allow", # allow params not defined here, these fall in litellm.completion(**kwargs)
280+
)
279281

280282

281283
class ModelInfoDelete(LiteLLMBase):
@@ -302,11 +304,12 @@ class ModelInfo(LiteLLMBase):
302304
]
303305
]
304306

305-
class Config:
306-
extra = Extra.allow # Allow extra fields
307-
protected_namespaces = ()
307+
model_config = dict(
308+
extra = "allow", # Allow extra fields
309+
protected_namespaces = (),
310+
)
308311

309-
@root_validator(pre=True)
312+
@model_validator(mode="before")
310313
def set_model_info(cls, values):
311314
if values.get("id") is None:
312315
values.update({"id": str(uuid.uuid4())})
@@ -332,10 +335,11 @@ class ModelParams(LiteLLMBase):
332335
litellm_params: dict
333336
model_info: ModelInfo
334337

335-
class Config:
336-
protected_namespaces = ()
338+
model_config = dict(
339+
protected_namespaces = (),
340+
)
337341

338-
@root_validator(pre=True)
342+
@model_validator(mode="before")
339343
def set_model_info(cls, values):
340344
if values.get("model_info") is None:
341345
values.update({"model_info": ModelInfo()})
@@ -371,8 +375,9 @@ class GenerateKeyRequest(GenerateRequestBase):
371375
{}
372376
) # {"gpt-4": 5.0, "gpt-3.5-turbo": 5.0}, defaults to {}
373377

374-
class Config:
375-
protected_namespaces = ()
378+
model_config = dict(
379+
protected_namespaces = (),
380+
)
376381

377382

378383
class GenerateKeyResponse(GenerateKeyRequest):
@@ -382,7 +387,7 @@ class GenerateKeyResponse(GenerateKeyRequest):
382387
user_id: Optional[str] = None
383388
token_id: Optional[str] = None
384389

385-
@root_validator(pre=True)
390+
@model_validator(mode="before")
386391
def set_model_info(cls, values):
387392
if values.get("token") is not None:
388393
values.update({"key": values.get("token")})
@@ -422,8 +427,9 @@ class LiteLLM_ModelTable(LiteLLMBase):
422427
created_by: str
423428
updated_by: str
424429

425-
class Config:
426-
protected_namespaces = ()
430+
model_config = dict(
431+
protected_namespaces = (),
432+
)
427433

428434

429435
class NewUserRequest(GenerateKeyRequest):
@@ -451,7 +457,7 @@ class UpdateUserRequest(GenerateRequestBase):
451457
user_role: Optional[str] = None
452458
max_budget: Optional[float] = None
453459

454-
@root_validator(pre=True)
460+
@model_validator(mode="before")
455461
def check_user_info(cls, values):
456462
if values.get("user_id") is None and values.get("user_email") is None:
457463
raise ValueError("Either user id or user email must be provided")
@@ -471,7 +477,7 @@ class NewEndUserRequest(LiteLLMBase):
471477
None # if no equivalent model in allowed region - default all requests to this model
472478
)
473479

474-
@root_validator(pre=True)
480+
@model_validator(mode="before")
475481
def check_user_info(cls, values):
476482
if values.get("max_budget") is not None and values.get("budget_id") is not None:
477483
raise ValueError("Set either 'max_budget' or 'budget_id', not both.")
@@ -484,7 +490,7 @@ class Member(LiteLLMBase):
484490
user_id: Optional[str] = None
485491
user_email: Optional[str] = None
486492

487-
@root_validator(pre=True)
493+
@model_validator(mode="before")
488494
def check_user_info(cls, values):
489495
if values.get("user_id") is None and values.get("user_email") is None:
490496
raise ValueError("Either user id or user email must be provided")
@@ -509,8 +515,9 @@ class TeamBase(LiteLLMBase):
509515
class NewTeamRequest(TeamBase):
510516
model_aliases: Optional[dict] = None
511517

512-
class Config:
513-
protected_namespaces = ()
518+
model_config = dict(
519+
protected_namespaces = (),
520+
)
514521

515522

516523
class GlobalEndUsersSpend(LiteLLMBase):
@@ -529,7 +536,7 @@ class TeamMemberDeleteRequest(LiteLLMBase):
529536
user_id: Optional[str] = None
530537
user_email: Optional[str] = None
531538

532-
@root_validator(pre=True)
539+
@model_validator(mode="before")
533540
def check_user_info(cls, values):
534541
if values.get("user_id") is None and values.get("user_email") is None:
535542
raise ValueError("Either user id or user email must be provided")
@@ -563,10 +570,11 @@ class LiteLLM_TeamTable(TeamBase):
563570
budget_reset_at: Optional[datetime] = None
564571
model_id: Optional[int] = None
565572

566-
class Config:
567-
protected_namespaces = ()
573+
model_config = dict(
574+
protected_namespaces = (),
575+
)
568576

569-
@root_validator(pre=True)
577+
@model_validator(mode="before")
570578
def set_model_info(cls, values):
571579
dict_fields = [
572580
"metadata",
@@ -602,8 +610,9 @@ class LiteLLM_BudgetTable(LiteLLMBase):
602610
model_max_budget: Optional[dict] = None
603611
budget_duration: Optional[str] = None
604612

605-
class Config:
606-
protected_namespaces = ()
613+
model_config = dict(
614+
protected_namespaces = (),
615+
)
607616

608617

609618
class NewOrganizationRequest(LiteLLM_BudgetTable):
@@ -653,8 +662,9 @@ class KeyManagementSettings(LiteLLMBase):
653662
class TeamDefaultSettings(LiteLLMBase):
654663
team_id: str
655664

656-
class Config:
657-
extra = "allow" # allow params not defined here, these fall in litellm.completion(**kwargs)
665+
model_config = dict(
666+
extra = "allow", # allow params not defined here, these fall in litellm.completion(**kwargs)
667+
)
658668

659669

660670
class DynamoDBArgs(LiteLLMBase):
@@ -795,8 +805,9 @@ class ConfigYAML(LiteLLMBase):
795805
description="litellm router object settings. See router.py __init__ for all, example router.num_retries=5, router.timeout=5, router.max_retries=5, router.retry_after=5",
796806
)
797807

798-
class Config:
799-
protected_namespaces = ()
808+
model_config = dict(
809+
protected_namespaces = (),
810+
)
800811

801812

802813
class LiteLLM_VerificationToken(LiteLLMBase):
@@ -830,8 +841,9 @@ class LiteLLM_VerificationToken(LiteLLMBase):
830841
user_id_rate_limits: Optional[dict] = None
831842
team_id_rate_limits: Optional[dict] = None
832843

833-
class Config:
834-
protected_namespaces = ()
844+
model_config = dict(
845+
protected_namespaces = (),
846+
)
835847

836848

837849
class LiteLLM_VerificationTokenView(LiteLLM_VerificationToken):
@@ -861,7 +873,7 @@ class UserAPIKeyAuth(
861873
user_role: Optional[Literal["proxy_admin", "app_owner", "app_user"]] = None
862874
allowed_model_region: Optional[Literal["eu"]] = None
863875

864-
@root_validator(pre=True)
876+
@model_validator(mode="before")
865877
def check_api_key(cls, values):
866878
if values.get("api_key") is not None:
867879
values.update({"token": hash_token(values.get("api_key"))})
@@ -888,16 +900,17 @@ class LiteLLM_UserTable(LiteLLMBase):
888900
tpm_limit: Optional[int] = None
889901
rpm_limit: Optional[int] = None
890902

891-
@root_validator(pre=True)
903+
@model_validator(mode="before")
892904
def set_model_info(cls, values):
893905
if values.get("spend") is None:
894906
values.update({"spend": 0.0})
895907
if values.get("models") is None:
896908
values.update({"models": []})
897909
return values
898910

899-
class Config:
900-
protected_namespaces = ()
911+
model_config = dict(
912+
protected_namespaces = (),
913+
)
901914

902915

903916
class LiteLLM_EndUserTable(LiteLLMBase):
@@ -909,14 +922,15 @@ class LiteLLM_EndUserTable(LiteLLMBase):
909922
default_model: Optional[str] = None
910923
litellm_budget_table: Optional[LiteLLM_BudgetTable] = None
911924

912-
@root_validator(pre=True)
925+
@model_validator(mode="before")
913926
def set_model_info(cls, values):
914927
if values.get("spend") is None:
915928
values.update({"spend": 0.0})
916929
return values
917930

918-
class Config:
919-
protected_namespaces = ()
931+
model_config = dict(
932+
protected_namespaces = (),
933+
)
920934

921935

922936
class LiteLLM_SpendLogs(LiteLLMBase):

litellm/tests/test_config.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import sys, os
66
import traceback
77
from dotenv import load_dotenv
8+
from pydantic import ConfigDict
89

910
load_dotenv()
1011
import os, io
@@ -25,9 +26,7 @@ class DBModel(BaseModel):
2526
model_name: str
2627
model_info: dict
2728
litellm_params: dict
28-
29-
class Config:
30-
protected_namespaces = ()
29+
model_config = ConfigDict(protected_namespaces=())
3130

3231

3332
@pytest.mark.asyncio

litellm/tests/test_streaming.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2156,15 +2156,15 @@ class ToolCalls(BaseModel):
21562156

21572157
class Delta(BaseModel):
21582158
role: str
2159-
content: Optional[str]
2159+
content: Optional[str] = None
21602160
tool_calls: List[ToolCalls]
21612161

21622162

21632163
class Choices(BaseModel):
21642164
index: int
21652165
delta: Delta
2166-
logprobs: Optional[str]
2167-
finish_reason: Optional[str]
2166+
logprobs: Optional[str] = None
2167+
finish_reason: Optional[str] = None
21682168

21692169

21702170
class Chunk(BaseModel):
@@ -2218,7 +2218,7 @@ class Function2(BaseModel):
22182218

22192219
class ToolCalls2(BaseModel):
22202220
index: int
2221-
function: Optional[Function2]
2221+
function: Optional[Function2] = None
22222222

22232223

22242224
class Delta2(BaseModel):
@@ -2228,8 +2228,8 @@ class Delta2(BaseModel):
22282228
class Choices2(BaseModel):
22292229
index: int
22302230
delta: Delta2
2231-
logprobs: Optional[str]
2232-
finish_reason: Optional[str]
2231+
logprobs: Optional[str] = None
2232+
finish_reason: Optional[str] = None
22332233

22342234

22352235
class Chunk2(BaseModel):
@@ -2283,7 +2283,7 @@ class Delta3(BaseModel):
22832283
class Choices3(BaseModel):
22842284
index: int
22852285
delta: Delta3
2286-
logprobs: Optional[str]
2286+
logprobs: Optional[str] = None
22872287
finish_reason: str
22882288

22892289

litellm/types/completion.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import List, Optional, Union, Iterable
22

3-
from pydantic import BaseModel, validator
3+
from pydantic import ConfigDict, BaseModel, validator
44

55
from typing_extensions import Literal, Required, TypedDict
66

@@ -190,7 +190,4 @@ class CompletionRequest(BaseModel):
190190
api_version: Optional[str] = None
191191
api_key: Optional[str] = None
192192
model_list: Optional[List[str]] = None
193-
194-
class Config:
195-
extra = "allow"
196-
protected_namespaces = ()
193+
model_config = ConfigDict(extra="allow", protected_namespaces=())

litellm/types/embedding.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import List, Optional, Union
22

3-
from pydantic import BaseModel, validator
3+
from pydantic import ConfigDict, BaseModel, validator
44

55

66
class EmbeddingRequest(BaseModel):
@@ -17,7 +17,4 @@ class EmbeddingRequest(BaseModel):
1717
litellm_call_id: Optional[str] = None
1818
litellm_logging_obj: Optional[dict] = None
1919
logger_fn: Optional[str] = None
20-
21-
class Config:
22-
# allow kwargs
23-
extra = "allow"
20+
model_config = ConfigDict(extra="allow")

0 commit comments

Comments
 (0)