Skip to content

chore(deps): bump pydantic-ai to 2.13.0 - #205

Closed
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/deps/pydantic-ai-2.13.0
Closed

chore(deps): bump pydantic-ai to 2.13.0#205
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/deps/pydantic-ai-2.13.0

Conversation

@mendral-app

@mendral-app mendral-app Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

⚠️ Reviewer attention

  • Major version bump: pydantic-ai 1.x → 2.x
  • GeminiModel and the pydantic_ai.models.gemini module were removed in v2; migrated to GoogleModel from pydantic_ai.models.google
  • Our custom GoogleGLAProvider(Provider[AsyncClient]) in src/blaxel/pydantic/custom/gemini.py extends the base Provider class which is stable in v2
  • OpenAIChatModel, AnthropicModel, MistralModel, CohereModel and their providers remain at same import paths
  • Agent, RunContext, Tool, ToolDefinition APIs unchanged
  • Behavioral change: Default end_strategy changed from 'early' to 'graceful' — function tools alongside output tools are now executed instead of skipped
  • Suggested manual checks: Run pydantic integration tests; verify gemini model provider works correctly

Packages bumped

Package Group Old New
pydantic-ai pydantic (optional) >=1.0.8 >=2.13.0
pydantic-ai test (dep group) >=0.0.48 >=2.13.0
Per-package details

pydantic-ai (>=1.0.8 → >=2.13.0)

  • v2.0 major release with significant API modernization
  • GeminiModel removed → use GoogleModel from pydantic_ai.models.google
  • OpenAIModel renamed to OpenAIChatModel (we already use the new name)
  • Token/usage fields renamed: request_tokensinput_tokens, response_tokensoutput_tokens
  • Default end_strategy changed from 'early' to 'graceful'
  • builtin_tools API renamed to native_tools (we don't use this)
  • ModelProfile changed from dataclass to TypedDict (we don't use this)
  • Impact on our code: Only the GeminiModelGoogleModel migration in src/blaxel/pydantic/model.py. All other APIs we use (Model, RunContext, Tool, ToolDefinition, Provider, provider-specific models) remain stable.

Files modified

  • pyproject.toml — bump version constraints
  • src/blaxel/pydantic/model.pyGeminiModelGoogleModel import
  • tests/core/test_pydantic_lazy_imports.py — update mocked module path

Note

Created by Mendral. Tag @mendral-app with feedback or questions.

- Migrate GeminiModel → GoogleModel (pydantic_ai.models.gemini removed in v2)
- Update lazy import test to mock pydantic_ai.models.google
- Bump floor in both optional-dependencies and test group
@mendral-app
mendral-app Bot requested a review from a team July 27, 2026 09:41
@mendral-app
mendral-app Bot marked this pull request as ready for review July 27, 2026 09:51
@drappier-charles
drappier-charles deleted the mendral/deps/pydantic-ai-2.13.0 branch July 27, 2026 21:34
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.

1 participant