@ai-sdk/anthropic 2.0.3 → 2.0.5

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.
@@ -170,6 +170,24 @@ declare const anthropicTools: {
170
170
  encryptedContent: string;
171
171
  type: string;
172
172
  }[]>;
173
+ /**
174
+ * Creates a tool for executing Python code. Must have name "code_execution".
175
+ */
176
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
177
+ code: string;
178
+ }, {
179
+ type: "code_execution_result";
180
+ stdout: string;
181
+ stderr: string;
182
+ return_code: number;
183
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
184
+ code: string;
185
+ }, {
186
+ type: "code_execution_result";
187
+ stdout: string;
188
+ stderr: string;
189
+ return_code: number;
190
+ }>;
173
191
  };
174
192
 
175
193
  type AnthropicCacheControl = {
@@ -205,6 +223,9 @@ type AnthropicTool = {
205
223
  country?: string;
206
224
  timezone?: string;
207
225
  };
226
+ } | {
227
+ type: 'code_execution_20250522';
228
+ name: string;
208
229
  };
209
230
  type AnthropicToolChoice = {
210
231
  type: 'auto' | 'any';
@@ -170,6 +170,24 @@ declare const anthropicTools: {
170
170
  encryptedContent: string;
171
171
  type: string;
172
172
  }[]>;
173
+ /**
174
+ * Creates a tool for executing Python code. Must have name "code_execution".
175
+ */
176
+ codeExecution_20250522: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
177
+ code: string;
178
+ }, {
179
+ type: "code_execution_result";
180
+ stdout: string;
181
+ stderr: string;
182
+ return_code: number;
183
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
184
+ code: string;
185
+ }, {
186
+ type: "code_execution_result";
187
+ stdout: string;
188
+ stderr: string;
189
+ return_code: number;
190
+ }>;
173
191
  };
174
192
 
175
193
  type AnthropicCacheControl = {
@@ -205,6 +223,9 @@ type AnthropicTool = {
205
223
  country?: string;
206
224
  timezone?: string;
207
225
  };
226
+ } | {
227
+ type: 'code_execution_20250522';
228
+ name: string;
208
229
  };
209
230
  type AnthropicToolChoice = {
210
231
  type: 'auto' | 'any';