@anthropic-ai/sdk 0.114.0 → 0.116.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 +40 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +9 -2
- package/client.js.map +1 -1
- package/client.mjs +9 -2
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +3 -0
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +3 -0
- package/core/streaming.mjs.map +1 -1
- package/internal/constants.d.mts.map +1 -1
- package/internal/constants.d.ts.map +1 -1
- package/internal/constants.js +0 -5
- package/internal/constants.js.map +1 -1
- package/internal/constants.mjs +0 -5
- package/internal/constants.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-signal.d.mts +4 -0
- package/internal/request-signal.d.mts.map +1 -0
- package/internal/request-signal.d.ts +4 -0
- package/internal/request-signal.d.ts.map +1 -0
- package/internal/request-signal.js +50 -0
- package/internal/request-signal.js.map +1 -0
- package/internal/request-signal.mjs +45 -0
- package/internal/request-signal.mjs.map +1 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +3 -0
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +3 -0
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/middleware.d.mts +5 -3
- package/lib/middleware.d.mts.map +1 -1
- package/lib/middleware.d.ts +5 -3
- package/lib/middleware.d.ts.map +1 -1
- package/lib/middleware.js +58 -15
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +58 -15
- package/lib/middleware.mjs.map +1 -1
- package/lib/sessions/accumulate.js +1 -0
- package/lib/sessions/accumulate.js.map +1 -1
- package/lib/sessions/accumulate.mjs +1 -0
- package/lib/sessions/accumulate.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +80 -7
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +80 -7
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +26 -4
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +26 -4
- 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/agents/index.d.mts +1 -1
- package/resources/beta/agents/index.d.mts.map +1 -1
- package/resources/beta/agents/index.d.ts +1 -1
- package/resources/beta/agents/index.d.ts.map +1 -1
- package/resources/beta/agents/index.js.map +1 -1
- package/resources/beta/agents/index.mjs.map +1 -1
- package/resources/beta/beta.d.mts +28 -10
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +28 -10
- 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 +16 -1
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +16 -1
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/index.d.mts +5 -5
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +5 -5
- 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 +4 -3
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +4 -3
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +205 -6
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +205 -6
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +1 -22
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +1 -22
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +60 -10
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +60 -10
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/index.d.mts +2 -2
- package/resources/beta/sessions/index.d.mts.map +1 -1
- package/resources/beta/sessions/index.d.ts +2 -2
- package/resources/beta/sessions/index.d.ts.map +1 -1
- package/resources/beta/sessions/index.js.map +1 -1
- package/resources/beta/sessions/index.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +101 -6
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +101 -6
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.d.mts +17 -5
- package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
- package/resources/beta/sessions/threads/threads.d.ts +17 -5
- package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/webhooks.d.mts +11 -2
- package/resources/beta/webhooks.d.mts.map +1 -1
- package/resources/beta/webhooks.d.ts +11 -2
- package/resources/beta/webhooks.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/messages.d.mts +52 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +52 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +1 -22
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +1 -22
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +19 -3
- package/src/core/streaming.ts +3 -0
- package/src/internal/constants.ts +0 -5
- package/src/internal/parse.ts +10 -1
- package/src/internal/request-signal.ts +68 -0
- package/src/lib/BetaMessageStream.ts +4 -0
- package/src/lib/middleware.ts +61 -16
- package/src/lib/sessions/accumulate.ts +1 -0
- package/src/lib/tools/BetaToolRunner.ts +101 -8
- package/src/resources/beta/agents/agents.ts +30 -2
- package/src/resources/beta/agents/index.ts +1 -0
- package/src/resources/beta/beta.ts +59 -1
- package/src/resources/beta/deployments.ts +19 -0
- package/src/resources/beta/index.ts +18 -0
- package/src/resources/beta/messages/batches.ts +4 -3
- package/src/resources/beta/messages/index.ts +10 -0
- package/src/resources/beta/messages/messages.ts +251 -26
- package/src/resources/beta/sessions/events.ts +95 -9
- package/src/resources/beta/sessions/index.ts +7 -0
- package/src/resources/beta/sessions/sessions.ts +127 -3
- package/src/resources/beta/sessions/threads/threads.ts +21 -5
- package/src/resources/beta/webhooks.ts +16 -1
- package/src/resources/index.ts +2 -0
- package/src/resources/messages/messages.ts +53 -24
- package/src/tools/agent-toolset/node.browser.ts +14 -0
- package/src/tools/agent-toolset/node.ts +19 -8
- package/src/version.ts +1 -1
- package/tools/agent-toolset/node.browser.d.mts +9 -0
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +9 -0
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js +13 -1
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs +11 -0
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +9 -0
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +9 -0
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +18 -6
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +16 -5
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/tools/ToolRunner.d.mts +0 -132
- package/lib/tools/ToolRunner.d.mts.map +0 -1
- package/lib/tools/ToolRunner.d.ts +0 -132
- package/lib/tools/ToolRunner.d.ts.map +0 -1
- package/lib/tools/ToolRunner.js +0 -294
- package/lib/tools/ToolRunner.js.map +0 -1
- package/lib/tools/ToolRunner.mjs +0 -290
- package/lib/tools/ToolRunner.mjs.map +0 -1
- package/src/lib/tools/ToolRunner.ts +0 -381
|
@@ -903,7 +903,7 @@ export type BetaContentBlock = BetaTextBlock | BetaThinkingBlock | BetaRedactedT
|
|
|
903
903
|
/**
|
|
904
904
|
* Regular text content.
|
|
905
905
|
*/
|
|
906
|
-
export type BetaContentBlockParam = BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock | BetaSearchResultBlockParam | BetaThinkingBlockParam | BetaRedactedThinkingBlockParam | BetaToolUseBlockParam | BetaToolResultBlockParam | BetaServerToolUseBlockParam | BetaWebSearchToolResultBlockParam | BetaWebFetchToolResultBlockParam | BetaAdvisorToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaBashCodeExecutionToolResultBlockParam | BetaTextEditorCodeExecutionToolResultBlockParam | BetaToolSearchToolResultBlockParam | BetaMCPToolUseBlockParam | BetaRequestMCPToolResultBlockParam | BetaContainerUploadBlockParam | BetaCompactionBlockParam | BetaMidConversationSystemBlockParam | BetaFallbackBlockParam;
|
|
906
|
+
export type BetaContentBlockParam = BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock | BetaSearchResultBlockParam | BetaThinkingBlockParam | BetaRedactedThinkingBlockParam | BetaToolUseBlockParam | BetaToolResultBlockParam | BetaServerToolUseBlockParam | BetaWebSearchToolResultBlockParam | BetaWebFetchToolResultBlockParam | BetaAdvisorToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaBashCodeExecutionToolResultBlockParam | BetaTextEditorCodeExecutionToolResultBlockParam | BetaToolSearchToolResultBlockParam | BetaMCPToolUseBlockParam | BetaRequestMCPToolResultBlockParam | BetaContainerUploadBlockParam | BetaCompactionBlockParam | BetaMidConversationSystemBlockParam | BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock | BetaFallbackBlockParam;
|
|
907
907
|
export interface BetaContentBlockSource {
|
|
908
908
|
content: string | Array<BetaContentBlockSourceContent>;
|
|
909
909
|
type: 'content';
|
|
@@ -1054,6 +1054,75 @@ export interface BetaFallbackBlockParam {
|
|
|
1054
1054
|
*/
|
|
1055
1055
|
trigger?: unknown;
|
|
1056
1056
|
}
|
|
1057
|
+
/**
|
|
1058
|
+
* No reprice was applied; `reason` says why.
|
|
1059
|
+
*/
|
|
1060
|
+
export interface BetaFallbackCreditNotApplied {
|
|
1061
|
+
/**
|
|
1062
|
+
* Why the reprice was not applied.
|
|
1063
|
+
*
|
|
1064
|
+
* A closed enum; additions to the redemption-check vocabulary arrive as deliberate
|
|
1065
|
+
* schema updates.
|
|
1066
|
+
*/
|
|
1067
|
+
reason: 'body_mismatch' | 'continuation_excluded' | 'continuation_only' | 'expired' | 'invalid_target_model' | 'not_enabled' | 'reprice_unavailable' | 'temporarily_unavailable' | 'variant_fields_present' | 'wrong_organization' | 'wrong_platform' | 'wrong_workspace';
|
|
1068
|
+
type: 'not_applied';
|
|
1069
|
+
/**
|
|
1070
|
+
* Request fields to remove before retrying, so the retry can redeem this token.
|
|
1071
|
+
*
|
|
1072
|
+
* Present exactly when `reason` is `variant_fields_present` — never null, never an
|
|
1073
|
+
* empty array; absent otherwise. Fields are named only from your own request, and
|
|
1074
|
+
* only after the sealed variant hash matched. A served best-effort retry has
|
|
1075
|
+
* already been billed at normal price; nothing redeems retroactively, but a
|
|
1076
|
+
* corrected re-send inside the token's five-minute window can still redeem.
|
|
1077
|
+
*/
|
|
1078
|
+
remove_to_redeem?: Array<string> | null;
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* The reprice was applied: the retry is billed as if the conversation had been on
|
|
1082
|
+
* the retry model all along.
|
|
1083
|
+
*/
|
|
1084
|
+
export interface BetaFallbackCreditRedeemed {
|
|
1085
|
+
type: 'redeemed';
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Object form of `fallback_credit_token`: the token plus a redemption mode.
|
|
1089
|
+
*
|
|
1090
|
+
* Requires `anthropic-beta: fallback-credit-2026-07-01`; without that header the
|
|
1091
|
+
* field accepts the bare string only. The bare string and the mode-less object are
|
|
1092
|
+
* equivalent (both select `strict`), so wrapping an existing token changes nothing
|
|
1093
|
+
* by itself.
|
|
1094
|
+
*/
|
|
1095
|
+
export interface BetaFallbackCreditTokenParam {
|
|
1096
|
+
/**
|
|
1097
|
+
* The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the
|
|
1098
|
+
* same string the bare-string form carries.
|
|
1099
|
+
*/
|
|
1100
|
+
token: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* How a failing token affects the retry. `strict` (the default, and the
|
|
1103
|
+
* bare-string behavior): a failing redemption is a 400 and the retry is not
|
|
1104
|
+
* served. `best_effort`: the retry is served either way — a token-layer failure no
|
|
1105
|
+
* longer rejects the request; the retry proceeds at normal price and the outcome
|
|
1106
|
+
* is reported on the response's `usage.fallback_credit`. Two failures stay hard in
|
|
1107
|
+
* both modes: a malformed token, and combining `fallback_credit_token` with
|
|
1108
|
+
* `fallbacks`.
|
|
1109
|
+
*/
|
|
1110
|
+
mode?: 'strict' | 'best_effort';
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Outcome of the `fallback_credit_token` presented on this request.
|
|
1114
|
+
*/
|
|
1115
|
+
export interface BetaFallbackCreditUsage {
|
|
1116
|
+
/**
|
|
1117
|
+
* Whether the fallback-credit reprice was applied to this response's billing.
|
|
1118
|
+
*
|
|
1119
|
+
* A union discriminated on `type`. `redeemed`: the retry is billed as if the
|
|
1120
|
+
* conversation had been on the retry model all along — including when the
|
|
1121
|
+
* resulting shift is zero because there was nothing to move. `not_applied`: no
|
|
1122
|
+
* reprice was applied; the arm's `reason` says why.
|
|
1123
|
+
*/
|
|
1124
|
+
status: BetaFallbackCreditRedeemed | BetaFallbackCreditNotApplied;
|
|
1125
|
+
}
|
|
1057
1126
|
/**
|
|
1058
1127
|
* Identifies one hop of a fallback transition.
|
|
1059
1128
|
*/
|
|
@@ -1171,6 +1240,13 @@ export interface BetaFallbackRefusalTrigger {
|
|
|
1171
1240
|
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'general_harms' | null;
|
|
1172
1241
|
type: 'refusal';
|
|
1173
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* Opt-in server-side retry on one or more substitute models when the requested
|
|
1245
|
+
* model declines for policy reasons. Tried in order: if the first entry also
|
|
1246
|
+
* declines, the second is tried, and so on. The string "default" requests the
|
|
1247
|
+
* requested model's server-defined default fallback configuration.
|
|
1248
|
+
*/
|
|
1249
|
+
export type BetaFallbacksParam = Array<BetaFallbackParam> | 'default';
|
|
1174
1250
|
export interface BetaFileDocumentSource {
|
|
1175
1251
|
file_id: string;
|
|
1176
1252
|
type: 'file';
|
|
@@ -1543,6 +1619,10 @@ export interface BetaMessageDeltaUsage {
|
|
|
1543
1619
|
* The cumulative number of input tokens read from the cache.
|
|
1544
1620
|
*/
|
|
1545
1621
|
cache_read_input_tokens: number | null;
|
|
1622
|
+
/**
|
|
1623
|
+
* Outcome of the `fallback_credit_token` presented on this request.
|
|
1624
|
+
*/
|
|
1625
|
+
fallback_credit: BetaFallbackCreditUsage | null;
|
|
1546
1626
|
/**
|
|
1547
1627
|
* The cumulative number of input tokens which were used.
|
|
1548
1628
|
*/
|
|
@@ -1648,7 +1728,7 @@ export interface BetaMidConversationSystemBlockParam {
|
|
|
1648
1728
|
/**
|
|
1649
1729
|
* System instruction text blocks.
|
|
1650
1730
|
*/
|
|
1651
|
-
content: Array<BetaTextBlockParam>;
|
|
1731
|
+
content: Array<BetaTextBlockParam | BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock>;
|
|
1652
1732
|
type: 'mid_conv_system';
|
|
1653
1733
|
/**
|
|
1654
1734
|
* Create a cache control breakpoint at this content block.
|
|
@@ -1756,10 +1836,26 @@ export interface BetaRawMessageStopEvent {
|
|
|
1756
1836
|
}
|
|
1757
1837
|
export type BetaRawMessageStreamEvent = BetaRawMessageStartEvent | BetaRawMessageDeltaEvent | BetaRawMessageStopEvent | BetaRawContentBlockStartEvent | BetaRawContentBlockDeltaEvent | BetaRawContentBlockStopEvent;
|
|
1758
1838
|
export interface BetaRedactedThinkingBlock {
|
|
1839
|
+
/**
|
|
1840
|
+
* The contents of this redacted thinking block, returned when portions of the
|
|
1841
|
+
* model's thinking were safety-redacted. This field is opaque and encrypted, with
|
|
1842
|
+
* no readable content.
|
|
1843
|
+
*
|
|
1844
|
+
* Pass `redacted_thinking` blocks back to the API unchanged when continuing a
|
|
1845
|
+
* multi-turn conversation.
|
|
1846
|
+
*
|
|
1847
|
+
* See
|
|
1848
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks)
|
|
1849
|
+
* for details.
|
|
1850
|
+
*/
|
|
1759
1851
|
data: string;
|
|
1760
1852
|
type: 'redacted_thinking';
|
|
1761
1853
|
}
|
|
1762
1854
|
export interface BetaRedactedThinkingBlockParam {
|
|
1855
|
+
/**
|
|
1856
|
+
* The `data` value of this redacted thinking block, exactly as returned by the API
|
|
1857
|
+
* in a previous response. Opaque and encrypted; pass it back unchanged.
|
|
1858
|
+
*/
|
|
1763
1859
|
data: string;
|
|
1764
1860
|
type: 'redacted_thinking';
|
|
1765
1861
|
}
|
|
@@ -1877,6 +1973,44 @@ export interface BetaRequestMCPToolResultBlockParam {
|
|
|
1877
1973
|
content?: string | Array<BetaTextBlockParam>;
|
|
1878
1974
|
is_error?: boolean;
|
|
1879
1975
|
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Mid-conversation directive to surface a declared tool.
|
|
1978
|
+
*
|
|
1979
|
+
* `tool` references a tool (or MCP toolset) by name from the request's `tools`; it
|
|
1980
|
+
* is offered to the model from this point in the conversation onward.
|
|
1981
|
+
*/
|
|
1982
|
+
export interface BetaRequestToolAdditionBlock {
|
|
1983
|
+
/**
|
|
1984
|
+
* Reference to a single tool the caller declared directly in `tools[]`. Does not
|
|
1985
|
+
* accept the composed `{server}_{name}` form the server assigns to MCP-resolved
|
|
1986
|
+
* tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
|
|
1987
|
+
*/
|
|
1988
|
+
tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;
|
|
1989
|
+
type: 'tool_addition';
|
|
1990
|
+
/**
|
|
1991
|
+
* Create a cache control breakpoint at this content block.
|
|
1992
|
+
*/
|
|
1993
|
+
cache_control?: BetaCacheControlEphemeral | null;
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Mid-conversation directive to withdraw a tool.
|
|
1997
|
+
*
|
|
1998
|
+
* `tool` references a tool (or MCP toolset) by name from the request's `tools`; it
|
|
1999
|
+
* is no longer offered to the model from this point in the conversation onward.
|
|
2000
|
+
*/
|
|
2001
|
+
export interface BetaRequestToolRemovalBlock {
|
|
2002
|
+
/**
|
|
2003
|
+
* Reference to a single tool the caller declared directly in `tools[]`. Does not
|
|
2004
|
+
* accept the composed `{server}_{name}` form the server assigns to MCP-resolved
|
|
2005
|
+
* tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
|
|
2006
|
+
*/
|
|
2007
|
+
tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;
|
|
2008
|
+
type: 'tool_removal';
|
|
2009
|
+
/**
|
|
2010
|
+
* Create a cache control breakpoint at this content block.
|
|
2011
|
+
*/
|
|
2012
|
+
cache_control?: BetaCacheControlEphemeral | null;
|
|
2013
|
+
}
|
|
1880
2014
|
export interface BetaSearchResultBlockParam {
|
|
1881
2015
|
content: Array<BetaTextBlockParam>;
|
|
1882
2016
|
source: string;
|
|
@@ -1936,6 +2070,11 @@ export interface BetaServerToolUseBlockParam {
|
|
|
1936
2070
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
1937
2071
|
}
|
|
1938
2072
|
export interface BetaSignatureDelta {
|
|
2073
|
+
/**
|
|
2074
|
+
* The `signature` for this thinking block: an opaque value used to verify that the
|
|
2075
|
+
* block was generated by Claude when it is passed back to the API. Delivered in a
|
|
2076
|
+
* `signature_delta` event just before the block's `content_block_stop` event.
|
|
2077
|
+
*/
|
|
1939
2078
|
signature: string;
|
|
1940
2079
|
type: 'signature_delta';
|
|
1941
2080
|
}
|
|
@@ -2066,12 +2205,37 @@ export interface BetaTextEditorCodeExecutionViewResultBlockParam {
|
|
|
2066
2205
|
total_lines?: number | null;
|
|
2067
2206
|
}
|
|
2068
2207
|
export interface BetaThinkingBlock {
|
|
2208
|
+
/**
|
|
2209
|
+
* A value used to verify that this thinking block was generated by Claude when it
|
|
2210
|
+
* is passed back to the API.
|
|
2211
|
+
*
|
|
2212
|
+
* This is an opaque field and should not be interpreted or parsed. When passing
|
|
2213
|
+
* thinking blocks back to the API (required when using tools with extended
|
|
2214
|
+
* thinking), pass them back exactly as received, with this field intact.
|
|
2215
|
+
*
|
|
2216
|
+
* See
|
|
2217
|
+
* [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
|
|
2218
|
+
* for details.
|
|
2219
|
+
*/
|
|
2069
2220
|
signature: string;
|
|
2221
|
+
/**
|
|
2222
|
+
* The text of Claude's thinking process for this block.
|
|
2223
|
+
*/
|
|
2070
2224
|
thinking: string;
|
|
2071
2225
|
type: 'thinking';
|
|
2072
2226
|
}
|
|
2073
2227
|
export interface BetaThinkingBlockParam {
|
|
2228
|
+
/**
|
|
2229
|
+
* The `signature` value of this thinking block, exactly as returned by the API in
|
|
2230
|
+
* a previous response. Used to verify that the block was generated by Claude.
|
|
2231
|
+
*
|
|
2232
|
+
* Thinking blocks must be passed back unmodified and in their original order; a
|
|
2233
|
+
* modified block results in a 400 `invalid_request_error`.
|
|
2234
|
+
*/
|
|
2074
2235
|
signature: string;
|
|
2236
|
+
/**
|
|
2237
|
+
* The `thinking` text of this block as returned by the API.
|
|
2238
|
+
*/
|
|
2075
2239
|
thinking: string;
|
|
2076
2240
|
type: 'thinking';
|
|
2077
2241
|
}
|
|
@@ -2134,6 +2298,11 @@ export interface BetaThinkingDelta {
|
|
|
2134
2298
|
* `usage.output_tokens` remains authoritative.
|
|
2135
2299
|
*/
|
|
2136
2300
|
estimated_tokens: number | null;
|
|
2301
|
+
/**
|
|
2302
|
+
* The incremental `thinking` text for this content block. Concatenate the
|
|
2303
|
+
* `thinking` values of successive `thinking_delta` events to assemble the block's
|
|
2304
|
+
* full `thinking` value.
|
|
2305
|
+
*/
|
|
2137
2306
|
thinking: string;
|
|
2138
2307
|
type: 'thinking_delta';
|
|
2139
2308
|
}
|
|
@@ -2275,6 +2444,31 @@ export interface BetaToolBash20250124 {
|
|
|
2275
2444
|
*/
|
|
2276
2445
|
strict?: boolean;
|
|
2277
2446
|
}
|
|
2447
|
+
/**
|
|
2448
|
+
* Reference to a single MCP tool by its server and remote name — the same
|
|
2449
|
+
* `server_name`/`name` pair `mcp_tool_use` carries.
|
|
2450
|
+
*/
|
|
2451
|
+
export interface BetaToolChangeMCPToolReference {
|
|
2452
|
+
name: string;
|
|
2453
|
+
server_name: string;
|
|
2454
|
+
type: 'mcp_tool_reference';
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* Reference to every tool in the named MCP server's toolset.
|
|
2458
|
+
*/
|
|
2459
|
+
export interface BetaToolChangeMCPToolsetReference {
|
|
2460
|
+
server_name: string;
|
|
2461
|
+
type: 'mcp_toolset_reference';
|
|
2462
|
+
}
|
|
2463
|
+
/**
|
|
2464
|
+
* Reference to a single tool the caller declared directly in `tools[]`. Does not
|
|
2465
|
+
* accept the composed `{server}_{name}` form the server assigns to MCP-resolved
|
|
2466
|
+
* tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
|
|
2467
|
+
*/
|
|
2468
|
+
export interface BetaToolChangeToolReference {
|
|
2469
|
+
name: string;
|
|
2470
|
+
type: 'tool_reference';
|
|
2471
|
+
}
|
|
2278
2472
|
/**
|
|
2279
2473
|
* How the model should use the provided tools. The model can use a specific tool,
|
|
2280
2474
|
* any available tool, decide by itself, or not use tools at all.
|
|
@@ -2718,6 +2912,10 @@ export interface BetaUsage {
|
|
|
2718
2912
|
* The number of input tokens read from the cache.
|
|
2719
2913
|
*/
|
|
2720
2914
|
cache_read_input_tokens: number | null;
|
|
2915
|
+
/**
|
|
2916
|
+
* Outcome of the `fallback_credit_token` presented on this request.
|
|
2917
|
+
*/
|
|
2918
|
+
fallback_credit: BetaFallbackCreditUsage | null;
|
|
2721
2919
|
/**
|
|
2722
2920
|
* The geographic region where inference was performed for this request.
|
|
2723
2921
|
*/
|
|
@@ -3366,13 +3564,14 @@ export interface MessageCreateParamsBase {
|
|
|
3366
3564
|
* When the appended-assistant form is used on a model that otherwise disallows
|
|
3367
3565
|
* assistant-turn prefill, this token also authorizes that one prefill.
|
|
3368
3566
|
*/
|
|
3369
|
-
fallback_credit_token?: string | null;
|
|
3567
|
+
fallback_credit_token?: string | BetaFallbackCreditTokenParam | null;
|
|
3370
3568
|
/**
|
|
3371
3569
|
* Body param: Opt-in server-side retry on one or more substitute models when the
|
|
3372
3570
|
* requested model declines for policy reasons. Tried in order: if the first entry
|
|
3373
|
-
* also declines, the second is tried, and so on.
|
|
3571
|
+
* also declines, the second is tried, and so on. The string "default" requests the
|
|
3572
|
+
* requested model's server-defined default fallback configuration.
|
|
3374
3573
|
*/
|
|
3375
|
-
fallbacks?:
|
|
3574
|
+
fallbacks?: BetaFallbacksParam | null;
|
|
3376
3575
|
/**
|
|
3377
3576
|
* Body param: Specifies the geographic region for inference processing. If not
|
|
3378
3577
|
* specified, the workspace's `default_inference_geo` is used.
|
|
@@ -3822,7 +4021,7 @@ export interface MessageCountTokensParams {
|
|
|
3822
4021
|
export { BetaToolRunner, type BetaToolRunnerParams } from "../../../lib/tools/BetaToolRunner.js";
|
|
3823
4022
|
export { ToolError } from "../../../lib/tools/ToolError.js";
|
|
3824
4023
|
export declare namespace Messages {
|
|
3825
|
-
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, };
|
|
4024
|
+
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 BetaFallbackCreditNotApplied as BetaFallbackCreditNotApplied, type BetaFallbackCreditRedeemed as BetaFallbackCreditRedeemed, type BetaFallbackCreditTokenParam as BetaFallbackCreditTokenParam, type BetaFallbackCreditUsage as BetaFallbackCreditUsage, type BetaFallbackInfo as BetaFallbackInfo, type BetaFallbackInfoParam as BetaFallbackInfoParam, type BetaFallbackMessageIterationUsage as BetaFallbackMessageIterationUsage, type BetaFallbackParam as BetaFallbackParam, type BetaFallbackRefusalTrigger as BetaFallbackRefusalTrigger, type BetaFallbacksParam as BetaFallbacksParam, 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 BetaRequestToolAdditionBlock as BetaRequestToolAdditionBlock, type BetaRequestToolRemovalBlock as BetaRequestToolRemovalBlock, 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 BetaToolChangeMCPToolReference as BetaToolChangeMCPToolReference, type BetaToolChangeMCPToolsetReference as BetaToolChangeMCPToolsetReference, type BetaToolChangeToolReference as BetaToolChangeToolReference, 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, };
|
|
3826
4025
|
export { type BetaToolRunnerParams, BetaToolRunner };
|
|
3827
4026
|
export { ToolError };
|
|
3828
4027
|
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, };
|