Skip to content

Conversation

@angus-langchain
Copy link
Contributor

@angus-langchain angus-langchain commented Dec 28, 2025

Changes

  • Migrate from Pydantic v1 to v2 syntax
  • Update class Configmodel_config = ConfigDict(...)
  • Update validators: @validator/@root_validator@field_validator/@model_validator
  • Update .dict().model_dump(), .update_forward_refs().model_rebuild()
  • Update Field params: min_items/max_itemsmin_length/max_length
  • Bump minimum pydantic version to >=2,<3

Test plan

  • Existing tests pass
  • Manual

Todo

  • Update LangChainTracer to use Pydantic v2 syntax (with minimum LS version)
    • run.dict(...)run.model_dump(...)
    • Run.construct(...)Run.model_construct(...)

Resolves #2029

@angus-langchain angus-langchain merged commit 71b7189 into main Jan 2, 2026
36 of 41 checks passed
@angus-langchain angus-langchain deleted the angus/bump-pydantic-v2 branch January 2, 2026 18:41
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.

pydantic v2 compatibility

4 participants