Upload folder using huggingface_hub (part 5)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_result_error_param.py +14 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_search_result_block.py +13 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_search_result_block_param.py +14 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20241022.py +35 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +36 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250124.py +35 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +36 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250429.py +35 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +36 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250728.py +41 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250728_param.py +42 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_union_param.py +66 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_block.py +28 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_block_param.py +31 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_caller.py +13 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_uses_keep_param.py +11 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_uses_trigger_param.py +11 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_toolset_tool_use_block.py +10 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tunnel.py +35 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tunnel_token.py +20 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_unrestricted_network.py +12 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_unrestricted_network_param.py +12 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_url_image_source_param.py +11 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_url_pdf_source_param.py +11 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_usage.py +81 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_location.py +26 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_location_param.py +26 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_message_param.py +13 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile.py +93 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_enrollment_url.py +21 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_external_user_details.py +63 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_external_user_details_params.py +64 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_trust_grant.py +14 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_block.py +19 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_block_param.py +20 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20250910.py +62 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20250910_param.py +64 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260209.py +62 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260209_param.py +64 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260309.py +72 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260309_param.py +74 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260318.py +80 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260318_param.py +82 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_block.py +27 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_block_param.py +30 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_block.py +12 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_block_param.py +13 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_code.py +16 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_url_source_all.py +14 -0
- .venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_url_source_all_param.py +14 -0
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_result_error_param.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
__all__ = ["BetaToolSearchToolResultErrorParam"]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class BetaToolSearchToolResultErrorParam(TypedDict, total=False):
|
| 10 |
+
error_code: Required[Literal["invalid_tool_input", "unavailable", "too_many_requests", "execution_time_exceeded"]]
|
| 11 |
+
|
| 12 |
+
type: Required[Literal["tool_search_tool_result_error"]]
|
| 13 |
+
|
| 14 |
+
error_message: Optional[str]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_search_result_block.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_tool_reference_block import BetaToolReferenceBlock
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaToolSearchToolSearchResultBlock"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaToolSearchToolSearchResultBlock(BaseModel):
|
| 11 |
+
tool_references: List[BetaToolReferenceBlock]
|
| 12 |
+
|
| 13 |
+
type: Literal["tool_search_tool_search_result"]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_search_tool_search_result_block_param.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Iterable
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_tool_reference_block_param import BetaToolReferenceBlockParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolSearchToolSearchResultBlockParam"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaToolSearchToolSearchResultBlockParam(TypedDict, total=False):
|
| 12 |
+
tool_references: Required[Iterable[BetaToolReferenceBlockParam]]
|
| 13 |
+
|
| 14 |
+
type: Required[Literal["tool_search_tool_search_result"]]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20241022.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaToolTextEditor20241022"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaToolTextEditor20241022(BaseModel):
|
| 11 |
+
name: Literal["str_replace_editor"]
|
| 12 |
+
"""Name of the tool.
|
| 13 |
+
|
| 14 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
type: Literal["text_editor_20241022"]
|
| 18 |
+
|
| 19 |
+
allowed_callers: Optional[
|
| 20 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 21 |
+
] = None
|
| 22 |
+
|
| 23 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 24 |
+
"""Create a cache control breakpoint at this content block."""
|
| 25 |
+
|
| 26 |
+
defer_loading: Optional[bool] = None
|
| 27 |
+
"""If true, tool will not be included in initial system prompt.
|
| 28 |
+
|
| 29 |
+
Only loaded when returned via tool_reference from tool search.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
input_examples: Optional[List[Dict[str, object]]] = None
|
| 33 |
+
|
| 34 |
+
strict: Optional[bool] = None
|
| 35 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20241022_param.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Dict, List, Iterable, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolTextEditor20241022Param"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaToolTextEditor20241022Param(TypedDict, total=False):
|
| 12 |
+
name: Required[Literal["str_replace_editor"]]
|
| 13 |
+
"""Name of the tool.
|
| 14 |
+
|
| 15 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
type: Required[Literal["text_editor_20241022"]]
|
| 19 |
+
|
| 20 |
+
allowed_callers: List[
|
| 21 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 25 |
+
"""Create a cache control breakpoint at this content block."""
|
| 26 |
+
|
| 27 |
+
defer_loading: bool
|
| 28 |
+
"""If true, tool will not be included in initial system prompt.
|
| 29 |
+
|
| 30 |
+
Only loaded when returned via tool_reference from tool search.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
input_examples: Iterable[Dict[str, object]]
|
| 34 |
+
|
| 35 |
+
strict: bool
|
| 36 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250124.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaToolTextEditor20250124"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaToolTextEditor20250124(BaseModel):
|
| 11 |
+
name: Literal["str_replace_editor"]
|
| 12 |
+
"""Name of the tool.
|
| 13 |
+
|
| 14 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
type: Literal["text_editor_20250124"]
|
| 18 |
+
|
| 19 |
+
allowed_callers: Optional[
|
| 20 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 21 |
+
] = None
|
| 22 |
+
|
| 23 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 24 |
+
"""Create a cache control breakpoint at this content block."""
|
| 25 |
+
|
| 26 |
+
defer_loading: Optional[bool] = None
|
| 27 |
+
"""If true, tool will not be included in initial system prompt.
|
| 28 |
+
|
| 29 |
+
Only loaded when returned via tool_reference from tool search.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
input_examples: Optional[List[Dict[str, object]]] = None
|
| 33 |
+
|
| 34 |
+
strict: Optional[bool] = None
|
| 35 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250124_param.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Dict, List, Iterable, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolTextEditor20250124Param"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaToolTextEditor20250124Param(TypedDict, total=False):
|
| 12 |
+
name: Required[Literal["str_replace_editor"]]
|
| 13 |
+
"""Name of the tool.
|
| 14 |
+
|
| 15 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
type: Required[Literal["text_editor_20250124"]]
|
| 19 |
+
|
| 20 |
+
allowed_callers: List[
|
| 21 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 25 |
+
"""Create a cache control breakpoint at this content block."""
|
| 26 |
+
|
| 27 |
+
defer_loading: bool
|
| 28 |
+
"""If true, tool will not be included in initial system prompt.
|
| 29 |
+
|
| 30 |
+
Only loaded when returned via tool_reference from tool search.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
input_examples: Iterable[Dict[str, object]]
|
| 34 |
+
|
| 35 |
+
strict: bool
|
| 36 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250429.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaToolTextEditor20250429"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaToolTextEditor20250429(BaseModel):
|
| 11 |
+
name: Literal["str_replace_based_edit_tool"]
|
| 12 |
+
"""Name of the tool.
|
| 13 |
+
|
| 14 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
type: Literal["text_editor_20250429"]
|
| 18 |
+
|
| 19 |
+
allowed_callers: Optional[
|
| 20 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 21 |
+
] = None
|
| 22 |
+
|
| 23 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 24 |
+
"""Create a cache control breakpoint at this content block."""
|
| 25 |
+
|
| 26 |
+
defer_loading: Optional[bool] = None
|
| 27 |
+
"""If true, tool will not be included in initial system prompt.
|
| 28 |
+
|
| 29 |
+
Only loaded when returned via tool_reference from tool search.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
input_examples: Optional[List[Dict[str, object]]] = None
|
| 33 |
+
|
| 34 |
+
strict: Optional[bool] = None
|
| 35 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250429_param.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Dict, List, Iterable, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolTextEditor20250429Param"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaToolTextEditor20250429Param(TypedDict, total=False):
|
| 12 |
+
name: Required[Literal["str_replace_based_edit_tool"]]
|
| 13 |
+
"""Name of the tool.
|
| 14 |
+
|
| 15 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
type: Required[Literal["text_editor_20250429"]]
|
| 19 |
+
|
| 20 |
+
allowed_callers: List[
|
| 21 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 25 |
+
"""Create a cache control breakpoint at this content block."""
|
| 26 |
+
|
| 27 |
+
defer_loading: bool
|
| 28 |
+
"""If true, tool will not be included in initial system prompt.
|
| 29 |
+
|
| 30 |
+
Only loaded when returned via tool_reference from tool search.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
input_examples: Iterable[Dict[str, object]]
|
| 34 |
+
|
| 35 |
+
strict: bool
|
| 36 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250728.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaToolTextEditor20250728"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaToolTextEditor20250728(BaseModel):
|
| 11 |
+
name: Literal["str_replace_based_edit_tool"]
|
| 12 |
+
"""Name of the tool.
|
| 13 |
+
|
| 14 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
type: Literal["text_editor_20250728"]
|
| 18 |
+
|
| 19 |
+
allowed_callers: Optional[
|
| 20 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 21 |
+
] = None
|
| 22 |
+
|
| 23 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 24 |
+
"""Create a cache control breakpoint at this content block."""
|
| 25 |
+
|
| 26 |
+
defer_loading: Optional[bool] = None
|
| 27 |
+
"""If true, tool will not be included in initial system prompt.
|
| 28 |
+
|
| 29 |
+
Only loaded when returned via tool_reference from tool search.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
input_examples: Optional[List[Dict[str, object]]] = None
|
| 33 |
+
|
| 34 |
+
max_characters: Optional[int] = None
|
| 35 |
+
"""Maximum number of characters to display when viewing a file.
|
| 36 |
+
|
| 37 |
+
If not specified, defaults to displaying the full file.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
strict: Optional[bool] = None
|
| 41 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_text_editor_20250728_param.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Dict, List, Iterable, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolTextEditor20250728Param"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaToolTextEditor20250728Param(TypedDict, total=False):
|
| 12 |
+
name: Required[Literal["str_replace_based_edit_tool"]]
|
| 13 |
+
"""Name of the tool.
|
| 14 |
+
|
| 15 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
type: Required[Literal["text_editor_20250728"]]
|
| 19 |
+
|
| 20 |
+
allowed_callers: List[
|
| 21 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 25 |
+
"""Create a cache control breakpoint at this content block."""
|
| 26 |
+
|
| 27 |
+
defer_loading: bool
|
| 28 |
+
"""If true, tool will not be included in initial system prompt.
|
| 29 |
+
|
| 30 |
+
Only loaded when returned via tool_reference from tool search.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
input_examples: Iterable[Dict[str, object]]
|
| 34 |
+
|
| 35 |
+
max_characters: Optional[int]
|
| 36 |
+
"""Maximum number of characters to display when viewing a file.
|
| 37 |
+
|
| 38 |
+
If not specified, defaults to displaying the full file.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
strict: bool
|
| 42 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_union_param.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Union
|
| 4 |
+
from typing_extensions import TypeAlias
|
| 5 |
+
|
| 6 |
+
from .beta_tool_param import BetaToolParam
|
| 7 |
+
from .beta_mcp_toolset_param import BetaMCPToolsetParam
|
| 8 |
+
from .beta_tool_bash_20241022_param import BetaToolBash20241022Param
|
| 9 |
+
from .beta_tool_bash_20250124_param import BetaToolBash20250124Param
|
| 10 |
+
from .beta_memory_tool_20250818_param import BetaMemoryTool20250818Param
|
| 11 |
+
from .beta_advisor_tool_20260301_param import BetaAdvisorTool20260301Param
|
| 12 |
+
from .beta_web_fetch_tool_20250910_param import BetaWebFetchTool20250910Param
|
| 13 |
+
from .beta_web_fetch_tool_20260209_param import BetaWebFetchTool20260209Param
|
| 14 |
+
from .beta_web_fetch_tool_20260309_param import BetaWebFetchTool20260309Param
|
| 15 |
+
from .beta_web_fetch_tool_20260318_param import BetaWebFetchTool20260318Param
|
| 16 |
+
from .beta_browser_toolset_20260801_param import BetaBrowserToolset20260801Param
|
| 17 |
+
from .beta_web_search_tool_20250305_param import BetaWebSearchTool20250305Param
|
| 18 |
+
from .beta_web_search_tool_20260209_param import BetaWebSearchTool20260209Param
|
| 19 |
+
from .beta_web_search_tool_20260318_param import BetaWebSearchTool20260318Param
|
| 20 |
+
from .beta_computer_toolset_20260801_param import BetaComputerToolset20260801Param
|
| 21 |
+
from .beta_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param
|
| 22 |
+
from .beta_tool_text_editor_20250124_param import BetaToolTextEditor20250124Param
|
| 23 |
+
from .beta_tool_text_editor_20250429_param import BetaToolTextEditor20250429Param
|
| 24 |
+
from .beta_tool_text_editor_20250728_param import BetaToolTextEditor20250728Param
|
| 25 |
+
from .beta_tool_computer_use_20241022_param import BetaToolComputerUse20241022Param
|
| 26 |
+
from .beta_tool_computer_use_20250124_param import BetaToolComputerUse20250124Param
|
| 27 |
+
from .beta_tool_computer_use_20251124_param import BetaToolComputerUse20251124Param
|
| 28 |
+
from .beta_code_execution_tool_20250522_param import BetaCodeExecutionTool20250522Param
|
| 29 |
+
from .beta_code_execution_tool_20250825_param import BetaCodeExecutionTool20250825Param
|
| 30 |
+
from .beta_code_execution_tool_20260120_param import BetaCodeExecutionTool20260120Param
|
| 31 |
+
from .beta_code_execution_tool_20260521_param import BetaCodeExecutionTool20260521Param
|
| 32 |
+
from .beta_tool_search_tool_bm25_20251119_param import BetaToolSearchToolBm25_20251119Param
|
| 33 |
+
from .beta_tool_search_tool_regex_20251119_param import BetaToolSearchToolRegex20251119Param
|
| 34 |
+
|
| 35 |
+
__all__ = ["BetaToolUnionParam"]
|
| 36 |
+
|
| 37 |
+
BetaToolUnionParam: TypeAlias = Union[
|
| 38 |
+
BetaToolParam,
|
| 39 |
+
BetaToolBash20241022Param,
|
| 40 |
+
BetaToolBash20250124Param,
|
| 41 |
+
BetaCodeExecutionTool20250522Param,
|
| 42 |
+
BetaCodeExecutionTool20250825Param,
|
| 43 |
+
BetaCodeExecutionTool20260120Param,
|
| 44 |
+
BetaCodeExecutionTool20260521Param,
|
| 45 |
+
BetaBrowserToolset20260801Param,
|
| 46 |
+
BetaToolComputerUse20241022Param,
|
| 47 |
+
BetaMemoryTool20250818Param,
|
| 48 |
+
BetaToolComputerUse20250124Param,
|
| 49 |
+
BetaToolTextEditor20241022Param,
|
| 50 |
+
BetaToolComputerUse20251124Param,
|
| 51 |
+
BetaComputerToolset20260801Param,
|
| 52 |
+
BetaToolTextEditor20250124Param,
|
| 53 |
+
BetaToolTextEditor20250429Param,
|
| 54 |
+
BetaToolTextEditor20250728Param,
|
| 55 |
+
BetaWebSearchTool20250305Param,
|
| 56 |
+
BetaWebFetchTool20250910Param,
|
| 57 |
+
BetaWebSearchTool20260209Param,
|
| 58 |
+
BetaWebFetchTool20260209Param,
|
| 59 |
+
BetaWebFetchTool20260309Param,
|
| 60 |
+
BetaWebSearchTool20260318Param,
|
| 61 |
+
BetaWebFetchTool20260318Param,
|
| 62 |
+
BetaAdvisorTool20260301Param,
|
| 63 |
+
BetaToolSearchToolBm25_20251119Param,
|
| 64 |
+
BetaToolSearchToolRegex20251119Param,
|
| 65 |
+
BetaMCPToolsetParam,
|
| 66 |
+
]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_block.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, Union, Optional
|
| 2 |
+
from typing_extensions import Literal, Annotated, TypeAlias
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel, UnionDiscriminator
|
| 5 |
+
from .beta_direct_caller import BetaDirectCaller
|
| 6 |
+
from .beta_server_tool_caller import BetaServerToolCaller
|
| 7 |
+
from .beta_server_tool_caller_20260120 import BetaServerToolCaller20260120
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaToolUseBlock", "Caller"]
|
| 10 |
+
|
| 11 |
+
Caller: TypeAlias = Annotated[
|
| 12 |
+
Union[BetaDirectCaller, BetaServerToolCaller, BetaServerToolCaller20260120], UnionDiscriminator("type")
|
| 13 |
+
]
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class BetaToolUseBlock(BaseModel):
|
| 17 |
+
id: str
|
| 18 |
+
|
| 19 |
+
input: Dict[str, object]
|
| 20 |
+
|
| 21 |
+
name: str
|
| 22 |
+
|
| 23 |
+
type: Literal["tool_use"]
|
| 24 |
+
|
| 25 |
+
caller: Optional[Caller] = None
|
| 26 |
+
|
| 27 |
+
toolset_name: Optional[str] = None
|
| 28 |
+
"""For a toolset member tool_use, the toolset family."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_block_param.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Dict, Union, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_direct_caller_param import BetaDirectCallerParam
|
| 7 |
+
from .beta_server_tool_caller_param import BetaServerToolCallerParam
|
| 8 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 9 |
+
from .beta_server_tool_caller_20260120_param import BetaServerToolCaller20260120Param
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaToolUseBlockParam", "Caller"]
|
| 12 |
+
|
| 13 |
+
Caller: TypeAlias = Union[BetaDirectCallerParam, BetaServerToolCallerParam, BetaServerToolCaller20260120Param]
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class BetaToolUseBlockParam(TypedDict, total=False):
|
| 17 |
+
id: Required[str]
|
| 18 |
+
|
| 19 |
+
input: Required[Dict[str, object]]
|
| 20 |
+
|
| 21 |
+
name: Required[str]
|
| 22 |
+
|
| 23 |
+
type: Required[Literal["tool_use"]]
|
| 24 |
+
|
| 25 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 26 |
+
"""Create a cache control breakpoint at this content block."""
|
| 27 |
+
|
| 28 |
+
caller: Caller
|
| 29 |
+
|
| 30 |
+
toolset_name: Optional[str]
|
| 31 |
+
"""For a toolset member tool_use, the toolset family this member belongs to."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_use_caller.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Union
|
| 2 |
+
from typing_extensions import Annotated, TypeAlias
|
| 3 |
+
|
| 4 |
+
from ..._models import UnionDiscriminator
|
| 5 |
+
from .beta_direct_caller import BetaDirectCaller
|
| 6 |
+
from .beta_server_tool_caller import BetaServerToolCaller
|
| 7 |
+
from .beta_server_tool_caller_20260120 import BetaServerToolCaller20260120
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaToolUseCaller"]
|
| 10 |
+
|
| 11 |
+
BetaToolUseCaller: TypeAlias = Annotated[
|
| 12 |
+
Union[BetaDirectCaller, BetaServerToolCaller, BetaServerToolCaller20260120], UnionDiscriminator("type")
|
| 13 |
+
]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_uses_keep_param.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaToolUsesKeepParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaToolUsesKeepParam(TypedDict, total=False):
|
| 9 |
+
type: Required[Literal["tool_uses"]]
|
| 10 |
+
|
| 11 |
+
value: Required[int]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tool_uses_trigger_param.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaToolUsesTriggerParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaToolUsesTriggerParam(TypedDict, total=False):
|
| 9 |
+
type: Required[Literal["tool_uses"]]
|
| 10 |
+
|
| 11 |
+
value: Required[int]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_toolset_tool_use_block.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Union
|
| 2 |
+
from typing_extensions import TypeAlias
|
| 3 |
+
|
| 4 |
+
from .beta_tool_use_block import BetaToolUseBlock
|
| 5 |
+
from .beta_browser_tool_use_block import BetaBrowserToolUseBlock
|
| 6 |
+
from .beta_computer_tool_use_block import BetaComputerToolUseBlock
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaToolsetToolUseBlock"]
|
| 9 |
+
|
| 10 |
+
BetaToolsetToolUseBlock: TypeAlias = Union[BetaBrowserToolUseBlock, BetaComputerToolUseBlock, BetaToolUseBlock]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tunnel.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
from datetime import datetime
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaTunnel"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaTunnel(BaseModel):
|
| 11 |
+
"""An MCP tunnel."""
|
| 12 |
+
|
| 13 |
+
id: str
|
| 14 |
+
"""Unique identifier for the tunnel, prefixed with `tnl_`."""
|
| 15 |
+
|
| 16 |
+
archived_at: Optional[datetime] = None
|
| 17 |
+
"""RFC 3339 datetime string indicating when the tunnel was archived.
|
| 18 |
+
|
| 19 |
+
Null if it is not archived.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
created_at: datetime
|
| 23 |
+
"""RFC 3339 datetime string indicating when the tunnel was created."""
|
| 24 |
+
|
| 25 |
+
display_name: Optional[str] = None
|
| 26 |
+
"""Human-readable name for the tunnel (1-255 characters). Null if unset."""
|
| 27 |
+
|
| 28 |
+
domain: str
|
| 29 |
+
"""Anthropic-assigned hostname for the tunnel.
|
| 30 |
+
|
| 31 |
+
MCP server URLs whose host is a subdomain of this value are routed through the
|
| 32 |
+
tunnel. Globally unique and never reused, even after the tunnel is archived.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
type: Literal["tunnel"]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_tunnel_token.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaTunnelToken"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaTunnelToken(BaseModel):
|
| 9 |
+
"""A tunnel's connector token."""
|
| 10 |
+
|
| 11 |
+
id: str
|
| 12 |
+
"""Stable identifier for the current token value.
|
| 13 |
+
|
| 14 |
+
Changes when the token is rotated.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
tunnel_token: str
|
| 18 |
+
"""The connector token used to run the tunnel. Treat as a credential."""
|
| 19 |
+
|
| 20 |
+
type: Literal["tunnel_token"]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_unrestricted_network.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaUnrestrictedNetwork"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaUnrestrictedNetwork(BaseModel):
|
| 9 |
+
"""Unrestricted network access."""
|
| 10 |
+
|
| 11 |
+
type: Literal["unrestricted"]
|
| 12 |
+
"""Network policy type"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_unrestricted_network_param.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaUnrestrictedNetworkParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaUnrestrictedNetworkParam(TypedDict, total=False):
|
| 9 |
+
"""Unrestricted network access."""
|
| 10 |
+
|
| 11 |
+
type: Required[Literal["unrestricted"]]
|
| 12 |
+
"""Network policy type"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_url_image_source_param.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaURLImageSourceParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaURLImageSourceParam(TypedDict, total=False):
|
| 9 |
+
type: Required[Literal["url"]]
|
| 10 |
+
|
| 11 |
+
url: Required[str]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_url_pdf_source_param.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaURLPDFSourceParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaURLPDFSourceParam(TypedDict, total=False):
|
| 9 |
+
type: Required[Literal["url"]]
|
| 10 |
+
|
| 11 |
+
url: Required[str]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_usage.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_cache_creation import BetaCacheCreation
|
| 6 |
+
from .beta_iterations_usage import BetaIterationsUsage
|
| 7 |
+
from .beta_server_tool_usage import BetaServerToolUsage
|
| 8 |
+
from .beta_fallback_credit_usage import BetaFallbackCreditUsage
|
| 9 |
+
from .beta_output_tokens_details import BetaOutputTokensDetails
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaUsage"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class BetaUsage(BaseModel):
|
| 15 |
+
cache_creation: Optional[BetaCacheCreation] = None
|
| 16 |
+
"""Breakdown of cached tokens by TTL"""
|
| 17 |
+
|
| 18 |
+
cache_creation_input_tokens: Optional[int] = None
|
| 19 |
+
"""The number of input tokens used to create the cache entry."""
|
| 20 |
+
|
| 21 |
+
cache_read_input_tokens: Optional[int] = None
|
| 22 |
+
"""The number of input tokens read from the cache."""
|
| 23 |
+
|
| 24 |
+
fallback_credit: Optional[BetaFallbackCreditUsage] = None
|
| 25 |
+
"""Outcome of the `fallback_credit_token` presented on this request.
|
| 26 |
+
|
| 27 |
+
Present on every response to a non-batch request that carried a
|
| 28 |
+
`fallback_credit_token`, in either redemption mode; absent otherwise (batch
|
| 29 |
+
items accept and ignore the token and carry no outcome object).
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
inference_geo: Optional[str] = None
|
| 33 |
+
"""The geographic region where inference was performed for this request."""
|
| 34 |
+
|
| 35 |
+
input_tokens: int
|
| 36 |
+
"""The number of input tokens which were used."""
|
| 37 |
+
|
| 38 |
+
iterations: Optional[BetaIterationsUsage] = None
|
| 39 |
+
"""Per-iteration token usage breakdown.
|
| 40 |
+
|
| 41 |
+
Each entry represents one sampling iteration, with its own input/output token
|
| 42 |
+
counts and cache statistics, discriminated by `type`. For `message` entries
|
| 43 |
+
(model sampling iterations, such as the turns of a server-side tool use loop),
|
| 44 |
+
this allows you to:
|
| 45 |
+
|
| 46 |
+
- Calculate the context window size from the last `message` entry
|
| 47 |
+
- Understand token accumulation across server-side tool use loops
|
| 48 |
+
|
| 49 |
+
A `compaction` entry reports the token usage of the compaction operation itself
|
| 50 |
+
— the server-side request that summarizes the context being closed — NOT the
|
| 51 |
+
size of the context that was compacted away, and its token counts can be much
|
| 52 |
+
smaller than that closed context (for example, a compaction that closes a
|
| 53 |
+
~200k-token context can report only a few thousand tokens). Do not derive the
|
| 54 |
+
context window size from a `compaction` entry, even when it is the last entry. A
|
| 55 |
+
`compaction` entry's tokens are not included in the top-level `usage` fields.
|
| 56 |
+
When an input-token trigger is in effect (the default — 150,000 tokens unless
|
| 57 |
+
configured otherwise), each `compaction` entry closes a context that had reached
|
| 58 |
+
at least that threshold, though the context can exceed it by the final
|
| 59 |
+
iteration's output and tool results.
|
| 60 |
+
"""
|
| 61 |
+
|
| 62 |
+
output_tokens: int
|
| 63 |
+
"""The number of output tokens which were used."""
|
| 64 |
+
|
| 65 |
+
output_tokens_details: Optional[BetaOutputTokensDetails] = None
|
| 66 |
+
"""Breakdown of output tokens by category.
|
| 67 |
+
|
| 68 |
+
`output_tokens` remains the inclusive, authoritative total used for billing.
|
| 69 |
+
This object provides a read-only decomposition for observability — for example,
|
| 70 |
+
how many of the billed output tokens were spent on internal reasoning that may
|
| 71 |
+
have been summarized before being returned to you.
|
| 72 |
+
"""
|
| 73 |
+
|
| 74 |
+
server_tool_use: Optional[BetaServerToolUsage] = None
|
| 75 |
+
"""The number of server tool requests."""
|
| 76 |
+
|
| 77 |
+
service_tier: Optional[Literal["standard", "priority", "batch"]] = None
|
| 78 |
+
"""If the request used the priority, standard, or batch tier."""
|
| 79 |
+
|
| 80 |
+
speed: Optional[Literal["standard", "fast"]] = None
|
| 81 |
+
"""The inference speed mode used for this request."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_location.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
|
| 6 |
+
__all__ = ["BetaUserLocation"]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class BetaUserLocation(BaseModel):
|
| 10 |
+
type: Literal["approximate"]
|
| 11 |
+
|
| 12 |
+
city: Optional[str] = None
|
| 13 |
+
"""The city of the user."""
|
| 14 |
+
|
| 15 |
+
country: Optional[str] = None
|
| 16 |
+
"""
|
| 17 |
+
The two letter
|
| 18 |
+
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
|
| 19 |
+
user.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
region: Optional[str] = None
|
| 23 |
+
"""The region of the user."""
|
| 24 |
+
|
| 25 |
+
timezone: Optional[str] = None
|
| 26 |
+
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_location_param.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
__all__ = ["BetaUserLocationParam"]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class BetaUserLocationParam(TypedDict, total=False):
|
| 10 |
+
type: Required[Literal["approximate"]]
|
| 11 |
+
|
| 12 |
+
city: Optional[str]
|
| 13 |
+
"""The city of the user."""
|
| 14 |
+
|
| 15 |
+
country: Optional[str]
|
| 16 |
+
"""
|
| 17 |
+
The two letter
|
| 18 |
+
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
|
| 19 |
+
user.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
region: Optional[str]
|
| 23 |
+
"""The region of the user."""
|
| 24 |
+
|
| 25 |
+
timezone: Optional[str]
|
| 26 |
+
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_message_param.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
from .beta_message_content_param import BetaMessageContentParam
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaUserMessageParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaUserMessageParam(TypedDict, total=False):
|
| 11 |
+
content: Required[BetaMessageContentParam]
|
| 12 |
+
|
| 13 |
+
role: Required[Literal["user"]]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile.py
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Dict, Optional
|
| 2 |
+
from datetime import datetime
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
from .beta_user_profile_trust_grant import BetaUserProfileTrustGrant
|
| 7 |
+
from .beta_user_profile_external_user_details import BetaUserProfileExternalUserDetails
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaUserProfile"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class BetaUserProfile(BaseModel):
|
| 13 |
+
"""
|
| 14 |
+
A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.
|
| 15 |
+
|
| 16 |
+
A Messages, Message Batches or token counting request can send a profile's `id` in the `anthropic-user-profile-id` header to attribute the request to that entity.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
id: str
|
| 20 |
+
"""Unique identifier for this user profile, prefixed `uprof_`."""
|
| 21 |
+
|
| 22 |
+
created_at: datetime
|
| 23 |
+
"""When this user profile was created, in RFC 3339 format."""
|
| 24 |
+
|
| 25 |
+
metadata: Dict[str, str]
|
| 26 |
+
"""Arbitrary key-value metadata.
|
| 27 |
+
|
| 28 |
+
Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
name: Optional[str] = None
|
| 32 |
+
"""Real-world name of the entity this profile represents (company or individual).
|
| 33 |
+
|
| 34 |
+
For a company the platform resells Claude access to (`access_type`
|
| 35 |
+
`passthrough`) this is that company's name. `null` until the platform supplies
|
| 36 |
+
one.
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
trust_grants: Dict[str, BetaUserProfileTrustGrant]
|
| 40 |
+
"""Trust grants for this profile, keyed by grant name.
|
| 41 |
+
|
| 42 |
+
Key omitted when no grant is active or in flight.
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
type: Literal["user_profile"]
|
| 46 |
+
"""Object type. Always `user_profile`."""
|
| 47 |
+
|
| 48 |
+
updated_at: datetime
|
| 49 |
+
"""When this user profile was last modified, in RFC 3339 format.
|
| 50 |
+
|
| 51 |
+
It normally also updates shortly after Anthropic gives the profile an approval
|
| 52 |
+
or withdraws one. Other changes to the statuses that Anthropic reports do not
|
| 53 |
+
always update it, so read the status itself rather than watching this timestamp.
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
access_type: Optional[Literal["application", "passthrough"]] = None
|
| 57 |
+
"""
|
| 58 |
+
How the platform uses the API for this entity: `application` (default) or
|
| 59 |
+
`passthrough`. Absent under the legacy `user-profiles-2026-03-24` beta header.
|
| 60 |
+
|
| 61 |
+
- `application` - The user profile represents an individual end-user of a
|
| 62 |
+
product that the platform builds on the API. New profiles get this value by
|
| 63 |
+
default.
|
| 64 |
+
- `passthrough` - The user profile represents a company that the platform
|
| 65 |
+
resells Claude access to.
|
| 66 |
+
"""
|
| 67 |
+
|
| 68 |
+
external_id: Optional[str] = None
|
| 69 |
+
"""Platform's own identifier for this user.
|
| 70 |
+
|
| 71 |
+
Not enforced unique. Legacy field, present only under the
|
| 72 |
+
`user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers; without
|
| 73 |
+
one of them, the value is `external_user_details.reference_id`.
|
| 74 |
+
"""
|
| 75 |
+
|
| 76 |
+
external_user_details: Optional[BetaUserProfileExternalUserDetails] = None
|
| 77 |
+
"""
|
| 78 |
+
Details about the entity this profile represents, as the platform states them;
|
| 79 |
+
not verified by Anthropic. Every field is present, `null` until the platform
|
| 80 |
+
supplies a value. Absent under the legacy `user-profiles-2026-03-24` and
|
| 81 |
+
`user-profiles-2026-08-18` beta headers, which serve `reference_id` as the
|
| 82 |
+
top-level `external_id` and, under `user-profiles-2026-08-18`, `onboarded_at` as
|
| 83 |
+
`external_user_onboarded_at`.
|
| 84 |
+
"""
|
| 85 |
+
|
| 86 |
+
external_user_onboarded_at: Optional[datetime] = None
|
| 87 |
+
"""
|
| 88 |
+
When the entity this profile represents opened its account with the platform, as
|
| 89 |
+
stated by the platform, in RFC 3339 format (UTC). `null` until the platform
|
| 90 |
+
supplies one. Legacy field, present only under the `user-profiles-2026-08-18`
|
| 91 |
+
beta header; without a legacy header, the value is
|
| 92 |
+
`external_user_details.onboarded_at`.
|
| 93 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_enrollment_url.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from datetime import datetime
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
|
| 6 |
+
__all__ = ["BetaUserProfileEnrollmentURL"]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class BetaUserProfileEnrollmentURL(BaseModel):
|
| 10 |
+
"""
|
| 11 |
+
A URL to give to the entity that a user profile represents, so that the entity can enroll in a program.
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
expires_at: datetime
|
| 15 |
+
"""When this enrollment URL expires, in RFC 3339 format."""
|
| 16 |
+
|
| 17 |
+
type: Literal["enrollment_url"]
|
| 18 |
+
"""Object type. Always `enrollment_url`."""
|
| 19 |
+
|
| 20 |
+
url: str
|
| 21 |
+
"""Enrollment URL to send to the end user. Valid until `expires_at`."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_external_user_details.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
from datetime import datetime
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaUserProfileExternalUserDetails"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaUserProfileExternalUserDetails(BaseModel):
|
| 11 |
+
"""Details about the entity this profile represents, as the platform states them.
|
| 12 |
+
|
| 13 |
+
Anthropic does not verify them. Every field is present, `null` until the platform supplies a value.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
account_status: Optional[Literal["active", "suspended", "blocked"]] = None
|
| 17 |
+
"""
|
| 18 |
+
The status of the entity's account on the platform: `active`, `suspended` or
|
| 19 |
+
`blocked`. `null` until the platform supplies one.
|
| 20 |
+
|
| 21 |
+
- `active` - The platform has neither restricted nor barred the account of the
|
| 22 |
+
entity that the user profile represents.
|
| 23 |
+
- `suspended` - The platform has restricted the account of the entity that the
|
| 24 |
+
user profile represents and may restore it.
|
| 25 |
+
- `blocked` - The platform has barred the account of the entity that the user
|
| 26 |
+
profile represents.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
country: Optional[str] = None
|
| 30 |
+
"""
|
| 31 |
+
The country the platform associates with the entity, as an ISO 3166-1 alpha-2
|
| 32 |
+
code. `null` until the platform supplies one.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
email_hash: Optional[str] = None
|
| 36 |
+
"""The platform-computed hash of the entity's email address.
|
| 37 |
+
|
| 38 |
+
`null` until the platform supplies one.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
entity_type: Optional[Literal["individual", "business", "non_profit", "government"]] = None
|
| 42 |
+
"""
|
| 43 |
+
What kind of entity the profile represents: `individual`, `business`,
|
| 44 |
+
`non_profit` or `government`. `null` until the platform supplies one.
|
| 45 |
+
"""
|
| 46 |
+
|
| 47 |
+
name_hash: Optional[str] = None
|
| 48 |
+
"""The platform-computed hash of the entity's name.
|
| 49 |
+
|
| 50 |
+
`null` until the platform supplies one.
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
onboarded_at: Optional[datetime] = None
|
| 54 |
+
"""
|
| 55 |
+
When the entity opened its account with the platform, as stated by the platform,
|
| 56 |
+
in RFC 3339 format (UTC). `null` until the platform supplies one.
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
+
reference_id: Optional[str] = None
|
| 60 |
+
"""The platform's own reference for the entity.
|
| 61 |
+
|
| 62 |
+
`null` until the platform supplies one.
|
| 63 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_external_user_details_params.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Union, Optional
|
| 4 |
+
from datetime import datetime
|
| 5 |
+
from typing_extensions import Literal, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaUserProfileExternalUserDetailsParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaUserProfileExternalUserDetailsParams(TypedDict, total=False):
|
| 11 |
+
account_status: Optional[Literal["active", "suspended", "blocked"]]
|
| 12 |
+
"""
|
| 13 |
+
The status of the entity's account on the platform: `active`, `suspended` or
|
| 14 |
+
`blocked`.
|
| 15 |
+
|
| 16 |
+
- `active` - The platform has neither restricted nor barred the account of the
|
| 17 |
+
entity that the user profile represents.
|
| 18 |
+
- `suspended` - The platform has restricted the account of the entity that the
|
| 19 |
+
user profile represents and may restore it.
|
| 20 |
+
- `blocked` - The platform has barred the account of the entity that the user
|
| 21 |
+
profile represents.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
country: Optional[str]
|
| 25 |
+
"""
|
| 26 |
+
The country of the entity (not of the platform), as the platform determines it:
|
| 27 |
+
an ISO 3166-1 alpha-2 code in upper case, for example `US`. Only the form, two
|
| 28 |
+
uppercase ASCII letters, is checked.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
email_hash: Optional[str]
|
| 32 |
+
"""A hash of the entity's email address, computed by the platform.
|
| 33 |
+
|
| 34 |
+
Anthropic treats it as an opaque string and does not prescribe the hash
|
| 35 |
+
function. 1 to 255 characters.
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
entity_type: Optional[Literal["individual", "business", "non_profit", "government"]]
|
| 39 |
+
"""
|
| 40 |
+
What kind of entity the profile represents: `individual`, `business`,
|
| 41 |
+
`non_profit` or `government`.
|
| 42 |
+
"""
|
| 43 |
+
|
| 44 |
+
name_hash: Optional[str]
|
| 45 |
+
"""A hash of the entity's name, computed by the platform.
|
| 46 |
+
|
| 47 |
+
Anthropic treats it as an opaque string and does not prescribe the hash
|
| 48 |
+
function. 1 to 255 characters.
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
onboarded_at: Union[str, datetime]
|
| 52 |
+
"""
|
| 53 |
+
When the entity opened its account with the platform, in RFC 3339 format: for an
|
| 54 |
+
`application` profile, when the end-user signed up; for a `passthrough` profile,
|
| 55 |
+
when the company became the platform's customer. Must be a complete timestamp no
|
| 56 |
+
more than 1 minute in the future.
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
+
reference_id: Optional[str]
|
| 60 |
+
"""
|
| 61 |
+
The platform's own reference for the entity, for example the key of the
|
| 62 |
+
end-user's row in the platform's database. Not interpreted by Anthropic and not
|
| 63 |
+
enforced unique. 1 to 255 characters.
|
| 64 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_user_profile_trust_grant.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaUserProfileTrustGrant"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaUserProfileTrustGrant(BaseModel):
|
| 9 |
+
"""
|
| 10 |
+
The status of one trust grant on a user profile, listed in the profile's `trust_grants` map under the grant's name.
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
status: Literal["active", "pending", "rejected"]
|
| 14 |
+
"""Status of the trust grant."""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_block.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_document_block import BetaDocumentBlock
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaWebFetchBlock"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaWebFetchBlock(BaseModel):
|
| 11 |
+
content: BetaDocumentBlock
|
| 12 |
+
|
| 13 |
+
retrieved_at: Optional[str] = None
|
| 14 |
+
"""ISO 8601 timestamp when the content was retrieved"""
|
| 15 |
+
|
| 16 |
+
type: Literal["web_fetch_result"]
|
| 17 |
+
|
| 18 |
+
url: str
|
| 19 |
+
"""Fetched content URL"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_block_param.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_request_document_block_param import BetaRequestDocumentBlockParam
|
| 7 |
+
|
| 8 |
+
__all__ = ["BetaWebFetchBlockParam"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class BetaWebFetchBlockParam(TypedDict, total=False):
|
| 12 |
+
content: Required[BetaRequestDocumentBlockParam]
|
| 13 |
+
|
| 14 |
+
type: Required[Literal["web_fetch_result"]]
|
| 15 |
+
|
| 16 |
+
url: Required[str]
|
| 17 |
+
"""Fetched content URL"""
|
| 18 |
+
|
| 19 |
+
retrieved_at: Optional[str]
|
| 20 |
+
"""ISO 8601 timestamp when the content was retrieved"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20250910.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_web_fetch_url_sources import BetaWebFetchURLSources
|
| 6 |
+
from .beta_citations_config_param import BetaCitationsConfigParam
|
| 7 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaWebFetchTool20250910"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class BetaWebFetchTool20250910(BaseModel):
|
| 13 |
+
name: Literal["web_fetch"]
|
| 14 |
+
"""Name of the tool.
|
| 15 |
+
|
| 16 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
type: Literal["web_fetch_20250910"]
|
| 20 |
+
|
| 21 |
+
allowed_callers: Optional[
|
| 22 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 23 |
+
] = None
|
| 24 |
+
|
| 25 |
+
allowed_domains: Optional[List[str]] = None
|
| 26 |
+
"""List of domains to allow fetching from"""
|
| 27 |
+
|
| 28 |
+
blocked_domains: Optional[List[str]] = None
|
| 29 |
+
"""List of domains to block fetching from"""
|
| 30 |
+
|
| 31 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 32 |
+
"""Create a cache control breakpoint at this content block."""
|
| 33 |
+
|
| 34 |
+
citations: Optional[BetaCitationsConfigParam] = None
|
| 35 |
+
"""Citations configuration for fetched documents.
|
| 36 |
+
|
| 37 |
+
Citations are disabled by default.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
defer_loading: Optional[bool] = None
|
| 41 |
+
"""If true, tool will not be included in initial system prompt.
|
| 42 |
+
|
| 43 |
+
Only loaded when returned via tool_reference from tool search.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
max_content_tokens: Optional[int] = None
|
| 47 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 48 |
+
|
| 49 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
max_uses: Optional[int] = None
|
| 53 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 54 |
+
|
| 55 |
+
strict: Optional[bool] = None
|
| 56 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 57 |
+
|
| 58 |
+
url_sources: Optional[BetaWebFetchURLSources] = None
|
| 59 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 60 |
+
|
| 61 |
+
Omitted means every source.
|
| 62 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20250910_param.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from ..._types import SequenceNotStr
|
| 7 |
+
from .beta_web_fetch_url_sources_param import BetaWebFetchURLSourcesParam
|
| 8 |
+
from .beta_citations_config_param_param import BetaCitationsConfigParamParam
|
| 9 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaWebFetchTool20250910Param"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class BetaWebFetchTool20250910Param(TypedDict, total=False):
|
| 15 |
+
name: Required[Literal["web_fetch"]]
|
| 16 |
+
"""Name of the tool.
|
| 17 |
+
|
| 18 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
type: Required[Literal["web_fetch_20250910"]]
|
| 22 |
+
|
| 23 |
+
allowed_callers: List[
|
| 24 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
allowed_domains: Optional[SequenceNotStr[str]]
|
| 28 |
+
"""List of domains to allow fetching from"""
|
| 29 |
+
|
| 30 |
+
blocked_domains: Optional[SequenceNotStr[str]]
|
| 31 |
+
"""List of domains to block fetching from"""
|
| 32 |
+
|
| 33 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 34 |
+
"""Create a cache control breakpoint at this content block."""
|
| 35 |
+
|
| 36 |
+
citations: Optional[BetaCitationsConfigParamParam]
|
| 37 |
+
"""Citations configuration for fetched documents.
|
| 38 |
+
|
| 39 |
+
Citations are disabled by default.
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
defer_loading: bool
|
| 43 |
+
"""If true, tool will not be included in initial system prompt.
|
| 44 |
+
|
| 45 |
+
Only loaded when returned via tool_reference from tool search.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
max_content_tokens: Optional[int]
|
| 49 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 50 |
+
|
| 51 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
max_uses: Optional[int]
|
| 55 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 56 |
+
|
| 57 |
+
strict: bool
|
| 58 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 59 |
+
|
| 60 |
+
url_sources: Optional[BetaWebFetchURLSourcesParam]
|
| 61 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 62 |
+
|
| 63 |
+
Omitted means every source.
|
| 64 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260209.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_web_fetch_url_sources import BetaWebFetchURLSources
|
| 6 |
+
from .beta_citations_config_param import BetaCitationsConfigParam
|
| 7 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaWebFetchTool20260209"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class BetaWebFetchTool20260209(BaseModel):
|
| 13 |
+
name: Literal["web_fetch"]
|
| 14 |
+
"""Name of the tool.
|
| 15 |
+
|
| 16 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
type: Literal["web_fetch_20260209"]
|
| 20 |
+
|
| 21 |
+
allowed_callers: Optional[
|
| 22 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 23 |
+
] = None
|
| 24 |
+
|
| 25 |
+
allowed_domains: Optional[List[str]] = None
|
| 26 |
+
"""List of domains to allow fetching from"""
|
| 27 |
+
|
| 28 |
+
blocked_domains: Optional[List[str]] = None
|
| 29 |
+
"""List of domains to block fetching from"""
|
| 30 |
+
|
| 31 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 32 |
+
"""Create a cache control breakpoint at this content block."""
|
| 33 |
+
|
| 34 |
+
citations: Optional[BetaCitationsConfigParam] = None
|
| 35 |
+
"""Citations configuration for fetched documents.
|
| 36 |
+
|
| 37 |
+
Citations are disabled by default.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
defer_loading: Optional[bool] = None
|
| 41 |
+
"""If true, tool will not be included in initial system prompt.
|
| 42 |
+
|
| 43 |
+
Only loaded when returned via tool_reference from tool search.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
max_content_tokens: Optional[int] = None
|
| 47 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 48 |
+
|
| 49 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
max_uses: Optional[int] = None
|
| 53 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 54 |
+
|
| 55 |
+
strict: Optional[bool] = None
|
| 56 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 57 |
+
|
| 58 |
+
url_sources: Optional[BetaWebFetchURLSources] = None
|
| 59 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 60 |
+
|
| 61 |
+
Omitted means every source.
|
| 62 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260209_param.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from ..._types import SequenceNotStr
|
| 7 |
+
from .beta_web_fetch_url_sources_param import BetaWebFetchURLSourcesParam
|
| 8 |
+
from .beta_citations_config_param_param import BetaCitationsConfigParamParam
|
| 9 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaWebFetchTool20260209Param"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class BetaWebFetchTool20260209Param(TypedDict, total=False):
|
| 15 |
+
name: Required[Literal["web_fetch"]]
|
| 16 |
+
"""Name of the tool.
|
| 17 |
+
|
| 18 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
type: Required[Literal["web_fetch_20260209"]]
|
| 22 |
+
|
| 23 |
+
allowed_callers: List[
|
| 24 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
allowed_domains: Optional[SequenceNotStr[str]]
|
| 28 |
+
"""List of domains to allow fetching from"""
|
| 29 |
+
|
| 30 |
+
blocked_domains: Optional[SequenceNotStr[str]]
|
| 31 |
+
"""List of domains to block fetching from"""
|
| 32 |
+
|
| 33 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 34 |
+
"""Create a cache control breakpoint at this content block."""
|
| 35 |
+
|
| 36 |
+
citations: Optional[BetaCitationsConfigParamParam]
|
| 37 |
+
"""Citations configuration for fetched documents.
|
| 38 |
+
|
| 39 |
+
Citations are disabled by default.
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
defer_loading: bool
|
| 43 |
+
"""If true, tool will not be included in initial system prompt.
|
| 44 |
+
|
| 45 |
+
Only loaded when returned via tool_reference from tool search.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
max_content_tokens: Optional[int]
|
| 49 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 50 |
+
|
| 51 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
max_uses: Optional[int]
|
| 55 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 56 |
+
|
| 57 |
+
strict: bool
|
| 58 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 59 |
+
|
| 60 |
+
url_sources: Optional[BetaWebFetchURLSourcesParam]
|
| 61 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 62 |
+
|
| 63 |
+
Omitted means every source.
|
| 64 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260309.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_web_fetch_url_sources import BetaWebFetchURLSources
|
| 6 |
+
from .beta_citations_config_param import BetaCitationsConfigParam
|
| 7 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaWebFetchTool20260309"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class BetaWebFetchTool20260309(BaseModel):
|
| 13 |
+
"""Web fetch tool with use_cache parameter for bypassing cached content."""
|
| 14 |
+
|
| 15 |
+
name: Literal["web_fetch"]
|
| 16 |
+
"""Name of the tool.
|
| 17 |
+
|
| 18 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
type: Literal["web_fetch_20260309"]
|
| 22 |
+
|
| 23 |
+
allowed_callers: Optional[
|
| 24 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 25 |
+
] = None
|
| 26 |
+
|
| 27 |
+
allowed_domains: Optional[List[str]] = None
|
| 28 |
+
"""List of domains to allow fetching from"""
|
| 29 |
+
|
| 30 |
+
blocked_domains: Optional[List[str]] = None
|
| 31 |
+
"""List of domains to block fetching from"""
|
| 32 |
+
|
| 33 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 34 |
+
"""Create a cache control breakpoint at this content block."""
|
| 35 |
+
|
| 36 |
+
citations: Optional[BetaCitationsConfigParam] = None
|
| 37 |
+
"""Citations configuration for fetched documents.
|
| 38 |
+
|
| 39 |
+
Citations are disabled by default.
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
defer_loading: Optional[bool] = None
|
| 43 |
+
"""If true, tool will not be included in initial system prompt.
|
| 44 |
+
|
| 45 |
+
Only loaded when returned via tool_reference from tool search.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
max_content_tokens: Optional[int] = None
|
| 49 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 50 |
+
|
| 51 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
max_uses: Optional[int] = None
|
| 55 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 56 |
+
|
| 57 |
+
strict: Optional[bool] = None
|
| 58 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 59 |
+
|
| 60 |
+
url_sources: Optional[BetaWebFetchURLSources] = None
|
| 61 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 62 |
+
|
| 63 |
+
Omitted means every source.
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
use_cache: Optional[bool] = None
|
| 67 |
+
"""Whether to use cached content.
|
| 68 |
+
|
| 69 |
+
Set to false to bypass the cache and fetch fresh content. Only set to false when
|
| 70 |
+
the user explicitly requests fresh content or when fetching rapidly-changing
|
| 71 |
+
sources.
|
| 72 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260309_param.py
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from ..._types import SequenceNotStr
|
| 7 |
+
from .beta_web_fetch_url_sources_param import BetaWebFetchURLSourcesParam
|
| 8 |
+
from .beta_citations_config_param_param import BetaCitationsConfigParamParam
|
| 9 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaWebFetchTool20260309Param"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class BetaWebFetchTool20260309Param(TypedDict, total=False):
|
| 15 |
+
"""Web fetch tool with use_cache parameter for bypassing cached content."""
|
| 16 |
+
|
| 17 |
+
name: Required[Literal["web_fetch"]]
|
| 18 |
+
"""Name of the tool.
|
| 19 |
+
|
| 20 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
type: Required[Literal["web_fetch_20260309"]]
|
| 24 |
+
|
| 25 |
+
allowed_callers: List[
|
| 26 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 27 |
+
]
|
| 28 |
+
|
| 29 |
+
allowed_domains: Optional[SequenceNotStr[str]]
|
| 30 |
+
"""List of domains to allow fetching from"""
|
| 31 |
+
|
| 32 |
+
blocked_domains: Optional[SequenceNotStr[str]]
|
| 33 |
+
"""List of domains to block fetching from"""
|
| 34 |
+
|
| 35 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 36 |
+
"""Create a cache control breakpoint at this content block."""
|
| 37 |
+
|
| 38 |
+
citations: Optional[BetaCitationsConfigParamParam]
|
| 39 |
+
"""Citations configuration for fetched documents.
|
| 40 |
+
|
| 41 |
+
Citations are disabled by default.
|
| 42 |
+
"""
|
| 43 |
+
|
| 44 |
+
defer_loading: bool
|
| 45 |
+
"""If true, tool will not be included in initial system prompt.
|
| 46 |
+
|
| 47 |
+
Only loaded when returned via tool_reference from tool search.
|
| 48 |
+
"""
|
| 49 |
+
|
| 50 |
+
max_content_tokens: Optional[int]
|
| 51 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 52 |
+
|
| 53 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
max_uses: Optional[int]
|
| 57 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 58 |
+
|
| 59 |
+
strict: bool
|
| 60 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 61 |
+
|
| 62 |
+
url_sources: Optional[BetaWebFetchURLSourcesParam]
|
| 63 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 64 |
+
|
| 65 |
+
Omitted means every source.
|
| 66 |
+
"""
|
| 67 |
+
|
| 68 |
+
use_cache: bool
|
| 69 |
+
"""Whether to use cached content.
|
| 70 |
+
|
| 71 |
+
Set to false to bypass the cache and fetch fresh content. Only set to false when
|
| 72 |
+
the user explicitly requests fresh content or when fetching rapidly-changing
|
| 73 |
+
sources.
|
| 74 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260318.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List, Optional
|
| 2 |
+
from typing_extensions import Literal
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel
|
| 5 |
+
from .beta_web_fetch_url_sources import BetaWebFetchURLSources
|
| 6 |
+
from .beta_citations_config_param import BetaCitationsConfigParam
|
| 7 |
+
from .beta_cache_control_ephemeral import BetaCacheControlEphemeral
|
| 8 |
+
|
| 9 |
+
__all__ = ["BetaWebFetchTool20260318"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class BetaWebFetchTool20260318(BaseModel):
|
| 13 |
+
name: Literal["web_fetch"]
|
| 14 |
+
"""Name of the tool.
|
| 15 |
+
|
| 16 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
type: Literal["web_fetch_20260318"]
|
| 20 |
+
|
| 21 |
+
allowed_callers: Optional[
|
| 22 |
+
List[Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]]
|
| 23 |
+
] = None
|
| 24 |
+
|
| 25 |
+
allowed_domains: Optional[List[str]] = None
|
| 26 |
+
"""List of domains to allow fetching from"""
|
| 27 |
+
|
| 28 |
+
blocked_domains: Optional[List[str]] = None
|
| 29 |
+
"""List of domains to block fetching from"""
|
| 30 |
+
|
| 31 |
+
cache_control: Optional[BetaCacheControlEphemeral] = None
|
| 32 |
+
"""Create a cache control breakpoint at this content block."""
|
| 33 |
+
|
| 34 |
+
citations: Optional[BetaCitationsConfigParam] = None
|
| 35 |
+
"""Citations configuration for fetched documents.
|
| 36 |
+
|
| 37 |
+
Citations are disabled by default.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
defer_loading: Optional[bool] = None
|
| 41 |
+
"""If true, tool will not be included in initial system prompt.
|
| 42 |
+
|
| 43 |
+
Only loaded when returned via tool_reference from tool search.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
max_content_tokens: Optional[int] = None
|
| 47 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 48 |
+
|
| 49 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
max_uses: Optional[int] = None
|
| 53 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 54 |
+
|
| 55 |
+
response_inclusion: Optional[Literal["full", "excluded"]] = None
|
| 56 |
+
"""
|
| 57 |
+
How this tool's result blocks appear in the API response when the result was
|
| 58 |
+
consumed by a completed code_execution call in the same turn. 'full' returns the
|
| 59 |
+
complete content (default). 'excluded' drops the nested server_tool_use and
|
| 60 |
+
result block pair entirely. Results from direct calls, or from code_execution
|
| 61 |
+
calls that paused before completing, are always returned in full so they can be
|
| 62 |
+
sent back on the next turn.
|
| 63 |
+
"""
|
| 64 |
+
|
| 65 |
+
strict: Optional[bool] = None
|
| 66 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 67 |
+
|
| 68 |
+
url_sources: Optional[BetaWebFetchURLSources] = None
|
| 69 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 70 |
+
|
| 71 |
+
Omitted means every source.
|
| 72 |
+
"""
|
| 73 |
+
|
| 74 |
+
use_cache: Optional[bool] = None
|
| 75 |
+
"""Whether to use cached content.
|
| 76 |
+
|
| 77 |
+
Set to false to bypass the cache and fetch fresh content. Only set to false when
|
| 78 |
+
the user explicitly requests fresh content or when fetching rapidly-changing
|
| 79 |
+
sources.
|
| 80 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_20260318_param.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 5 |
+
|
| 6 |
+
from ..._types import SequenceNotStr
|
| 7 |
+
from .beta_web_fetch_url_sources_param import BetaWebFetchURLSourcesParam
|
| 8 |
+
from .beta_citations_config_param_param import BetaCitationsConfigParamParam
|
| 9 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaWebFetchTool20260318Param"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class BetaWebFetchTool20260318Param(TypedDict, total=False):
|
| 15 |
+
name: Required[Literal["web_fetch"]]
|
| 16 |
+
"""Name of the tool.
|
| 17 |
+
|
| 18 |
+
This is how the tool will be called by the model and in `tool_use` blocks.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
type: Required[Literal["web_fetch_20260318"]]
|
| 22 |
+
|
| 23 |
+
allowed_callers: List[
|
| 24 |
+
Literal["direct", "code_execution_20250825", "code_execution_20260120", "code_execution_20260521"]
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
allowed_domains: Optional[SequenceNotStr[str]]
|
| 28 |
+
"""List of domains to allow fetching from"""
|
| 29 |
+
|
| 30 |
+
blocked_domains: Optional[SequenceNotStr[str]]
|
| 31 |
+
"""List of domains to block fetching from"""
|
| 32 |
+
|
| 33 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 34 |
+
"""Create a cache control breakpoint at this content block."""
|
| 35 |
+
|
| 36 |
+
citations: Optional[BetaCitationsConfigParamParam]
|
| 37 |
+
"""Citations configuration for fetched documents.
|
| 38 |
+
|
| 39 |
+
Citations are disabled by default.
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
defer_loading: bool
|
| 43 |
+
"""If true, tool will not be included in initial system prompt.
|
| 44 |
+
|
| 45 |
+
Only loaded when returned via tool_reference from tool search.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
max_content_tokens: Optional[int]
|
| 49 |
+
"""Maximum number of tokens used by including web page text content in the context.
|
| 50 |
+
|
| 51 |
+
The limit is approximate and does not apply to binary content such as PDFs.
|
| 52 |
+
"""
|
| 53 |
+
|
| 54 |
+
max_uses: Optional[int]
|
| 55 |
+
"""Maximum number of times the tool can be used in the API request."""
|
| 56 |
+
|
| 57 |
+
response_inclusion: Literal["full", "excluded"]
|
| 58 |
+
"""
|
| 59 |
+
How this tool's result blocks appear in the API response when the result was
|
| 60 |
+
consumed by a completed code_execution call in the same turn. 'full' returns the
|
| 61 |
+
complete content (default). 'excluded' drops the nested server_tool_use and
|
| 62 |
+
result block pair entirely. Results from direct calls, or from code_execution
|
| 63 |
+
calls that paused before completing, are always returned in full so they can be
|
| 64 |
+
sent back on the next turn.
|
| 65 |
+
"""
|
| 66 |
+
|
| 67 |
+
strict: bool
|
| 68 |
+
"""When true, guarantees schema validation on tool names and inputs"""
|
| 69 |
+
|
| 70 |
+
url_sources: Optional[BetaWebFetchURLSourcesParam]
|
| 71 |
+
"""Which sources contribute to the set of URLs the tool may fetch.
|
| 72 |
+
|
| 73 |
+
Omitted means every source.
|
| 74 |
+
"""
|
| 75 |
+
|
| 76 |
+
use_cache: bool
|
| 77 |
+
"""Whether to use cached content.
|
| 78 |
+
|
| 79 |
+
Set to false to bypass the cache and fetch fresh content. Only set to false when
|
| 80 |
+
the user explicitly requests fresh content or when fetching rapidly-changing
|
| 81 |
+
sources.
|
| 82 |
+
"""
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_block.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Union, Optional
|
| 2 |
+
from typing_extensions import Literal, Annotated, TypeAlias
|
| 3 |
+
|
| 4 |
+
from ..._models import BaseModel, UnionDiscriminator
|
| 5 |
+
from .beta_direct_caller import BetaDirectCaller
|
| 6 |
+
from .beta_web_fetch_block import BetaWebFetchBlock
|
| 7 |
+
from .beta_server_tool_caller import BetaServerToolCaller
|
| 8 |
+
from .beta_server_tool_caller_20260120 import BetaServerToolCaller20260120
|
| 9 |
+
from .beta_web_fetch_tool_result_error_block import BetaWebFetchToolResultErrorBlock
|
| 10 |
+
|
| 11 |
+
__all__ = ["BetaWebFetchToolResultBlock", "Content", "Caller"]
|
| 12 |
+
|
| 13 |
+
Content: TypeAlias = Union[BetaWebFetchToolResultErrorBlock, BetaWebFetchBlock]
|
| 14 |
+
|
| 15 |
+
Caller: TypeAlias = Annotated[
|
| 16 |
+
Union[BetaDirectCaller, BetaServerToolCaller, BetaServerToolCaller20260120], UnionDiscriminator("type")
|
| 17 |
+
]
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class BetaWebFetchToolResultBlock(BaseModel):
|
| 21 |
+
content: Content
|
| 22 |
+
|
| 23 |
+
tool_use_id: str
|
| 24 |
+
|
| 25 |
+
type: Literal["web_fetch_tool_result"]
|
| 26 |
+
|
| 27 |
+
caller: Optional[Caller] = None
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_block_param.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Union, Optional
|
| 4 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 5 |
+
|
| 6 |
+
from .beta_direct_caller_param import BetaDirectCallerParam
|
| 7 |
+
from .beta_web_fetch_block_param import BetaWebFetchBlockParam
|
| 8 |
+
from .beta_server_tool_caller_param import BetaServerToolCallerParam
|
| 9 |
+
from .beta_cache_control_ephemeral_param import BetaCacheControlEphemeralParam
|
| 10 |
+
from .beta_server_tool_caller_20260120_param import BetaServerToolCaller20260120Param
|
| 11 |
+
from .beta_web_fetch_tool_result_error_block_param import BetaWebFetchToolResultErrorBlockParam
|
| 12 |
+
|
| 13 |
+
__all__ = ["BetaWebFetchToolResultBlockParam", "Content", "Caller"]
|
| 14 |
+
|
| 15 |
+
Content: TypeAlias = Union[BetaWebFetchToolResultErrorBlockParam, BetaWebFetchBlockParam]
|
| 16 |
+
|
| 17 |
+
Caller: TypeAlias = Union[BetaDirectCallerParam, BetaServerToolCallerParam, BetaServerToolCaller20260120Param]
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class BetaWebFetchToolResultBlockParam(TypedDict, total=False):
|
| 21 |
+
content: Required[Content]
|
| 22 |
+
|
| 23 |
+
tool_use_id: Required[str]
|
| 24 |
+
|
| 25 |
+
type: Required[Literal["web_fetch_tool_result"]]
|
| 26 |
+
|
| 27 |
+
cache_control: Optional[BetaCacheControlEphemeralParam]
|
| 28 |
+
"""Create a cache control breakpoint at this content block."""
|
| 29 |
+
|
| 30 |
+
caller: Caller
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_block.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
from .beta_web_fetch_tool_result_error_code import BetaWebFetchToolResultErrorCode
|
| 5 |
+
|
| 6 |
+
__all__ = ["BetaWebFetchToolResultErrorBlock"]
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class BetaWebFetchToolResultErrorBlock(BaseModel):
|
| 10 |
+
error_code: BetaWebFetchToolResultErrorCode
|
| 11 |
+
|
| 12 |
+
type: Literal["web_fetch_tool_result_error"]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_block_param.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
from .beta_web_fetch_tool_result_error_code import BetaWebFetchToolResultErrorCode
|
| 6 |
+
|
| 7 |
+
__all__ = ["BetaWebFetchToolResultErrorBlockParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class BetaWebFetchToolResultErrorBlockParam(TypedDict, total=False):
|
| 11 |
+
error_code: Required[BetaWebFetchToolResultErrorCode]
|
| 12 |
+
|
| 13 |
+
type: Required[Literal["web_fetch_tool_result_error"]]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_tool_result_error_code.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal, TypeAlias
|
| 2 |
+
|
| 3 |
+
__all__ = ["BetaWebFetchToolResultErrorCode"]
|
| 4 |
+
|
| 5 |
+
BetaWebFetchToolResultErrorCode: TypeAlias = Literal[
|
| 6 |
+
"invalid_tool_input",
|
| 7 |
+
"url_too_long",
|
| 8 |
+
"url_not_allowed",
|
| 9 |
+
"url_not_in_prior_context",
|
| 10 |
+
"url_not_accessible",
|
| 11 |
+
"unsupported_content_type",
|
| 12 |
+
"too_many_requests",
|
| 13 |
+
"max_uses_exceeded",
|
| 14 |
+
"unavailable",
|
| 15 |
+
"content_too_large",
|
| 16 |
+
]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_url_source_all.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing_extensions import Literal
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaWebFetchURLSourceAll"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaWebFetchURLSourceAll(BaseModel):
|
| 9 |
+
"""
|
| 10 |
+
The ``url_sources`` variant under which a source contributes in
|
| 11 |
+
full: every result of the tool filter's source, or all user input.
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
type: Literal["all"]
|
.venv/lib/python3.13/site-packages/anthropic/types/beta/beta_web_fetch_url_source_all_param.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 4 |
+
|
| 5 |
+
__all__ = ["BetaWebFetchURLSourceAllParam"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class BetaWebFetchURLSourceAllParam(TypedDict, total=False):
|
| 9 |
+
"""
|
| 10 |
+
The ``url_sources`` variant under which a source contributes in
|
| 11 |
+
full: every result of the tool filter's source, or all user input.
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
type: Required[Literal["all"]]
|