Skip to content

Commit fc9f47e

Browse files
feat(api): GA thinking-display-setting
1 parent 42921e3 commit fc9f47e

18 files changed

+206
-9
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-3f1132b9be2d8218a7255103c40a0fbfc2b6d65db76f160db4477f9221493561.yml
3-
openapi_spec_hash: 58021ab18daccd5c45a930ffd7d6ab4d
4-
config_hash: 6debadaa8ff30c5b5ee61176ef42a5fc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-7fce94a3c9f72c1d81df2009682a3b554e4b641b32443fd7c1f09f566420f711.yml
3+
openapi_spec_hash: ae7e30bb8d093b5546cdc2b180f7b8e0
4+
config_hash: 32f037e4bc66dfaca12016b0e5110140

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ from anthropic.types import (
161161
WebFetchBlockParam,
162162
WebFetchTool20250910,
163163
WebFetchTool20260209,
164+
WebFetchTool20260309,
164165
WebFetchToolResultBlock,
165166
WebFetchToolResultBlockParam,
166167
WebFetchToolResultErrorBlock,
@@ -453,6 +454,7 @@ from anthropic.types.beta import (
453454
BetaWebFetchBlockParam,
454455
BetaWebFetchTool20250910,
455456
BetaWebFetchTool20260209,
457+
BetaWebFetchTool20260309,
456458
BetaWebFetchToolResultBlock,
457459
BetaWebFetchToolResultBlockParam,
458460
BetaWebFetchToolResultErrorBlock,

src/anthropic/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
from .tool_search_tool_result_error import ToolSearchToolResultError as ToolSearchToolResultError
140140
from .web_fetch_tool_20250910_param import WebFetchTool20250910Param as WebFetchTool20250910Param
141141
from .web_fetch_tool_20260209_param import WebFetchTool20260209Param as WebFetchTool20260209Param
142+
from .web_fetch_tool_20260309_param import WebFetchTool20260309Param as WebFetchTool20260309Param
142143
from .web_search_result_block_param import WebSearchResultBlockParam as WebSearchResultBlockParam
143144
from .thinking_config_adaptive_param import ThinkingConfigAdaptiveParam as ThinkingConfigAdaptiveParam
144145
from .thinking_config_disabled_param import ThinkingConfigDisabledParam as ThinkingConfigDisabledParam

src/anthropic/types/beta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
from .beta_tool_search_tool_result_error import BetaToolSearchToolResultError as BetaToolSearchToolResultError
135135
from .beta_web_fetch_tool_20250910_param import BetaWebFetchTool20250910Param as BetaWebFetchTool20250910Param
136136
from .beta_web_fetch_tool_20260209_param import BetaWebFetchTool20260209Param as BetaWebFetchTool20260209Param
137+
from .beta_web_fetch_tool_20260309_param import BetaWebFetchTool20260309Param as BetaWebFetchTool20260309Param
137138
from .beta_web_search_result_block_param import BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam
138139
from .beta_compaction_content_block_delta import BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta
139140
from .beta_thinking_config_adaptive_param import BetaThinkingConfigAdaptiveParam as BetaThinkingConfigAdaptiveParam
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import List, Union
4-
from typing_extensions import TypeAlias
4+
from typing_extensions import Annotated, TypeAlias
55

6+
from ..._utils import PropertyInfo
67
from .beta_message_iteration_usage import BetaMessageIterationUsage
78
from .beta_compaction_iteration_usage import BetaCompactionIterationUsage
89

910
__all__ = ["BetaIterationsUsage", "BetaIterationsUsageItem"]
1011

11-
BetaIterationsUsageItem: TypeAlias = Union[BetaMessageIterationUsage, BetaCompactionIterationUsage]
12+
BetaIterationsUsageItem: TypeAlias = Annotated[
13+
Union[BetaMessageIterationUsage, BetaCompactionIterationUsage], PropertyInfo(discriminator="type")
14+
]
1215

1316
BetaIterationsUsage: TypeAlias = List[BetaIterationsUsageItem]

src/anthropic/types/beta/beta_thinking_config_adaptive_param.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["BetaThinkingConfigAdaptiveParam"]
89

910

1011
class BetaThinkingConfigAdaptiveParam(TypedDict, total=False):
1112
type: Required[Literal["adaptive"]]
13+
14+
display: Optional[Literal["summarized", "omitted"]]
15+
"""Controls how thinking content appears in the response.
16+
17+
When set to `summarized`, thinking is returned normally. When set to `omitted`,
18+
thinking content is redacted but a signature is returned for multi-turn
19+
continuity. Defaults to `summarized`.
20+
"""

src/anthropic/types/beta/beta_thinking_config_enabled_param.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["BetaThinkingConfigEnabledParam"]
@@ -22,3 +23,11 @@ class BetaThinkingConfigEnabledParam(TypedDict, total=False):
2223
"""
2324

2425
type: Required[Literal["enabled"]]
26+
27+
display: Optional[Literal["summarized", "omitted"]]
28+
"""Controls how thinking content appears in the response.
29+
30+
When set to `summarized`, thinking is returned normally. When set to `omitted`,
31+
thinking content is redacted but a signature is returned for multi-turn
32+
continuity. Defaults to `summarized`.
33+
"""

src/anthropic/types/beta/beta_tool_union_param.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from .beta_memory_tool_20250818_param import BetaMemoryTool20250818Param
1313
from .beta_web_fetch_tool_20250910_param import BetaWebFetchTool20250910Param
1414
from .beta_web_fetch_tool_20260209_param import BetaWebFetchTool20260209Param
15+
from .beta_web_fetch_tool_20260309_param import BetaWebFetchTool20260309Param
1516
from .beta_web_search_tool_20250305_param import BetaWebSearchTool20250305Param
1617
from .beta_web_search_tool_20260209_param import BetaWebSearchTool20260209Param
1718
from .beta_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param
@@ -48,6 +49,7 @@
4849
BetaWebFetchTool20250910Param,
4950
BetaWebSearchTool20260209Param,
5051
BetaWebFetchTool20260209Param,
52+
BetaWebFetchTool20260309Param,
5153
BetaToolSearchToolBm25_20251119Param,
5254
BetaToolSearchToolRegex20251119Param,
5355
BetaMCPToolsetParam,
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import List, Optional
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
from ..._types import SequenceNotStr
9+
from .beta_citations_config_param import BetaCitationsConfigParam
10+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
11+
12+
__all__ = ["BetaWebFetchTool20260309Param"]
13+
14+
15+
class BetaWebFetchTool20260309Param(TypedDict, total=False):
16+
"""Web fetch tool with use_cache parameter for bypassing cached content."""
17+
18+
name: Required[Literal["web_fetch"]]
19+
"""Name of the tool.
20+
21+
This is how the tool will be called by the model and in `tool_use` blocks.
22+
"""
23+
24+
type: Required[Literal["web_fetch_20260309"]]
25+
26+
allowed_callers: List[Literal["direct", "code_execution_20250825", "code_execution_20260120"]]
27+
28+
allowed_domains: Optional[SequenceNotStr[str]]
29+
"""List of domains to allow fetching from"""
30+
31+
blocked_domains: Optional[SequenceNotStr[str]]
32+
"""List of domains to block fetching from"""
33+
34+
cache_control: Optional[BetaCacheControlEphemeralParam]
35+
"""Create a cache control breakpoint at this content block."""
36+
37+
citations: Optional[BetaCitationsConfigParam]
38+
"""Citations configuration for fetched documents.
39+
40+
Citations are disabled by default.
41+
"""
42+
43+
defer_loading: bool
44+
"""If true, tool will not be included in initial system prompt.
45+
46+
Only loaded when returned via tool_reference from tool search.
47+
"""
48+
49+
max_content_tokens: Optional[int]
50+
"""Maximum number of tokens used by including web page text content in the context.
51+
52+
The limit is approximate and does not apply to binary content such as PDFs.
53+
"""
54+
55+
max_uses: Optional[int]
56+
"""Maximum number of times the tool can be used in the API request."""
57+
58+
strict: bool
59+
"""When true, guarantees schema validation on tool names and inputs"""
60+
61+
use_cache: bool
62+
"""Whether to use cached content.
63+
64+
Set to false to bypass the cache and fetch fresh content. Only set to false when
65+
the user explicitly requests fresh content or when fetching rapidly-changing
66+
sources.
67+
"""

src/anthropic/types/beta/message_count_tokens_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
2323
from .beta_web_fetch_tool_20250910_param import BetaWebFetchTool20250910Param
2424
from .beta_web_fetch_tool_20260209_param import BetaWebFetchTool20260209Param
25+
from .beta_web_fetch_tool_20260309_param import BetaWebFetchTool20260309Param
2526
from .beta_web_search_tool_20250305_param import BetaWebSearchTool20250305Param
2627
from .beta_web_search_tool_20260209_param import BetaWebSearchTool20260209Param
2728
from .beta_context_management_config_param import BetaContextManagementConfigParam
@@ -281,6 +282,7 @@ class MessageCountTokensParams(TypedDict, total=False):
281282
BetaWebFetchTool20250910Param,
282283
BetaWebSearchTool20260209Param,
283284
BetaWebFetchTool20260209Param,
285+
BetaWebFetchTool20260309Param,
284286
BetaToolSearchToolBm25_20251119Param,
285287
BetaToolSearchToolRegex20251119Param,
286288
BetaMCPToolsetParam,

0 commit comments

Comments
 (0)