Skip to content

fix(pydantic): use ConfigDict instead of class-based Config in SearchInterface#1478

Open
yuzi-co wants to merge 1 commit into
getzep:mainfrom
yuzi-co:fix/searchinterface-pydantic-v2-config
Open

fix(pydantic): use ConfigDict instead of class-based Config in SearchInterface#1478
yuzi-co wants to merge 1 commit into
getzep:mainfrom
yuzi-co:fix/searchinterface-pydantic-v2-config

Conversation

@yuzi-co
Copy link
Copy Markdown

@yuzi-co yuzi-co commented May 8, 2026

Summary

Resolves #1477. SearchInterface declares a Pydantic v1-style class Config: which Pydantic v2 deprecated and v3 will reject as a hard error. This PR swaps to the v2 idiom — one-line behavior preserved.

Diff

-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict


 class SearchInterface(BaseModel):
     """..."""

+    model_config = ConfigDict(arbitrary_types_allowed=True)
+
     async def edge_fulltext_search(...): ...

-    class Config:
-        arbitrary_types_allowed = True

Verification

  • from graphiti_core.driver.search_interface.search_interface import SearchInterface; SearchInterface.model_config returns {'arbitrary_types_allowed': True} — same configuration as before, no semantic change.
  • python -W error::DeprecationWarning -c "import graphiti_core" no longer raises.

Test plan

  • No behavior change (arbitrary_types_allowed=True preserved).
  • CI run by maintainers; happy to address feedback.

🤖 Generated with Claude Code

…Interface

Resolves getzep#1477. class-based `Config:` was deprecated in Pydantic v2 and
becomes a hard error in v3. Swap to the v2 idiom:

  model_config = ConfigDict(arbitrary_types_allowed=True)

No behavioral change — `arbitrary_types_allowed=True` preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchInterface uses deprecated class-based Config (Pydantic v2 deprecation, will hard-fail in v3)

1 participant