From 04d93c2190489b24e5fcb64c0d7b3e3be242838f Mon Sep 17 00:00:00 2001 From: Mohamed Amine Zghal Date: Wed, 6 Aug 2025 06:20:39 +0100 Subject: [PATCH 1/3] Remove older deprecated models and add new model of Anthropic --- pydantic_ai_slim/pydantic_ai/models/__init__.py | 8 ++------ pydantic_ai_slim/pyproject.toml | 2 +- uv.lock | 8 ++++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/__init__.py b/pydantic_ai_slim/pydantic_ai/models/__init__.py index bc922692ee..8f43120d0d 100644 --- a/pydantic_ai_slim/pydantic_ai/models/__init__.py +++ b/pydantic_ai_slim/pydantic_ai/models/__init__.py @@ -34,8 +34,6 @@ KnownModelName = TypeAliasType( 'KnownModelName', Literal[ - 'anthropic:claude-2.0', - 'anthropic:claude-2.1', 'anthropic:claude-3-5-haiku-20241022', 'anthropic:claude-3-5-haiku-latest', 'anthropic:claude-3-5-sonnet-20240620', @@ -46,10 +44,10 @@ 'anthropic:claude-3-haiku-20240307', 'anthropic:claude-3-opus-20240229', 'anthropic:claude-3-opus-latest', - 'anthropic:claude-3-sonnet-20240229', 'anthropic:claude-4-opus-20250514', 'anthropic:claude-4-sonnet-20250514', 'anthropic:claude-opus-4-0', + 'anthropic:claude-opus-4-1-20250805', 'anthropic:claude-opus-4-20250514', 'anthropic:claude-sonnet-4-0', 'anthropic:claude-sonnet-4-20250514', @@ -100,8 +98,6 @@ 'bedrock:mistral.mixtral-8x7b-instruct-v0:1', 'bedrock:mistral.mistral-large-2402-v1:0', 'bedrock:mistral.mistral-large-2407-v1:0', - 'claude-2.0', - 'claude-2.1', 'claude-3-5-haiku-20241022', 'claude-3-5-haiku-latest', 'claude-3-5-sonnet-20240620', @@ -112,10 +108,10 @@ 'claude-3-haiku-20240307', 'claude-3-opus-20240229', 'claude-3-opus-latest', - 'claude-3-sonnet-20240229', 'claude-4-opus-20250514', 'claude-4-sonnet-20250514', 'claude-opus-4-0', + 'claude-opus-4-1-20250805', 'claude-opus-4-20250514', 'claude-sonnet-4-0', 'claude-sonnet-4-20250514', diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index bfb93c8624..39a36d56e0 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -66,7 +66,7 @@ openai = ["openai>=1.92.0"] cohere = ["cohere>=5.16.0; platform_system != 'Emscripten'"] vertexai = ["google-auth>=2.36.0", "requests>=2.32.2"] google = ["google-genai>=1.24.0"] -anthropic = ["anthropic>=0.52.0"] +anthropic = ["anthropic>=0.61.0"] groq = ["groq>=0.19.0"] mistral = ["mistralai>=1.9.2"] bedrock = ["boto3>=1.37.24"] diff --git a/uv.lock b/uv.lock index 93701f47e2..438da95e93 100644 --- a/uv.lock +++ b/uv.lock @@ -196,7 +196,7 @@ wheels = [ [[package]] name = "anthropic" -version = "0.52.0" +version = "0.61.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -207,9 +207,9 @@ dependencies = [ { name = "sniffio" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/57/fd/8a9332f5baf352c272494a9d359863a53385a208954c1a7251a524071930/anthropic-0.52.0.tar.gz", hash = "sha256:f06bc924d7eb85f8a43fe587b875ff58b410d60251b7dc5f1387b322a35bd67b", size = 229372, upload-time = "2025-05-22T16:42:22.044Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7a/9a/b384758ef93b8f931a523efc8782f7191b175714b3952ff11002899f638b/anthropic-0.61.0.tar.gz", hash = "sha256:af4b3b8f3bc4626cca6af2d412e301974da1747179341ad9e271bdf5cbd2f008", size = 426606, upload-time = "2025-08-05T16:29:37.958Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/43/172c0031654908bbac2a87d356fff4de1b4947a9b14b9658540b69416417/anthropic-0.52.0-py3-none-any.whl", hash = "sha256:c026daa164f0e3bde36ce9cbdd27f5f1419fff03306be1e138726f42e6a7810f", size = 286076, upload-time = "2025-05-22T16:42:20Z" }, + { url = "https://files.pythonhosted.org/packages/6e/07/c7907eee22f5c27a53118dd2576267052ae01f52811dbb06a2848012639e/anthropic-0.61.0-py3-none-any.whl", hash = "sha256:798c8e6cc61e6315143c3f5847d2f220c45f1e69f433436872a237413ca58803", size = 294935, upload-time = "2025-08-05T16:29:36.379Z" }, ] [[package]] @@ -3481,7 +3481,7 @@ dev = [ [package.metadata] requires-dist = [ { name = "ag-ui-protocol", marker = "extra == 'ag-ui'", specifier = ">=0.1.8" }, - { name = "anthropic", marker = "extra == 'anthropic'", specifier = ">=0.52.0" }, + { name = "anthropic", marker = "extra == 'anthropic'", specifier = ">=0.61.0" }, { name = "argcomplete", marker = "extra == 'cli'", specifier = ">=3.5.0" }, { name = "boto3", marker = "extra == 'bedrock'", specifier = ">=1.37.24" }, { name = "cohere", marker = "sys_platform != 'emscripten' and extra == 'cohere'", specifier = ">=5.16.0" }, From 2c929b35ad4e0cc28a4933d6c1b2ef929dcc2687 Mon Sep 17 00:00:00 2001 From: Mohamed Amine Zghal Date: Wed, 6 Aug 2025 10:48:19 +0100 Subject: [PATCH 2/3] Update pyproject.toml --- pydantic_ai_slim/pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 3296fc0584..5c8b942bba 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -65,13 +65,8 @@ logfire = ["logfire>=3.11.0"] openai = ["openai>=1.92.0"] cohere = ["cohere>=5.16.0; platform_system != 'Emscripten'"] vertexai = ["google-auth>=2.36.0", "requests>=2.32.2"] - - anthropic = ["anthropic>=0.61.0"] - google = ["google-genai>=1.28.0"] - - groq = ["groq>=0.19.0"] mistral = ["mistralai>=1.9.2"] bedrock = ["boto3>=1.37.24"] From c322d551b942f732439819e2a0b8d054ad6f7e49 Mon Sep 17 00:00:00 2001 From: Mohamed Amine Zghal Date: Wed, 6 Aug 2025 10:52:10 +0100 Subject: [PATCH 3/3] Update pyproject.toml --- pydantic_ai_slim/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 5c8b942bba..8933e06e1e 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -65,8 +65,8 @@ logfire = ["logfire>=3.11.0"] openai = ["openai>=1.92.0"] cohere = ["cohere>=5.16.0; platform_system != 'Emscripten'"] vertexai = ["google-auth>=2.36.0", "requests>=2.32.2"] -anthropic = ["anthropic>=0.61.0"] google = ["google-genai>=1.28.0"] +anthropic = ["anthropic>=0.61.0"] groq = ["groq>=0.19.0"] mistral = ["mistralai>=1.9.2"] bedrock = ["boto3>=1.37.24"]