Skip to content

genai-prices 's stricter pydantic requirement (>=2.11.7) can cause issues #2949

@jerry-heygen

Description

@jerry-heygen

Question

(already created an issue in genai-prices)

Hello Pydantic AI team,

I've noticed a potential dependency conflict where a sub-dependency is enforcing a stricter pydantic version than pydantic-ai-slim itself declares.

The Issue

Currently, pydantic-ai-slim depends on genai-prices. This creates the following situation:

  1. pydantic-ai-slim explicitly requires pydantic>=2.10 in its pyproject.toml here

  2. However, its dependency, genai-prices, requires a stricter version: pydantic>=2.11.7.

This effectively forces any project using pydantic-ai-slim to install pydantic>=2.11.7, overriding the more relaxed constraint defined in pydantic-ai-slim's own configuration.

Question & Proposed Solution

My question is: Is there a specific feature or fix in pydantic>=2.11.7 that genai-prices relies on?

  • If so, it would be helpful to update the dependency requirement in pydantic-ai-slim to pydantic>=2.11.7 for transparency and to avoid potential resolution issues for users.
  • If not, would it be possible to loosen the version requirement in genai-prices to align with pydantic-ai-slim (e.g., pydantic>=2.10)? This would provide more flexibility for downstream projects.

Thank you for your great work on this library and for looking into this!

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions