Skip to content

Commit 9ad8fe5

Browse files
feat(api): adds support for text_editor_20250728 tool
https://docs.anthropic.com/en/release-notes/api#july-28%2C-2025
1 parent 4c1f704 commit 9ad8fe5

16 files changed

+95
-5
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: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-17f0c838a3c08e61b79d51ee22d850a44098c5432cf944ff5e1bcab69fa4018b.yml
3-
openapi_spec_hash: 6dcdf2b065d61612f4403a1786c3bee2
4-
config_hash: a230db180ca9a70de9a2d86d337d3052
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-e35574542a0e97f5127bac86f280bce8aaffa9d8d0bb90b5994ff132b31072e1.yml
3+
openapi_spec_hash: f09142bb93ac7ed78f4dc1a47af7b5ed
4+
config_hash: b7bf6ac9e5b9ce5a010806d2bc05ffa7

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ from anthropic.types import (
8585
ToolChoiceTool,
8686
ToolResultBlockParam,
8787
ToolTextEditor20250124,
88+
ToolTextEditor20250728,
8889
ToolUnion,
8990
ToolUseBlock,
9091
ToolUseBlockParam,
@@ -289,6 +290,7 @@ from anthropic.types.beta import (
289290
BetaToolTextEditor20241022,
290291
BetaToolTextEditor20250124,
291292
BetaToolTextEditor20250429,
293+
BetaToolTextEditor20250728,
292294
BetaToolUnion,
293295
BetaToolUseBlock,
294296
BetaToolUseBlockParam,

src/anthropic/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
from .citation_content_block_location import CitationContentBlockLocation as CitationContentBlockLocation
112112
from .message_count_tokens_tool_param import MessageCountTokensToolParam as MessageCountTokensToolParam
113113
from .tool_text_editor_20250124_param import ToolTextEditor20250124Param as ToolTextEditor20250124Param
114+
from .tool_text_editor_20250728_param import ToolTextEditor20250728Param as ToolTextEditor20250728Param
114115
from .content_block_source_content_param import ContentBlockSourceContentParam as ContentBlockSourceContentParam
115116
from .web_search_tool_result_block_param import WebSearchToolResultBlockParam as WebSearchToolResultBlockParam
116117
from .web_search_tool_request_error_param import WebSearchToolRequestErrorParam as WebSearchToolRequestErrorParam

src/anthropic/types/beta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
from .beta_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param as BetaToolTextEditor20241022Param
9696
from .beta_tool_text_editor_20250124_param import BetaToolTextEditor20250124Param as BetaToolTextEditor20250124Param
9797
from .beta_tool_text_editor_20250429_param import BetaToolTextEditor20250429Param as BetaToolTextEditor20250429Param
98+
from .beta_tool_text_editor_20250728_param import BetaToolTextEditor20250728Param as BetaToolTextEditor20250728Param
9899
from .beta_code_execution_tool_result_block import BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock
99100
from .beta_code_execution_tool_result_error import BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError
100101
from .beta_tool_computer_use_20241022_param import BetaToolComputerUse20241022Param as BetaToolComputerUse20241022Param

src/anthropic/types/beta/beta_citation_char_location.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class BetaCitationCharLocation(BaseModel):
1717

1818
end_char_index: int
1919

20+
file_id: Optional[str] = None
21+
2022
start_char_index: int
2123

2224
type: Literal["char_location"]

src/anthropic/types/beta/beta_citation_content_block_location.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class BetaCitationContentBlockLocation(BaseModel):
1717

1818
end_block_index: int
1919

20+
file_id: Optional[str] = None
21+
2022
start_block_index: int
2123

2224
type: Literal["content_block_location"]

src/anthropic/types/beta/beta_citation_page_location.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class BetaCitationPageLocation(BaseModel):
1717

1818
end_page_number: int
1919

20+
file_id: Optional[str] = None
21+
2022
start_page_number: int
2123

2224
type: Literal["page_location"]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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 Optional
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
9+
10+
__all__ = ["BetaToolTextEditor20250728Param"]
11+
12+
13+
class BetaToolTextEditor20250728Param(TypedDict, total=False):
14+
name: Required[Literal["str_replace_based_edit_tool"]]
15+
"""Name of the tool.
16+
17+
This is how the tool will be called by the model and in `tool_use` blocks.
18+
"""
19+
20+
type: Required[Literal["text_editor_20250728"]]
21+
22+
cache_control: Optional[BetaCacheControlEphemeralParam]
23+
"""Create a cache control breakpoint at this content block."""
24+
25+
max_characters: Optional[int]
26+
"""Maximum number of characters to display when viewing a file.
27+
28+
If not specified, defaults to displaying the full file.
29+
"""

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_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param
1313
from .beta_tool_text_editor_20250124_param import BetaToolTextEditor20250124Param
1414
from .beta_tool_text_editor_20250429_param import BetaToolTextEditor20250429Param
15+
from .beta_tool_text_editor_20250728_param import BetaToolTextEditor20250728Param
1516
from .beta_tool_computer_use_20241022_param import BetaToolComputerUse20241022Param
1617
from .beta_tool_computer_use_20250124_param import BetaToolComputerUse20250124Param
1718
from .beta_code_execution_tool_20250522_param import BetaCodeExecutionTool20250522Param
@@ -28,5 +29,6 @@
2829
BetaToolTextEditor20241022Param,
2930
BetaToolTextEditor20250124Param,
3031
BetaToolTextEditor20250429Param,
32+
BetaToolTextEditor20250728Param,
3133
BetaWebSearchTool20250305Param,
3234
]

src/anthropic/types/beta/message_count_tokens_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from .beta_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param
2020
from .beta_tool_text_editor_20250124_param import BetaToolTextEditor20250124Param
2121
from .beta_tool_text_editor_20250429_param import BetaToolTextEditor20250429Param
22+
from .beta_tool_text_editor_20250728_param import BetaToolTextEditor20250728Param
2223
from .beta_tool_computer_use_20241022_param import BetaToolComputerUse20241022Param
2324
from .beta_tool_computer_use_20250124_param import BetaToolComputerUse20250124Param
2425
from .beta_code_execution_tool_20250522_param import BetaCodeExecutionTool20250522Param
@@ -248,5 +249,6 @@ class MessageCountTokensParams(TypedDict, total=False):
248249
BetaToolTextEditor20241022Param,
249250
BetaToolTextEditor20250124Param,
250251
BetaToolTextEditor20250429Param,
252+
BetaToolTextEditor20250728Param,
251253
BetaWebSearchTool20250305Param,
252254
]

0 commit comments

Comments
 (0)