Skip to content

Commit eca8ddf

Browse files
karpetrosyanstainless-app[bot]
authored andcommitted
fix(structured outputs): send structured output beta header when format is omitted (#1158)
This reverts commit 062077e.
1 parent ee44c52 commit eca8ddf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/anthropic/resources/beta/messages/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ def parse(
11181118

11191119
betas = [beta for beta in betas] if is_given(betas) else []
11201120

1121-
if "structured-outputs-2025-12-15" not in betas and is_given(output_format):
1121+
if "structured-outputs-2025-12-15" not in betas:
11221122
# Ensure structured outputs beta is included for parse method
11231123
betas.append("structured-outputs-2025-12-15")
11241124

@@ -2813,7 +2813,7 @@ async def parse(
28132813
)
28142814
betas = [beta for beta in betas] if is_given(betas) else []
28152815

2816-
if "structured-outputs-2025-12-15" not in betas and is_given(output_format):
2816+
if "structured-outputs-2025-12-15" not in betas:
28172817
# Ensure structured outputs beta is included for parse method
28182818
betas.append("structured-outputs-2025-12-15")
28192819

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)