Skip to content

Incompatibility with cohere >=5.20 #4383

@DarthJuri

Description

@DarthJuri

Initial Checks

Description

The AssistantMessageV2ContentItem was probably replaced by the AssistantMessageV2ContentOneItem in the cohere library. Could be replaced by TextAssistantMessageV2ContentItem | ThinkingAssistantMessageV2ContentItem in the type annotation (I have prepared PR to fix this bug).

Minimal, Reproducible Example

from pydantic_ai.models.cohere import CohereModel

Logfire Trace

No response

Python, Pydantic AI & LLM client version

  • Python: 3.13.11
  • Pydantic AI: 1.62.0
  • LLM provider SDK: cohere 5.20.6

Metadata

Metadata

Assignees

Labels

bugReport that something isn't working, or PR implementing a fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions