@anthropic-ai/sdk 0.106.0 → 0.108.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 +43 -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/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- 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/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 +29 -21
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +29 -21
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/batches.js +6 -6
- package/resources/beta/messages/batches.mjs +6 -6
- 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 +160 -32
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +160 -32
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +6 -3
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +6 -3
- 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 +8 -7
- package/resources/messages/batches.d.mts.map +1 -1
- package/resources/messages/batches.d.ts +8 -7
- package/resources/messages/batches.d.ts.map +1 -1
- package/resources/messages/batches.js +6 -6
- package/resources/messages/batches.mjs +6 -6
- 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 +173 -44
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +173 -44
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +11 -3
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +11 -3
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/beta/agents/agents.ts +1 -0
- package/src/resources/beta/beta.ts +4 -0
- package/src/resources/beta/deployments.ts +18 -6
- package/src/resources/beta/index.ts +2 -0
- package/src/resources/beta/messages/batches.ts +29 -21
- package/src/resources/beta/messages/index.ts +2 -0
- package/src/resources/beta/messages/messages.ts +197 -31
- package/src/resources/completions.ts +12 -7
- package/src/resources/index.ts +2 -0
- package/src/resources/messages/batches.ts +8 -7
- package/src/resources/messages/index.ts +2 -0
- package/src/resources/messages/messages.ts +214 -41
- package/src/tools/agent-toolset/fs-util.ts +12 -12
- package/src/tools/agent-toolset/node.ts +29 -12
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts +4 -3
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts +4 -3
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +12 -12
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +12 -12
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +10 -9
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +10 -9
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +29 -10
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +29 -10
- 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
|
@@ -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
|
|
@@ -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;
|
|
@@ -158,7 +158,7 @@ export interface CacheControlEphemeral {
|
|
|
158
158
|
* - `1h`: 1 hour
|
|
159
159
|
*
|
|
160
160
|
* Defaults to `5m`. See
|
|
161
|
-
* [prompt caching pricing](https://
|
|
161
|
+
* [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
162
162
|
* for details.
|
|
163
163
|
*/
|
|
164
164
|
ttl?: '5m' | '1h';
|
|
@@ -772,7 +772,7 @@ export interface Message {
|
|
|
772
772
|
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
773
773
|
* checkpoint).
|
|
774
774
|
*/
|
|
775
|
-
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;
|
|
776
776
|
export interface MessageDeltaUsage {
|
|
777
777
|
/**
|
|
778
778
|
* The cumulative number of input tokens used to create the cache entry.
|
|
@@ -849,7 +849,7 @@ export interface MidConversationSystemBlockParam {
|
|
|
849
849
|
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
850
850
|
* details and options.
|
|
851
851
|
*/
|
|
852
|
-
export type Model = 'claude-fable-5' | 'claude-mythos-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-mythos-preview' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-opus-4-1' | 'claude-opus-4-1-20250805' | (string & {});
|
|
852
|
+
export type Model = 'claude-sonnet-5' | 'claude-fable-5' | 'claude-mythos-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-mythos-preview' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-haiku-4-5-20251001' | 'claude-opus-4-5' | 'claude-opus-4-5-20251101' | 'claude-sonnet-4-5' | 'claude-sonnet-4-5-20250929' | 'claude-opus-4-1' | 'claude-opus-4-1-20250805' | (string & {});
|
|
853
853
|
export interface OutputConfig {
|
|
854
854
|
/**
|
|
855
855
|
* All possible effort levels.
|
|
@@ -1152,7 +1152,7 @@ export interface ThinkingConfigEnabled {
|
|
|
1152
1152
|
* Must be ≥1024 and less than `max_tokens`.
|
|
1153
1153
|
*
|
|
1154
1154
|
* See
|
|
1155
|
-
* [extended thinking](https://
|
|
1155
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
1156
1156
|
* for details.
|
|
1157
1157
|
*/
|
|
1158
1158
|
budget_tokens: number;
|
|
@@ -1173,7 +1173,7 @@ export interface ThinkingConfigEnabled {
|
|
|
1173
1173
|
* tokens and counts towards your `max_tokens` limit.
|
|
1174
1174
|
*
|
|
1175
1175
|
* See
|
|
1176
|
-
* [extended thinking](https://
|
|
1176
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
1177
1177
|
* for details.
|
|
1178
1178
|
*/
|
|
1179
1179
|
export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigAdaptive;
|
|
@@ -1516,7 +1516,7 @@ export interface ToolTextEditor20250728 {
|
|
|
1516
1516
|
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
1517
1517
|
* checkpoint).
|
|
1518
1518
|
*/
|
|
1519
|
-
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;
|
|
1520
1520
|
export interface ToolUseBlock {
|
|
1521
1521
|
id: string;
|
|
1522
1522
|
/**
|
|
@@ -1781,6 +1781,66 @@ export interface WebFetchTool20260309 {
|
|
|
1781
1781
|
*/
|
|
1782
1782
|
use_cache?: boolean;
|
|
1783
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
|
+
}
|
|
1784
1844
|
export interface WebFetchToolResultBlock {
|
|
1785
1845
|
/**
|
|
1786
1846
|
* Tool invocation directly from the model.
|
|
@@ -1924,6 +1984,57 @@ export declare namespace WebSearchTool20260209 {
|
|
|
1924
1984
|
*/
|
|
1925
1985
|
type UserLocation = Messages.UserLocation;
|
|
1926
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
|
+
}
|
|
1927
2038
|
export interface WebSearchToolRequestError {
|
|
1928
2039
|
error_code: WebSearchToolResultErrorCode;
|
|
1929
2040
|
type: 'web_search_tool_result_error';
|
|
@@ -1973,11 +2084,12 @@ export interface MessageCreateParamsBase {
|
|
|
1973
2084
|
* only specifies the absolute maximum number of tokens to generate.
|
|
1974
2085
|
*
|
|
1975
2086
|
* Set to `0` to populate the
|
|
1976
|
-
* [prompt cache](https://
|
|
2087
|
+
* [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
|
|
1977
2088
|
* without generating a response.
|
|
1978
2089
|
*
|
|
1979
2090
|
* Different models have different maximum values for this parameter. See
|
|
1980
|
-
* [models](https://
|
|
2091
|
+
* [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
|
|
2092
|
+
* details.
|
|
1981
2093
|
*/
|
|
1982
2094
|
max_tokens: number;
|
|
1983
2095
|
/**
|
|
@@ -2038,12 +2150,13 @@ export interface MessageCreateParamsBase {
|
|
|
2038
2150
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
2039
2151
|
* ```
|
|
2040
2152
|
*
|
|
2041
|
-
* See
|
|
2153
|
+
* See
|
|
2154
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
2042
2155
|
*
|
|
2043
2156
|
* Note that if you want to include a
|
|
2044
|
-
* [system prompt](https://
|
|
2045
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
2046
|
-
* 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.
|
|
2047
2160
|
*
|
|
2048
2161
|
* There is a limit of 100,000 messages in a single request.
|
|
2049
2162
|
*/
|
|
@@ -2083,7 +2196,8 @@ export interface MessageCreateParamsBase {
|
|
|
2083
2196
|
* standard capacity for this request.
|
|
2084
2197
|
*
|
|
2085
2198
|
* Anthropic offers different levels of service for your API requests. See
|
|
2086
|
-
* [service-tiers](https://
|
|
2199
|
+
* [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
|
|
2200
|
+
* details.
|
|
2087
2201
|
*/
|
|
2088
2202
|
service_tier?: 'auto' | 'standard_only';
|
|
2089
2203
|
/**
|
|
@@ -2102,7 +2216,8 @@ export interface MessageCreateParamsBase {
|
|
|
2102
2216
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
2103
2217
|
* events.
|
|
2104
2218
|
*
|
|
2105
|
-
* See [streaming](https://
|
|
2219
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2220
|
+
* for details.
|
|
2106
2221
|
*/
|
|
2107
2222
|
stream?: boolean;
|
|
2108
2223
|
/**
|
|
@@ -2110,7 +2225,7 @@ export interface MessageCreateParamsBase {
|
|
|
2110
2225
|
*
|
|
2111
2226
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
2112
2227
|
* as specifying a particular goal or role. See our
|
|
2113
|
-
* [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).
|
|
2114
2229
|
*/
|
|
2115
2230
|
system?: string | Array<TextBlockParam>;
|
|
2116
2231
|
/**
|
|
@@ -2127,7 +2242,7 @@ export interface MessageCreateParamsBase {
|
|
|
2127
2242
|
* tokens and counts towards your `max_tokens` limit.
|
|
2128
2243
|
*
|
|
2129
2244
|
* See
|
|
2130
|
-
* [extended thinking](https://
|
|
2245
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2131
2246
|
* for details.
|
|
2132
2247
|
*/
|
|
2133
2248
|
thinking?: ThinkingConfigParam;
|
|
@@ -2146,9 +2261,9 @@ export interface MessageCreateParamsBase {
|
|
|
2146
2261
|
*
|
|
2147
2262
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
2148
2263
|
* behavior described below applies to client tools. For
|
|
2149
|
-
* [server tools](https://
|
|
2264
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
2150
2265
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
2151
|
-
* [web search tool](https://
|
|
2266
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
2152
2267
|
*
|
|
2153
2268
|
* Each tool definition includes:
|
|
2154
2269
|
*
|
|
@@ -2211,7 +2326,9 @@ export interface MessageCreateParamsBase {
|
|
|
2211
2326
|
* functions, or more generally whenever you want the model to produce a particular
|
|
2212
2327
|
* JSON structure of output.
|
|
2213
2328
|
*
|
|
2214
|
-
* See our
|
|
2329
|
+
* See our
|
|
2330
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
2331
|
+
* for more details.
|
|
2215
2332
|
*/
|
|
2216
2333
|
tools?: Array<ToolUnion>;
|
|
2217
2334
|
/**
|
|
@@ -2241,7 +2358,8 @@ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase
|
|
|
2241
2358
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
2242
2359
|
* events.
|
|
2243
2360
|
*
|
|
2244
|
-
* See [streaming](https://
|
|
2361
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2362
|
+
* for details.
|
|
2245
2363
|
*/
|
|
2246
2364
|
stream?: false;
|
|
2247
2365
|
}
|
|
@@ -2250,14 +2368,15 @@ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
|
2250
2368
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
2251
2369
|
* events.
|
|
2252
2370
|
*
|
|
2253
|
-
* See [streaming](https://
|
|
2371
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
2372
|
+
* for details.
|
|
2254
2373
|
*/
|
|
2255
2374
|
stream: true;
|
|
2256
2375
|
}
|
|
2257
2376
|
export type MessageStreamParams = ParseableMessageCreateParams;
|
|
2258
2377
|
export interface MessageCountTokensParams {
|
|
2259
2378
|
/**
|
|
2260
|
-
* Input messages.
|
|
2379
|
+
* Body param: Input messages.
|
|
2261
2380
|
*
|
|
2262
2381
|
* Our models are trained to operate on alternating `user` and `assistant`
|
|
2263
2382
|
* conversational turns. When creating a new `Message`, you specify the prior
|
|
@@ -2314,59 +2433,61 @@ export interface MessageCountTokensParams {
|
|
|
2314
2433
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
2315
2434
|
* ```
|
|
2316
2435
|
*
|
|
2317
|
-
* See
|
|
2436
|
+
* See
|
|
2437
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
2318
2438
|
*
|
|
2319
2439
|
* Note that if you want to include a
|
|
2320
|
-
* [system prompt](https://
|
|
2321
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
2322
|
-
* 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.
|
|
2323
2443
|
*
|
|
2324
2444
|
* There is a limit of 100,000 messages in a single request.
|
|
2325
2445
|
*/
|
|
2326
2446
|
messages: Array<MessageParam>;
|
|
2327
2447
|
/**
|
|
2328
|
-
* The model that will complete your prompt.
|
|
2448
|
+
* Body param: The model that will complete your prompt.
|
|
2329
2449
|
*
|
|
2330
2450
|
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
2331
2451
|
* details and options.
|
|
2332
2452
|
*/
|
|
2333
2453
|
model: Model;
|
|
2334
2454
|
/**
|
|
2335
|
-
* Top-level cache control automatically applies a cache_control marker
|
|
2336
|
-
* 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.
|
|
2337
2457
|
*/
|
|
2338
2458
|
cache_control?: CacheControlEphemeral | null;
|
|
2339
2459
|
/**
|
|
2340
|
-
* 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.
|
|
2341
2462
|
*/
|
|
2342
2463
|
output_config?: OutputConfig;
|
|
2343
2464
|
/**
|
|
2344
|
-
* System prompt.
|
|
2465
|
+
* Body param: System prompt.
|
|
2345
2466
|
*
|
|
2346
2467
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
2347
2468
|
* as specifying a particular goal or role. See our
|
|
2348
|
-
* [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).
|
|
2349
2470
|
*/
|
|
2350
2471
|
system?: string | Array<TextBlockParam>;
|
|
2351
2472
|
/**
|
|
2352
|
-
* Configuration for enabling Claude's extended thinking.
|
|
2473
|
+
* Body param: Configuration for enabling Claude's extended thinking.
|
|
2353
2474
|
*
|
|
2354
2475
|
* When enabled, responses include `thinking` content blocks showing Claude's
|
|
2355
2476
|
* thinking process before the final answer. Requires a minimum budget of 1,024
|
|
2356
2477
|
* tokens and counts towards your `max_tokens` limit.
|
|
2357
2478
|
*
|
|
2358
2479
|
* See
|
|
2359
|
-
* [extended thinking](https://
|
|
2480
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2360
2481
|
* for details.
|
|
2361
2482
|
*/
|
|
2362
2483
|
thinking?: ThinkingConfigParam;
|
|
2363
2484
|
/**
|
|
2364
|
-
* How the model should use the provided tools. The model can use a
|
|
2365
|
-
* 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.
|
|
2366
2487
|
*/
|
|
2367
2488
|
tool_choice?: ToolChoice;
|
|
2368
2489
|
/**
|
|
2369
|
-
* Definitions of tools that the model may use.
|
|
2490
|
+
* Body param: Definitions of tools that the model may use.
|
|
2370
2491
|
*
|
|
2371
2492
|
* If you include `tools` in your API request, the model may return `tool_use`
|
|
2372
2493
|
* content blocks that represent the model's use of those tools. You can then run
|
|
@@ -2375,9 +2496,9 @@ export interface MessageCountTokensParams {
|
|
|
2375
2496
|
*
|
|
2376
2497
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
2377
2498
|
* behavior described below applies to client tools. For
|
|
2378
|
-
* [server tools](https://
|
|
2499
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
2379
2500
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
2380
|
-
* [web search tool](https://
|
|
2501
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
2381
2502
|
*
|
|
2382
2503
|
* Each tool definition includes:
|
|
2383
2504
|
*
|
|
@@ -2440,12 +2561,20 @@ export interface MessageCountTokensParams {
|
|
|
2440
2561
|
* functions, or more generally whenever you want the model to produce a particular
|
|
2441
2562
|
* JSON structure of output.
|
|
2442
2563
|
*
|
|
2443
|
-
* See our
|
|
2564
|
+
* See our
|
|
2565
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
2566
|
+
* for more details.
|
|
2444
2567
|
*/
|
|
2445
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;
|
|
2446
2575
|
}
|
|
2447
2576
|
export declare namespace Messages {
|
|
2448
|
-
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, };
|
|
2449
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, };
|
|
2450
2579
|
}
|
|
2451
2580
|
//# sourceMappingURL=messages.d.ts.map
|