From 82d5d637fc84f1b246aadd41a702aa80e9def37f Mon Sep 17 00:00:00 2001 From: karpetrosyan Date: Tue, 3 Feb 2026 18:07:52 +0400 Subject: [PATCH 1/3] Revert "fix(structured outputs): avoid including beta header if `output_format` is missing (#1121)" This reverts commit 062077e50d182719637403576f59761999b3b2f5. --- src/anthropic/resources/beta/messages/messages.py | 4 ++-- src/anthropic/types/beta/messages/batch_create_params.py | 2 +- uv.lock | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/anthropic/resources/beta/messages/messages.py b/src/anthropic/resources/beta/messages/messages.py index 1292ee6f..dc17a9b7 100644 --- a/src/anthropic/resources/beta/messages/messages.py +++ b/src/anthropic/resources/beta/messages/messages.py @@ -1118,7 +1118,7 @@ def parse( betas = [beta for beta in betas] if is_given(betas) else [] - if "structured-outputs-2025-12-15" not in betas and is_given(output_format): + if "structured-outputs-2025-11-13" not in betas: # Ensure structured outputs beta is included for parse method betas.append("structured-outputs-2025-12-15") @@ -2813,7 +2813,7 @@ async def parse( ) betas = [beta for beta in betas] if is_given(betas) else [] - if "structured-outputs-2025-12-15" not in betas and is_given(output_format): + if "structured-outputs-2025-11-13" not in betas: # Ensure structured outputs beta is included for parse method betas.append("structured-outputs-2025-12-15") diff --git a/src/anthropic/types/beta/messages/batch_create_params.py b/src/anthropic/types/beta/messages/batch_create_params.py index 1967840c..68f61f99 100644 --- a/src/anthropic/types/beta/messages/batch_create_params.py +++ b/src/anthropic/types/beta/messages/batch_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Iterable +from typing import List, Literal, Iterable from typing_extensions import Required, Annotated, TypedDict from ...._utils import PropertyInfo diff --git a/uv.lock b/uv.lock index 14f72de9..fc47d522 100644 --- a/uv.lock +++ b/uv.lock @@ -185,7 +185,7 @@ wheels = [ [[package]] name = "anthropic" -version = "0.76.0" +version = "0.77.0" source = { editable = "." } dependencies = [ { name = "anyio" }, From b8f21358ba4b267179758164c3aa0cee90b7f982 Mon Sep 17 00:00:00 2001 From: karpetrosyan Date: Tue, 3 Feb 2026 18:18:02 +0400 Subject: [PATCH 2/3] fix ci --- src/anthropic/types/beta/messages/batch_create_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anthropic/types/beta/messages/batch_create_params.py b/src/anthropic/types/beta/messages/batch_create_params.py index 68f61f99..1967840c 100644 --- a/src/anthropic/types/beta/messages/batch_create_params.py +++ b/src/anthropic/types/beta/messages/batch_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Literal, Iterable +from typing import List, Iterable from typing_extensions import Required, Annotated, TypedDict from ...._utils import PropertyInfo From e8ddc6e64b973c063d1149f441f662c72a3521d5 Mon Sep 17 00:00:00 2001 From: karpetrosyan Date: Tue, 3 Feb 2026 18:20:59 +0400 Subject: [PATCH 3/3] fix date --- src/anthropic/resources/beta/messages/messages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anthropic/resources/beta/messages/messages.py b/src/anthropic/resources/beta/messages/messages.py index dc17a9b7..31c0e17d 100644 --- a/src/anthropic/resources/beta/messages/messages.py +++ b/src/anthropic/resources/beta/messages/messages.py @@ -1118,7 +1118,7 @@ def parse( betas = [beta for beta in betas] if is_given(betas) else [] - if "structured-outputs-2025-11-13" not in betas: + if "structured-outputs-2025-12-15" not in betas: # Ensure structured outputs beta is included for parse method betas.append("structured-outputs-2025-12-15") @@ -2813,7 +2813,7 @@ async def parse( ) betas = [beta for beta in betas] if is_given(betas) else [] - if "structured-outputs-2025-11-13" not in betas: + if "structured-outputs-2025-12-15" not in betas: # Ensure structured outputs beta is included for parse method betas.append("structured-outputs-2025-12-15")