Fix Pydantic class-based config deprecation warnings (#9279)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig
2025-06-23 15:10:38 -04:00
committed by GitHub
parent a156d5d243
commit 7b0f880860
16 changed files with 55 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
from pydantic import Field
from pydantic import ConfigDict, Field
from openhands.integrations.provider import CUSTOM_SECRETS_TYPE, PROVIDER_TOKEN_TYPE
from openhands.integrations.service_types import ProviderType
@@ -18,6 +18,6 @@ class ConversationInitData(Settings):
conversation_instructions: str | None = Field(default=None)
git_provider: ProviderType | None = Field(default=None)
model_config = {
'arbitrary_types_allowed': True,
}
model_config = ConfigDict(
arbitrary_types_allowed=True,
)