@anthropic-ai/sdk 0.125.0 → 0.126.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 +50 -0
- 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 +846 -840
- package/client.js.map +1 -1
- package/client.mjs +846 -834
- package/client.mjs.map +1 -1
- package/core/api-promise.js +71 -68
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +71 -64
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +5 -2
- package/core/error.js.map +1 -1
- package/core/error.mjs +5 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +56 -50
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +56 -41
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.js +212 -209
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +212 -209
- package/core/streaming.mjs.map +1 -1
- package/helpers/beta/mcp.js +14 -19
- package/helpers/beta/mcp.js.map +1 -1
- package/helpers/beta/mcp.mjs +14 -13
- package/helpers/beta/mcp.mjs.map +1 -1
- package/internal/constants.js +1 -1
- package/internal/constants.js.map +1 -1
- package/internal/decoders/jsonl.js +27 -24
- package/internal/decoders/jsonl.js.map +1 -1
- package/internal/decoders/jsonl.mjs +27 -24
- package/internal/decoders/jsonl.mjs.map +1 -1
- package/internal/decoders/line.js +52 -49
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +52 -43
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/file-store.js +256 -258
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +256 -243
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts.map +1 -1
- package/internal/node.browser.d.ts.map +1 -1
- package/internal/node.browser.js.map +1 -1
- package/internal/node.browser.mjs +7 -7
- package/internal/node.browser.mjs.map +1 -1
- package/internal/shim-types.js +0 -6
- package/internal/shim-types.js.map +1 -1
- package/internal/shim-types.mjs +0 -6
- package/internal/shim-types.mjs.map +1 -1
- package/internal/shims.js +0 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +0 -6
- package/internal/shims.mjs.map +1 -1
- package/internal/stainless-helper-header.js +6 -6
- package/internal/stainless-helper-header.js.map +1 -1
- package/internal/utils/async-queue.js +66 -63
- package/internal/utils/async-queue.js.map +1 -1
- package/internal/utils/async-queue.mjs +66 -56
- package/internal/utils/async-queue.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +1 -1
- package/internal/utils/bytes.d.mts.map +1 -1
- package/internal/utils/bytes.d.ts +1 -1
- package/internal/utils/bytes.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +593 -590
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +593 -590
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.js +544 -541
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +544 -541
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/poller.js +180 -174
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +180 -153
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.js +375 -369
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +374 -329
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.js +316 -313
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +315 -306
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.js +241 -235
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +241 -192
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/lib/tools/ToolError.js +39 -36
- package/lib/tools/ToolError.js.map +1 -1
- package/lib/tools/ToolError.mjs +39 -13
- package/lib/tools/ToolError.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/beta/agents/agents.js +135 -132
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +135 -132
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +39 -36
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +39 -36
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +2 -28
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +2 -28
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/environments/environments.js +157 -154
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs +157 -154
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.js +255 -252
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +255 -252
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- 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/memory-stores/memory-stores.js +150 -147
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs +150 -147
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +12 -1
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +12 -1
- 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 +238 -100
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +238 -100
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +113 -110
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +113 -110
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +22 -1
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +22 -1
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/organization/federation/federation.js +11 -8
- package/resources/beta/organization/federation/federation.js.map +1 -1
- package/resources/beta/organization/federation/federation.mjs +11 -8
- package/resources/beta/organization/federation/federation.mjs.map +1 -1
- package/resources/beta/organization/federation/rules/rules.js +187 -184
- package/resources/beta/organization/federation/rules/rules.js.map +1 -1
- package/resources/beta/organization/federation/rules/rules.mjs +187 -184
- package/resources/beta/organization/federation/rules/rules.mjs.map +1 -1
- package/resources/beta/organization/organization.js +38 -35
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +38 -35
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.js +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.mjs +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js +97 -94
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs +97 -94
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +12 -21
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +12 -21
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +118 -115
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +118 -115
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +0 -3
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +0 -3
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +2 -2
- package/resources/beta/sessions/sessions.d.ts +2 -2
- package/resources/beta/sessions/sessions.js +161 -158
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +161 -158
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.js +86 -83
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs +86 -83
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.js +104 -101
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +104 -101
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/tunnels/tunnels.js +188 -185
- package/resources/beta/tunnels/tunnels.js.map +1 -1
- package/resources/beta/tunnels/tunnels.mjs +188 -185
- package/resources/beta/tunnels/tunnels.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +45 -0
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +45 -0
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +25 -10
- package/resources/beta/user-profiles.js.map +1 -1
- package/resources/beta/user-profiles.mjs +25 -10
- package/resources/beta/user-profiles.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +0 -14
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +0 -14
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js +156 -153
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs +156 -153
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.ts +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/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 +100 -63
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +100 -63
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +115 -112
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +115 -112
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/skills.js +88 -85
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +88 -85
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/top-level.js +0 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -1
- package/resources/top-level.mjs.map +1 -1
- package/src/client.ts +13 -1
- package/src/internal/node.browser.ts +7 -7
- package/src/internal/utils/bytes.ts +1 -1
- package/src/resources/beta/beta.ts +24 -1
- package/src/resources/beta/dreams.ts +2 -28
- package/src/resources/beta/index.ts +11 -0
- package/src/resources/beta/messages/batches.ts +13 -1
- package/src/resources/beta/messages/index.ts +10 -0
- package/src/resources/beta/messages/messages.ts +288 -99
- package/src/resources/beta/models.ts +25 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +3 -3
- package/src/resources/beta/sessions/events.ts +12 -21
- package/src/resources/beta/sessions/resources.ts +0 -3
- package/src/resources/beta/sessions/sessions.ts +2 -2
- package/src/resources/beta/user-profiles.ts +75 -10
- package/src/resources/beta/vaults/credentials.ts +0 -14
- package/src/resources/completions.ts +1 -1
- package/src/resources/index.ts +6 -0
- package/src/resources/messages/index.ts +6 -0
- package/src/resources/messages/messages.ts +128 -62
- package/src/tsconfig.json +13 -3
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.js +0 -6
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +0 -6
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.js +4 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +2 -2
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/node.browser.js +12 -12
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.js +142 -139
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +132 -125
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.js +5 -5
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/sync-interval.js +3 -3
- package/tools/agent-toolset/sync-interval.js.map +1 -1
- package/tools/memory/node.browser.js +2 -2
- package/tools/memory/node.browser.js.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
|
@@ -1060,14 +1060,6 @@ export interface BetaBrowserStateBlockParam {
|
|
|
1060
1060
|
state_changes?: Array<BetaBrowserStateChange> | null;
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
/**
|
|
1064
|
-
* A tab this call's execution opened that remains open at its end — the creation
|
|
1065
|
-
* delta of the `tabs` inventory, not an event log.
|
|
1066
|
-
*
|
|
1067
|
-
* Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,
|
|
1068
|
-
* which must include the same `tab_id`. A tab opened during a failed call gets no
|
|
1069
|
-
* deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.
|
|
1070
|
-
*/
|
|
1071
1063
|
export type BetaBrowserStateChange =
|
|
1072
1064
|
| BetaBrowserStateChangeTabOpened
|
|
1073
1065
|
| BetaBrowserStateChangeDownloadStarted
|
|
@@ -2045,9 +2037,6 @@ export interface BetaCodeExecutionTool20260521 {
|
|
|
2045
2037
|
}
|
|
2046
2038
|
|
|
2047
2039
|
export interface BetaCodeExecutionToolResultBlock {
|
|
2048
|
-
/**
|
|
2049
|
-
* Code execution result with encrypted stdout for PFC + web_search results.
|
|
2050
|
-
*/
|
|
2051
2040
|
content: BetaCodeExecutionToolResultBlockContent;
|
|
2052
2041
|
|
|
2053
2042
|
tool_use_id: string;
|
|
@@ -2055,18 +2044,12 @@ export interface BetaCodeExecutionToolResultBlock {
|
|
|
2055
2044
|
type: 'code_execution_tool_result';
|
|
2056
2045
|
}
|
|
2057
2046
|
|
|
2058
|
-
/**
|
|
2059
|
-
* Code execution result with encrypted stdout for PFC + web_search results.
|
|
2060
|
-
*/
|
|
2061
2047
|
export type BetaCodeExecutionToolResultBlockContent =
|
|
2062
2048
|
| BetaCodeExecutionToolResultError
|
|
2063
2049
|
| BetaCodeExecutionResultBlock
|
|
2064
2050
|
| BetaEncryptedCodeExecutionResultBlock;
|
|
2065
2051
|
|
|
2066
2052
|
export interface BetaCodeExecutionToolResultBlockParam {
|
|
2067
|
-
/**
|
|
2068
|
-
* Code execution result with encrypted stdout for PFC + web_search results.
|
|
2069
|
-
*/
|
|
2070
2053
|
content: BetaCodeExecutionToolResultBlockParamContent;
|
|
2071
2054
|
|
|
2072
2055
|
tool_use_id: string;
|
|
@@ -2079,9 +2062,6 @@ export interface BetaCodeExecutionToolResultBlockParam {
|
|
|
2079
2062
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
2080
2063
|
}
|
|
2081
2064
|
|
|
2082
|
-
/**
|
|
2083
|
-
* Code execution result with encrypted stdout for PFC + web_search results.
|
|
2084
|
-
*/
|
|
2085
2065
|
export type BetaCodeExecutionToolResultBlockParamContent =
|
|
2086
2066
|
| BetaCodeExecutionToolResultErrorParam
|
|
2087
2067
|
| BetaCodeExecutionResultBlockParam
|
|
@@ -2147,6 +2127,11 @@ export interface BetaCompactionBlock {
|
|
|
2147
2127
|
encrypted_content: string | null;
|
|
2148
2128
|
|
|
2149
2129
|
type: 'compaction';
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* Signature over the summary, to be sent back with the block verbatim
|
|
2133
|
+
*/
|
|
2134
|
+
signature?: string | null;
|
|
2150
2135
|
}
|
|
2151
2136
|
|
|
2152
2137
|
/**
|
|
@@ -2175,6 +2160,31 @@ export interface BetaCompactionBlockParam {
|
|
|
2175
2160
|
* Opaque metadata from prior compaction, to be round-tripped verbatim
|
|
2176
2161
|
*/
|
|
2177
2162
|
encrypted_content?: string | null;
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* The block's signature as returned, to be sent back verbatim
|
|
2166
|
+
*/
|
|
2167
|
+
signature?: string | null;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Compact the whole conversation and return a signed `compaction` block, alone,
|
|
2172
|
+
* that a later request sends back first in `messages`, in place of the messages it
|
|
2173
|
+
* summarizes. There is no trigger and no pause flag: sending the parameter
|
|
2174
|
+
* compacts, and nothing is sampled after the block.
|
|
2175
|
+
*
|
|
2176
|
+
* The summarization prompt is the server's own unless `instructions` are given,
|
|
2177
|
+
* which then replace it for this request; a value that is empty or only whitespace
|
|
2178
|
+
* counts as absent.
|
|
2179
|
+
*/
|
|
2180
|
+
export interface BetaCompactionConfig {
|
|
2181
|
+
type: 'summarize';
|
|
2182
|
+
|
|
2183
|
+
/**
|
|
2184
|
+
* Replaces the server's default summarization prompt for this request. An empty or
|
|
2185
|
+
* whitespace-only value counts as absent.
|
|
2186
|
+
*/
|
|
2187
|
+
instructions?: string | null;
|
|
2178
2188
|
}
|
|
2179
2189
|
|
|
2180
2190
|
export interface BetaCompactionContentBlockDelta {
|
|
@@ -2729,9 +2739,6 @@ export interface BetaContainerUploadBlockParam {
|
|
|
2729
2739
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
2730
2740
|
}
|
|
2731
2741
|
|
|
2732
|
-
/**
|
|
2733
|
-
* Response model for a file uploaded to the container.
|
|
2734
|
-
*/
|
|
2735
2742
|
export type BetaContentBlock =
|
|
2736
2743
|
| BetaTextBlock
|
|
2737
2744
|
| BetaThinkingBlock
|
|
@@ -2751,9 +2758,6 @@ export type BetaContentBlock =
|
|
|
2751
2758
|
| BetaCompactionBlock
|
|
2752
2759
|
| BetaFallbackBlock;
|
|
2753
2760
|
|
|
2754
|
-
/**
|
|
2755
|
-
* Regular text content.
|
|
2756
|
-
*/
|
|
2757
2761
|
export type BetaContentBlockParam =
|
|
2758
2762
|
| BetaTextBlockParam
|
|
2759
2763
|
| BetaImageBlockParam
|
|
@@ -3084,10 +3088,11 @@ export interface BetaFallbackInfoParam {
|
|
|
3084
3088
|
/**
|
|
3085
3089
|
* Token usage for the fallback-model attempt of a server-side fallback request.
|
|
3086
3090
|
*
|
|
3087
|
-
*
|
|
3088
|
-
*
|
|
3089
|
-
*
|
|
3090
|
-
* `
|
|
3091
|
+
* The terminal entry of a fallback-served turn: when a fallback hop's output is
|
|
3092
|
+
* the returned message, the entry for the iteration that completed it carries this
|
|
3093
|
+
* type in place of `message`. A declined hop and the serving hop's earlier
|
|
3094
|
+
* tool-loop iterations produce `message` entries. Whether a fallback model served
|
|
3095
|
+
* the response is signalled by the presence of this entry in `usage.iterations`.
|
|
3091
3096
|
*/
|
|
3092
3097
|
export interface BetaFallbackMessageIterationUsage {
|
|
3093
3098
|
/**
|
|
@@ -3264,6 +3269,15 @@ export interface BetaInputTokensTrigger {
|
|
|
3264
3269
|
value: number;
|
|
3265
3270
|
}
|
|
3266
3271
|
|
|
3272
|
+
/**
|
|
3273
|
+
* One entry of `input_transformations`: either a change the API made to the
|
|
3274
|
+
* request's input before showing it to the model, or a block that failed a binding
|
|
3275
|
+
* check and was still shown to the model unchanged. The `type` field says which.
|
|
3276
|
+
*/
|
|
3277
|
+
export type BetaInputTransformation =
|
|
3278
|
+
| BetaThinkingDroppedInputTransformation
|
|
3279
|
+
| BetaThinkingMismatchAllowedInputTransformation;
|
|
3280
|
+
|
|
3267
3281
|
/**
|
|
3268
3282
|
* Per-iteration token usage breakdown.
|
|
3269
3283
|
*
|
|
@@ -3686,23 +3700,28 @@ export interface BetaMessage {
|
|
|
3686
3700
|
usage: BetaUsage;
|
|
3687
3701
|
|
|
3688
3702
|
/**
|
|
3689
|
-
* Changes the API made to the request's input before showing it to the model
|
|
3690
|
-
*
|
|
3691
|
-
* `thinking_dropped` — a `thinking`,
|
|
3692
|
-
* from the request's `messages` that
|
|
3693
|
-
*
|
|
3694
|
-
*
|
|
3703
|
+
* Changes the API made to the request's input before showing it to the model, and
|
|
3704
|
+
* blocks that failed a binding check but were left unchanged: one entry per block,
|
|
3705
|
+
* in request order. Two entry types today. `thinking_dropped` — a `thinking`,
|
|
3706
|
+
* `redacted_thinking` or `connector_text` block from the request's `messages` that
|
|
3707
|
+
* was removed from the prompt instead of being shown to the model because it
|
|
3708
|
+
* failed a binding check. `thinking_mismatch_allowed` — a `thinking` or
|
|
3709
|
+
* `redacted_thinking` block that failed the conversation check (the conversation
|
|
3710
|
+
* before it differs from the one it was created in, or it carries no record of one
|
|
3711
|
+
* on a model that requires it) and was shown to the model all the same, because
|
|
3712
|
+
* that check is not enforced for this request. More entry types may be added over
|
|
3713
|
+
* time; ignore types you do not recognize.
|
|
3695
3714
|
*
|
|
3696
3715
|
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3697
3716
|
* every such response from a model that supports extended thinking, as `[]` when
|
|
3698
|
-
*
|
|
3699
|
-
* nothing is reported. Removed blocks contribute nothing to
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
*
|
|
3703
|
-
* `message_start`.
|
|
3717
|
+
* there is no entry to report; without the beta, blocks are removed or left in
|
|
3718
|
+
* place all the same but nothing is reported. Removed blocks contribute nothing to
|
|
3719
|
+
* `usage.input_tokens`; blocks left in place count as sent. When streaming, the
|
|
3720
|
+
* array is final in `message_start`; the final `message_delta` event carries it
|
|
3721
|
+
* only when a server-side model fallback happened mid-stream, in which case it
|
|
3722
|
+
* holds the serving model's entries and replaces the one in `message_start`.
|
|
3704
3723
|
*/
|
|
3705
|
-
input_transformations?: Array<
|
|
3724
|
+
input_transformations?: Array<BetaInputTransformation> | null;
|
|
3706
3725
|
}
|
|
3707
3726
|
|
|
3708
3727
|
export interface BetaMessageDeltaUsage {
|
|
@@ -3803,7 +3822,7 @@ export interface BetaMessageIterationUsage {
|
|
|
3803
3822
|
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
3804
3823
|
* details and options.
|
|
3805
3824
|
*/
|
|
3806
|
-
model: MessagesAPI.Model;
|
|
3825
|
+
model: MessagesAPI.Model | null;
|
|
3807
3826
|
|
|
3808
3827
|
/**
|
|
3809
3828
|
* The number of output tokens which were used.
|
|
@@ -3922,9 +3941,6 @@ export interface BetaRawContentBlockDeltaEvent {
|
|
|
3922
3941
|
}
|
|
3923
3942
|
|
|
3924
3943
|
export interface BetaRawContentBlockStartEvent {
|
|
3925
|
-
/**
|
|
3926
|
-
* Response model for a file uploaded to the container.
|
|
3927
|
-
*/
|
|
3928
3944
|
content_block:
|
|
3929
3945
|
| BetaTextBlock
|
|
3930
3946
|
| BetaThinkingBlock
|
|
@@ -3985,23 +4001,28 @@ export interface BetaRawMessageDeltaEvent {
|
|
|
3985
4001
|
usage: BetaMessageDeltaUsage;
|
|
3986
4002
|
|
|
3987
4003
|
/**
|
|
3988
|
-
* Changes the API made to the request's input before showing it to the model
|
|
3989
|
-
*
|
|
3990
|
-
* `thinking_dropped` — a `thinking`,
|
|
3991
|
-
* from the request's `messages` that
|
|
3992
|
-
*
|
|
3993
|
-
*
|
|
4004
|
+
* Changes the API made to the request's input before showing it to the model, and
|
|
4005
|
+
* blocks that failed a binding check but were left unchanged: one entry per block,
|
|
4006
|
+
* in request order. Two entry types today. `thinking_dropped` — a `thinking`,
|
|
4007
|
+
* `redacted_thinking` or `connector_text` block from the request's `messages` that
|
|
4008
|
+
* was removed from the prompt instead of being shown to the model because it
|
|
4009
|
+
* failed a binding check. `thinking_mismatch_allowed` — a `thinking` or
|
|
4010
|
+
* `redacted_thinking` block that failed the conversation check (the conversation
|
|
4011
|
+
* before it differs from the one it was created in, or it carries no record of one
|
|
4012
|
+
* on a model that requires it) and was shown to the model all the same, because
|
|
4013
|
+
* that check is not enforced for this request. More entry types may be added over
|
|
4014
|
+
* time; ignore types you do not recognize.
|
|
3994
4015
|
*
|
|
3995
4016
|
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3996
4017
|
* every such response from a model that supports extended thinking, as `[]` when
|
|
3997
|
-
*
|
|
3998
|
-
* nothing is reported. Removed blocks contribute nothing to
|
|
3999
|
-
*
|
|
4000
|
-
*
|
|
4001
|
-
*
|
|
4002
|
-
* `message_start`.
|
|
4018
|
+
* there is no entry to report; without the beta, blocks are removed or left in
|
|
4019
|
+
* place all the same but nothing is reported. Removed blocks contribute nothing to
|
|
4020
|
+
* `usage.input_tokens`; blocks left in place count as sent. When streaming, the
|
|
4021
|
+
* array is final in `message_start`; the final `message_delta` event carries it
|
|
4022
|
+
* only when a server-side model fallback happened mid-stream, in which case it
|
|
4023
|
+
* holds the serving model's entries and replaces the one in `message_start`.
|
|
4003
4024
|
*/
|
|
4004
|
-
input_transformations?: Array<
|
|
4025
|
+
input_transformations?: Array<BetaInputTransformation> | null;
|
|
4005
4026
|
}
|
|
4006
4027
|
|
|
4007
4028
|
export namespace BetaRawMessageDeltaEvent {
|
|
@@ -4219,11 +4240,6 @@ export interface BetaRequestMCPToolResultBlockParam {
|
|
|
4219
4240
|
* is offered to the model from this point in the conversation onward.
|
|
4220
4241
|
*/
|
|
4221
4242
|
export interface BetaRequestToolAdditionBlock {
|
|
4222
|
-
/**
|
|
4223
|
-
* Reference to a single tool the caller declared directly in `tools[]`. Does not
|
|
4224
|
-
* accept the composed `{server}_{name}` form the server assigns to MCP-resolved
|
|
4225
|
-
* tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
|
|
4226
|
-
*/
|
|
4227
4243
|
tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;
|
|
4228
4244
|
|
|
4229
4245
|
type: 'tool_addition';
|
|
@@ -4241,11 +4257,6 @@ export interface BetaRequestToolAdditionBlock {
|
|
|
4241
4257
|
* is no longer offered to the model from this point in the conversation onward.
|
|
4242
4258
|
*/
|
|
4243
4259
|
export interface BetaRequestToolRemovalBlock {
|
|
4244
|
-
/**
|
|
4245
|
-
* Reference to a single tool the caller declared directly in `tools[]`. Does not
|
|
4246
|
-
* accept the composed `{server}_{name}` form the server assigns to MCP-resolved
|
|
4247
|
-
* tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
|
|
4248
|
-
*/
|
|
4249
4260
|
tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;
|
|
4250
4261
|
|
|
4251
4262
|
type: 'tool_removal';
|
|
@@ -4317,9 +4328,6 @@ export interface BetaServerToolUseBlock {
|
|
|
4317
4328
|
|
|
4318
4329
|
type: 'server_tool_use';
|
|
4319
4330
|
|
|
4320
|
-
/**
|
|
4321
|
-
* Tool invocation directly from the model.
|
|
4322
|
-
*/
|
|
4323
4331
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
4324
4332
|
}
|
|
4325
4333
|
|
|
@@ -4345,9 +4353,6 @@ export interface BetaServerToolUseBlockParam {
|
|
|
4345
4353
|
*/
|
|
4346
4354
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
4347
4355
|
|
|
4348
|
-
/**
|
|
4349
|
-
* Tool invocation directly from the model.
|
|
4350
|
-
*/
|
|
4351
4356
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
4352
4357
|
}
|
|
4353
4358
|
|
|
@@ -4392,6 +4397,26 @@ export type BetaStopReason =
|
|
|
4392
4397
|
| 'refusal'
|
|
4393
4398
|
| 'model_context_window_exceeded';
|
|
4394
4399
|
|
|
4400
|
+
/**
|
|
4401
|
+
* Compact the whole conversation and return a signed `compaction` block, alone,
|
|
4402
|
+
* that a later request sends back first in `messages`, in place of the messages it
|
|
4403
|
+
* summarizes. There is no trigger and no pause flag: sending the parameter
|
|
4404
|
+
* compacts, and nothing is sampled after the block.
|
|
4405
|
+
*
|
|
4406
|
+
* The summarization prompt is the server's own unless `instructions` are given,
|
|
4407
|
+
* which then replace it for this request; a value that is empty or only whitespace
|
|
4408
|
+
* counts as absent.
|
|
4409
|
+
*/
|
|
4410
|
+
export interface BetaSummarizeCompaction {
|
|
4411
|
+
type: 'summarize';
|
|
4412
|
+
|
|
4413
|
+
/**
|
|
4414
|
+
* Replaces the server's default summarization prompt for this request. An empty or
|
|
4415
|
+
* whitespace-only value counts as absent.
|
|
4416
|
+
*/
|
|
4417
|
+
instructions?: string | null;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4395
4420
|
/**
|
|
4396
4421
|
* Per-message output configuration on a role:"system" input message.
|
|
4397
4422
|
*
|
|
@@ -4763,6 +4788,37 @@ export interface BetaThinkingDroppedInputTransformation {
|
|
|
4763
4788
|
type: 'thinking_dropped';
|
|
4764
4789
|
}
|
|
4765
4790
|
|
|
4791
|
+
export interface BetaThinkingMismatchAllowedInputTransformation {
|
|
4792
|
+
/**
|
|
4793
|
+
* Where the block is in your request, as `messages.{i}.content.{j}`: `i` indexes
|
|
4794
|
+
* the `messages` array you sent and `j` that message's `content` array — the same
|
|
4795
|
+
* form error messages use.
|
|
4796
|
+
*/
|
|
4797
|
+
path: string;
|
|
4798
|
+
|
|
4799
|
+
/**
|
|
4800
|
+
* Which binding check the block failed; the block was shown to the model all the
|
|
4801
|
+
* same. Always `prefix_binding_mismatch` today — the conversation before the block
|
|
4802
|
+
* differs from the conversation it was created in, or the block carries no record
|
|
4803
|
+
* of one on a model that requires it. Were the check enforced for this request,
|
|
4804
|
+
* the block would have been removed or the request rejected
|
|
4805
|
+
* (`thinking.block_binding.prefix_mismatch_behavior`). A removal also takes the
|
|
4806
|
+
* rest of that turn's consecutive thinking blocks, whereas here each block is
|
|
4807
|
+
* checked on its own, so `thinking_mismatch_allowed` entries are a lower bound on
|
|
4808
|
+
* what enforcement would remove.
|
|
4809
|
+
*/
|
|
4810
|
+
reason:
|
|
4811
|
+
| 'model_binding_mismatch'
|
|
4812
|
+
| 'prefix_binding_mismatch'
|
|
4813
|
+
| 'organization_binding_mismatch'
|
|
4814
|
+
| 'end_user_binding_mismatch';
|
|
4815
|
+
|
|
4816
|
+
/**
|
|
4817
|
+
* Always `thinking_mismatch_allowed` for this entry type.
|
|
4818
|
+
*/
|
|
4819
|
+
type: 'thinking_mismatch_allowed';
|
|
4820
|
+
}
|
|
4821
|
+
|
|
4766
4822
|
/**
|
|
4767
4823
|
* What happens when a thinking block in `messages` fails the conversation check:
|
|
4768
4824
|
* it was created in a different conversation, or the messages before it have
|
|
@@ -5487,10 +5543,6 @@ export interface BetaToolTextEditor20250728 {
|
|
|
5487
5543
|
strict?: boolean;
|
|
5488
5544
|
}
|
|
5489
5545
|
|
|
5490
|
-
/**
|
|
5491
|
-
* Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
5492
|
-
* checkpoint).
|
|
5493
|
-
*/
|
|
5494
5546
|
export type BetaToolUnion =
|
|
5495
5547
|
| BetaTool
|
|
5496
5548
|
| BetaToolBash20241022
|
|
@@ -5530,9 +5582,6 @@ export interface BetaToolUseBlock {
|
|
|
5530
5582
|
|
|
5531
5583
|
type: 'tool_use';
|
|
5532
5584
|
|
|
5533
|
-
/**
|
|
5534
|
-
* Tool invocation directly from the model.
|
|
5535
|
-
*/
|
|
5536
5585
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
5537
5586
|
|
|
5538
5587
|
/**
|
|
@@ -5555,9 +5604,6 @@ export interface BetaToolUseBlockParam {
|
|
|
5555
5604
|
*/
|
|
5556
5605
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
5557
5606
|
|
|
5558
|
-
/**
|
|
5559
|
-
* Tool invocation directly from the model.
|
|
5560
|
-
*/
|
|
5561
5607
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
5562
5608
|
|
|
5563
5609
|
/**
|
|
@@ -5794,6 +5840,16 @@ export interface BetaWebFetchTool20250910 {
|
|
|
5794
5840
|
* When true, guarantees schema validation on tool names and inputs
|
|
5795
5841
|
*/
|
|
5796
5842
|
strict?: boolean;
|
|
5843
|
+
|
|
5844
|
+
/**
|
|
5845
|
+
* Which sources contribute to the set of URLs web fetch may fetch.
|
|
5846
|
+
*
|
|
5847
|
+
* Each key is a tagged variant: `user_input` is `all` or `none`; the two tool
|
|
5848
|
+
* filters are `all`, `none`, `only` (only the named tools' results) or `except`
|
|
5849
|
+
* (every result but the named tools'). A named tool must be declared in this
|
|
5850
|
+
* request's `tools[]`.
|
|
5851
|
+
*/
|
|
5852
|
+
url_sources?: BetaWebFetchURLSources | null;
|
|
5797
5853
|
}
|
|
5798
5854
|
|
|
5799
5855
|
export interface BetaWebFetchTool20260209 {
|
|
@@ -5852,6 +5908,16 @@ export interface BetaWebFetchTool20260209 {
|
|
|
5852
5908
|
* When true, guarantees schema validation on tool names and inputs
|
|
5853
5909
|
*/
|
|
5854
5910
|
strict?: boolean;
|
|
5911
|
+
|
|
5912
|
+
/**
|
|
5913
|
+
* Which sources contribute to the set of URLs web fetch may fetch.
|
|
5914
|
+
*
|
|
5915
|
+
* Each key is a tagged variant: `user_input` is `all` or `none`; the two tool
|
|
5916
|
+
* filters are `all`, `none`, `only` (only the named tools' results) or `except`
|
|
5917
|
+
* (every result but the named tools'). A named tool must be declared in this
|
|
5918
|
+
* request's `tools[]`.
|
|
5919
|
+
*/
|
|
5920
|
+
url_sources?: BetaWebFetchURLSources | null;
|
|
5855
5921
|
}
|
|
5856
5922
|
|
|
5857
5923
|
/**
|
|
@@ -5914,6 +5980,16 @@ export interface BetaWebFetchTool20260309 {
|
|
|
5914
5980
|
*/
|
|
5915
5981
|
strict?: boolean;
|
|
5916
5982
|
|
|
5983
|
+
/**
|
|
5984
|
+
* Which sources contribute to the set of URLs web fetch may fetch.
|
|
5985
|
+
*
|
|
5986
|
+
* Each key is a tagged variant: `user_input` is `all` or `none`; the two tool
|
|
5987
|
+
* filters are `all`, `none`, `only` (only the named tools' results) or `except`
|
|
5988
|
+
* (every result but the named tools'). A named tool must be declared in this
|
|
5989
|
+
* request's `tools[]`.
|
|
5990
|
+
*/
|
|
5991
|
+
url_sources?: BetaWebFetchURLSources | null;
|
|
5992
|
+
|
|
5917
5993
|
/**
|
|
5918
5994
|
* Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
5919
5995
|
* content. Only set to false when the user explicitly requests fresh content or
|
|
@@ -5989,6 +6065,16 @@ export interface BetaWebFetchTool20260318 {
|
|
|
5989
6065
|
*/
|
|
5990
6066
|
strict?: boolean;
|
|
5991
6067
|
|
|
6068
|
+
/**
|
|
6069
|
+
* Which sources contribute to the set of URLs web fetch may fetch.
|
|
6070
|
+
*
|
|
6071
|
+
* Each key is a tagged variant: `user_input` is `all` or `none`; the two tool
|
|
6072
|
+
* filters are `all`, `none`, `only` (only the named tools' results) or `except`
|
|
6073
|
+
* (every result but the named tools'). A named tool must be declared in this
|
|
6074
|
+
* request's `tools[]`.
|
|
6075
|
+
*/
|
|
6076
|
+
url_sources?: BetaWebFetchURLSources | null;
|
|
6077
|
+
|
|
5992
6078
|
/**
|
|
5993
6079
|
* Whether to use cached content. Set to false to bypass the cache and fetch fresh
|
|
5994
6080
|
* content. Only set to false when the user explicitly requests fresh content or
|
|
@@ -6004,9 +6090,6 @@ export interface BetaWebFetchToolResultBlock {
|
|
|
6004
6090
|
|
|
6005
6091
|
type: 'web_fetch_tool_result';
|
|
6006
6092
|
|
|
6007
|
-
/**
|
|
6008
|
-
* Tool invocation directly from the model.
|
|
6009
|
-
*/
|
|
6010
6093
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
6011
6094
|
}
|
|
6012
6095
|
|
|
@@ -6022,9 +6105,6 @@ export interface BetaWebFetchToolResultBlockParam {
|
|
|
6022
6105
|
*/
|
|
6023
6106
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
6024
6107
|
|
|
6025
|
-
/**
|
|
6026
|
-
* Tool invocation directly from the model.
|
|
6027
|
-
*/
|
|
6028
6108
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
6029
6109
|
}
|
|
6030
6110
|
|
|
@@ -6052,6 +6132,87 @@ export type BetaWebFetchToolResultErrorCode =
|
|
|
6052
6132
|
| 'unavailable'
|
|
6053
6133
|
| 'content_too_large';
|
|
6054
6134
|
|
|
6135
|
+
/**
|
|
6136
|
+
* The `url_sources` variant under which a source contributes in full: every result
|
|
6137
|
+
* of the tool filter's source, or all user input.
|
|
6138
|
+
*/
|
|
6139
|
+
export interface BetaWebFetchURLSourceAll {
|
|
6140
|
+
type: 'all';
|
|
6141
|
+
}
|
|
6142
|
+
|
|
6143
|
+
/**
|
|
6144
|
+
* The tool filter variant under which every result but the named tools'
|
|
6145
|
+
* contributes.
|
|
6146
|
+
*/
|
|
6147
|
+
export interface BetaWebFetchURLSourceExcept {
|
|
6148
|
+
tools: Array<BetaWebFetchURLSourceToolReference>;
|
|
6149
|
+
|
|
6150
|
+
type: 'except';
|
|
6151
|
+
}
|
|
6152
|
+
|
|
6153
|
+
/**
|
|
6154
|
+
* The `url_sources` variant under which a source contributes nothing: no result of
|
|
6155
|
+
* the tool filter's source, or no user input.
|
|
6156
|
+
*/
|
|
6157
|
+
export interface BetaWebFetchURLSourceNone {
|
|
6158
|
+
type: 'none';
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
/**
|
|
6162
|
+
* The tool filter variant under which only the named tools' results contribute.
|
|
6163
|
+
*/
|
|
6164
|
+
export interface BetaWebFetchURLSourceOnly {
|
|
6165
|
+
tools: Array<BetaWebFetchURLSourceToolReference>;
|
|
6166
|
+
|
|
6167
|
+
type: 'only';
|
|
6168
|
+
}
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* One entry of a tool filter's `tools`: it must name a tool declared in this
|
|
6172
|
+
* request's `tools[]`.
|
|
6173
|
+
*/
|
|
6174
|
+
export interface BetaWebFetchURLSourceToolReference {
|
|
6175
|
+
name: string;
|
|
6176
|
+
|
|
6177
|
+
type: 'tool_reference';
|
|
6178
|
+
}
|
|
6179
|
+
|
|
6180
|
+
/**
|
|
6181
|
+
* Which sources contribute to the set of URLs web fetch may fetch.
|
|
6182
|
+
*
|
|
6183
|
+
* Each key is a tagged variant: `user_input` is `all` or `none`; the two tool
|
|
6184
|
+
* filters are `all`, `none`, `only` (only the named tools' results) or `except`
|
|
6185
|
+
* (every result but the named tools'). A named tool must be declared in this
|
|
6186
|
+
* request's `tools[]`.
|
|
6187
|
+
*/
|
|
6188
|
+
export interface BetaWebFetchURLSources {
|
|
6189
|
+
/**
|
|
6190
|
+
* Which client tools' results contribute fetchable URLs: "all", "none", or an only
|
|
6191
|
+
* or except list of client tool names from tools[].
|
|
6192
|
+
*/
|
|
6193
|
+
client_tool_results?:
|
|
6194
|
+
| BetaWebFetchURLSourceAll
|
|
6195
|
+
| BetaWebFetchURLSourceNone
|
|
6196
|
+
| BetaWebFetchURLSourceOnly
|
|
6197
|
+
| BetaWebFetchURLSourceExcept;
|
|
6198
|
+
|
|
6199
|
+
/**
|
|
6200
|
+
* Which server tools' results contribute fetchable URLs: "all", "none", or an only
|
|
6201
|
+
* or except list of server tool names from tools[]; only web_search and web_fetch
|
|
6202
|
+
* results ever contribute.
|
|
6203
|
+
*/
|
|
6204
|
+
server_tool_results?:
|
|
6205
|
+
| BetaWebFetchURLSourceAll
|
|
6206
|
+
| BetaWebFetchURLSourceNone
|
|
6207
|
+
| BetaWebFetchURLSourceOnly
|
|
6208
|
+
| BetaWebFetchURLSourceExcept;
|
|
6209
|
+
|
|
6210
|
+
/**
|
|
6211
|
+
* Whether URLs in user messages are fetchable: "all" or "none".
|
|
6212
|
+
*/
|
|
6213
|
+
user_input?: BetaWebFetchURLSourceAll | BetaWebFetchURLSourceNone;
|
|
6214
|
+
}
|
|
6215
|
+
|
|
6055
6216
|
export interface BetaWebSearchResultBlock {
|
|
6056
6217
|
encrypted_content: string;
|
|
6057
6218
|
|
|
@@ -6261,9 +6422,6 @@ export interface BetaWebSearchToolResultBlock {
|
|
|
6261
6422
|
|
|
6262
6423
|
type: 'web_search_tool_result';
|
|
6263
6424
|
|
|
6264
|
-
/**
|
|
6265
|
-
* Tool invocation directly from the model.
|
|
6266
|
-
*/
|
|
6267
6425
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
6268
6426
|
}
|
|
6269
6427
|
|
|
@@ -6283,9 +6441,6 @@ export interface BetaWebSearchToolResultBlockParam {
|
|
|
6283
6441
|
*/
|
|
6284
6442
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
6285
6443
|
|
|
6286
|
-
/**
|
|
6287
|
-
* Tool invocation directly from the model.
|
|
6288
|
-
*/
|
|
6289
6444
|
caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;
|
|
6290
6445
|
}
|
|
6291
6446
|
|
|
@@ -6415,6 +6570,18 @@ export interface MessageCreateParamsBase {
|
|
|
6415
6570
|
*/
|
|
6416
6571
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
6417
6572
|
|
|
6573
|
+
/**
|
|
6574
|
+
* Body param: Compact the whole conversation and return a signed `compaction`
|
|
6575
|
+
* block, alone, that a later request sends back first in `messages`, in place of
|
|
6576
|
+
* the messages it summarizes. There is no trigger and no pause flag: sending the
|
|
6577
|
+
* parameter compacts, and nothing is sampled after the block.
|
|
6578
|
+
*
|
|
6579
|
+
* The summarization prompt is the server's own unless `instructions` are given,
|
|
6580
|
+
* which then replace it for this request; a value that is empty or only whitespace
|
|
6581
|
+
* counts as absent.
|
|
6582
|
+
*/
|
|
6583
|
+
compaction?: BetaCompactionConfig | null;
|
|
6584
|
+
|
|
6418
6585
|
/**
|
|
6419
6586
|
* Body param: Container identifier for reuse across requests.
|
|
6420
6587
|
*/
|
|
@@ -6546,7 +6713,7 @@ export interface MessageCreateParamsBase {
|
|
|
6546
6713
|
|
|
6547
6714
|
/**
|
|
6548
6715
|
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
6549
|
-
* setting temperature. A value of 1.0
|
|
6716
|
+
* setting temperature. A value of 1.0 will be accepted for backwards
|
|
6550
6717
|
* compatibility, all other values will be rejected with a 400 error.
|
|
6551
6718
|
*/
|
|
6552
6719
|
temperature?: number;
|
|
@@ -6799,6 +6966,18 @@ export interface MessageCountTokensParams {
|
|
|
6799
6966
|
*/
|
|
6800
6967
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
6801
6968
|
|
|
6969
|
+
/**
|
|
6970
|
+
* Body param: Compact the whole conversation and return a signed `compaction`
|
|
6971
|
+
* block, alone, that a later request sends back first in `messages`, in place of
|
|
6972
|
+
* the messages it summarizes. There is no trigger and no pause flag: sending the
|
|
6973
|
+
* parameter compacts, and nothing is sampled after the block.
|
|
6974
|
+
*
|
|
6975
|
+
* The summarization prompt is the server's own unless `instructions` are given,
|
|
6976
|
+
* which then replace it for this request; a value that is empty or only whitespace
|
|
6977
|
+
* counts as absent.
|
|
6978
|
+
*/
|
|
6979
|
+
compaction?: BetaCompactionConfig | null;
|
|
6980
|
+
|
|
6802
6981
|
/**
|
|
6803
6982
|
* Body param: Context management configuration.
|
|
6804
6983
|
*
|
|
@@ -7109,6 +7288,7 @@ export declare namespace Messages {
|
|
|
7109
7288
|
type BetaCompact20260112Edit as BetaCompact20260112Edit,
|
|
7110
7289
|
type BetaCompactionBlock as BetaCompactionBlock,
|
|
7111
7290
|
type BetaCompactionBlockParam as BetaCompactionBlockParam,
|
|
7291
|
+
type BetaCompactionConfig as BetaCompactionConfig,
|
|
7112
7292
|
type BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta,
|
|
7113
7293
|
type BetaCompactionIterationUsage as BetaCompactionIterationUsage,
|
|
7114
7294
|
type BetaComputerCursorPositionConfig as BetaComputerCursorPositionConfig,
|
|
@@ -7167,6 +7347,7 @@ export declare namespace Messages {
|
|
|
7167
7347
|
type BetaInputJSONDelta as BetaInputJSONDelta,
|
|
7168
7348
|
type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast,
|
|
7169
7349
|
type BetaInputTokensTrigger as BetaInputTokensTrigger,
|
|
7350
|
+
type BetaInputTransformation as BetaInputTransformation,
|
|
7170
7351
|
type BetaIterationsUsage as BetaIterationsUsage,
|
|
7171
7352
|
type BetaJSONOutputFormat as BetaJSONOutputFormat,
|
|
7172
7353
|
type BetaMCPToolConfig as BetaMCPToolConfig,
|
|
@@ -7218,6 +7399,7 @@ export declare namespace Messages {
|
|
|
7218
7399
|
type BetaSignatureDelta as BetaSignatureDelta,
|
|
7219
7400
|
type BetaSkillParams as BetaSkillParams,
|
|
7220
7401
|
type BetaStopReason as BetaStopReason,
|
|
7402
|
+
type BetaSummarizeCompaction as BetaSummarizeCompaction,
|
|
7221
7403
|
type BetaSystemMessageOutputConfig as BetaSystemMessageOutputConfig,
|
|
7222
7404
|
type BetaTextBlock as BetaTextBlock,
|
|
7223
7405
|
type BetaTextBlockParam as BetaTextBlockParam,
|
|
@@ -7243,6 +7425,7 @@ export declare namespace Messages {
|
|
|
7243
7425
|
type BetaThinkingConfigParam as BetaThinkingConfigParam,
|
|
7244
7426
|
type BetaThinkingDelta as BetaThinkingDelta,
|
|
7245
7427
|
type BetaThinkingDroppedInputTransformation as BetaThinkingDroppedInputTransformation,
|
|
7428
|
+
type BetaThinkingMismatchAllowedInputTransformation as BetaThinkingMismatchAllowedInputTransformation,
|
|
7246
7429
|
type BetaThinkingPrefixMismatchBehavior as BetaThinkingPrefixMismatchBehavior,
|
|
7247
7430
|
type BetaThinkingTurns as BetaThinkingTurns,
|
|
7248
7431
|
type BetaTokenTaskBudget as BetaTokenTaskBudget,
|
|
@@ -7296,6 +7479,12 @@ export declare namespace Messages {
|
|
|
7296
7479
|
type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock,
|
|
7297
7480
|
type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam,
|
|
7298
7481
|
type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode,
|
|
7482
|
+
type BetaWebFetchURLSourceAll as BetaWebFetchURLSourceAll,
|
|
7483
|
+
type BetaWebFetchURLSourceExcept as BetaWebFetchURLSourceExcept,
|
|
7484
|
+
type BetaWebFetchURLSourceNone as BetaWebFetchURLSourceNone,
|
|
7485
|
+
type BetaWebFetchURLSourceOnly as BetaWebFetchURLSourceOnly,
|
|
7486
|
+
type BetaWebFetchURLSourceToolReference as BetaWebFetchURLSourceToolReference,
|
|
7487
|
+
type BetaWebFetchURLSources as BetaWebFetchURLSources,
|
|
7299
7488
|
type BetaWebSearchResultBlock as BetaWebSearchResultBlock,
|
|
7300
7489
|
type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam,
|
|
7301
7490
|
type BetaWebSearchTool20250305 as BetaWebSearchTool20250305,
|