Skip to content

Conversation

@medaminezghal
Copy link
Contributor

This will remove the deprecated models of Anthropic in version 0.59.0 by this commit

@DouweM DouweM assigned alexmojaki and DouweM and unassigned alexmojaki Jul 29, 2025
@DouweM DouweM merged commit 8f20f9b into pydantic:main Jul 29, 2025
18 checks passed
@DouweM
Copy link
Collaborator

DouweM commented Jul 29, 2025

@medaminezghal Thanks Mohamed!

@medaminezghal medaminezghal deleted the remove-anthropic-deprecated-models branch July 29, 2025 14:45
@alexmojaki
Copy link
Contributor

Why do this?

@DouweM
Copy link
Collaborator

DouweM commented Jul 29, 2025

@alexmojaki These model names will still work, but by removing them from this Literal type, they will no longer be suggested as values for the Agent model_name argument by the IDE, since they shouldn't be used in new projects.

@alexmojaki
Copy link
Contributor

And why restrict the version of anthropic?

@DouweM
Copy link
Collaborator

DouweM commented Jul 29, 2025

@alexmojaki Good point, I'll revert that.

@medaminezghal For future reference, we want to be on the lowest possible version that works with Pydantic AI, meaning we should only update when relevant bugs get fixed or new features get added that we use.

@medaminezghal
Copy link
Contributor Author

@DouweM @alexmojaki according to this documentation, the models removed are retired, only claude-3-opus-20240229 still maintained until January 2026.

Sorry, I didn't mention this in the description. I think this commit shouldn't be reverted.

@DouweM
Copy link
Collaborator

DouweM commented Jul 29, 2025

@medaminezghal I reverted it because there's no particular reason to require users to update the anthropic package, and with packages like ours it's better as a rule to leave dependency version requirements as low as possible.

@medaminezghal
Copy link
Contributor Author

@DouweM Even with old versions, claude-2.0 and claude-2.1 won't work.

@alexmojaki
Copy link
Contributor

Isn't it possible to remove the model names without bumping the anthropic version?

@medaminezghal
Copy link
Contributor Author

@alexmojaki this will cause problem in tests.

@DouweM
Copy link
Collaborator

DouweM commented Jul 29, 2025

@alexmojaki The model names are coming from a constant from the anthropic package, so we could manually filter them out, but there's honestly no real harm in having them. I'd be more inclined to update anthropic when they add new models.

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.

3 participants