@anthropic-ai/sdk 0.105.0 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/README.md +16 -1
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +2 -1
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +2 -1
- package/core/streaming.mjs.map +1 -1
- package/helpers/beta/mcp.d.mts +1 -1
- package/helpers/beta/mcp.d.mts.map +1 -1
- package/helpers/beta/mcp.d.ts +1 -1
- package/helpers/beta/mcp.d.ts.map +1 -1
- package/helpers/beta/mcp.js +1 -1
- package/helpers/beta/mcp.js.map +1 -1
- package/helpers/beta/mcp.mjs +1 -1
- package/helpers/beta/mcp.mjs.map +1 -1
- package/internal/headers.d.mts +7 -0
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +7 -0
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +45 -4
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +43 -3
- package/internal/headers.mjs.map +1 -1
- package/internal/stainless-helper-header.d.mts +60 -0
- package/internal/stainless-helper-header.d.mts.map +1 -0
- package/internal/stainless-helper-header.d.ts +60 -0
- package/internal/stainless-helper-header.d.ts.map +1 -0
- package/{lib → internal}/stainless-helper-header.js +27 -6
- package/internal/stainless-helper-header.js.map +1 -0
- package/{lib → internal}/stainless-helper-header.mjs +25 -5
- package/internal/stainless-helper-header.mjs.map +1 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +2 -1
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +2 -1
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.d.mts.map +1 -1
- package/lib/MessageStream.d.ts.map +1 -1
- package/lib/MessageStream.js +2 -1
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +2 -1
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/helper-client.d.mts +2 -20
- package/lib/helper-client.d.mts.map +1 -1
- package/lib/helper-client.d.ts +2 -20
- package/lib/helper-client.d.ts.map +1 -1
- package/lib/helper-client.js +2 -1
- package/lib/helper-client.js.map +1 -1
- package/lib/helper-client.mjs +2 -1
- package/lib/helper-client.mjs.map +1 -1
- package/lib/middleware.d.mts.map +1 -1
- package/lib/middleware.d.ts.map +1 -1
- package/lib/middleware.js +7 -5
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +7 -5
- package/lib/middleware.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +11 -5
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +11 -5
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.d.mts.map +1 -1
- package/lib/tools/SessionToolRunner.d.ts.map +1 -1
- package/lib/tools/SessionToolRunner.js +2 -3
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +2 -3
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +7 -2
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +7 -2
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployments.d.mts +18 -6
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +18 -6
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/deployments.js +18 -6
- package/resources/beta/deployments.js.map +1 -1
- package/resources/beta/deployments.mjs +18 -6
- package/resources/beta/deployments.mjs.map +1 -1
- package/resources/beta/files.js +1 -1
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +1 -1
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +37 -26
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +37 -26
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/batches.js +11 -8
- package/resources/beta/messages/batches.js.map +1 -1
- package/resources/beta/messages/batches.mjs +11 -8
- package/resources/beta/messages/batches.mjs.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +170 -39
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +170 -39
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +12 -6
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +12 -6
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/completions.d.mts +12 -7
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +12 -7
- package/resources/completions.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/batches.d.mts +19 -10
- package/resources/messages/batches.d.mts.map +1 -1
- package/resources/messages/batches.d.ts +19 -10
- package/resources/messages/batches.d.ts.map +1 -1
- package/resources/messages/batches.js +16 -8
- package/resources/messages/batches.js.map +1 -1
- package/resources/messages/batches.mjs +16 -8
- package/resources/messages/batches.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +209 -68
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +209 -68
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +20 -7
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +20 -7
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/core/streaming.ts +2 -1
- package/src/helpers/beta/mcp.ts +1 -1
- package/src/internal/headers.ts +47 -4
- package/src/internal/stainless-helper-header.ts +122 -0
- package/src/lib/BetaMessageStream.ts +2 -1
- package/src/lib/MessageStream.ts +2 -1
- package/src/lib/helper-client.ts +6 -9
- package/src/lib/middleware.ts +10 -4
- package/src/lib/tools/BetaToolRunner.ts +15 -6
- package/src/lib/tools/SessionToolRunner.ts +2 -4
- package/src/resources/beta/agents/agents.ts +7 -2
- package/src/resources/beta/beta.ts +4 -0
- package/src/resources/beta/deployments.ts +18 -6
- package/src/resources/beta/files.ts +1 -1
- package/src/resources/beta/index.ts +2 -0
- package/src/resources/beta/messages/batches.ts +43 -29
- package/src/resources/beta/messages/index.ts +2 -0
- package/src/resources/beta/messages/messages.ts +213 -41
- package/src/resources/completions.ts +12 -7
- package/src/resources/index.ts +2 -0
- package/src/resources/messages/batches.ts +29 -11
- package/src/resources/messages/index.ts +2 -0
- package/src/resources/messages/messages.ts +260 -71
- package/src/tools/agent-toolset/fs-util.ts +7 -1
- package/src/tools/agent-toolset/node.ts +19 -3
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +7 -1
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +7 -1
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +21 -4
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +21 -4
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/stainless-helper-header.d.mts +0 -34
- package/lib/stainless-helper-header.d.mts.map +0 -1
- package/lib/stainless-helper-header.d.ts +0 -34
- package/lib/stainless-helper-header.d.ts.map +0 -1
- package/lib/stainless-helper-header.js.map +0 -1
- package/lib/stainless-helper-header.mjs.map +0 -1
- package/src/lib/stainless-helper-header.ts +0 -80
|
@@ -17,7 +17,7 @@ export declare class Messages extends APIResource {
|
|
|
17
17
|
* conversations.
|
|
18
18
|
*
|
|
19
19
|
* Learn more about the Messages API in our
|
|
20
|
-
* [user guide](https://
|
|
20
|
+
* [user guide](https://platform.claude.com/docs/en/get-started)
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
@@ -28,9 +28,9 @@ export declare class Messages extends APIResource {
|
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
create(
|
|
32
|
-
create(
|
|
33
|
-
create(
|
|
31
|
+
create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise<Message>;
|
|
32
|
+
create(params: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise<Stream<RawMessageStreamEvent>>;
|
|
33
|
+
create(params: MessageCreateParamsBase, options?: RequestOptions): APIPromise<Stream<RawMessageStreamEvent> | Message>;
|
|
34
34
|
/**
|
|
35
35
|
* Send a structured list of input messages with text and/or image content, along with an expected `output_config.format` and
|
|
36
36
|
* the response will be automatically parsed and available in the `parsed_output` property of the message.
|
|
@@ -79,7 +79,7 @@ export declare class Messages extends APIResource {
|
|
|
79
79
|
* including tools, images, and documents, without creating it.
|
|
80
80
|
*
|
|
81
81
|
* Learn more about token counting in our
|
|
82
|
-
* [user guide](https://
|
|
82
|
+
* [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
85
|
* ```ts
|
|
@@ -90,7 +90,7 @@ export declare class Messages extends APIResource {
|
|
|
90
90
|
* });
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
|
-
countTokens(
|
|
93
|
+
countTokens(params: MessageCountTokensParams, options?: RequestOptions): APIPromise<MessageTokensCount>;
|
|
94
94
|
}
|
|
95
95
|
export interface Base64ImageSource {
|
|
96
96
|
data: string;
|
|
@@ -157,7 +157,9 @@ export interface CacheControlEphemeral {
|
|
|
157
157
|
* - `5m`: 5 minutes
|
|
158
158
|
* - `1h`: 1 hour
|
|
159
159
|
*
|
|
160
|
-
* Defaults to `5m`.
|
|
160
|
+
* Defaults to `5m`. See
|
|
161
|
+
* [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
162
|
+
* for details.
|
|
161
163
|
*/
|
|
162
164
|
ttl?: '5m' | '1h';
|
|
163
165
|
}
|
|
@@ -770,7 +772,7 @@ export interface Message {
|
|
|
770
772
|
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
771
773
|
* checkpoint).
|
|
772
774
|
*/
|
|
773
|
-
export type MessageCountTokensTool = Tool | ToolBash20250124 | CodeExecutionTool20250522 | CodeExecutionTool20250825 | CodeExecutionTool20260120 | CodeExecutionTool20260521 | MemoryTool20250818 | ToolTextEditor20250124 | ToolTextEditor20250429 | ToolTextEditor20250728 | WebSearchTool20250305 | WebFetchTool20250910 | WebSearchTool20260209 | WebFetchTool20260209 | WebFetchTool20260309 | ToolSearchToolBm25_20251119 | ToolSearchToolRegex20251119;
|
|
775
|
+
export type MessageCountTokensTool = Tool | ToolBash20250124 | CodeExecutionTool20250522 | CodeExecutionTool20250825 | CodeExecutionTool20260120 | CodeExecutionTool20260521 | MemoryTool20250818 | ToolTextEditor20250124 | ToolTextEditor20250429 | ToolTextEditor20250728 | WebSearchTool20250305 | WebFetchTool20250910 | WebSearchTool20260209 | WebFetchTool20260209 | WebFetchTool20260309 | WebSearchTool20260318 | WebFetchTool20260318 | ToolSearchToolBm25_20251119 | ToolSearchToolRegex20251119;
|
|
774
776
|
export interface MessageDeltaUsage {
|
|
775
777
|
/**
|
|
776
778
|
* The cumulative number of input tokens used to create the cache entry.
|
|
@@ -955,7 +957,7 @@ export interface RefusalStopDetails {
|
|
|
955
957
|
/**
|
|
956
958
|
* The policy category that triggered a refusal.
|
|
957
959
|
*/
|
|
958
|
-
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | null;
|
|
960
|
+
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'military_weapons' | null;
|
|
959
961
|
/**
|
|
960
962
|
* Human-readable explanation of the refusal.
|
|
961
963
|
*
|
|
@@ -1150,7 +1152,7 @@ export interface ThinkingConfigEnabled {
|
|
|
1150
1152
|
* Must be ≥1024 and less than `max_tokens`.
|
|
1151
1153
|
*
|
|
1152
1154
|
* See
|
|
1153
|
-
* [extended thinking](https://
|
|
1155
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
1154
1156
|
* for details.
|
|
1155
1157
|
*/
|
|
1156
1158
|
budget_tokens: number;
|
|
@@ -1171,7 +1173,7 @@ export interface ThinkingConfigEnabled {
|
|
|
1171
1173
|
* tokens and counts towards your `max_tokens` limit.
|
|
1172
1174
|
*
|
|
1173
1175
|
* See
|
|
1174
|
-
* [extended thinking](https://
|
|
1176
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
1175
1177
|
* for details.
|
|
1176
1178
|
*/
|
|
1177
1179
|
export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigAdaptive;
|
|
@@ -1514,7 +1516,7 @@ export interface ToolTextEditor20250728 {
|
|
|
1514
1516
|
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
1515
1517
|
* checkpoint).
|
|
1516
1518
|
*/
|
|
1517
|
-
export type ToolUnion = Tool | ToolBash20250124 | CodeExecutionTool20250522 | CodeExecutionTool20250825 | CodeExecutionTool20260120 | CodeExecutionTool20260521 | MemoryTool20250818 | ToolTextEditor20250124 | ToolTextEditor20250429 | ToolTextEditor20250728 | WebSearchTool20250305 | WebFetchTool20250910 | WebSearchTool20260209 | WebFetchTool20260209 | WebFetchTool20260309 | ToolSearchToolBm25_20251119 | ToolSearchToolRegex20251119;
|
|
1519
|
+
export type ToolUnion = Tool | ToolBash20250124 | CodeExecutionTool20250522 | CodeExecutionTool20250825 | CodeExecutionTool20260120 | CodeExecutionTool20260521 | MemoryTool20250818 | ToolTextEditor20250124 | ToolTextEditor20250429 | ToolTextEditor20250728 | WebSearchTool20250305 | WebFetchTool20250910 | WebSearchTool20260209 | WebFetchTool20260209 | WebFetchTool20260309 | WebSearchTool20260318 | WebFetchTool20260318 | ToolSearchToolBm25_20251119 | ToolSearchToolRegex20251119;
|
|
1518
1520
|
export interface ToolUseBlock {
|
|
1519
1521
|
id: string;
|
|
1520
1522
|
/**
|
|
@@ -1779,6 +1781,66 @@ export interface WebFetchTool20260309 {
|
|
|
1779
1781
|
*/
|
|
1780
1782
|
use_cache?: boolean;
|
|
1781
1783
|
}
|
|
1784
|
+
export interface WebFetchTool20260318 {
|
|
1785
|
+
/**
|
|
1786
|
+
* Name of the tool.
|
|
1787
|
+
*
|
|
1788
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
1789
|
+
*/
|
|
1790
|
+
name: 'web_fetch';
|
|
1791
|
+
type: 'web_fetch_20260318';
|
|
1792
|
+
allowed_callers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'>;
|
|
1793
|
+
/**
|
|
1794
|
+
* List of domains to allow fetching from
|
|
1795
|
+
*/
|
|
1796
|
+
allowed_domains?: Array<string> | null;
|
|
1797
|
+
/**
|
|
1798
|
+
* List of domains to block fetching from
|
|
1799
|
+
*/
|
|
1800
|
+
blocked_domains?: Array<string> | null;
|
|
1801
|
+
/**
|
|
1802
|
+
* Create a cache control breakpoint at this content block.
|
|
1803
|
+
*/
|
|
1804
|
+
cache_control?: CacheControlEphemeral | null;
|
|
1805
|
+
/**
|
|
1806
|
+
* Citations configuration for fetched documents. Citations are disabled by
|
|
1807
|
+
* default.
|
|
1808
|
+
*/
|
|
1809
|
+
citations?: CitationsConfigParam | null;
|
|
1810
|
+
/**
|
|
1811
|
+
* If true, tool will not be included in initial system prompt. Only loaded when
|
|
1812
|
+
* returned via tool_reference from tool search.
|
|
1813
|
+
*/
|
|
1814
|
+
defer_loading?: boolean;
|
|
1815
|
+
/**
|
|
1816
|
+
* Maximum number of tokens used by including web page text content in the context.
|
|
1817
|
+
* The limit is approximate and does not apply to binary content such as PDFs.
|
|
1818
|
+
*/
|
|
1819
|
+
max_content_tokens?: number | null;
|
|
1820
|
+
/**
|
|
1821
|
+
* Maximum number of times the tool can be used in the API request.
|
|
1822
|
+
*/
|
|
1823
|
+
max_uses?: number | null;
|
|
1824
|
+
/**
|
|
1825
|
+
* How this tool's result blocks appear in the API response when the result was
|
|
1826
|
+
* consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
1827
|
+
* complete content (default). 'excluded' drops the nested server_tool_use and
|
|
1828
|
+
* result block pair entirely. Results from direct calls, or from code_execution
|
|
1829
|
+
* calls that paused before completing, are always returned in full so they can be
|
|
1830
|
+
* sent back on the next turn.
|
|
1831
|
+
*/
|
|
1832
|
+
response_inclusion?: 'full' | 'excluded';
|
|
1833
|
+
/**
|
|
1834
|
+
* When true, guarantees schema validation on tool names and inputs
|
|
1835
|
+
*/
|
|
1836
|
+
strict?: boolean;
|
|
1837
|
+
/**
|
|
1838
|
+
* Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
1839
|
+
* content. Only set to false when the user explicitly requests fresh content or
|
|
1840
|
+
* when fetching rapidly-changing sources.
|
|
1841
|
+
*/
|
|
1842
|
+
use_cache?: boolean;
|
|
1843
|
+
}
|
|
1782
1844
|
export interface WebFetchToolResultBlock {
|
|
1783
1845
|
/**
|
|
1784
1846
|
* Tool invocation directly from the model.
|
|
@@ -1922,6 +1984,57 @@ export declare namespace WebSearchTool20260209 {
|
|
|
1922
1984
|
*/
|
|
1923
1985
|
type UserLocation = Messages.UserLocation;
|
|
1924
1986
|
}
|
|
1987
|
+
export interface WebSearchTool20260318 {
|
|
1988
|
+
/**
|
|
1989
|
+
* Name of the tool.
|
|
1990
|
+
*
|
|
1991
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
1992
|
+
*/
|
|
1993
|
+
name: 'web_search';
|
|
1994
|
+
type: 'web_search_20260318';
|
|
1995
|
+
allowed_callers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'>;
|
|
1996
|
+
/**
|
|
1997
|
+
* If provided, only these domains will be included in results. Cannot be used
|
|
1998
|
+
* alongside `blocked_domains`.
|
|
1999
|
+
*/
|
|
2000
|
+
allowed_domains?: Array<string> | null;
|
|
2001
|
+
/**
|
|
2002
|
+
* If provided, these domains will never appear in results. Cannot be used
|
|
2003
|
+
* alongside `allowed_domains`.
|
|
2004
|
+
*/
|
|
2005
|
+
blocked_domains?: Array<string> | null;
|
|
2006
|
+
/**
|
|
2007
|
+
* Create a cache control breakpoint at this content block.
|
|
2008
|
+
*/
|
|
2009
|
+
cache_control?: CacheControlEphemeral | null;
|
|
2010
|
+
/**
|
|
2011
|
+
* If true, tool will not be included in initial system prompt. Only loaded when
|
|
2012
|
+
* returned via tool_reference from tool search.
|
|
2013
|
+
*/
|
|
2014
|
+
defer_loading?: boolean;
|
|
2015
|
+
/**
|
|
2016
|
+
* Maximum number of times the tool can be used in the API request.
|
|
2017
|
+
*/
|
|
2018
|
+
max_uses?: number | null;
|
|
2019
|
+
/**
|
|
2020
|
+
* How this tool's result blocks appear in the API response when the result was
|
|
2021
|
+
* consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
2022
|
+
* complete content (default). 'excluded' drops the nested server_tool_use and
|
|
2023
|
+
* result block pair entirely. Results from direct calls, or from code_execution
|
|
2024
|
+
* calls that paused before completing, are always returned in full so they can be
|
|
2025
|
+
* sent back on the next turn.
|
|
2026
|
+
*/
|
|
2027
|
+
response_inclusion?: 'full' | 'excluded';
|
|
2028
|
+
/**
|
|
2029
|
+
* When true, guarantees schema validation on tool names and inputs
|
|
2030
|
+
*/
|
|
2031
|
+
strict?: boolean;
|
|
2032
|
+
/**
|
|
2033
|
+
* Parameters for the user's location. Used to provide more relevant search
|
|
2034
|
+
* results.
|
|
2035
|
+
*/
|
|
2036
|
+
user_location?: UserLocation | null;
|
|
2037
|
+
}
|
|
1925
2038
|
export interface WebSearchToolRequestError {
|
|
1926
2039
|
error_code: WebSearchToolResultErrorCode;
|
|
1927
2040
|
type: 'web_search_tool_result_error';
|
|
@@ -1965,21 +2078,22 @@ export type ContentBlockStopEvent = RawContentBlockStopEvent;
|
|
|
1965
2078
|
export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
|
|
1966
2079
|
export interface MessageCreateParamsBase {
|
|
1967
2080
|
/**
|
|
1968
|
-
* The maximum number of tokens to generate before stopping.
|
|
2081
|
+
* Body param: The maximum number of tokens to generate before stopping.
|
|
1969
2082
|
*
|
|
1970
2083
|
* Note that our models may stop _before_ reaching this maximum. This parameter
|
|
1971
2084
|
* only specifies the absolute maximum number of tokens to generate.
|
|
1972
2085
|
*
|
|
1973
2086
|
* Set to `0` to populate the
|
|
1974
|
-
* [prompt cache](https://
|
|
2087
|
+
* [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
|
|
1975
2088
|
* without generating a response.
|
|
1976
2089
|
*
|
|
1977
2090
|
* Different models have different maximum values for this parameter. See
|
|
1978
|
-
* [models](https://
|
|
2091
|
+
* [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
|
|
2092
|
+
* details.
|
|
1979
2093
|
*/
|
|
1980
2094
|
max_tokens: number;
|
|
1981
2095
|
/**
|
|
1982
|
-
* Input messages.
|
|
2096
|
+
* Body param: Input messages.
|
|
1983
2097
|
*
|
|
1984
2098
|
* Our models are trained to operate on alternating `user` and `assistant`
|
|
1985
2099
|
* conversational turns. When creating a new `Message`, you specify the prior
|
|
@@ -2036,55 +2150,58 @@ export interface MessageCreateParamsBase {
|
|
|
2036
2150
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
2037
2151
|
* ```
|
|
2038
2152
|
*
|
|
2039
|
-
* See
|
|
2153
|
+
* See
|
|
2154
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
2040
2155
|
*
|
|
2041
2156
|
* Note that if you want to include a
|
|
2042
|
-
* [system prompt](https://
|
|
2043
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
2044
|
-
* the Messages API.
|
|
2157
|
+
* [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
|
|
2158
|
+
* you can use the top-level `system` parameter — there is no `"system"` role for
|
|
2159
|
+
* input messages in the Messages API.
|
|
2045
2160
|
*
|
|
2046
2161
|
* There is a limit of 100,000 messages in a single request.
|
|
2047
2162
|
*/
|
|
2048
2163
|
messages: Array<MessageParam>;
|
|
2049
2164
|
/**
|
|
2050
|
-
* The model that will complete your prompt.
|
|
2165
|
+
* Body param: The model that will complete your prompt.
|
|
2051
2166
|
*
|
|
2052
2167
|
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
2053
2168
|
* details and options.
|
|
2054
2169
|
*/
|
|
2055
2170
|
model: Model;
|
|
2056
2171
|
/**
|
|
2057
|
-
* Top-level cache control automatically applies a cache_control marker
|
|
2058
|
-
* cacheable block in the request.
|
|
2172
|
+
* Body param: Top-level cache control automatically applies a cache_control marker
|
|
2173
|
+
* to the last cacheable block in the request.
|
|
2059
2174
|
*/
|
|
2060
2175
|
cache_control?: CacheControlEphemeral | null;
|
|
2061
2176
|
/**
|
|
2062
|
-
* Container identifier for reuse across requests.
|
|
2177
|
+
* Body param: Container identifier for reuse across requests.
|
|
2063
2178
|
*/
|
|
2064
2179
|
container?: string | null;
|
|
2065
2180
|
/**
|
|
2066
|
-
* Specifies the geographic region for inference processing. If not
|
|
2067
|
-
* workspace's `default_inference_geo` is used.
|
|
2181
|
+
* Body param: Specifies the geographic region for inference processing. If not
|
|
2182
|
+
* specified, the workspace's `default_inference_geo` is used.
|
|
2068
2183
|
*/
|
|
2069
2184
|
inference_geo?: string | null;
|
|
2070
2185
|
/**
|
|
2071
|
-
* An object describing metadata about the request.
|
|
2186
|
+
* Body param: An object describing metadata about the request.
|
|
2072
2187
|
*/
|
|
2073
2188
|
metadata?: Metadata;
|
|
2074
2189
|
/**
|
|
2075
|
-
* Configuration options for the model's output, such as the output
|
|
2190
|
+
* Body param: Configuration options for the model's output, such as the output
|
|
2191
|
+
* format.
|
|
2076
2192
|
*/
|
|
2077
2193
|
output_config?: OutputConfig;
|
|
2078
2194
|
/**
|
|
2079
|
-
* Determines whether to use priority capacity (if available) or
|
|
2080
|
-
* for this request.
|
|
2195
|
+
* Body param: Determines whether to use priority capacity (if available) or
|
|
2196
|
+
* standard capacity for this request.
|
|
2081
2197
|
*
|
|
2082
2198
|
* Anthropic offers different levels of service for your API requests. See
|
|
2083
|
-
* [service-tiers](https://
|
|
2199
|
+
* [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
|
|
2200
|
+
* details.
|
|
2084
2201
|
*/
|
|
2085
2202
|
service_tier?: 'auto' | 'standard_only';
|
|
2086
2203
|
/**
|
|
2087
|
-
* Custom text sequences that will cause the model to stop generating.
|
|
2204
|
+
* Body param: Custom text sequences that will cause the model to stop generating.
|
|
2088
2205
|
*
|
|
2089
2206
|
* Our models will normally stop when they have naturally completed their turn,
|
|
2090
2207
|
* which will result in a response `stop_reason` of `"end_turn"`.
|
|
@@ -2096,17 +2213,19 @@ export interface MessageCreateParamsBase {
|
|
|
2096
2213
|
*/
|
|
2097
2214
|
stop_sequences?: Array<string>;
|
|
2098
2215
|
/**
|
|
2099
|
-
* Whether to incrementally stream the response using server-sent
|
|
2216
|
+
* Body param: Whether to incrementally stream the response using server-sent
|
|
2217
|
+
* events.
|
|
2100
2218
|
*
|
|
2101
|
-
* See [streaming](https://
|
|
2219
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2220
|
+
* for details.
|
|
2102
2221
|
*/
|
|
2103
2222
|
stream?: boolean;
|
|
2104
2223
|
/**
|
|
2105
|
-
* System prompt.
|
|
2224
|
+
* Body param: System prompt.
|
|
2106
2225
|
*
|
|
2107
2226
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
2108
2227
|
* as specifying a particular goal or role. See our
|
|
2109
|
-
* [guide to system prompts](https://
|
|
2228
|
+
* [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
2110
2229
|
*/
|
|
2111
2230
|
system?: string | Array<TextBlockParam>;
|
|
2112
2231
|
/**
|
|
@@ -2116,24 +2235,24 @@ export interface MessageCreateParamsBase {
|
|
|
2116
2235
|
*/
|
|
2117
2236
|
temperature?: number;
|
|
2118
2237
|
/**
|
|
2119
|
-
* Configuration for enabling Claude's extended thinking.
|
|
2238
|
+
* Body param: Configuration for enabling Claude's extended thinking.
|
|
2120
2239
|
*
|
|
2121
2240
|
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
2122
2241
|
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
2123
2242
|
* tokens and counts towards your `max_tokens` limit.
|
|
2124
2243
|
*
|
|
2125
2244
|
* See
|
|
2126
|
-
* [extended thinking](https://
|
|
2245
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2127
2246
|
* for details.
|
|
2128
2247
|
*/
|
|
2129
2248
|
thinking?: ThinkingConfigParam;
|
|
2130
2249
|
/**
|
|
2131
|
-
* How the model should use the provided tools. The model can use a
|
|
2132
|
-
* any available tool, decide by itself, or not use tools at all.
|
|
2250
|
+
* Body param: How the model should use the provided tools. The model can use a
|
|
2251
|
+
* specific tool, any available tool, decide by itself, or not use tools at all.
|
|
2133
2252
|
*/
|
|
2134
2253
|
tool_choice?: ToolChoice;
|
|
2135
2254
|
/**
|
|
2136
|
-
* Definitions of tools that the model may use.
|
|
2255
|
+
* Body param: Definitions of tools that the model may use.
|
|
2137
2256
|
*
|
|
2138
2257
|
* If you include `tools` in your API request, the model may return `tool_use`
|
|
2139
2258
|
* content blocks that represent the model's use of those tools. You can then run
|
|
@@ -2142,9 +2261,9 @@ export interface MessageCreateParamsBase {
|
|
|
2142
2261
|
*
|
|
2143
2262
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
2144
2263
|
* behavior described below applies to client tools. For
|
|
2145
|
-
* [server tools](https://
|
|
2264
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
2146
2265
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
2147
|
-
* [web search tool](https://
|
|
2266
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
2148
2267
|
*
|
|
2149
2268
|
* Each tool definition includes:
|
|
2150
2269
|
*
|
|
@@ -2207,7 +2326,9 @@ export interface MessageCreateParamsBase {
|
|
|
2207
2326
|
* functions, or more generally whenever you want the model to produce a particular
|
|
2208
2327
|
* JSON structure of output.
|
|
2209
2328
|
*
|
|
2210
|
-
* See our
|
|
2329
|
+
* See our
|
|
2330
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
2331
|
+
* for more details.
|
|
2211
2332
|
*/
|
|
2212
2333
|
tools?: Array<ToolUnion>;
|
|
2213
2334
|
/**
|
|
@@ -2221,6 +2342,12 @@ export interface MessageCreateParamsBase {
|
|
|
2221
2342
|
* other values will be rejected with a 400 error.
|
|
2222
2343
|
*/
|
|
2223
2344
|
top_p?: number;
|
|
2345
|
+
/**
|
|
2346
|
+
* Header param: The user profile ID to attribute this request to. Use when acting
|
|
2347
|
+
* on behalf of a party other than your organization. Requires the `user-profiles`
|
|
2348
|
+
* beta header.
|
|
2349
|
+
*/
|
|
2350
|
+
user_profile_id?: string;
|
|
2224
2351
|
}
|
|
2225
2352
|
export declare namespace MessageCreateParams {
|
|
2226
2353
|
type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
|
|
@@ -2228,24 +2355,28 @@ export declare namespace MessageCreateParams {
|
|
|
2228
2355
|
}
|
|
2229
2356
|
export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
|
|
2230
2357
|
/**
|
|
2231
|
-
* Whether to incrementally stream the response using server-sent
|
|
2358
|
+
* Body param: Whether to incrementally stream the response using server-sent
|
|
2359
|
+
* events.
|
|
2232
2360
|
*
|
|
2233
|
-
* See [streaming](https://
|
|
2361
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2362
|
+
* for details.
|
|
2234
2363
|
*/
|
|
2235
2364
|
stream?: false;
|
|
2236
2365
|
}
|
|
2237
2366
|
export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
2238
2367
|
/**
|
|
2239
|
-
* Whether to incrementally stream the response using server-sent
|
|
2368
|
+
* Body param: Whether to incrementally stream the response using server-sent
|
|
2369
|
+
* events.
|
|
2240
2370
|
*
|
|
2241
|
-
* See [streaming](https://
|
|
2371
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2372
|
+
* for details.
|
|
2242
2373
|
*/
|
|
2243
2374
|
stream: true;
|
|
2244
2375
|
}
|
|
2245
2376
|
export type MessageStreamParams = ParseableMessageCreateParams;
|
|
2246
2377
|
export interface MessageCountTokensParams {
|
|
2247
2378
|
/**
|
|
2248
|
-
* Input messages.
|
|
2379
|
+
* Body param: Input messages.
|
|
2249
2380
|
*
|
|
2250
2381
|
* Our models are trained to operate on alternating `user` and `assistant`
|
|
2251
2382
|
* conversational turns. When creating a new `Message`, you specify the prior
|
|
@@ -2302,59 +2433,61 @@ export interface MessageCountTokensParams {
|
|
|
2302
2433
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
2303
2434
|
* ```
|
|
2304
2435
|
*
|
|
2305
|
-
* See
|
|
2436
|
+
* See
|
|
2437
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
2306
2438
|
*
|
|
2307
2439
|
* Note that if you want to include a
|
|
2308
|
-
* [system prompt](https://
|
|
2309
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
2310
|
-
* the Messages API.
|
|
2440
|
+
* [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
|
|
2441
|
+
* you can use the top-level `system` parameter — there is no `"system"` role for
|
|
2442
|
+
* input messages in the Messages API.
|
|
2311
2443
|
*
|
|
2312
2444
|
* There is a limit of 100,000 messages in a single request.
|
|
2313
2445
|
*/
|
|
2314
2446
|
messages: Array<MessageParam>;
|
|
2315
2447
|
/**
|
|
2316
|
-
* The model that will complete your prompt.
|
|
2448
|
+
* Body param: The model that will complete your prompt.
|
|
2317
2449
|
*
|
|
2318
2450
|
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
2319
2451
|
* details and options.
|
|
2320
2452
|
*/
|
|
2321
2453
|
model: Model;
|
|
2322
2454
|
/**
|
|
2323
|
-
* Top-level cache control automatically applies a cache_control marker
|
|
2324
|
-
* cacheable block in the request.
|
|
2455
|
+
* Body param: Top-level cache control automatically applies a cache_control marker
|
|
2456
|
+
* to the last cacheable block in the request.
|
|
2325
2457
|
*/
|
|
2326
2458
|
cache_control?: CacheControlEphemeral | null;
|
|
2327
2459
|
/**
|
|
2328
|
-
* Configuration options for the model's output, such as the output
|
|
2460
|
+
* Body param: Configuration options for the model's output, such as the output
|
|
2461
|
+
* format.
|
|
2329
2462
|
*/
|
|
2330
2463
|
output_config?: OutputConfig;
|
|
2331
2464
|
/**
|
|
2332
|
-
* System prompt.
|
|
2465
|
+
* Body param: System prompt.
|
|
2333
2466
|
*
|
|
2334
2467
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
2335
2468
|
* as specifying a particular goal or role. See our
|
|
2336
|
-
* [guide to system prompts](https://
|
|
2469
|
+
* [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
2337
2470
|
*/
|
|
2338
2471
|
system?: string | Array<TextBlockParam>;
|
|
2339
2472
|
/**
|
|
2340
|
-
* Configuration for enabling Claude's extended thinking.
|
|
2473
|
+
* Body param: Configuration for enabling Claude's extended thinking.
|
|
2341
2474
|
*
|
|
2342
2475
|
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
2343
2476
|
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
2344
2477
|
* tokens and counts towards your `max_tokens` limit.
|
|
2345
2478
|
*
|
|
2346
2479
|
* See
|
|
2347
|
-
* [extended thinking](https://
|
|
2480
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2348
2481
|
* for details.
|
|
2349
2482
|
*/
|
|
2350
2483
|
thinking?: ThinkingConfigParam;
|
|
2351
2484
|
/**
|
|
2352
|
-
* How the model should use the provided tools. The model can use a
|
|
2353
|
-
* any available tool, decide by itself, or not use tools at all.
|
|
2485
|
+
* Body param: How the model should use the provided tools. The model can use a
|
|
2486
|
+
* specific tool, any available tool, decide by itself, or not use tools at all.
|
|
2354
2487
|
*/
|
|
2355
2488
|
tool_choice?: ToolChoice;
|
|
2356
2489
|
/**
|
|
2357
|
-
* Definitions of tools that the model may use.
|
|
2490
|
+
* Body param: Definitions of tools that the model may use.
|
|
2358
2491
|
*
|
|
2359
2492
|
* If you include `tools` in your API request, the model may return `tool_use`
|
|
2360
2493
|
* content blocks that represent the model's use of those tools. You can then run
|
|
@@ -2363,9 +2496,9 @@ export interface MessageCountTokensParams {
|
|
|
2363
2496
|
*
|
|
2364
2497
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
2365
2498
|
* behavior described below applies to client tools. For
|
|
2366
|
-
* [server tools](https://
|
|
2499
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
2367
2500
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
2368
|
-
* [web search tool](https://
|
|
2501
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
2369
2502
|
*
|
|
2370
2503
|
* Each tool definition includes:
|
|
2371
2504
|
*
|
|
@@ -2428,12 +2561,20 @@ export interface MessageCountTokensParams {
|
|
|
2428
2561
|
* functions, or more generally whenever you want the model to produce a particular
|
|
2429
2562
|
* JSON structure of output.
|
|
2430
2563
|
*
|
|
2431
|
-
* See our
|
|
2564
|
+
* See our
|
|
2565
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
2566
|
+
* for more details.
|
|
2432
2567
|
*/
|
|
2433
2568
|
tools?: Array<MessageCountTokensTool>;
|
|
2569
|
+
/**
|
|
2570
|
+
* Header param: The user profile ID to attribute this request to. Use when acting
|
|
2571
|
+
* on behalf of a party other than your organization. Requires the `user-profiles`
|
|
2572
|
+
* beta header.
|
|
2573
|
+
*/
|
|
2574
|
+
user_profile_id?: string;
|
|
2434
2575
|
}
|
|
2435
2576
|
export declare namespace Messages {
|
|
2436
|
-
export { type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type BashCodeExecutionOutputBlock as BashCodeExecutionOutputBlock, type BashCodeExecutionOutputBlockParam as BashCodeExecutionOutputBlockParam, type BashCodeExecutionResultBlock as BashCodeExecutionResultBlock, type BashCodeExecutionResultBlockParam as BashCodeExecutionResultBlockParam, type BashCodeExecutionToolResultBlock as BashCodeExecutionToolResultBlock, type BashCodeExecutionToolResultBlockParam as BashCodeExecutionToolResultBlockParam, type BashCodeExecutionToolResultError as BashCodeExecutionToolResultError, type BashCodeExecutionToolResultErrorCode as BashCodeExecutionToolResultErrorCode, type BashCodeExecutionToolResultErrorParam as BashCodeExecutionToolResultErrorParam, type CacheControlEphemeral as CacheControlEphemeral, type CacheCreation as CacheCreation, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationSearchResultLocationParam as CitationSearchResultLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfig as CitationsConfig, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsSearchResultLocation as CitationsSearchResultLocation, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type CodeExecutionOutputBlock as CodeExecutionOutputBlock, type CodeExecutionOutputBlockParam as CodeExecutionOutputBlockParam, type CodeExecutionResultBlock as CodeExecutionResultBlock, type CodeExecutionResultBlockParam as CodeExecutionResultBlockParam, type CodeExecutionTool20250522 as CodeExecutionTool20250522, type CodeExecutionTool20250825 as CodeExecutionTool20250825, type CodeExecutionTool20260120 as CodeExecutionTool20260120, type CodeExecutionTool20260521 as CodeExecutionTool20260521, type CodeExecutionToolResultBlock as CodeExecutionToolResultBlock, type CodeExecutionToolResultBlockContent as CodeExecutionToolResultBlockContent, type CodeExecutionToolResultBlockParam as CodeExecutionToolResultBlockParam, type CodeExecutionToolResultBlockParamContent as CodeExecutionToolResultBlockParamContent, type CodeExecutionToolResultError as CodeExecutionToolResultError, type CodeExecutionToolResultErrorCode as CodeExecutionToolResultErrorCode, type CodeExecutionToolResultErrorParam as CodeExecutionToolResultErrorParam, type Container as Container, type ContainerUploadBlock as ContainerUploadBlock, type ContainerUploadBlockParam as ContainerUploadBlockParam, type ContentBlock as ContentBlock, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DirectCaller as DirectCaller, type DocumentBlock as DocumentBlock, type DocumentBlockParam as DocumentBlockParam, type EncryptedCodeExecutionResultBlock as EncryptedCodeExecutionResultBlock, type EncryptedCodeExecutionResultBlockParam as EncryptedCodeExecutionResultBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type JSONOutputFormat as JSONOutputFormat, type MemoryTool20250818 as MemoryTool20250818, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type MidConversationSystemBlockParam as MidConversationSystemBlockParam, type Model as Model, type OutputConfig as OutputConfig, type OutputTokensDetails as OutputTokensDetails, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type RefusalStopDetails as RefusalStopDetails, type SearchResultBlockParam as SearchResultBlockParam, type ServerToolCaller as ServerToolCaller, type ServerToolCaller20260120 as ServerToolCaller20260120, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type TextEditorCodeExecutionCreateResultBlock as TextEditorCodeExecutionCreateResultBlock, type TextEditorCodeExecutionCreateResultBlockParam as TextEditorCodeExecutionCreateResultBlockParam, type TextEditorCodeExecutionStrReplaceResultBlock as TextEditorCodeExecutionStrReplaceResultBlock, type TextEditorCodeExecutionStrReplaceResultBlockParam as TextEditorCodeExecutionStrReplaceResultBlockParam, type TextEditorCodeExecutionToolResultBlock as TextEditorCodeExecutionToolResultBlock, type TextEditorCodeExecutionToolResultBlockParam as TextEditorCodeExecutionToolResultBlockParam, type TextEditorCodeExecutionToolResultError as TextEditorCodeExecutionToolResultError, type TextEditorCodeExecutionToolResultErrorCode as TextEditorCodeExecutionToolResultErrorCode, type TextEditorCodeExecutionToolResultErrorParam as TextEditorCodeExecutionToolResultErrorParam, type TextEditorCodeExecutionViewResultBlock as TextEditorCodeExecutionViewResultBlock, type TextEditorCodeExecutionViewResultBlockParam as TextEditorCodeExecutionViewResultBlockParam, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigAdaptive as ThinkingConfigAdaptive, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolReferenceBlock as ToolReferenceBlock, type ToolReferenceBlockParam as ToolReferenceBlockParam, type ToolResultBlockParam as ToolResultBlockParam, type ToolSearchToolBm25_20251119 as ToolSearchToolBm25_20251119, type ToolSearchToolRegex20251119 as ToolSearchToolRegex20251119, type ToolSearchToolResultBlock as ToolSearchToolResultBlock, type ToolSearchToolResultBlockParam as ToolSearchToolResultBlockParam, type ToolSearchToolResultError as ToolSearchToolResultError, type ToolSearchToolResultErrorCode as ToolSearchToolResultErrorCode, type ToolSearchToolResultErrorParam as ToolSearchToolResultErrorParam, type ToolSearchToolSearchResultBlock as ToolSearchToolSearchResultBlock, type ToolSearchToolSearchResultBlockParam as ToolSearchToolSearchResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolTextEditor20250429 as ToolTextEditor20250429, type ToolTextEditor20250728 as ToolTextEditor20250728, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type UserLocation as UserLocation, type WebFetchBlock as WebFetchBlock, type WebFetchBlockParam as WebFetchBlockParam, type WebFetchTool20250910 as WebFetchTool20250910, type WebFetchTool20260209 as WebFetchTool20260209, type WebFetchTool20260309 as WebFetchTool20260309, type WebFetchToolResultBlock as WebFetchToolResultBlock, type WebFetchToolResultBlockParam as WebFetchToolResultBlockParam, type WebFetchToolResultErrorBlock as WebFetchToolResultErrorBlock, type WebFetchToolResultErrorBlockParam as WebFetchToolResultErrorBlockParam, type WebFetchToolResultErrorCode as WebFetchToolResultErrorCode, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchTool20260209 as WebSearchTool20260209, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageStreamEvent as MessageStreamEvent, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
2577
|
+
export { type Base64ImageSource as Base64ImageSource, type Base64PDFSource as Base64PDFSource, type BashCodeExecutionOutputBlock as BashCodeExecutionOutputBlock, type BashCodeExecutionOutputBlockParam as BashCodeExecutionOutputBlockParam, type BashCodeExecutionResultBlock as BashCodeExecutionResultBlock, type BashCodeExecutionResultBlockParam as BashCodeExecutionResultBlockParam, type BashCodeExecutionToolResultBlock as BashCodeExecutionToolResultBlock, type BashCodeExecutionToolResultBlockParam as BashCodeExecutionToolResultBlockParam, type BashCodeExecutionToolResultError as BashCodeExecutionToolResultError, type BashCodeExecutionToolResultErrorCode as BashCodeExecutionToolResultErrorCode, type BashCodeExecutionToolResultErrorParam as BashCodeExecutionToolResultErrorParam, type CacheControlEphemeral as CacheControlEphemeral, type CacheCreation as CacheCreation, type CitationCharLocation as CitationCharLocation, type CitationCharLocationParam as CitationCharLocationParam, type CitationContentBlockLocation as CitationContentBlockLocation, type CitationContentBlockLocationParam as CitationContentBlockLocationParam, type CitationPageLocation as CitationPageLocation, type CitationPageLocationParam as CitationPageLocationParam, type CitationSearchResultLocationParam as CitationSearchResultLocationParam, type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam, type CitationsConfig as CitationsConfig, type CitationsConfigParam as CitationsConfigParam, type CitationsDelta as CitationsDelta, type CitationsSearchResultLocation as CitationsSearchResultLocation, type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation, type CodeExecutionOutputBlock as CodeExecutionOutputBlock, type CodeExecutionOutputBlockParam as CodeExecutionOutputBlockParam, type CodeExecutionResultBlock as CodeExecutionResultBlock, type CodeExecutionResultBlockParam as CodeExecutionResultBlockParam, type CodeExecutionTool20250522 as CodeExecutionTool20250522, type CodeExecutionTool20250825 as CodeExecutionTool20250825, type CodeExecutionTool20260120 as CodeExecutionTool20260120, type CodeExecutionTool20260521 as CodeExecutionTool20260521, type CodeExecutionToolResultBlock as CodeExecutionToolResultBlock, type CodeExecutionToolResultBlockContent as CodeExecutionToolResultBlockContent, type CodeExecutionToolResultBlockParam as CodeExecutionToolResultBlockParam, type CodeExecutionToolResultBlockParamContent as CodeExecutionToolResultBlockParamContent, type CodeExecutionToolResultError as CodeExecutionToolResultError, type CodeExecutionToolResultErrorCode as CodeExecutionToolResultErrorCode, type CodeExecutionToolResultErrorParam as CodeExecutionToolResultErrorParam, type Container as Container, type ContainerUploadBlock as ContainerUploadBlock, type ContainerUploadBlockParam as ContainerUploadBlockParam, type ContentBlock as ContentBlock, type ContentBlockParam as ContentBlockParam, type ContentBlockStartEvent as ContentBlockStartEvent, type ContentBlockStopEvent as ContentBlockStopEvent, type ContentBlockSource as ContentBlockSource, type ContentBlockSourceContent as ContentBlockSourceContent, type DirectCaller as DirectCaller, type DocumentBlock as DocumentBlock, type DocumentBlockParam as DocumentBlockParam, type EncryptedCodeExecutionResultBlock as EncryptedCodeExecutionResultBlock, type EncryptedCodeExecutionResultBlockParam as EncryptedCodeExecutionResultBlockParam, type ImageBlockParam as ImageBlockParam, type InputJSONDelta as InputJSONDelta, type JSONOutputFormat as JSONOutputFormat, type MemoryTool20250818 as MemoryTool20250818, type Message as Message, type MessageCountTokensTool as MessageCountTokensTool, type MessageDeltaEvent as MessageDeltaEvent, type MessageDeltaUsage as MessageDeltaUsage, type MessageParam as MessageParam, type MessageTokensCount as MessageTokensCount, type Metadata as Metadata, type MidConversationSystemBlockParam as MidConversationSystemBlockParam, type Model as Model, type OutputConfig as OutputConfig, type OutputTokensDetails as OutputTokensDetails, type PlainTextSource as PlainTextSource, type RawContentBlockDelta as RawContentBlockDelta, type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent, type RawContentBlockStartEvent as RawContentBlockStartEvent, type RawContentBlockStopEvent as RawContentBlockStopEvent, type RawMessageDeltaEvent as RawMessageDeltaEvent, type RawMessageStartEvent as RawMessageStartEvent, type RawMessageStopEvent as RawMessageStopEvent, type RawMessageStreamEvent as RawMessageStreamEvent, type RedactedThinkingBlock as RedactedThinkingBlock, type RedactedThinkingBlockParam as RedactedThinkingBlockParam, type RefusalStopDetails as RefusalStopDetails, type SearchResultBlockParam as SearchResultBlockParam, type ServerToolCaller as ServerToolCaller, type ServerToolCaller20260120 as ServerToolCaller20260120, type ServerToolUsage as ServerToolUsage, type ServerToolUseBlock as ServerToolUseBlock, type ServerToolUseBlockParam as ServerToolUseBlockParam, type SignatureDelta as SignatureDelta, type StopReason as StopReason, type TextBlock as TextBlock, type TextBlockParam as TextBlockParam, type TextCitation as TextCitation, type TextCitationParam as TextCitationParam, type TextDelta as TextDelta, type TextEditorCodeExecutionCreateResultBlock as TextEditorCodeExecutionCreateResultBlock, type TextEditorCodeExecutionCreateResultBlockParam as TextEditorCodeExecutionCreateResultBlockParam, type TextEditorCodeExecutionStrReplaceResultBlock as TextEditorCodeExecutionStrReplaceResultBlock, type TextEditorCodeExecutionStrReplaceResultBlockParam as TextEditorCodeExecutionStrReplaceResultBlockParam, type TextEditorCodeExecutionToolResultBlock as TextEditorCodeExecutionToolResultBlock, type TextEditorCodeExecutionToolResultBlockParam as TextEditorCodeExecutionToolResultBlockParam, type TextEditorCodeExecutionToolResultError as TextEditorCodeExecutionToolResultError, type TextEditorCodeExecutionToolResultErrorCode as TextEditorCodeExecutionToolResultErrorCode, type TextEditorCodeExecutionToolResultErrorParam as TextEditorCodeExecutionToolResultErrorParam, type TextEditorCodeExecutionViewResultBlock as TextEditorCodeExecutionViewResultBlock, type TextEditorCodeExecutionViewResultBlockParam as TextEditorCodeExecutionViewResultBlockParam, type ThinkingBlock as ThinkingBlock, type ThinkingBlockParam as ThinkingBlockParam, type ThinkingConfigAdaptive as ThinkingConfigAdaptive, type ThinkingConfigDisabled as ThinkingConfigDisabled, type ThinkingConfigEnabled as ThinkingConfigEnabled, type ThinkingConfigParam as ThinkingConfigParam, type ThinkingDelta as ThinkingDelta, type Tool as Tool, type ToolBash20250124 as ToolBash20250124, type ToolChoice as ToolChoice, type ToolChoiceAny as ToolChoiceAny, type ToolChoiceAuto as ToolChoiceAuto, type ToolChoiceNone as ToolChoiceNone, type ToolChoiceTool as ToolChoiceTool, type ToolReferenceBlock as ToolReferenceBlock, type ToolReferenceBlockParam as ToolReferenceBlockParam, type ToolResultBlockParam as ToolResultBlockParam, type ToolSearchToolBm25_20251119 as ToolSearchToolBm25_20251119, type ToolSearchToolRegex20251119 as ToolSearchToolRegex20251119, type ToolSearchToolResultBlock as ToolSearchToolResultBlock, type ToolSearchToolResultBlockParam as ToolSearchToolResultBlockParam, type ToolSearchToolResultError as ToolSearchToolResultError, type ToolSearchToolResultErrorCode as ToolSearchToolResultErrorCode, type ToolSearchToolResultErrorParam as ToolSearchToolResultErrorParam, type ToolSearchToolSearchResultBlock as ToolSearchToolSearchResultBlock, type ToolSearchToolSearchResultBlockParam as ToolSearchToolSearchResultBlockParam, type ToolTextEditor20250124 as ToolTextEditor20250124, type ToolTextEditor20250429 as ToolTextEditor20250429, type ToolTextEditor20250728 as ToolTextEditor20250728, type ToolUnion as ToolUnion, type ToolUseBlock as ToolUseBlock, type ToolUseBlockParam as ToolUseBlockParam, type URLImageSource as URLImageSource, type URLPDFSource as URLPDFSource, type Usage as Usage, type UserLocation as UserLocation, type WebFetchBlock as WebFetchBlock, type WebFetchBlockParam as WebFetchBlockParam, type WebFetchTool20250910 as WebFetchTool20250910, type WebFetchTool20260209 as WebFetchTool20260209, type WebFetchTool20260309 as WebFetchTool20260309, type WebFetchTool20260318 as WebFetchTool20260318, type WebFetchToolResultBlock as WebFetchToolResultBlock, type WebFetchToolResultBlockParam as WebFetchToolResultBlockParam, type WebFetchToolResultErrorBlock as WebFetchToolResultErrorBlock, type WebFetchToolResultErrorBlockParam as WebFetchToolResultErrorBlockParam, type WebFetchToolResultErrorCode as WebFetchToolResultErrorCode, type WebSearchResultBlock as WebSearchResultBlock, type WebSearchResultBlockParam as WebSearchResultBlockParam, type WebSearchTool20250305 as WebSearchTool20250305, type WebSearchTool20260209 as WebSearchTool20260209, type WebSearchTool20260318 as WebSearchTool20260318, type WebSearchToolRequestError as WebSearchToolRequestError, type WebSearchToolResultBlock as WebSearchToolResultBlock, type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent, type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam, type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent, type WebSearchToolResultError as WebSearchToolResultError, type MessageStreamEvent as MessageStreamEvent, type MessageStartEvent as MessageStartEvent, type MessageStopEvent as MessageStopEvent, type ContentBlockDeltaEvent as ContentBlockDeltaEvent, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageStreamParams as MessageStreamParams, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
2437
2578
|
export { Batches as Batches, type DeletedMessageBatch as DeletedMessageBatch, type MessageBatch as MessageBatch, type MessageBatchCanceledResult as MessageBatchCanceledResult, type MessageBatchErroredResult as MessageBatchErroredResult, type MessageBatchExpiredResult as MessageBatchExpiredResult, type MessageBatchIndividualResponse as MessageBatchIndividualResponse, type MessageBatchRequestCounts as MessageBatchRequestCounts, type MessageBatchResult as MessageBatchResult, type MessageBatchSucceededResult as MessageBatchSucceededResult, type MessageBatchesPage as MessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
2438
2579
|
}
|
|
2439
2580
|
//# sourceMappingURL=messages.d.ts.map
|