@anthropic-ai/sdk 0.106.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 +25 -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/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 +172 -43
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +172 -43
- 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/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 +213 -41
- 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
|
@@ -21,7 +21,7 @@ export declare class Messages extends APIResource {
|
|
|
21
21
|
* conversations.
|
|
22
22
|
*
|
|
23
23
|
* Learn more about the Messages API in our
|
|
24
|
-
* [user guide](https://
|
|
24
|
+
* [user guide](https://platform.claude.com/docs/en/get-started)
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
@@ -63,7 +63,7 @@ export declare class Messages extends APIResource {
|
|
|
63
63
|
* including tools, images, and documents, without creating it.
|
|
64
64
|
*
|
|
65
65
|
* Learn more about token counting in our
|
|
66
|
-
* [user guide](https://
|
|
66
|
+
* [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* ```ts
|
|
@@ -296,7 +296,7 @@ export interface BetaCacheControlEphemeral {
|
|
|
296
296
|
* - `1h`: 1 hour
|
|
297
297
|
*
|
|
298
298
|
* Defaults to `5m`. See
|
|
299
|
-
* [prompt caching pricing](https://
|
|
299
|
+
* [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
|
|
300
300
|
* for details.
|
|
301
301
|
*/
|
|
302
302
|
ttl?: '5m' | '1h';
|
|
@@ -2061,7 +2061,7 @@ export interface BetaThinkingConfigEnabled {
|
|
|
2061
2061
|
* Must be ≥1024 and less than `max_tokens`.
|
|
2062
2062
|
*
|
|
2063
2063
|
* See
|
|
2064
|
-
* [extended thinking](https://
|
|
2064
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2065
2065
|
* for details.
|
|
2066
2066
|
*/
|
|
2067
2067
|
budget_tokens: number;
|
|
@@ -2082,7 +2082,7 @@ export interface BetaThinkingConfigEnabled {
|
|
|
2082
2082
|
* tokens and counts towards your `max_tokens` limit.
|
|
2083
2083
|
*
|
|
2084
2084
|
* See
|
|
2085
|
-
* [extended thinking](https://
|
|
2085
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2086
2086
|
* for details.
|
|
2087
2087
|
*/
|
|
2088
2088
|
export type BetaThinkingConfigParam = BetaThinkingConfigEnabled | BetaThinkingConfigDisabled | BetaThinkingConfigAdaptive;
|
|
@@ -2628,7 +2628,7 @@ export interface BetaToolTextEditor20250728 {
|
|
|
2628
2628
|
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
2629
2629
|
* checkpoint).
|
|
2630
2630
|
*/
|
|
2631
|
-
export type BetaToolUnion = BetaTool | BetaToolBash20241022 | BetaToolBash20250124 | BetaCodeExecutionTool20250522 | BetaCodeExecutionTool20250825 | BetaCodeExecutionTool20260120 | BetaCodeExecutionTool20260521 | BetaToolComputerUse20241022 | BetaMemoryTool20250818 | BetaToolComputerUse20250124 | BetaToolTextEditor20241022 | BetaToolComputerUse20251124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaToolTextEditor20250728 | BetaWebSearchTool20250305 | BetaWebFetchTool20250910 | BetaWebSearchTool20260209 | BetaWebFetchTool20260209 | BetaWebFetchTool20260309 | BetaAdvisorTool20260301 | BetaToolSearchToolBm25_20251119 | BetaToolSearchToolRegex20251119 | BetaMCPToolset;
|
|
2631
|
+
export type BetaToolUnion = BetaTool | BetaToolBash20241022 | BetaToolBash20250124 | BetaCodeExecutionTool20250522 | BetaCodeExecutionTool20250825 | BetaCodeExecutionTool20260120 | BetaCodeExecutionTool20260521 | BetaToolComputerUse20241022 | BetaMemoryTool20250818 | BetaToolComputerUse20250124 | BetaToolTextEditor20241022 | BetaToolComputerUse20251124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaToolTextEditor20250728 | BetaWebSearchTool20250305 | BetaWebFetchTool20250910 | BetaWebSearchTool20260209 | BetaWebFetchTool20260209 | BetaWebFetchTool20260309 | BetaWebSearchTool20260318 | BetaWebFetchTool20260318 | BetaAdvisorTool20260301 | BetaToolSearchToolBm25_20251119 | BetaToolSearchToolRegex20251119 | BetaMCPToolset;
|
|
2632
2632
|
export interface BetaToolUseBlock {
|
|
2633
2633
|
id: string;
|
|
2634
2634
|
input: unknown;
|
|
@@ -2916,6 +2916,66 @@ export interface BetaWebFetchTool20260309 {
|
|
|
2916
2916
|
*/
|
|
2917
2917
|
use_cache?: boolean;
|
|
2918
2918
|
}
|
|
2919
|
+
export interface BetaWebFetchTool20260318 {
|
|
2920
|
+
/**
|
|
2921
|
+
* Name of the tool.
|
|
2922
|
+
*
|
|
2923
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
2924
|
+
*/
|
|
2925
|
+
name: 'web_fetch';
|
|
2926
|
+
type: 'web_fetch_20260318';
|
|
2927
|
+
allowed_callers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'>;
|
|
2928
|
+
/**
|
|
2929
|
+
* List of domains to allow fetching from
|
|
2930
|
+
*/
|
|
2931
|
+
allowed_domains?: Array<string> | null;
|
|
2932
|
+
/**
|
|
2933
|
+
* List of domains to block fetching from
|
|
2934
|
+
*/
|
|
2935
|
+
blocked_domains?: Array<string> | null;
|
|
2936
|
+
/**
|
|
2937
|
+
* Create a cache control breakpoint at this content block.
|
|
2938
|
+
*/
|
|
2939
|
+
cache_control?: BetaCacheControlEphemeral | null;
|
|
2940
|
+
/**
|
|
2941
|
+
* Citations configuration for fetched documents. Citations are disabled by
|
|
2942
|
+
* default.
|
|
2943
|
+
*/
|
|
2944
|
+
citations?: BetaCitationsConfigParam | null;
|
|
2945
|
+
/**
|
|
2946
|
+
* If true, tool will not be included in initial system prompt. Only loaded when
|
|
2947
|
+
* returned via tool_reference from tool search.
|
|
2948
|
+
*/
|
|
2949
|
+
defer_loading?: boolean;
|
|
2950
|
+
/**
|
|
2951
|
+
* Maximum number of tokens used by including web page text content in the context.
|
|
2952
|
+
* The limit is approximate and does not apply to binary content such as PDFs.
|
|
2953
|
+
*/
|
|
2954
|
+
max_content_tokens?: number | null;
|
|
2955
|
+
/**
|
|
2956
|
+
* Maximum number of times the tool can be used in the API request.
|
|
2957
|
+
*/
|
|
2958
|
+
max_uses?: number | null;
|
|
2959
|
+
/**
|
|
2960
|
+
* How this tool's result blocks appear in the API response when the result was
|
|
2961
|
+
* consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
2962
|
+
* complete content (default). 'excluded' drops the nested server_tool_use and
|
|
2963
|
+
* result block pair entirely. Results from direct calls, or from code_execution
|
|
2964
|
+
* calls that paused before completing, are always returned in full so they can be
|
|
2965
|
+
* sent back on the next turn.
|
|
2966
|
+
*/
|
|
2967
|
+
response_inclusion?: 'full' | 'excluded';
|
|
2968
|
+
/**
|
|
2969
|
+
* When true, guarantees schema validation on tool names and inputs
|
|
2970
|
+
*/
|
|
2971
|
+
strict?: boolean;
|
|
2972
|
+
/**
|
|
2973
|
+
* Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
2974
|
+
* content. Only set to false when the user explicitly requests fresh content or
|
|
2975
|
+
* when fetching rapidly-changing sources.
|
|
2976
|
+
*/
|
|
2977
|
+
use_cache?: boolean;
|
|
2978
|
+
}
|
|
2919
2979
|
export interface BetaWebFetchToolResultBlock {
|
|
2920
2980
|
content: BetaWebFetchToolResultErrorBlock | BetaWebFetchBlock;
|
|
2921
2981
|
tool_use_id: string;
|
|
@@ -3045,6 +3105,57 @@ export interface BetaWebSearchTool20260209 {
|
|
|
3045
3105
|
*/
|
|
3046
3106
|
user_location?: BetaUserLocation | null;
|
|
3047
3107
|
}
|
|
3108
|
+
export interface BetaWebSearchTool20260318 {
|
|
3109
|
+
/**
|
|
3110
|
+
* Name of the tool.
|
|
3111
|
+
*
|
|
3112
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
3113
|
+
*/
|
|
3114
|
+
name: 'web_search';
|
|
3115
|
+
type: 'web_search_20260318';
|
|
3116
|
+
allowed_callers?: Array<'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'>;
|
|
3117
|
+
/**
|
|
3118
|
+
* If provided, only these domains will be included in results. Cannot be used
|
|
3119
|
+
* alongside `blocked_domains`.
|
|
3120
|
+
*/
|
|
3121
|
+
allowed_domains?: Array<string> | null;
|
|
3122
|
+
/**
|
|
3123
|
+
* If provided, these domains will never appear in results. Cannot be used
|
|
3124
|
+
* alongside `allowed_domains`.
|
|
3125
|
+
*/
|
|
3126
|
+
blocked_domains?: Array<string> | null;
|
|
3127
|
+
/**
|
|
3128
|
+
* Create a cache control breakpoint at this content block.
|
|
3129
|
+
*/
|
|
3130
|
+
cache_control?: BetaCacheControlEphemeral | null;
|
|
3131
|
+
/**
|
|
3132
|
+
* If true, tool will not be included in initial system prompt. Only loaded when
|
|
3133
|
+
* returned via tool_reference from tool search.
|
|
3134
|
+
*/
|
|
3135
|
+
defer_loading?: boolean;
|
|
3136
|
+
/**
|
|
3137
|
+
* Maximum number of times the tool can be used in the API request.
|
|
3138
|
+
*/
|
|
3139
|
+
max_uses?: number | null;
|
|
3140
|
+
/**
|
|
3141
|
+
* How this tool's result blocks appear in the API response when the result was
|
|
3142
|
+
* consumed by a completed code_execution call in the same turn. 'full' returns the
|
|
3143
|
+
* complete content (default). 'excluded' drops the nested server_tool_use and
|
|
3144
|
+
* result block pair entirely. Results from direct calls, or from code_execution
|
|
3145
|
+
* calls that paused before completing, are always returned in full so they can be
|
|
3146
|
+
* sent back on the next turn.
|
|
3147
|
+
*/
|
|
3148
|
+
response_inclusion?: 'full' | 'excluded';
|
|
3149
|
+
/**
|
|
3150
|
+
* When true, guarantees schema validation on tool names and inputs
|
|
3151
|
+
*/
|
|
3152
|
+
strict?: boolean;
|
|
3153
|
+
/**
|
|
3154
|
+
* Parameters for the user's location. Used to provide more relevant search
|
|
3155
|
+
* results.
|
|
3156
|
+
*/
|
|
3157
|
+
user_location?: BetaUserLocation | null;
|
|
3158
|
+
}
|
|
3048
3159
|
export interface BetaWebSearchToolRequestError {
|
|
3049
3160
|
error_code: BetaWebSearchToolResultErrorCode;
|
|
3050
3161
|
type: 'web_search_tool_result_error';
|
|
@@ -3091,11 +3202,12 @@ export interface MessageCreateParamsBase {
|
|
|
3091
3202
|
* only specifies the absolute maximum number of tokens to generate.
|
|
3092
3203
|
*
|
|
3093
3204
|
* Set to `0` to populate the
|
|
3094
|
-
* [prompt cache](https://
|
|
3205
|
+
* [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
|
|
3095
3206
|
* without generating a response.
|
|
3096
3207
|
*
|
|
3097
3208
|
* Different models have different maximum values for this parameter. See
|
|
3098
|
-
* [models](https://
|
|
3209
|
+
* [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
|
|
3210
|
+
* details.
|
|
3099
3211
|
*/
|
|
3100
3212
|
max_tokens: number;
|
|
3101
3213
|
/**
|
|
@@ -3156,12 +3268,13 @@ export interface MessageCreateParamsBase {
|
|
|
3156
3268
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
3157
3269
|
* ```
|
|
3158
3270
|
*
|
|
3159
|
-
* See
|
|
3271
|
+
* See
|
|
3272
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
3160
3273
|
*
|
|
3161
3274
|
* Note that if you want to include a
|
|
3162
|
-
* [system prompt](https://
|
|
3163
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
3164
|
-
* the Messages API.
|
|
3275
|
+
* [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
|
|
3276
|
+
* you can use the top-level `system` parameter — there is no `"system"` role for
|
|
3277
|
+
* input messages in the Messages API.
|
|
3165
3278
|
*
|
|
3166
3279
|
* There is a limit of 100,000 messages in a single request.
|
|
3167
3280
|
*/
|
|
@@ -3253,7 +3366,8 @@ export interface MessageCreateParamsBase {
|
|
|
3253
3366
|
* standard capacity for this request.
|
|
3254
3367
|
*
|
|
3255
3368
|
* Anthropic offers different levels of service for your API requests. See
|
|
3256
|
-
* [service-tiers](https://
|
|
3369
|
+
* [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
|
|
3370
|
+
* details.
|
|
3257
3371
|
*/
|
|
3258
3372
|
service_tier?: 'auto' | 'standard_only';
|
|
3259
3373
|
/**
|
|
@@ -3277,7 +3391,8 @@ export interface MessageCreateParamsBase {
|
|
|
3277
3391
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
3278
3392
|
* events.
|
|
3279
3393
|
*
|
|
3280
|
-
* See [streaming](https://
|
|
3394
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
3395
|
+
* for details.
|
|
3281
3396
|
*/
|
|
3282
3397
|
stream?: boolean;
|
|
3283
3398
|
/**
|
|
@@ -3285,7 +3400,7 @@ export interface MessageCreateParamsBase {
|
|
|
3285
3400
|
*
|
|
3286
3401
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
3287
3402
|
* as specifying a particular goal or role. See our
|
|
3288
|
-
* [guide to system prompts](https://
|
|
3403
|
+
* [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
3289
3404
|
*/
|
|
3290
3405
|
system?: string | Array<BetaTextBlockParam>;
|
|
3291
3406
|
/**
|
|
@@ -3302,7 +3417,7 @@ export interface MessageCreateParamsBase {
|
|
|
3302
3417
|
* tokens and counts towards your `max_tokens` limit.
|
|
3303
3418
|
*
|
|
3304
3419
|
* See
|
|
3305
|
-
* [extended thinking](https://
|
|
3420
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
3306
3421
|
* for details.
|
|
3307
3422
|
*/
|
|
3308
3423
|
thinking?: BetaThinkingConfigParam;
|
|
@@ -3321,9 +3436,9 @@ export interface MessageCreateParamsBase {
|
|
|
3321
3436
|
*
|
|
3322
3437
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
3323
3438
|
* behavior described below applies to client tools. For
|
|
3324
|
-
* [server tools](https://
|
|
3439
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
3325
3440
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
3326
|
-
* [web search tool](https://
|
|
3441
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
3327
3442
|
*
|
|
3328
3443
|
* Each tool definition includes:
|
|
3329
3444
|
*
|
|
@@ -3386,7 +3501,9 @@ export interface MessageCreateParamsBase {
|
|
|
3386
3501
|
* functions, or more generally whenever you want the model to produce a particular
|
|
3387
3502
|
* JSON structure of output.
|
|
3388
3503
|
*
|
|
3389
|
-
* See our
|
|
3504
|
+
* See our
|
|
3505
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
3506
|
+
* for more details.
|
|
3390
3507
|
*/
|
|
3391
3508
|
tools?: Array<BetaToolUnion>;
|
|
3392
3509
|
/**
|
|
@@ -3420,7 +3537,8 @@ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase
|
|
|
3420
3537
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
3421
3538
|
* events.
|
|
3422
3539
|
*
|
|
3423
|
-
* See [streaming](https://
|
|
3540
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
3541
|
+
* for details.
|
|
3424
3542
|
*/
|
|
3425
3543
|
stream?: false;
|
|
3426
3544
|
}
|
|
@@ -3429,7 +3547,8 @@ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
|
3429
3547
|
* Body param: Whether to incrementally stream the response using server-sent
|
|
3430
3548
|
* events.
|
|
3431
3549
|
*
|
|
3432
|
-
* See [streaming](https://
|
|
3550
|
+
* See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
|
|
3551
|
+
* for details.
|
|
3433
3552
|
*/
|
|
3434
3553
|
stream: true;
|
|
3435
3554
|
}
|
|
@@ -3492,12 +3611,13 @@ export interface MessageCountTokensParams {
|
|
|
3492
3611
|
* { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
|
|
3493
3612
|
* ```
|
|
3494
3613
|
*
|
|
3495
|
-
* See
|
|
3614
|
+
* See
|
|
3615
|
+
* [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
|
|
3496
3616
|
*
|
|
3497
3617
|
* Note that if you want to include a
|
|
3498
|
-
* [system prompt](https://
|
|
3499
|
-
* top-level `system` parameter — there is no `"system"` role for
|
|
3500
|
-
* the Messages API.
|
|
3618
|
+
* [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
|
|
3619
|
+
* you can use the top-level `system` parameter — there is no `"system"` role for
|
|
3620
|
+
* input messages in the Messages API.
|
|
3501
3621
|
*
|
|
3502
3622
|
* There is a limit of 100,000 messages in a single request.
|
|
3503
3623
|
*/
|
|
@@ -3548,7 +3668,7 @@ export interface MessageCountTokensParams {
|
|
|
3548
3668
|
*
|
|
3549
3669
|
* A system prompt is a way of providing context and instructions to Claude, such
|
|
3550
3670
|
* as specifying a particular goal or role. See our
|
|
3551
|
-
* [guide to system prompts](https://
|
|
3671
|
+
* [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
|
|
3552
3672
|
*/
|
|
3553
3673
|
system?: string | Array<BetaTextBlockParam>;
|
|
3554
3674
|
/**
|
|
@@ -3559,7 +3679,7 @@ export interface MessageCountTokensParams {
|
|
|
3559
3679
|
* tokens and counts towards your `max_tokens` limit.
|
|
3560
3680
|
*
|
|
3561
3681
|
* See
|
|
3562
|
-
* [extended thinking](https://
|
|
3682
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
3563
3683
|
* for details.
|
|
3564
3684
|
*/
|
|
3565
3685
|
thinking?: BetaThinkingConfigParam;
|
|
@@ -3578,9 +3698,9 @@ export interface MessageCountTokensParams {
|
|
|
3578
3698
|
*
|
|
3579
3699
|
* There are two types of tools: **client tools** and **server tools**. The
|
|
3580
3700
|
* behavior described below applies to client tools. For
|
|
3581
|
-
* [server tools](https://
|
|
3701
|
+
* [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
|
|
3582
3702
|
* see their individual documentation as each has its own behavior (e.g., the
|
|
3583
|
-
* [web search tool](https://
|
|
3703
|
+
* [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
|
|
3584
3704
|
*
|
|
3585
3705
|
* Each tool definition includes:
|
|
3586
3706
|
*
|
|
@@ -3643,18 +3763,26 @@ export interface MessageCountTokensParams {
|
|
|
3643
3763
|
* functions, or more generally whenever you want the model to produce a particular
|
|
3644
3764
|
* JSON structure of output.
|
|
3645
3765
|
*
|
|
3646
|
-
* See our
|
|
3766
|
+
* See our
|
|
3767
|
+
* [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
|
|
3768
|
+
* for more details.
|
|
3647
3769
|
*/
|
|
3648
|
-
tools?: Array<BetaTool | BetaToolBash20241022 | BetaToolBash20250124 | BetaCodeExecutionTool20250522 | BetaCodeExecutionTool20250825 | BetaCodeExecutionTool20260120 | BetaCodeExecutionTool20260521 | BetaToolComputerUse20241022 | BetaMemoryTool20250818 | BetaToolComputerUse20250124 | BetaToolTextEditor20241022 | BetaToolComputerUse20251124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaToolTextEditor20250728 | BetaWebSearchTool20250305 | BetaWebFetchTool20250910 | BetaWebSearchTool20260209 | BetaWebFetchTool20260209 | BetaWebFetchTool20260309 | BetaAdvisorTool20260301 | BetaToolSearchToolBm25_20251119 | BetaToolSearchToolRegex20251119 | BetaMCPToolset>;
|
|
3770
|
+
tools?: Array<BetaTool | BetaToolBash20241022 | BetaToolBash20250124 | BetaCodeExecutionTool20250522 | BetaCodeExecutionTool20250825 | BetaCodeExecutionTool20260120 | BetaCodeExecutionTool20260521 | BetaToolComputerUse20241022 | BetaMemoryTool20250818 | BetaToolComputerUse20250124 | BetaToolTextEditor20241022 | BetaToolComputerUse20251124 | BetaToolTextEditor20250124 | BetaToolTextEditor20250429 | BetaToolTextEditor20250728 | BetaWebSearchTool20250305 | BetaWebFetchTool20250910 | BetaWebSearchTool20260209 | BetaWebFetchTool20260209 | BetaWebFetchTool20260309 | BetaWebSearchTool20260318 | BetaWebFetchTool20260318 | BetaAdvisorTool20260301 | BetaToolSearchToolBm25_20251119 | BetaToolSearchToolRegex20251119 | BetaMCPToolset>;
|
|
3649
3771
|
/**
|
|
3650
3772
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
3651
3773
|
*/
|
|
3652
3774
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
3775
|
+
/**
|
|
3776
|
+
* Header param: The user profile ID to attribute this request to. Use when acting
|
|
3777
|
+
* on behalf of a party other than your organization. Requires the `user-profiles`
|
|
3778
|
+
* beta header.
|
|
3779
|
+
*/
|
|
3780
|
+
user_profile_id?: string;
|
|
3653
3781
|
}
|
|
3654
3782
|
export { BetaToolRunner, type BetaToolRunnerParams } from "../../../lib/tools/BetaToolRunner.mjs";
|
|
3655
3783
|
export { ToolError } from "../../../lib/tools/ToolError.mjs";
|
|
3656
3784
|
export declare namespace Messages {
|
|
3657
|
-
export { type BetaAdvisorMessageIterationUsage as BetaAdvisorMessageIterationUsage, type BetaAdvisorRedactedResultBlock as BetaAdvisorRedactedResultBlock, type BetaAdvisorRedactedResultBlockParam as BetaAdvisorRedactedResultBlockParam, type BetaAdvisorResultBlock as BetaAdvisorResultBlock, type BetaAdvisorResultBlockParam as BetaAdvisorResultBlockParam, type BetaAdvisorTool20260301 as BetaAdvisorTool20260301, type BetaAdvisorToolResultBlock as BetaAdvisorToolResultBlock, type BetaAdvisorToolResultBlockParam as BetaAdvisorToolResultBlockParam, type BetaAdvisorToolResultError as BetaAdvisorToolResultError, type BetaAdvisorToolResultErrorParam as BetaAdvisorToolResultErrorParam, type BetaAllThinkingTurns as BetaAllThinkingTurns, type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock, type BetaBashCodeExecutionOutputBlockParam as BetaBashCodeExecutionOutputBlockParam, type BetaBashCodeExecutionResultBlock as BetaBashCodeExecutionResultBlock, type BetaBashCodeExecutionResultBlockParam as BetaBashCodeExecutionResultBlockParam, type BetaBashCodeExecutionToolResultBlock as BetaBashCodeExecutionToolResultBlock, type BetaBashCodeExecutionToolResultBlockParam as BetaBashCodeExecutionToolResultBlockParam, type BetaBashCodeExecutionToolResultError as BetaBashCodeExecutionToolResultError, type BetaBashCodeExecutionToolResultErrorParam as BetaBashCodeExecutionToolResultErrorParam, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCacheMissMessagesChanged as BetaCacheMissMessagesChanged, type BetaCacheMissModelChanged as BetaCacheMissModelChanged, type BetaCacheMissPreviousMessageNotFound as BetaCacheMissPreviousMessageNotFound, type BetaCacheMissSystemChanged as BetaCacheMissSystemChanged, type BetaCacheMissToolsChanged as BetaCacheMissToolsChanged, type BetaCacheMissUnavailable as BetaCacheMissUnavailable, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationConfig as BetaCitationConfig, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationSearchResultLocation as BetaCitationSearchResultLocation, type BetaCitationSearchResultLocationParam as BetaCitationSearchResultLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaClearThinking20251015Edit as BetaClearThinking20251015Edit, type BetaClearThinking20251015EditResponse as BetaClearThinking20251015EditResponse, type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit, type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionTool20250825 as BetaCodeExecutionTool20250825, type BetaCodeExecutionTool20260120 as BetaCodeExecutionTool20260120, type BetaCodeExecutionTool20260521 as BetaCodeExecutionTool20260521, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaCompact20260112Edit as BetaCompact20260112Edit, type BetaCompactionBlock as BetaCompactionBlock, type BetaCompactionBlockParam as BetaCompactionBlockParam, type BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta, type BetaCompactionIterationUsage as BetaCompactionIterationUsage, type BetaContainer as BetaContainer, type BetaContainerParams as BetaContainerParams, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaContextManagementConfig as BetaContextManagementConfig, type BetaContextManagementResponse as BetaContextManagementResponse, type BetaCountTokensContextManagementResponse as BetaCountTokensContextManagementResponse, type BetaDiagnostics as BetaDiagnostics, type BetaDiagnosticsParam as BetaDiagnosticsParam, type BetaDirectCaller as BetaDirectCaller, type BetaDocumentBlock as BetaDocumentBlock, type BetaEncryptedCodeExecutionResultBlock as BetaEncryptedCodeExecutionResultBlock, type BetaEncryptedCodeExecutionResultBlockParam as BetaEncryptedCodeExecutionResultBlockParam, type BetaFallbackBlock as BetaFallbackBlock, type BetaFallbackBlockParam as BetaFallbackBlockParam, type BetaFallbackInfo as BetaFallbackInfo, type BetaFallbackInfoParam as BetaFallbackInfoParam, type BetaFallbackMessageIterationUsage as BetaFallbackMessageIterationUsage, type BetaFallbackParam as BetaFallbackParam, type BetaFallbackRefusalTrigger as BetaFallbackRefusalTrigger, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast, type BetaInputTokensTrigger as BetaInputTokensTrigger, type BetaIterationsUsage as BetaIterationsUsage, type BetaJSONOutputFormat as BetaJSONOutputFormat, type BetaMCPToolConfig as BetaMCPToolConfig, type BetaMCPToolDefaultConfig as BetaMCPToolDefaultConfig, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMCPToolset as BetaMCPToolset, type BetaMemoryTool20250818 as BetaMemoryTool20250818, type BetaMemoryTool20250818Command as BetaMemoryTool20250818Command, type BetaMemoryTool20250818CreateCommand as BetaMemoryTool20250818CreateCommand, type BetaMemoryTool20250818DeleteCommand as BetaMemoryTool20250818DeleteCommand, type BetaMemoryTool20250818InsertCommand as BetaMemoryTool20250818InsertCommand, type BetaMemoryTool20250818RenameCommand as BetaMemoryTool20250818RenameCommand, type BetaMemoryTool20250818StrReplaceCommand as BetaMemoryTool20250818StrReplaceCommand, type BetaMemoryTool20250818ViewCommand as BetaMemoryTool20250818ViewCommand, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageIterationUsage as BetaMessageIterationUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaMidConversationSystemBlockParam as BetaMidConversationSystemBlockParam, type BetaOutputConfig as BetaOutputConfig, type BetaOutputTokensDetails as BetaOutputTokensDetails, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRefusalStopDetails as BetaRefusalStopDetails, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaSearchResultBlockParam as BetaSearchResultBlockParam, type BetaServerToolCaller as BetaServerToolCaller, type BetaServerToolCaller20260120 as BetaServerToolCaller20260120, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaSkill as BetaSkill, type BetaSkillParams as BetaSkillParams, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaTextEditorCodeExecutionCreateResultBlock as BetaTextEditorCodeExecutionCreateResultBlock, type BetaTextEditorCodeExecutionCreateResultBlockParam as BetaTextEditorCodeExecutionCreateResultBlockParam, type BetaTextEditorCodeExecutionStrReplaceResultBlock as BetaTextEditorCodeExecutionStrReplaceResultBlock, type BetaTextEditorCodeExecutionStrReplaceResultBlockParam as BetaTextEditorCodeExecutionStrReplaceResultBlockParam, type BetaTextEditorCodeExecutionToolResultBlock as BetaTextEditorCodeExecutionToolResultBlock, type BetaTextEditorCodeExecutionToolResultBlockParam as BetaTextEditorCodeExecutionToolResultBlockParam, type BetaTextEditorCodeExecutionToolResultError as BetaTextEditorCodeExecutionToolResultError, type BetaTextEditorCodeExecutionToolResultErrorParam as BetaTextEditorCodeExecutionToolResultErrorParam, type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock, type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaThinkingTurns as BetaThinkingTurns, type BetaTokenTaskBudget as BetaTokenTaskBudget, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolComputerUse20251124 as BetaToolComputerUse20251124, type BetaToolReferenceBlock as BetaToolReferenceBlock, type BetaToolReferenceBlockParam as BetaToolReferenceBlockParam, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolResultContentBlockParam as BetaToolResultContentBlockParam, type BetaToolSearchToolBm25_20251119 as BetaToolSearchToolBm25_20251119, type BetaToolSearchToolRegex20251119 as BetaToolSearchToolRegex20251119, type BetaToolSearchToolResultBlock as BetaToolSearchToolResultBlock, type BetaToolSearchToolResultBlockParam as BetaToolSearchToolResultBlockParam, type BetaToolSearchToolResultError as BetaToolSearchToolResultError, type BetaToolSearchToolResultErrorParam as BetaToolSearchToolResultErrorParam, type BetaToolSearchToolSearchResultBlock as BetaToolSearchToolSearchResultBlock, type BetaToolSearchToolSearchResultBlockParam as BetaToolSearchToolSearchResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolTextEditor20250728 as BetaToolTextEditor20250728, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaToolUsesKeep as BetaToolUsesKeep, type BetaToolUsesTrigger as BetaToolUsesTrigger, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaUserLocation as BetaUserLocation, type BetaWebFetchBlock as BetaWebFetchBlock, type BetaWebFetchBlockParam as BetaWebFetchBlockParam, type BetaWebFetchTool20250910 as BetaWebFetchTool20250910, type BetaWebFetchTool20260209 as BetaWebFetchTool20260209, type BetaWebFetchTool20260309 as BetaWebFetchTool20260309, type BetaWebFetchToolResultBlock as BetaWebFetchToolResultBlock, type BetaWebFetchToolResultBlockParam as BetaWebFetchToolResultBlockParam, type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock, type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam, type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchTool20260209 as BetaWebSearchTool20260209, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
3785
|
+
export { type BetaAdvisorMessageIterationUsage as BetaAdvisorMessageIterationUsage, type BetaAdvisorRedactedResultBlock as BetaAdvisorRedactedResultBlock, type BetaAdvisorRedactedResultBlockParam as BetaAdvisorRedactedResultBlockParam, type BetaAdvisorResultBlock as BetaAdvisorResultBlock, type BetaAdvisorResultBlockParam as BetaAdvisorResultBlockParam, type BetaAdvisorTool20260301 as BetaAdvisorTool20260301, type BetaAdvisorToolResultBlock as BetaAdvisorToolResultBlock, type BetaAdvisorToolResultBlockParam as BetaAdvisorToolResultBlockParam, type BetaAdvisorToolResultError as BetaAdvisorToolResultError, type BetaAdvisorToolResultErrorParam as BetaAdvisorToolResultErrorParam, type BetaAllThinkingTurns as BetaAllThinkingTurns, type BetaBase64ImageSource as BetaBase64ImageSource, type BetaBase64PDFSource as BetaBase64PDFSource, type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock, type BetaBashCodeExecutionOutputBlockParam as BetaBashCodeExecutionOutputBlockParam, type BetaBashCodeExecutionResultBlock as BetaBashCodeExecutionResultBlock, type BetaBashCodeExecutionResultBlockParam as BetaBashCodeExecutionResultBlockParam, type BetaBashCodeExecutionToolResultBlock as BetaBashCodeExecutionToolResultBlock, type BetaBashCodeExecutionToolResultBlockParam as BetaBashCodeExecutionToolResultBlockParam, type BetaBashCodeExecutionToolResultError as BetaBashCodeExecutionToolResultError, type BetaBashCodeExecutionToolResultErrorParam as BetaBashCodeExecutionToolResultErrorParam, type BetaCacheControlEphemeral as BetaCacheControlEphemeral, type BetaCacheCreation as BetaCacheCreation, type BetaCacheMissMessagesChanged as BetaCacheMissMessagesChanged, type BetaCacheMissModelChanged as BetaCacheMissModelChanged, type BetaCacheMissPreviousMessageNotFound as BetaCacheMissPreviousMessageNotFound, type BetaCacheMissSystemChanged as BetaCacheMissSystemChanged, type BetaCacheMissToolsChanged as BetaCacheMissToolsChanged, type BetaCacheMissUnavailable as BetaCacheMissUnavailable, type BetaCitationCharLocation as BetaCitationCharLocation, type BetaCitationCharLocationParam as BetaCitationCharLocationParam, type BetaCitationConfig as BetaCitationConfig, type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation, type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam, type BetaCitationPageLocation as BetaCitationPageLocation, type BetaCitationPageLocationParam as BetaCitationPageLocationParam, type BetaCitationSearchResultLocation as BetaCitationSearchResultLocation, type BetaCitationSearchResultLocationParam as BetaCitationSearchResultLocationParam, type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam, type BetaCitationsConfigParam as BetaCitationsConfigParam, type BetaCitationsDelta as BetaCitationsDelta, type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation, type BetaClearThinking20251015Edit as BetaClearThinking20251015Edit, type BetaClearThinking20251015EditResponse as BetaClearThinking20251015EditResponse, type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit, type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse, type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock, type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam, type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock, type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam, type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522, type BetaCodeExecutionTool20250825 as BetaCodeExecutionTool20250825, type BetaCodeExecutionTool20260120 as BetaCodeExecutionTool20260120, type BetaCodeExecutionTool20260521 as BetaCodeExecutionTool20260521, type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock, type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent, type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam, type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent, type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError, type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode, type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam, type BetaCompact20260112Edit as BetaCompact20260112Edit, type BetaCompactionBlock as BetaCompactionBlock, type BetaCompactionBlockParam as BetaCompactionBlockParam, type BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta, type BetaCompactionIterationUsage as BetaCompactionIterationUsage, type BetaContainer as BetaContainer, type BetaContainerParams as BetaContainerParams, type BetaContainerUploadBlock as BetaContainerUploadBlock, type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam, type BetaContentBlock as BetaContentBlock, type BetaContentBlockParam as BetaContentBlockParam, type BetaContentBlockSource as BetaContentBlockSource, type BetaContentBlockSourceContent as BetaContentBlockSourceContent, type BetaContextManagementConfig as BetaContextManagementConfig, type BetaContextManagementResponse as BetaContextManagementResponse, type BetaCountTokensContextManagementResponse as BetaCountTokensContextManagementResponse, type BetaDiagnostics as BetaDiagnostics, type BetaDiagnosticsParam as BetaDiagnosticsParam, type BetaDirectCaller as BetaDirectCaller, type BetaDocumentBlock as BetaDocumentBlock, type BetaEncryptedCodeExecutionResultBlock as BetaEncryptedCodeExecutionResultBlock, type BetaEncryptedCodeExecutionResultBlockParam as BetaEncryptedCodeExecutionResultBlockParam, type BetaFallbackBlock as BetaFallbackBlock, type BetaFallbackBlockParam as BetaFallbackBlockParam, type BetaFallbackInfo as BetaFallbackInfo, type BetaFallbackInfoParam as BetaFallbackInfoParam, type BetaFallbackMessageIterationUsage as BetaFallbackMessageIterationUsage, type BetaFallbackParam as BetaFallbackParam, type BetaFallbackRefusalTrigger as BetaFallbackRefusalTrigger, type BetaFileDocumentSource as BetaFileDocumentSource, type BetaFileImageSource as BetaFileImageSource, type BetaImageBlockParam as BetaImageBlockParam, type BetaInputJSONDelta as BetaInputJSONDelta, type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast, type BetaInputTokensTrigger as BetaInputTokensTrigger, type BetaIterationsUsage as BetaIterationsUsage, type BetaJSONOutputFormat as BetaJSONOutputFormat, type BetaMCPToolConfig as BetaMCPToolConfig, type BetaMCPToolDefaultConfig as BetaMCPToolDefaultConfig, type BetaMCPToolResultBlock as BetaMCPToolResultBlock, type BetaMCPToolUseBlock as BetaMCPToolUseBlock, type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam, type BetaMCPToolset as BetaMCPToolset, type BetaMemoryTool20250818 as BetaMemoryTool20250818, type BetaMemoryTool20250818Command as BetaMemoryTool20250818Command, type BetaMemoryTool20250818CreateCommand as BetaMemoryTool20250818CreateCommand, type BetaMemoryTool20250818DeleteCommand as BetaMemoryTool20250818DeleteCommand, type BetaMemoryTool20250818InsertCommand as BetaMemoryTool20250818InsertCommand, type BetaMemoryTool20250818RenameCommand as BetaMemoryTool20250818RenameCommand, type BetaMemoryTool20250818StrReplaceCommand as BetaMemoryTool20250818StrReplaceCommand, type BetaMemoryTool20250818ViewCommand as BetaMemoryTool20250818ViewCommand, type BetaMessage as BetaMessage, type BetaMessageDeltaUsage as BetaMessageDeltaUsage, type BetaMessageIterationUsage as BetaMessageIterationUsage, type BetaMessageParam as BetaMessageParam, type BetaMessageTokensCount as BetaMessageTokensCount, type BetaMetadata as BetaMetadata, type BetaMidConversationSystemBlockParam as BetaMidConversationSystemBlockParam, type BetaOutputConfig as BetaOutputConfig, type BetaOutputTokensDetails as BetaOutputTokensDetails, type BetaPlainTextSource as BetaPlainTextSource, type BetaRawContentBlockDelta as BetaRawContentBlockDelta, type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent, type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent, type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent, type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent, type BetaRawMessageStartEvent as BetaRawMessageStartEvent, type BetaRawMessageStopEvent as BetaRawMessageStopEvent, type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent, type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock, type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam, type BetaRefusalStopDetails as BetaRefusalStopDetails, type BetaRequestDocumentBlock as BetaRequestDocumentBlock, type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration, type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition, type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam, type BetaSearchResultBlockParam as BetaSearchResultBlockParam, type BetaServerToolCaller as BetaServerToolCaller, type BetaServerToolCaller20260120 as BetaServerToolCaller20260120, type BetaServerToolUsage as BetaServerToolUsage, type BetaServerToolUseBlock as BetaServerToolUseBlock, type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam, type BetaSignatureDelta as BetaSignatureDelta, type BetaSkill as BetaSkill, type BetaSkillParams as BetaSkillParams, type BetaStopReason as BetaStopReason, type BetaTextBlock as BetaTextBlock, type BetaTextBlockParam as BetaTextBlockParam, type BetaTextCitation as BetaTextCitation, type BetaTextCitationParam as BetaTextCitationParam, type BetaTextDelta as BetaTextDelta, type BetaTextEditorCodeExecutionCreateResultBlock as BetaTextEditorCodeExecutionCreateResultBlock, type BetaTextEditorCodeExecutionCreateResultBlockParam as BetaTextEditorCodeExecutionCreateResultBlockParam, type BetaTextEditorCodeExecutionStrReplaceResultBlock as BetaTextEditorCodeExecutionStrReplaceResultBlock, type BetaTextEditorCodeExecutionStrReplaceResultBlockParam as BetaTextEditorCodeExecutionStrReplaceResultBlockParam, type BetaTextEditorCodeExecutionToolResultBlock as BetaTextEditorCodeExecutionToolResultBlock, type BetaTextEditorCodeExecutionToolResultBlockParam as BetaTextEditorCodeExecutionToolResultBlockParam, type BetaTextEditorCodeExecutionToolResultError as BetaTextEditorCodeExecutionToolResultError, type BetaTextEditorCodeExecutionToolResultErrorParam as BetaTextEditorCodeExecutionToolResultErrorParam, type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock, type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam, type BetaThinkingBlock as BetaThinkingBlock, type BetaThinkingBlockParam as BetaThinkingBlockParam, type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive, type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled, type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled, type BetaThinkingConfigParam as BetaThinkingConfigParam, type BetaThinkingDelta as BetaThinkingDelta, type BetaThinkingTurns as BetaThinkingTurns, type BetaTokenTaskBudget as BetaTokenTaskBudget, type BetaTool as BetaTool, type BetaToolBash20241022 as BetaToolBash20241022, type BetaToolBash20250124 as BetaToolBash20250124, type BetaToolChoice as BetaToolChoice, type BetaToolChoiceAny as BetaToolChoiceAny, type BetaToolChoiceAuto as BetaToolChoiceAuto, type BetaToolChoiceNone as BetaToolChoiceNone, type BetaToolChoiceTool as BetaToolChoiceTool, type BetaToolComputerUse20241022 as BetaToolComputerUse20241022, type BetaToolComputerUse20250124 as BetaToolComputerUse20250124, type BetaToolComputerUse20251124 as BetaToolComputerUse20251124, type BetaToolReferenceBlock as BetaToolReferenceBlock, type BetaToolReferenceBlockParam as BetaToolReferenceBlockParam, type BetaToolResultBlockParam as BetaToolResultBlockParam, type BetaToolResultContentBlockParam as BetaToolResultContentBlockParam, type BetaToolSearchToolBm25_20251119 as BetaToolSearchToolBm25_20251119, type BetaToolSearchToolRegex20251119 as BetaToolSearchToolRegex20251119, type BetaToolSearchToolResultBlock as BetaToolSearchToolResultBlock, type BetaToolSearchToolResultBlockParam as BetaToolSearchToolResultBlockParam, type BetaToolSearchToolResultError as BetaToolSearchToolResultError, type BetaToolSearchToolResultErrorParam as BetaToolSearchToolResultErrorParam, type BetaToolSearchToolSearchResultBlock as BetaToolSearchToolSearchResultBlock, type BetaToolSearchToolSearchResultBlockParam as BetaToolSearchToolSearchResultBlockParam, type BetaToolTextEditor20241022 as BetaToolTextEditor20241022, type BetaToolTextEditor20250124 as BetaToolTextEditor20250124, type BetaToolTextEditor20250429 as BetaToolTextEditor20250429, type BetaToolTextEditor20250728 as BetaToolTextEditor20250728, type BetaToolUnion as BetaToolUnion, type BetaToolUseBlock as BetaToolUseBlock, type BetaToolUseBlockParam as BetaToolUseBlockParam, type BetaToolUsesKeep as BetaToolUsesKeep, type BetaToolUsesTrigger as BetaToolUsesTrigger, type BetaURLImageSource as BetaURLImageSource, type BetaURLPDFSource as BetaURLPDFSource, type BetaUsage as BetaUsage, type BetaUserLocation as BetaUserLocation, type BetaWebFetchBlock as BetaWebFetchBlock, type BetaWebFetchBlockParam as BetaWebFetchBlockParam, type BetaWebFetchTool20250910 as BetaWebFetchTool20250910, type BetaWebFetchTool20260209 as BetaWebFetchTool20260209, type BetaWebFetchTool20260309 as BetaWebFetchTool20260309, type BetaWebFetchTool20260318 as BetaWebFetchTool20260318, type BetaWebFetchToolResultBlock as BetaWebFetchToolResultBlock, type BetaWebFetchToolResultBlockParam as BetaWebFetchToolResultBlockParam, type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock, type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam, type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode, type BetaWebSearchResultBlock as BetaWebSearchResultBlock, type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam, type BetaWebSearchTool20250305 as BetaWebSearchTool20250305, type BetaWebSearchTool20260209 as BetaWebSearchTool20260209, type BetaWebSearchTool20260318 as BetaWebSearchTool20260318, type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError, type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock, type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent, type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam, type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent, type BetaWebSearchToolResultError as BetaWebSearchToolResultError, type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode, type BetaBase64PDFBlock as BetaBase64PDFBlock, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageCountTokensParams as MessageCountTokensParams, };
|
|
3658
3786
|
export { type BetaToolRunnerParams, BetaToolRunner };
|
|
3659
3787
|
export { ToolError };
|
|
3660
3788
|
export { Batches as Batches, type BetaDeletedMessageBatch as BetaDeletedMessageBatch, type BetaMessageBatch as BetaMessageBatch, type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult, type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult, type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult, type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse, type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts, type BetaMessageBatchResult as BetaMessageBatchResult, type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult, type BetaMessageBatchesPage as BetaMessageBatchesPage, type BatchCreateParams as BatchCreateParams, type BatchRetrieveParams as BatchRetrieveParams, type BatchListParams as BatchListParams, type BatchDeleteParams as BatchDeleteParams, type BatchCancelParams as BatchCancelParams, type BatchResultsParams as BatchResultsParams, };
|