@ai-sdk/anthropic 3.0.0-beta.29 → 3.0.0-beta.30

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/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  } from "@ai-sdk/provider-utils";
11
11
 
12
12
  // src/version.ts
13
- var VERSION = true ? "3.0.0-beta.29" : "0.0.0-test";
13
+ var VERSION = true ? "3.0.0-beta.30" : "0.0.0-test";
14
14
 
15
15
  // src/anthropic-messages-language-model.ts
16
16
  import {
@@ -584,7 +584,22 @@ var anthropicProviderOptions = z3.object({
584
584
  allowedTools: z3.array(z3.string()).nullish()
585
585
  }).nullish()
586
586
  })
587
- ).optional()
587
+ ).optional(),
588
+ /**
589
+ * Agent Skills configuration. Skills enable Claude to perform specialized tasks
590
+ * like document processing (PPTX, DOCX, PDF, XLSX) and data analysis.
591
+ * Requires code execution tool to be enabled.
592
+ */
593
+ container: z3.object({
594
+ id: z3.string().optional(),
595
+ skills: z3.array(
596
+ z3.object({
597
+ type: z3.union([z3.literal("anthropic"), z3.literal("custom")]),
598
+ skillId: z3.string(),
599
+ version: z3.string().optional()
600
+ })
601
+ ).optional()
602
+ }).optional()
588
603
  });
589
604
 
590
605
  // src/anthropic-prepare-tools.ts
@@ -1766,7 +1781,7 @@ var AnthropicMessagesLanguageModel = class {
1766
1781
  toolChoice,
1767
1782
  providerOptions
1768
1783
  }) {
1769
- var _a, _b, _c;
1784
+ var _a, _b, _c, _d;
1770
1785
  const warnings = [];
1771
1786
  if (frequencyPenalty != null) {
1772
1787
  warnings.push({
@@ -1847,6 +1862,17 @@ var AnthropicMessagesLanguageModel = class {
1847
1862
  } : void 0
1848
1863
  }))
1849
1864
  },
1865
+ // container with agent skills:
1866
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.container) && {
1867
+ container: {
1868
+ id: anthropicOptions.container.id,
1869
+ skills: (_d = anthropicOptions.container.skills) == null ? void 0 : _d.map((skill) => ({
1870
+ type: skill.type,
1871
+ skill_id: skill.skillId,
1872
+ version: skill.version
1873
+ }))
1874
+ }
1875
+ },
1850
1876
  // prompt:
1851
1877
  system: messagesPrompt.system,
1852
1878
  messages: messagesPrompt.messages
@@ -1896,6 +1922,19 @@ var AnthropicMessagesLanguageModel = class {
1896
1922
  if ((anthropicOptions == null ? void 0 : anthropicOptions.mcpServers) && anthropicOptions.mcpServers.length > 0) {
1897
1923
  betas.add("mcp-client-2025-04-04");
1898
1924
  }
1925
+ if ((anthropicOptions == null ? void 0 : anthropicOptions.container) && anthropicOptions.container.skills && anthropicOptions.container.skills.length > 0) {
1926
+ betas.add("code-execution-2025-08-25");
1927
+ betas.add("skills-2025-10-02");
1928
+ betas.add("files-api-2025-04-14");
1929
+ if (!(tools == null ? void 0 : tools.some(
1930
+ (tool) => tool.type === "provider-defined" && tool.id === "anthropic.code_execution_20250825"
1931
+ ))) {
1932
+ warnings.push({
1933
+ type: "other",
1934
+ message: "code execution tool is required when using skills"
1935
+ });
1936
+ }
1937
+ }
1899
1938
  const {
1900
1939
  tools: anthropicTools2,
1901
1940
  toolChoice: anthropicToolChoice,