@ai-sdk/anthropic 4.0.53 → 4.0.55
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 +22 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +657 -484
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +109 -2
- package/dist/internal/index.js +608 -435
- package/dist/internal/index.js.map +1 -1
- package/docs/05-anthropic.mdx +42 -7
- package/package.json +3 -3
- package/src/anthropic-api.ts +8 -2
- package/src/anthropic-language-model.ts +14 -12
- package/src/anthropic-prepare-tools.ts +38 -0
- package/src/anthropic-tools.ts +26 -0
- package/src/convert-to-anthropic-prompt.ts +8 -7
- package/src/tool/web-fetch-20260318.ts +159 -0
- package/src/tool/web-search_20260318.ts +143 -0
package/dist/index.js
CHANGED
|
@@ -1405,14 +1405,14 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
1405
1405
|
return factory2(args);
|
|
1406
1406
|
};
|
|
1407
1407
|
|
|
1408
|
-
// src/tool/web-
|
|
1408
|
+
// src/tool/web-search_20260318.ts
|
|
1409
1409
|
import {
|
|
1410
1410
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory2,
|
|
1411
1411
|
lazySchema as lazySchema6,
|
|
1412
1412
|
zodSchema as zodSchema6
|
|
1413
1413
|
} from "@ai-sdk/provider-utils";
|
|
1414
1414
|
import { z as z7 } from "zod/v4";
|
|
1415
|
-
var
|
|
1415
|
+
var webSearch_20260318ArgsSchema = lazySchema6(
|
|
1416
1416
|
() => zodSchema6(
|
|
1417
1417
|
z7.object({
|
|
1418
1418
|
maxUses: z7.number().optional(),
|
|
@@ -1424,11 +1424,12 @@ var webSearch_20260209ArgsSchema = lazySchema6(
|
|
|
1424
1424
|
region: z7.string().optional(),
|
|
1425
1425
|
country: z7.string().optional(),
|
|
1426
1426
|
timezone: z7.string().optional()
|
|
1427
|
-
}).optional()
|
|
1427
|
+
}).optional(),
|
|
1428
|
+
responseInclusion: z7.enum(["full", "excluded"]).optional()
|
|
1428
1429
|
})
|
|
1429
1430
|
)
|
|
1430
1431
|
);
|
|
1431
|
-
var
|
|
1432
|
+
var webSearch_20260318OutputSchema = lazySchema6(
|
|
1432
1433
|
() => zodSchema6(
|
|
1433
1434
|
z7.array(
|
|
1434
1435
|
z7.object({
|
|
@@ -1441,7 +1442,7 @@ var webSearch_20260209OutputSchema = lazySchema6(
|
|
|
1441
1442
|
)
|
|
1442
1443
|
)
|
|
1443
1444
|
);
|
|
1444
|
-
var
|
|
1445
|
+
var webSearch_20260318InputSchema = lazySchema6(
|
|
1445
1446
|
() => zodSchema6(
|
|
1446
1447
|
z7.object({
|
|
1447
1448
|
query: z7.string()
|
|
@@ -1449,23 +1450,23 @@ var webSearch_20260209InputSchema = lazySchema6(
|
|
|
1449
1450
|
)
|
|
1450
1451
|
);
|
|
1451
1452
|
var factory3 = createProviderExecutedToolFactory2({
|
|
1452
|
-
id: "anthropic.
|
|
1453
|
-
inputSchema:
|
|
1454
|
-
outputSchema:
|
|
1453
|
+
id: "anthropic.web_search_20260318",
|
|
1454
|
+
inputSchema: webSearch_20260318InputSchema,
|
|
1455
|
+
outputSchema: webSearch_20260318OutputSchema,
|
|
1455
1456
|
supportsDeferredResults: true
|
|
1456
1457
|
});
|
|
1457
|
-
var
|
|
1458
|
+
var webSearch_20260318 = (args = {}) => {
|
|
1458
1459
|
return factory3(args);
|
|
1459
1460
|
};
|
|
1460
1461
|
|
|
1461
|
-
// src/tool/web-
|
|
1462
|
+
// src/tool/web-search_20260209.ts
|
|
1462
1463
|
import {
|
|
1463
1464
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory3,
|
|
1464
1465
|
lazySchema as lazySchema7,
|
|
1465
1466
|
zodSchema as zodSchema7
|
|
1466
1467
|
} from "@ai-sdk/provider-utils";
|
|
1467
1468
|
import { z as z8 } from "zod/v4";
|
|
1468
|
-
var
|
|
1469
|
+
var webSearch_20260209ArgsSchema = lazySchema7(
|
|
1469
1470
|
() => zodSchema7(
|
|
1470
1471
|
z8.object({
|
|
1471
1472
|
maxUses: z8.number().optional(),
|
|
@@ -1481,7 +1482,7 @@ var webSearch_20250305ArgsSchema = lazySchema7(
|
|
|
1481
1482
|
})
|
|
1482
1483
|
)
|
|
1483
1484
|
);
|
|
1484
|
-
var
|
|
1485
|
+
var webSearch_20260209OutputSchema = lazySchema7(
|
|
1485
1486
|
() => zodSchema7(
|
|
1486
1487
|
z8.array(
|
|
1487
1488
|
z8.object({
|
|
@@ -1494,7 +1495,7 @@ var webSearch_20250305OutputSchema = lazySchema7(
|
|
|
1494
1495
|
)
|
|
1495
1496
|
)
|
|
1496
1497
|
);
|
|
1497
|
-
var
|
|
1498
|
+
var webSearch_20260209InputSchema = lazySchema7(
|
|
1498
1499
|
() => zodSchema7(
|
|
1499
1500
|
z8.object({
|
|
1500
1501
|
query: z8.string()
|
|
@@ -1502,95 +1503,89 @@ var webSearch_20250305InputSchema = lazySchema7(
|
|
|
1502
1503
|
)
|
|
1503
1504
|
);
|
|
1504
1505
|
var factory4 = createProviderExecutedToolFactory3({
|
|
1505
|
-
id: "anthropic.
|
|
1506
|
-
inputSchema:
|
|
1507
|
-
outputSchema:
|
|
1506
|
+
id: "anthropic.web_search_20260209",
|
|
1507
|
+
inputSchema: webSearch_20260209InputSchema,
|
|
1508
|
+
outputSchema: webSearch_20260209OutputSchema,
|
|
1508
1509
|
supportsDeferredResults: true
|
|
1509
1510
|
});
|
|
1510
|
-
var
|
|
1511
|
+
var webSearch_20260209 = (args = {}) => {
|
|
1511
1512
|
return factory4(args);
|
|
1512
1513
|
};
|
|
1513
1514
|
|
|
1514
|
-
// src/tool/web-
|
|
1515
|
+
// src/tool/web-search_20250305.ts
|
|
1515
1516
|
import {
|
|
1516
1517
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory4,
|
|
1517
1518
|
lazySchema as lazySchema8,
|
|
1518
1519
|
zodSchema as zodSchema8
|
|
1519
1520
|
} from "@ai-sdk/provider-utils";
|
|
1520
1521
|
import { z as z9 } from "zod/v4";
|
|
1521
|
-
var
|
|
1522
|
+
var webSearch_20250305ArgsSchema = lazySchema8(
|
|
1522
1523
|
() => zodSchema8(
|
|
1523
1524
|
z9.object({
|
|
1524
1525
|
maxUses: z9.number().optional(),
|
|
1525
1526
|
allowedDomains: z9.array(z9.string()).optional(),
|
|
1526
1527
|
blockedDomains: z9.array(z9.string()).optional(),
|
|
1527
|
-
|
|
1528
|
-
|
|
1528
|
+
userLocation: z9.object({
|
|
1529
|
+
type: z9.literal("approximate"),
|
|
1530
|
+
city: z9.string().optional(),
|
|
1531
|
+
region: z9.string().optional(),
|
|
1532
|
+
country: z9.string().optional(),
|
|
1533
|
+
timezone: z9.string().optional()
|
|
1534
|
+
}).optional()
|
|
1529
1535
|
})
|
|
1530
1536
|
)
|
|
1531
1537
|
);
|
|
1532
|
-
var
|
|
1538
|
+
var webSearch_20250305OutputSchema = lazySchema8(
|
|
1533
1539
|
() => zodSchema8(
|
|
1534
|
-
z9.
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
content: z9.object({
|
|
1538
|
-
type: z9.literal("document"),
|
|
1540
|
+
z9.array(
|
|
1541
|
+
z9.object({
|
|
1542
|
+
url: z9.string(),
|
|
1539
1543
|
title: z9.string().nullable(),
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
data: z9.string()
|
|
1546
|
-
}),
|
|
1547
|
-
z9.object({
|
|
1548
|
-
type: z9.literal("text"),
|
|
1549
|
-
mediaType: z9.literal("text/plain"),
|
|
1550
|
-
data: z9.string()
|
|
1551
|
-
})
|
|
1552
|
-
])
|
|
1553
|
-
}),
|
|
1554
|
-
retrievedAt: z9.string().nullable()
|
|
1555
|
-
})
|
|
1544
|
+
pageAge: z9.string().nullable(),
|
|
1545
|
+
encryptedContent: z9.string(),
|
|
1546
|
+
type: z9.literal("web_search_result")
|
|
1547
|
+
})
|
|
1548
|
+
)
|
|
1556
1549
|
)
|
|
1557
1550
|
);
|
|
1558
|
-
var
|
|
1551
|
+
var webSearch_20250305InputSchema = lazySchema8(
|
|
1559
1552
|
() => zodSchema8(
|
|
1560
1553
|
z9.object({
|
|
1561
|
-
|
|
1554
|
+
query: z9.string()
|
|
1562
1555
|
})
|
|
1563
1556
|
)
|
|
1564
1557
|
);
|
|
1565
1558
|
var factory5 = createProviderExecutedToolFactory4({
|
|
1566
|
-
id: "anthropic.
|
|
1567
|
-
inputSchema:
|
|
1568
|
-
outputSchema:
|
|
1559
|
+
id: "anthropic.web_search_20250305",
|
|
1560
|
+
inputSchema: webSearch_20250305InputSchema,
|
|
1561
|
+
outputSchema: webSearch_20250305OutputSchema,
|
|
1569
1562
|
supportsDeferredResults: true
|
|
1570
1563
|
});
|
|
1571
|
-
var
|
|
1564
|
+
var webSearch_20250305 = (args = {}) => {
|
|
1572
1565
|
return factory5(args);
|
|
1573
1566
|
};
|
|
1574
1567
|
|
|
1575
|
-
// src/tool/web-fetch-
|
|
1568
|
+
// src/tool/web-fetch-20260318.ts
|
|
1576
1569
|
import {
|
|
1577
1570
|
createProviderExecutedToolFactory as createProviderExecutedToolFactory5,
|
|
1578
1571
|
lazySchema as lazySchema9,
|
|
1579
1572
|
zodSchema as zodSchema9
|
|
1580
1573
|
} from "@ai-sdk/provider-utils";
|
|
1581
1574
|
import { z as z10 } from "zod/v4";
|
|
1582
|
-
var
|
|
1575
|
+
var webFetch_20260318ArgsSchema = lazySchema9(
|
|
1583
1576
|
() => zodSchema9(
|
|
1584
1577
|
z10.object({
|
|
1585
1578
|
maxUses: z10.number().optional(),
|
|
1586
1579
|
allowedDomains: z10.array(z10.string()).optional(),
|
|
1587
1580
|
blockedDomains: z10.array(z10.string()).optional(),
|
|
1588
1581
|
citations: z10.object({ enabled: z10.boolean() }).optional(),
|
|
1589
|
-
maxContentTokens: z10.number().optional()
|
|
1582
|
+
maxContentTokens: z10.number().optional(),
|
|
1583
|
+
useCache: z10.boolean().optional(),
|
|
1584
|
+
responseInclusion: z10.enum(["full", "excluded"]).optional()
|
|
1590
1585
|
})
|
|
1591
1586
|
)
|
|
1592
1587
|
);
|
|
1593
|
-
var
|
|
1588
|
+
var webFetch_20260318OutputSchema = lazySchema9(
|
|
1594
1589
|
() => zodSchema9(
|
|
1595
1590
|
z10.object({
|
|
1596
1591
|
type: z10.literal("web_fetch_result"),
|
|
@@ -1616,7 +1611,7 @@ var webFetch_20250910OutputSchema = lazySchema9(
|
|
|
1616
1611
|
})
|
|
1617
1612
|
)
|
|
1618
1613
|
);
|
|
1619
|
-
var
|
|
1614
|
+
var webFetch_20260318InputSchema = lazySchema9(
|
|
1620
1615
|
() => zodSchema9(
|
|
1621
1616
|
z10.object({
|
|
1622
1617
|
url: z10.string()
|
|
@@ -1624,13 +1619,135 @@ var webFetch_20250910InputSchema = lazySchema9(
|
|
|
1624
1619
|
)
|
|
1625
1620
|
);
|
|
1626
1621
|
var factory6 = createProviderExecutedToolFactory5({
|
|
1622
|
+
id: "anthropic.web_fetch_20260318",
|
|
1623
|
+
inputSchema: webFetch_20260318InputSchema,
|
|
1624
|
+
outputSchema: webFetch_20260318OutputSchema,
|
|
1625
|
+
supportsDeferredResults: true
|
|
1626
|
+
});
|
|
1627
|
+
var webFetch_20260318 = (args = {}) => {
|
|
1628
|
+
return factory6(args);
|
|
1629
|
+
};
|
|
1630
|
+
|
|
1631
|
+
// src/tool/web-fetch-20260209.ts
|
|
1632
|
+
import {
|
|
1633
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory6,
|
|
1634
|
+
lazySchema as lazySchema10,
|
|
1635
|
+
zodSchema as zodSchema10
|
|
1636
|
+
} from "@ai-sdk/provider-utils";
|
|
1637
|
+
import { z as z11 } from "zod/v4";
|
|
1638
|
+
var webFetch_20260209ArgsSchema = lazySchema10(
|
|
1639
|
+
() => zodSchema10(
|
|
1640
|
+
z11.object({
|
|
1641
|
+
maxUses: z11.number().optional(),
|
|
1642
|
+
allowedDomains: z11.array(z11.string()).optional(),
|
|
1643
|
+
blockedDomains: z11.array(z11.string()).optional(),
|
|
1644
|
+
citations: z11.object({ enabled: z11.boolean() }).optional(),
|
|
1645
|
+
maxContentTokens: z11.number().optional()
|
|
1646
|
+
})
|
|
1647
|
+
)
|
|
1648
|
+
);
|
|
1649
|
+
var webFetch_20260209OutputSchema = lazySchema10(
|
|
1650
|
+
() => zodSchema10(
|
|
1651
|
+
z11.object({
|
|
1652
|
+
type: z11.literal("web_fetch_result"),
|
|
1653
|
+
url: z11.string(),
|
|
1654
|
+
content: z11.object({
|
|
1655
|
+
type: z11.literal("document"),
|
|
1656
|
+
title: z11.string().nullable(),
|
|
1657
|
+
citations: z11.object({ enabled: z11.boolean() }).optional(),
|
|
1658
|
+
source: z11.union([
|
|
1659
|
+
z11.object({
|
|
1660
|
+
type: z11.literal("base64"),
|
|
1661
|
+
mediaType: z11.literal("application/pdf"),
|
|
1662
|
+
data: z11.string()
|
|
1663
|
+
}),
|
|
1664
|
+
z11.object({
|
|
1665
|
+
type: z11.literal("text"),
|
|
1666
|
+
mediaType: z11.literal("text/plain"),
|
|
1667
|
+
data: z11.string()
|
|
1668
|
+
})
|
|
1669
|
+
])
|
|
1670
|
+
}),
|
|
1671
|
+
retrievedAt: z11.string().nullable()
|
|
1672
|
+
})
|
|
1673
|
+
)
|
|
1674
|
+
);
|
|
1675
|
+
var webFetch_20260209InputSchema = lazySchema10(
|
|
1676
|
+
() => zodSchema10(
|
|
1677
|
+
z11.object({
|
|
1678
|
+
url: z11.string()
|
|
1679
|
+
})
|
|
1680
|
+
)
|
|
1681
|
+
);
|
|
1682
|
+
var factory7 = createProviderExecutedToolFactory6({
|
|
1683
|
+
id: "anthropic.web_fetch_20260209",
|
|
1684
|
+
inputSchema: webFetch_20260209InputSchema,
|
|
1685
|
+
outputSchema: webFetch_20260209OutputSchema,
|
|
1686
|
+
supportsDeferredResults: true
|
|
1687
|
+
});
|
|
1688
|
+
var webFetch_20260209 = (args = {}) => {
|
|
1689
|
+
return factory7(args);
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
// src/tool/web-fetch-20250910.ts
|
|
1693
|
+
import {
|
|
1694
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory7,
|
|
1695
|
+
lazySchema as lazySchema11,
|
|
1696
|
+
zodSchema as zodSchema11
|
|
1697
|
+
} from "@ai-sdk/provider-utils";
|
|
1698
|
+
import { z as z12 } from "zod/v4";
|
|
1699
|
+
var webFetch_20250910ArgsSchema = lazySchema11(
|
|
1700
|
+
() => zodSchema11(
|
|
1701
|
+
z12.object({
|
|
1702
|
+
maxUses: z12.number().optional(),
|
|
1703
|
+
allowedDomains: z12.array(z12.string()).optional(),
|
|
1704
|
+
blockedDomains: z12.array(z12.string()).optional(),
|
|
1705
|
+
citations: z12.object({ enabled: z12.boolean() }).optional(),
|
|
1706
|
+
maxContentTokens: z12.number().optional()
|
|
1707
|
+
})
|
|
1708
|
+
)
|
|
1709
|
+
);
|
|
1710
|
+
var webFetch_20250910OutputSchema = lazySchema11(
|
|
1711
|
+
() => zodSchema11(
|
|
1712
|
+
z12.object({
|
|
1713
|
+
type: z12.literal("web_fetch_result"),
|
|
1714
|
+
url: z12.string(),
|
|
1715
|
+
content: z12.object({
|
|
1716
|
+
type: z12.literal("document"),
|
|
1717
|
+
title: z12.string().nullable(),
|
|
1718
|
+
citations: z12.object({ enabled: z12.boolean() }).optional(),
|
|
1719
|
+
source: z12.union([
|
|
1720
|
+
z12.object({
|
|
1721
|
+
type: z12.literal("base64"),
|
|
1722
|
+
mediaType: z12.literal("application/pdf"),
|
|
1723
|
+
data: z12.string()
|
|
1724
|
+
}),
|
|
1725
|
+
z12.object({
|
|
1726
|
+
type: z12.literal("text"),
|
|
1727
|
+
mediaType: z12.literal("text/plain"),
|
|
1728
|
+
data: z12.string()
|
|
1729
|
+
})
|
|
1730
|
+
])
|
|
1731
|
+
}),
|
|
1732
|
+
retrievedAt: z12.string().nullable()
|
|
1733
|
+
})
|
|
1734
|
+
)
|
|
1735
|
+
);
|
|
1736
|
+
var webFetch_20250910InputSchema = lazySchema11(
|
|
1737
|
+
() => zodSchema11(
|
|
1738
|
+
z12.object({
|
|
1739
|
+
url: z12.string()
|
|
1740
|
+
})
|
|
1741
|
+
)
|
|
1742
|
+
);
|
|
1743
|
+
var factory8 = createProviderExecutedToolFactory7({
|
|
1627
1744
|
id: "anthropic.web_fetch_20250910",
|
|
1628
1745
|
inputSchema: webFetch_20250910InputSchema,
|
|
1629
1746
|
outputSchema: webFetch_20250910OutputSchema,
|
|
1630
1747
|
supportsDeferredResults: true
|
|
1631
1748
|
});
|
|
1632
1749
|
var webFetch_20250910 = (args = {}) => {
|
|
1633
|
-
return
|
|
1750
|
+
return factory8(args);
|
|
1634
1751
|
};
|
|
1635
1752
|
|
|
1636
1753
|
// src/anthropic-prepare-tools.ts
|
|
@@ -1859,6 +1976,25 @@ async function prepareTools({
|
|
|
1859
1976
|
});
|
|
1860
1977
|
break;
|
|
1861
1978
|
}
|
|
1979
|
+
case "anthropic.web_fetch_20260318": {
|
|
1980
|
+
const args = await validateTypes({
|
|
1981
|
+
value: tool.args,
|
|
1982
|
+
schema: webFetch_20260318ArgsSchema
|
|
1983
|
+
});
|
|
1984
|
+
anthropicTools2.push({
|
|
1985
|
+
type: "web_fetch_20260318",
|
|
1986
|
+
name: "web_fetch",
|
|
1987
|
+
max_uses: args.maxUses,
|
|
1988
|
+
allowed_domains: args.allowedDomains,
|
|
1989
|
+
blocked_domains: args.blockedDomains,
|
|
1990
|
+
citations: args.citations,
|
|
1991
|
+
max_content_tokens: args.maxContentTokens,
|
|
1992
|
+
use_cache: args.useCache,
|
|
1993
|
+
response_inclusion: args.responseInclusion,
|
|
1994
|
+
cache_control: void 0
|
|
1995
|
+
});
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1862
1998
|
case "anthropic.web_search_20250305": {
|
|
1863
1999
|
const args = await validateTypes({
|
|
1864
2000
|
value: tool.args,
|
|
@@ -1892,6 +2028,23 @@ async function prepareTools({
|
|
|
1892
2028
|
});
|
|
1893
2029
|
break;
|
|
1894
2030
|
}
|
|
2031
|
+
case "anthropic.web_search_20260318": {
|
|
2032
|
+
const args = await validateTypes({
|
|
2033
|
+
value: tool.args,
|
|
2034
|
+
schema: webSearch_20260318ArgsSchema
|
|
2035
|
+
});
|
|
2036
|
+
anthropicTools2.push({
|
|
2037
|
+
type: "web_search_20260318",
|
|
2038
|
+
name: "web_search",
|
|
2039
|
+
max_uses: args.maxUses,
|
|
2040
|
+
allowed_domains: args.allowedDomains,
|
|
2041
|
+
blocked_domains: args.blockedDomains,
|
|
2042
|
+
user_location: args.userLocation,
|
|
2043
|
+
response_inclusion: args.responseInclusion,
|
|
2044
|
+
cache_control: void 0
|
|
2045
|
+
});
|
|
2046
|
+
break;
|
|
2047
|
+
}
|
|
1895
2048
|
case "anthropic.tool_search_regex_20251119": {
|
|
1896
2049
|
anthropicTools2.push({
|
|
1897
2050
|
type: "tool_search_tool_regex_20251119",
|
|
@@ -2065,145 +2218,145 @@ import {
|
|
|
2065
2218
|
|
|
2066
2219
|
// src/tool/code-execution_20250522.ts
|
|
2067
2220
|
import {
|
|
2068
|
-
createProviderExecutedToolFactory as
|
|
2069
|
-
lazySchema as
|
|
2070
|
-
zodSchema as
|
|
2221
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory8,
|
|
2222
|
+
lazySchema as lazySchema12,
|
|
2223
|
+
zodSchema as zodSchema12
|
|
2071
2224
|
} from "@ai-sdk/provider-utils";
|
|
2072
|
-
import { z as
|
|
2073
|
-
var codeExecution_20250522OutputSchema =
|
|
2074
|
-
() =>
|
|
2075
|
-
|
|
2076
|
-
type:
|
|
2077
|
-
stdout:
|
|
2078
|
-
stderr:
|
|
2079
|
-
return_code:
|
|
2080
|
-
content:
|
|
2081
|
-
|
|
2082
|
-
type:
|
|
2083
|
-
file_id:
|
|
2225
|
+
import { z as z13 } from "zod/v4";
|
|
2226
|
+
var codeExecution_20250522OutputSchema = lazySchema12(
|
|
2227
|
+
() => zodSchema12(
|
|
2228
|
+
z13.object({
|
|
2229
|
+
type: z13.literal("code_execution_result"),
|
|
2230
|
+
stdout: z13.string(),
|
|
2231
|
+
stderr: z13.string(),
|
|
2232
|
+
return_code: z13.number(),
|
|
2233
|
+
content: z13.array(
|
|
2234
|
+
z13.object({
|
|
2235
|
+
type: z13.literal("code_execution_output"),
|
|
2236
|
+
file_id: z13.string()
|
|
2084
2237
|
})
|
|
2085
2238
|
).optional().default([])
|
|
2086
2239
|
})
|
|
2087
2240
|
)
|
|
2088
2241
|
);
|
|
2089
|
-
var codeExecution_20250522InputSchema =
|
|
2090
|
-
() =>
|
|
2091
|
-
|
|
2092
|
-
code:
|
|
2242
|
+
var codeExecution_20250522InputSchema = lazySchema12(
|
|
2243
|
+
() => zodSchema12(
|
|
2244
|
+
z13.object({
|
|
2245
|
+
code: z13.string()
|
|
2093
2246
|
})
|
|
2094
2247
|
)
|
|
2095
2248
|
);
|
|
2096
|
-
var
|
|
2249
|
+
var factory9 = createProviderExecutedToolFactory8({
|
|
2097
2250
|
id: "anthropic.code_execution_20250522",
|
|
2098
2251
|
inputSchema: codeExecution_20250522InputSchema,
|
|
2099
2252
|
outputSchema: codeExecution_20250522OutputSchema
|
|
2100
2253
|
});
|
|
2101
2254
|
var codeExecution_20250522 = (args = {}) => {
|
|
2102
|
-
return
|
|
2255
|
+
return factory9(args);
|
|
2103
2256
|
};
|
|
2104
2257
|
|
|
2105
2258
|
// src/tool/code-execution_20250825.ts
|
|
2106
2259
|
import {
|
|
2107
|
-
createProviderExecutedToolFactory as
|
|
2260
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory9,
|
|
2108
2261
|
experimental_toolCaller,
|
|
2109
|
-
lazySchema as
|
|
2110
|
-
zodSchema as
|
|
2262
|
+
lazySchema as lazySchema13,
|
|
2263
|
+
zodSchema as zodSchema13
|
|
2111
2264
|
} from "@ai-sdk/provider-utils";
|
|
2112
|
-
import { z as
|
|
2113
|
-
var codeExecution_20250825OutputSchema =
|
|
2114
|
-
() =>
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
type:
|
|
2118
|
-
stdout:
|
|
2119
|
-
stderr:
|
|
2120
|
-
return_code:
|
|
2121
|
-
content:
|
|
2122
|
-
|
|
2123
|
-
type:
|
|
2124
|
-
file_id:
|
|
2265
|
+
import { z as z14 } from "zod/v4";
|
|
2266
|
+
var codeExecution_20250825OutputSchema = lazySchema13(
|
|
2267
|
+
() => zodSchema13(
|
|
2268
|
+
z14.discriminatedUnion("type", [
|
|
2269
|
+
z14.object({
|
|
2270
|
+
type: z14.literal("code_execution_result"),
|
|
2271
|
+
stdout: z14.string(),
|
|
2272
|
+
stderr: z14.string(),
|
|
2273
|
+
return_code: z14.number(),
|
|
2274
|
+
content: z14.array(
|
|
2275
|
+
z14.object({
|
|
2276
|
+
type: z14.literal("code_execution_output"),
|
|
2277
|
+
file_id: z14.string()
|
|
2125
2278
|
})
|
|
2126
2279
|
).optional().default([])
|
|
2127
2280
|
}),
|
|
2128
|
-
|
|
2129
|
-
type:
|
|
2130
|
-
content:
|
|
2131
|
-
|
|
2132
|
-
type:
|
|
2133
|
-
file_id:
|
|
2281
|
+
z14.object({
|
|
2282
|
+
type: z14.literal("bash_code_execution_result"),
|
|
2283
|
+
content: z14.array(
|
|
2284
|
+
z14.object({
|
|
2285
|
+
type: z14.literal("bash_code_execution_output"),
|
|
2286
|
+
file_id: z14.string()
|
|
2134
2287
|
})
|
|
2135
2288
|
),
|
|
2136
|
-
stdout:
|
|
2137
|
-
stderr:
|
|
2138
|
-
return_code:
|
|
2289
|
+
stdout: z14.string(),
|
|
2290
|
+
stderr: z14.string(),
|
|
2291
|
+
return_code: z14.number()
|
|
2139
2292
|
}),
|
|
2140
|
-
|
|
2141
|
-
type:
|
|
2142
|
-
error_code:
|
|
2293
|
+
z14.object({
|
|
2294
|
+
type: z14.literal("bash_code_execution_tool_result_error"),
|
|
2295
|
+
error_code: z14.string()
|
|
2143
2296
|
}),
|
|
2144
|
-
|
|
2145
|
-
type:
|
|
2146
|
-
error_code:
|
|
2297
|
+
z14.object({
|
|
2298
|
+
type: z14.literal("text_editor_code_execution_tool_result_error"),
|
|
2299
|
+
error_code: z14.string()
|
|
2147
2300
|
}),
|
|
2148
|
-
|
|
2149
|
-
type:
|
|
2150
|
-
content:
|
|
2151
|
-
file_type:
|
|
2152
|
-
num_lines:
|
|
2153
|
-
start_line:
|
|
2154
|
-
total_lines:
|
|
2301
|
+
z14.object({
|
|
2302
|
+
type: z14.literal("text_editor_code_execution_view_result"),
|
|
2303
|
+
content: z14.string(),
|
|
2304
|
+
file_type: z14.string(),
|
|
2305
|
+
num_lines: z14.number().nullable(),
|
|
2306
|
+
start_line: z14.number().nullable(),
|
|
2307
|
+
total_lines: z14.number().nullable()
|
|
2155
2308
|
}),
|
|
2156
|
-
|
|
2157
|
-
type:
|
|
2158
|
-
is_file_update:
|
|
2309
|
+
z14.object({
|
|
2310
|
+
type: z14.literal("text_editor_code_execution_create_result"),
|
|
2311
|
+
is_file_update: z14.boolean()
|
|
2159
2312
|
}),
|
|
2160
|
-
|
|
2161
|
-
type:
|
|
2162
|
-
lines:
|
|
2163
|
-
new_lines:
|
|
2164
|
-
new_start:
|
|
2165
|
-
old_lines:
|
|
2166
|
-
old_start:
|
|
2313
|
+
z14.object({
|
|
2314
|
+
type: z14.literal("text_editor_code_execution_str_replace_result"),
|
|
2315
|
+
lines: z14.array(z14.string()).nullable(),
|
|
2316
|
+
new_lines: z14.number().nullable(),
|
|
2317
|
+
new_start: z14.number().nullable(),
|
|
2318
|
+
old_lines: z14.number().nullable(),
|
|
2319
|
+
old_start: z14.number().nullable()
|
|
2167
2320
|
})
|
|
2168
2321
|
])
|
|
2169
2322
|
)
|
|
2170
2323
|
);
|
|
2171
|
-
var codeExecution_20250825InputSchema =
|
|
2172
|
-
() =>
|
|
2173
|
-
|
|
2324
|
+
var codeExecution_20250825InputSchema = lazySchema13(
|
|
2325
|
+
() => zodSchema13(
|
|
2326
|
+
z14.discriminatedUnion("type", [
|
|
2174
2327
|
// Programmatic tool calling format (mapped from { code } by AI SDK)
|
|
2175
|
-
|
|
2176
|
-
type:
|
|
2177
|
-
code:
|
|
2328
|
+
z14.object({
|
|
2329
|
+
type: z14.literal("programmatic-tool-call"),
|
|
2330
|
+
code: z14.string()
|
|
2178
2331
|
}),
|
|
2179
|
-
|
|
2180
|
-
type:
|
|
2181
|
-
command:
|
|
2332
|
+
z14.object({
|
|
2333
|
+
type: z14.literal("bash_code_execution"),
|
|
2334
|
+
command: z14.string()
|
|
2182
2335
|
}),
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
type:
|
|
2186
|
-
command:
|
|
2187
|
-
path:
|
|
2336
|
+
z14.discriminatedUnion("command", [
|
|
2337
|
+
z14.object({
|
|
2338
|
+
type: z14.literal("text_editor_code_execution"),
|
|
2339
|
+
command: z14.literal("view"),
|
|
2340
|
+
path: z14.string()
|
|
2188
2341
|
}),
|
|
2189
|
-
|
|
2190
|
-
type:
|
|
2191
|
-
command:
|
|
2192
|
-
path:
|
|
2193
|
-
file_text:
|
|
2342
|
+
z14.object({
|
|
2343
|
+
type: z14.literal("text_editor_code_execution"),
|
|
2344
|
+
command: z14.literal("create"),
|
|
2345
|
+
path: z14.string(),
|
|
2346
|
+
file_text: z14.string().nullish()
|
|
2194
2347
|
}),
|
|
2195
|
-
|
|
2196
|
-
type:
|
|
2197
|
-
command:
|
|
2198
|
-
path:
|
|
2199
|
-
old_str:
|
|
2200
|
-
new_str:
|
|
2348
|
+
z14.object({
|
|
2349
|
+
type: z14.literal("text_editor_code_execution"),
|
|
2350
|
+
command: z14.literal("str_replace"),
|
|
2351
|
+
path: z14.string(),
|
|
2352
|
+
old_str: z14.string(),
|
|
2353
|
+
new_str: z14.string()
|
|
2201
2354
|
})
|
|
2202
2355
|
])
|
|
2203
2356
|
])
|
|
2204
2357
|
)
|
|
2205
2358
|
);
|
|
2206
|
-
var
|
|
2359
|
+
var factory10 = createProviderExecutedToolFactory9({
|
|
2207
2360
|
id: "anthropic.code_execution_20250825",
|
|
2208
2361
|
inputSchema: codeExecution_20250825InputSchema,
|
|
2209
2362
|
outputSchema: codeExecution_20250825OutputSchema,
|
|
@@ -2213,7 +2366,7 @@ var factory8 = createProviderExecutedToolFactory7({
|
|
|
2213
2366
|
supportsDeferredResults: true
|
|
2214
2367
|
});
|
|
2215
2368
|
var codeExecution_20250825 = (args = {}) => {
|
|
2216
|
-
return experimental_toolCaller(
|
|
2369
|
+
return experimental_toolCaller(factory10(args), {
|
|
2217
2370
|
type: "provider",
|
|
2218
2371
|
prepareProviderOptions: (providerOptions) => {
|
|
2219
2372
|
var _a;
|
|
@@ -2236,124 +2389,124 @@ var codeExecution_20250825 = (args = {}) => {
|
|
|
2236
2389
|
|
|
2237
2390
|
// src/tool/code-execution_20260120.ts
|
|
2238
2391
|
import {
|
|
2239
|
-
createProviderExecutedToolFactory as
|
|
2392
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory10,
|
|
2240
2393
|
experimental_toolCaller as experimental_toolCaller2,
|
|
2241
|
-
lazySchema as
|
|
2242
|
-
zodSchema as
|
|
2394
|
+
lazySchema as lazySchema14,
|
|
2395
|
+
zodSchema as zodSchema14
|
|
2243
2396
|
} from "@ai-sdk/provider-utils";
|
|
2244
|
-
import { z as
|
|
2245
|
-
var codeExecution_20260120OutputSchema =
|
|
2246
|
-
() =>
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
type:
|
|
2250
|
-
stdout:
|
|
2251
|
-
stderr:
|
|
2252
|
-
return_code:
|
|
2253
|
-
content:
|
|
2254
|
-
|
|
2255
|
-
type:
|
|
2256
|
-
file_id:
|
|
2397
|
+
import { z as z15 } from "zod/v4";
|
|
2398
|
+
var codeExecution_20260120OutputSchema = lazySchema14(
|
|
2399
|
+
() => zodSchema14(
|
|
2400
|
+
z15.discriminatedUnion("type", [
|
|
2401
|
+
z15.object({
|
|
2402
|
+
type: z15.literal("code_execution_result"),
|
|
2403
|
+
stdout: z15.string(),
|
|
2404
|
+
stderr: z15.string(),
|
|
2405
|
+
return_code: z15.number(),
|
|
2406
|
+
content: z15.array(
|
|
2407
|
+
z15.object({
|
|
2408
|
+
type: z15.literal("code_execution_output"),
|
|
2409
|
+
file_id: z15.string()
|
|
2257
2410
|
})
|
|
2258
2411
|
).optional().default([])
|
|
2259
2412
|
}),
|
|
2260
|
-
|
|
2261
|
-
type:
|
|
2262
|
-
encrypted_stdout:
|
|
2263
|
-
stderr:
|
|
2264
|
-
return_code:
|
|
2265
|
-
content:
|
|
2266
|
-
|
|
2267
|
-
type:
|
|
2268
|
-
file_id:
|
|
2413
|
+
z15.object({
|
|
2414
|
+
type: z15.literal("encrypted_code_execution_result"),
|
|
2415
|
+
encrypted_stdout: z15.string(),
|
|
2416
|
+
stderr: z15.string(),
|
|
2417
|
+
return_code: z15.number(),
|
|
2418
|
+
content: z15.array(
|
|
2419
|
+
z15.object({
|
|
2420
|
+
type: z15.literal("code_execution_output"),
|
|
2421
|
+
file_id: z15.string()
|
|
2269
2422
|
})
|
|
2270
2423
|
).optional().default([])
|
|
2271
2424
|
}),
|
|
2272
|
-
|
|
2273
|
-
type:
|
|
2274
|
-
content:
|
|
2275
|
-
|
|
2276
|
-
type:
|
|
2277
|
-
file_id:
|
|
2425
|
+
z15.object({
|
|
2426
|
+
type: z15.literal("bash_code_execution_result"),
|
|
2427
|
+
content: z15.array(
|
|
2428
|
+
z15.object({
|
|
2429
|
+
type: z15.literal("bash_code_execution_output"),
|
|
2430
|
+
file_id: z15.string()
|
|
2278
2431
|
})
|
|
2279
2432
|
),
|
|
2280
|
-
stdout:
|
|
2281
|
-
stderr:
|
|
2282
|
-
return_code:
|
|
2433
|
+
stdout: z15.string(),
|
|
2434
|
+
stderr: z15.string(),
|
|
2435
|
+
return_code: z15.number()
|
|
2283
2436
|
}),
|
|
2284
|
-
|
|
2285
|
-
type:
|
|
2286
|
-
error_code:
|
|
2437
|
+
z15.object({
|
|
2438
|
+
type: z15.literal("bash_code_execution_tool_result_error"),
|
|
2439
|
+
error_code: z15.string()
|
|
2287
2440
|
}),
|
|
2288
|
-
|
|
2289
|
-
type:
|
|
2290
|
-
error_code:
|
|
2441
|
+
z15.object({
|
|
2442
|
+
type: z15.literal("text_editor_code_execution_tool_result_error"),
|
|
2443
|
+
error_code: z15.string()
|
|
2291
2444
|
}),
|
|
2292
|
-
|
|
2293
|
-
type:
|
|
2294
|
-
content:
|
|
2295
|
-
file_type:
|
|
2296
|
-
num_lines:
|
|
2297
|
-
start_line:
|
|
2298
|
-
total_lines:
|
|
2445
|
+
z15.object({
|
|
2446
|
+
type: z15.literal("text_editor_code_execution_view_result"),
|
|
2447
|
+
content: z15.string(),
|
|
2448
|
+
file_type: z15.string(),
|
|
2449
|
+
num_lines: z15.number().nullable(),
|
|
2450
|
+
start_line: z15.number().nullable(),
|
|
2451
|
+
total_lines: z15.number().nullable()
|
|
2299
2452
|
}),
|
|
2300
|
-
|
|
2301
|
-
type:
|
|
2302
|
-
is_file_update:
|
|
2453
|
+
z15.object({
|
|
2454
|
+
type: z15.literal("text_editor_code_execution_create_result"),
|
|
2455
|
+
is_file_update: z15.boolean()
|
|
2303
2456
|
}),
|
|
2304
|
-
|
|
2305
|
-
type:
|
|
2306
|
-
lines:
|
|
2307
|
-
new_lines:
|
|
2308
|
-
new_start:
|
|
2309
|
-
old_lines:
|
|
2310
|
-
old_start:
|
|
2457
|
+
z15.object({
|
|
2458
|
+
type: z15.literal("text_editor_code_execution_str_replace_result"),
|
|
2459
|
+
lines: z15.array(z15.string()).nullable(),
|
|
2460
|
+
new_lines: z15.number().nullable(),
|
|
2461
|
+
new_start: z15.number().nullable(),
|
|
2462
|
+
old_lines: z15.number().nullable(),
|
|
2463
|
+
old_start: z15.number().nullable()
|
|
2311
2464
|
})
|
|
2312
2465
|
])
|
|
2313
2466
|
)
|
|
2314
2467
|
);
|
|
2315
|
-
var codeExecution_20260120InputSchema =
|
|
2316
|
-
() =>
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
type:
|
|
2320
|
-
code:
|
|
2468
|
+
var codeExecution_20260120InputSchema = lazySchema14(
|
|
2469
|
+
() => zodSchema14(
|
|
2470
|
+
z15.discriminatedUnion("type", [
|
|
2471
|
+
z15.object({
|
|
2472
|
+
type: z15.literal("programmatic-tool-call"),
|
|
2473
|
+
code: z15.string()
|
|
2321
2474
|
}),
|
|
2322
|
-
|
|
2323
|
-
type:
|
|
2324
|
-
command:
|
|
2475
|
+
z15.object({
|
|
2476
|
+
type: z15.literal("bash_code_execution"),
|
|
2477
|
+
command: z15.string()
|
|
2325
2478
|
}),
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
type:
|
|
2329
|
-
command:
|
|
2330
|
-
path:
|
|
2479
|
+
z15.discriminatedUnion("command", [
|
|
2480
|
+
z15.object({
|
|
2481
|
+
type: z15.literal("text_editor_code_execution"),
|
|
2482
|
+
command: z15.literal("view"),
|
|
2483
|
+
path: z15.string()
|
|
2331
2484
|
}),
|
|
2332
|
-
|
|
2333
|
-
type:
|
|
2334
|
-
command:
|
|
2335
|
-
path:
|
|
2336
|
-
file_text:
|
|
2485
|
+
z15.object({
|
|
2486
|
+
type: z15.literal("text_editor_code_execution"),
|
|
2487
|
+
command: z15.literal("create"),
|
|
2488
|
+
path: z15.string(),
|
|
2489
|
+
file_text: z15.string().nullish()
|
|
2337
2490
|
}),
|
|
2338
|
-
|
|
2339
|
-
type:
|
|
2340
|
-
command:
|
|
2341
|
-
path:
|
|
2342
|
-
old_str:
|
|
2343
|
-
new_str:
|
|
2491
|
+
z15.object({
|
|
2492
|
+
type: z15.literal("text_editor_code_execution"),
|
|
2493
|
+
command: z15.literal("str_replace"),
|
|
2494
|
+
path: z15.string(),
|
|
2495
|
+
old_str: z15.string(),
|
|
2496
|
+
new_str: z15.string()
|
|
2344
2497
|
})
|
|
2345
2498
|
])
|
|
2346
2499
|
])
|
|
2347
2500
|
)
|
|
2348
2501
|
);
|
|
2349
|
-
var
|
|
2502
|
+
var factory11 = createProviderExecutedToolFactory10({
|
|
2350
2503
|
id: "anthropic.code_execution_20260120",
|
|
2351
2504
|
inputSchema: codeExecution_20260120InputSchema,
|
|
2352
2505
|
outputSchema: codeExecution_20260120OutputSchema,
|
|
2353
2506
|
supportsDeferredResults: true
|
|
2354
2507
|
});
|
|
2355
2508
|
var codeExecution_20260120 = (args = {}) => {
|
|
2356
|
-
return experimental_toolCaller2(
|
|
2509
|
+
return experimental_toolCaller2(factory11(args), {
|
|
2357
2510
|
type: "provider",
|
|
2358
2511
|
prepareProviderOptions: (providerOptions) => {
|
|
2359
2512
|
var _a;
|
|
@@ -2376,24 +2529,24 @@ var codeExecution_20260120 = (args = {}) => {
|
|
|
2376
2529
|
|
|
2377
2530
|
// src/tool/tool-search-regex_20251119.ts
|
|
2378
2531
|
import {
|
|
2379
|
-
createProviderExecutedToolFactory as
|
|
2380
|
-
lazySchema as
|
|
2381
|
-
zodSchema as
|
|
2532
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory11,
|
|
2533
|
+
lazySchema as lazySchema15,
|
|
2534
|
+
zodSchema as zodSchema15
|
|
2382
2535
|
} from "@ai-sdk/provider-utils";
|
|
2383
|
-
import { z as
|
|
2384
|
-
var toolSearchRegex_20251119OutputSchema =
|
|
2385
|
-
() =>
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
type:
|
|
2389
|
-
toolName:
|
|
2536
|
+
import { z as z16 } from "zod/v4";
|
|
2537
|
+
var toolSearchRegex_20251119OutputSchema = lazySchema15(
|
|
2538
|
+
() => zodSchema15(
|
|
2539
|
+
z16.array(
|
|
2540
|
+
z16.object({
|
|
2541
|
+
type: z16.literal("tool_reference"),
|
|
2542
|
+
toolName: z16.string()
|
|
2390
2543
|
})
|
|
2391
2544
|
)
|
|
2392
2545
|
)
|
|
2393
2546
|
);
|
|
2394
|
-
var toolSearchRegex_20251119InputSchema =
|
|
2395
|
-
() =>
|
|
2396
|
-
|
|
2547
|
+
var toolSearchRegex_20251119InputSchema = lazySchema15(
|
|
2548
|
+
() => zodSchema15(
|
|
2549
|
+
z16.object({
|
|
2397
2550
|
/**
|
|
2398
2551
|
* A regex pattern to search for tools.
|
|
2399
2552
|
* Uses Python re.search() syntax. Maximum 200 characters.
|
|
@@ -2404,22 +2557,22 @@ var toolSearchRegex_20251119InputSchema = lazySchema13(
|
|
|
2404
2557
|
* - "database.*query|query.*database" - OR patterns for flexibility
|
|
2405
2558
|
* - "(?i)slack" - case-insensitive search
|
|
2406
2559
|
*/
|
|
2407
|
-
pattern:
|
|
2560
|
+
pattern: z16.string(),
|
|
2408
2561
|
/**
|
|
2409
2562
|
* Maximum number of tools to return. Optional.
|
|
2410
2563
|
*/
|
|
2411
|
-
limit:
|
|
2564
|
+
limit: z16.number().optional()
|
|
2412
2565
|
})
|
|
2413
2566
|
)
|
|
2414
2567
|
);
|
|
2415
|
-
var
|
|
2568
|
+
var factory12 = createProviderExecutedToolFactory11({
|
|
2416
2569
|
id: "anthropic.tool_search_regex_20251119",
|
|
2417
2570
|
inputSchema: toolSearchRegex_20251119InputSchema,
|
|
2418
2571
|
outputSchema: toolSearchRegex_20251119OutputSchema,
|
|
2419
2572
|
supportsDeferredResults: true
|
|
2420
2573
|
});
|
|
2421
2574
|
var toolSearchRegex_20251119 = (args = {}) => {
|
|
2422
|
-
return
|
|
2575
|
+
return factory12(args);
|
|
2423
2576
|
};
|
|
2424
2577
|
|
|
2425
2578
|
// src/convert-to-anthropic-prompt.ts
|
|
@@ -3952,8 +4105,10 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
|
3952
4105
|
"anthropic.memory_20250818": "memory",
|
|
3953
4106
|
"anthropic.web_search_20250305": "web_search",
|
|
3954
4107
|
"anthropic.web_search_20260209": "web_search",
|
|
4108
|
+
"anthropic.web_search_20260318": "web_search",
|
|
3955
4109
|
"anthropic.web_fetch_20250910": "web_fetch",
|
|
3956
4110
|
"anthropic.web_fetch_20260209": "web_fetch",
|
|
4111
|
+
"anthropic.web_fetch_20260318": "web_fetch",
|
|
3957
4112
|
"anthropic.tool_search_regex_20251119": "tool_search_tool_regex",
|
|
3958
4113
|
"anthropic.tool_search_bm25_20251119": "tool_search_tool_bm25",
|
|
3959
4114
|
"anthropic.advisor_20260301": "advisor"
|
|
@@ -4369,9 +4524,7 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
|
4369
4524
|
const citationDocuments = [
|
|
4370
4525
|
...this.extractCitationDocuments(options.prompt)
|
|
4371
4526
|
];
|
|
4372
|
-
const markCodeExecutionDynamic =
|
|
4373
|
-
args.tools
|
|
4374
|
-
);
|
|
4527
|
+
const markCodeExecutionDynamic = hasDynamicFilteringWebToolWithoutCodeExecution(args.tools);
|
|
4375
4528
|
const {
|
|
4376
4529
|
responseHeaders,
|
|
4377
4530
|
value: response,
|
|
@@ -4887,9 +5040,7 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
|
|
|
4887
5040
|
const citationDocuments = [
|
|
4888
5041
|
...this.extractCitationDocuments(options.prompt)
|
|
4889
5042
|
];
|
|
4890
|
-
const markCodeExecutionDynamic =
|
|
4891
|
-
body.tools
|
|
4892
|
-
);
|
|
5043
|
+
const markCodeExecutionDynamic = hasDynamicFilteringWebToolWithoutCodeExecution(body.tools);
|
|
4893
5044
|
const url = this.buildRequestUrl(true);
|
|
4894
5045
|
const { responseHeaders, value: response } = await postJsonToApi({
|
|
4895
5046
|
url,
|
|
@@ -5901,15 +6052,15 @@ function getModelCapabilities(modelId) {
|
|
|
5901
6052
|
};
|
|
5902
6053
|
}
|
|
5903
6054
|
}
|
|
5904
|
-
function
|
|
6055
|
+
function hasDynamicFilteringWebToolWithoutCodeExecution(tools) {
|
|
5905
6056
|
if (!tools) {
|
|
5906
6057
|
return false;
|
|
5907
6058
|
}
|
|
5908
|
-
let
|
|
6059
|
+
let hasDynamicFilteringWebTool = false;
|
|
5909
6060
|
let hasCodeExecutionTool = false;
|
|
5910
6061
|
for (const tool of tools) {
|
|
5911
|
-
if ("type" in tool && (tool.type === "web_fetch_20260209" || tool.type === "web_search_20260209")) {
|
|
5912
|
-
|
|
6062
|
+
if ("type" in tool && (tool.type === "web_fetch_20260209" || tool.type === "web_fetch_20260318" || tool.type === "web_search_20260209" || tool.type === "web_search_20260318")) {
|
|
6063
|
+
hasDynamicFilteringWebTool = true;
|
|
5913
6064
|
continue;
|
|
5914
6065
|
}
|
|
5915
6066
|
if ("type" in tool && (tool.type === "code_execution_20250522" || tool.type === "code_execution_20250825" || tool.type === "code_execution_20260120")) {
|
|
@@ -5917,7 +6068,7 @@ function hasWebTool20260209WithoutCodeExecution(tools) {
|
|
|
5917
6068
|
break;
|
|
5918
6069
|
}
|
|
5919
6070
|
}
|
|
5920
|
-
return
|
|
6071
|
+
return hasDynamicFilteringWebTool && !hasCodeExecutionTool;
|
|
5921
6072
|
}
|
|
5922
6073
|
function resolveAnthropicReasoningConfig({
|
|
5923
6074
|
reasoning,
|
|
@@ -6011,47 +6162,47 @@ import {
|
|
|
6011
6162
|
generateId as generateId2,
|
|
6012
6163
|
getFromApi,
|
|
6013
6164
|
isRecord as isRecord2,
|
|
6014
|
-
lazySchema as
|
|
6165
|
+
lazySchema as lazySchema16,
|
|
6015
6166
|
normalizeBatchRequestCounts,
|
|
6016
6167
|
normalizeHeaders,
|
|
6017
6168
|
parseProviderOptions as parseProviderOptions3,
|
|
6018
6169
|
postJsonToApi as postJsonToApi2,
|
|
6019
6170
|
resolve as resolve2,
|
|
6020
6171
|
safeValidateTypes,
|
|
6021
|
-
zodSchema as
|
|
6172
|
+
zodSchema as zodSchema16
|
|
6022
6173
|
} from "@ai-sdk/provider-utils";
|
|
6023
|
-
import { z as
|
|
6174
|
+
import { z as z17 } from "zod/v4";
|
|
6024
6175
|
var anthropicBatchRequestIdPattern = /^[A-Za-z0-9_-]{1,64}$/;
|
|
6025
6176
|
var anthropicBatchProviderOptionsSchema = anthropicLanguageModelOptions.pick({
|
|
6026
6177
|
anthropicBeta: true
|
|
6027
6178
|
});
|
|
6028
|
-
var anthropicBatchResponseZodSchema = () =>
|
|
6029
|
-
id:
|
|
6030
|
-
type:
|
|
6031
|
-
processing_status:
|
|
6032
|
-
request_counts:
|
|
6033
|
-
processing:
|
|
6034
|
-
succeeded:
|
|
6035
|
-
errored:
|
|
6036
|
-
canceled:
|
|
6037
|
-
expired:
|
|
6179
|
+
var anthropicBatchResponseZodSchema = () => z17.object({
|
|
6180
|
+
id: z17.string(),
|
|
6181
|
+
type: z17.literal("message_batch"),
|
|
6182
|
+
processing_status: z17.string(),
|
|
6183
|
+
request_counts: z17.object({
|
|
6184
|
+
processing: z17.number(),
|
|
6185
|
+
succeeded: z17.number(),
|
|
6186
|
+
errored: z17.number(),
|
|
6187
|
+
canceled: z17.number(),
|
|
6188
|
+
expired: z17.number()
|
|
6038
6189
|
}),
|
|
6039
|
-
created_at:
|
|
6040
|
-
expires_at:
|
|
6041
|
-
archived_at:
|
|
6042
|
-
cancel_initiated_at:
|
|
6043
|
-
ended_at:
|
|
6044
|
-
results_url:
|
|
6190
|
+
created_at: z17.string(),
|
|
6191
|
+
expires_at: z17.string(),
|
|
6192
|
+
archived_at: z17.string().nullish(),
|
|
6193
|
+
cancel_initiated_at: z17.string().nullish(),
|
|
6194
|
+
ended_at: z17.string().nullish(),
|
|
6195
|
+
results_url: z17.string().nullish()
|
|
6045
6196
|
});
|
|
6046
|
-
var anthropicBatchResponseSchema =
|
|
6047
|
-
() =>
|
|
6197
|
+
var anthropicBatchResponseSchema = lazySchema16(
|
|
6198
|
+
() => zodSchema16(anthropicBatchResponseZodSchema())
|
|
6048
6199
|
);
|
|
6049
|
-
var anthropicBatchListResponseSchema =
|
|
6050
|
-
() =>
|
|
6051
|
-
|
|
6052
|
-
data:
|
|
6053
|
-
has_more:
|
|
6054
|
-
last_id:
|
|
6200
|
+
var anthropicBatchListResponseSchema = lazySchema16(
|
|
6201
|
+
() => zodSchema16(
|
|
6202
|
+
z17.object({
|
|
6203
|
+
data: z17.array(anthropicBatchResponseZodSchema()),
|
|
6204
|
+
has_more: z17.boolean(),
|
|
6205
|
+
last_id: z17.string().nullish()
|
|
6055
6206
|
})
|
|
6056
6207
|
)
|
|
6057
6208
|
);
|
|
@@ -6074,34 +6225,34 @@ var knownAnthropicBatchContentTypes = /* @__PURE__ */ new Set([
|
|
|
6074
6225
|
"web_fetch_tool_result",
|
|
6075
6226
|
"web_search_tool_result"
|
|
6076
6227
|
]);
|
|
6077
|
-
var anthropicBatchResultSchema =
|
|
6078
|
-
() =>
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
type:
|
|
6082
|
-
message:
|
|
6228
|
+
var anthropicBatchResultSchema = lazySchema16(
|
|
6229
|
+
() => zodSchema16(
|
|
6230
|
+
z17.discriminatedUnion("type", [
|
|
6231
|
+
z17.object({
|
|
6232
|
+
type: z17.literal("succeeded"),
|
|
6233
|
+
message: z17.unknown()
|
|
6083
6234
|
}),
|
|
6084
|
-
|
|
6085
|
-
type:
|
|
6086
|
-
error:
|
|
6087
|
-
type:
|
|
6088
|
-
error:
|
|
6089
|
-
type:
|
|
6090
|
-
message:
|
|
6235
|
+
z17.object({
|
|
6236
|
+
type: z17.literal("errored"),
|
|
6237
|
+
error: z17.object({
|
|
6238
|
+
type: z17.literal("error"),
|
|
6239
|
+
error: z17.object({
|
|
6240
|
+
type: z17.string(),
|
|
6241
|
+
message: z17.string()
|
|
6091
6242
|
}),
|
|
6092
|
-
request_id:
|
|
6243
|
+
request_id: z17.string().nullish()
|
|
6093
6244
|
})
|
|
6094
6245
|
}),
|
|
6095
|
-
|
|
6096
|
-
|
|
6246
|
+
z17.object({ type: z17.literal("canceled") }),
|
|
6247
|
+
z17.object({ type: z17.literal("expired") })
|
|
6097
6248
|
])
|
|
6098
6249
|
)
|
|
6099
6250
|
);
|
|
6100
|
-
var anthropicBatchResultLineSchema =
|
|
6101
|
-
() =>
|
|
6102
|
-
|
|
6103
|
-
custom_id:
|
|
6104
|
-
result:
|
|
6251
|
+
var anthropicBatchResultLineSchema = lazySchema16(
|
|
6252
|
+
() => zodSchema16(
|
|
6253
|
+
z17.object({
|
|
6254
|
+
custom_id: z17.string(),
|
|
6255
|
+
result: z17.unknown()
|
|
6105
6256
|
})
|
|
6106
6257
|
)
|
|
6107
6258
|
);
|
|
@@ -6913,15 +7064,15 @@ function mapAnthropicStopDetails2(stopDetails) {
|
|
|
6913
7064
|
// src/tool/bash_20241022.ts
|
|
6914
7065
|
import {
|
|
6915
7066
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
|
|
6916
|
-
lazySchema as
|
|
6917
|
-
zodSchema as
|
|
7067
|
+
lazySchema as lazySchema17,
|
|
7068
|
+
zodSchema as zodSchema17
|
|
6918
7069
|
} from "@ai-sdk/provider-utils";
|
|
6919
|
-
import { z as
|
|
6920
|
-
var bash_20241022InputSchema =
|
|
6921
|
-
() =>
|
|
6922
|
-
|
|
6923
|
-
command:
|
|
6924
|
-
restart:
|
|
7070
|
+
import { z as z18 } from "zod/v4";
|
|
7071
|
+
var bash_20241022InputSchema = lazySchema17(
|
|
7072
|
+
() => zodSchema17(
|
|
7073
|
+
z18.object({
|
|
7074
|
+
command: z18.string(),
|
|
7075
|
+
restart: z18.boolean().optional()
|
|
6925
7076
|
})
|
|
6926
7077
|
)
|
|
6927
7078
|
);
|
|
@@ -6954,15 +7105,15 @@ function bash_20241022(options = {}) {
|
|
|
6954
7105
|
// src/tool/bash_20250124.ts
|
|
6955
7106
|
import {
|
|
6956
7107
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory3,
|
|
6957
|
-
lazySchema as
|
|
6958
|
-
zodSchema as
|
|
7108
|
+
lazySchema as lazySchema18,
|
|
7109
|
+
zodSchema as zodSchema18
|
|
6959
7110
|
} from "@ai-sdk/provider-utils";
|
|
6960
|
-
import { z as
|
|
6961
|
-
var bash_20250124InputSchema =
|
|
6962
|
-
() =>
|
|
6963
|
-
|
|
6964
|
-
command:
|
|
6965
|
-
restart:
|
|
7111
|
+
import { z as z19 } from "zod/v4";
|
|
7112
|
+
var bash_20250124InputSchema = lazySchema18(
|
|
7113
|
+
() => zodSchema18(
|
|
7114
|
+
z19.object({
|
|
7115
|
+
command: z19.string(),
|
|
7116
|
+
restart: z19.boolean().optional()
|
|
6966
7117
|
})
|
|
6967
7118
|
)
|
|
6968
7119
|
);
|
|
@@ -6995,14 +7146,14 @@ function bash_20250124(options = {}) {
|
|
|
6995
7146
|
// src/tool/computer_20241022.ts
|
|
6996
7147
|
import {
|
|
6997
7148
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory4,
|
|
6998
|
-
lazySchema as
|
|
6999
|
-
zodSchema as
|
|
7149
|
+
lazySchema as lazySchema19,
|
|
7150
|
+
zodSchema as zodSchema19
|
|
7000
7151
|
} from "@ai-sdk/provider-utils";
|
|
7001
|
-
import { z as
|
|
7002
|
-
var computer_20241022InputSchema =
|
|
7003
|
-
() =>
|
|
7004
|
-
|
|
7005
|
-
action:
|
|
7152
|
+
import { z as z20 } from "zod/v4";
|
|
7153
|
+
var computer_20241022InputSchema = lazySchema19(
|
|
7154
|
+
() => zodSchema19(
|
|
7155
|
+
z20.object({
|
|
7156
|
+
action: z20.enum([
|
|
7006
7157
|
"key",
|
|
7007
7158
|
"type",
|
|
7008
7159
|
"mouse_move",
|
|
@@ -7014,8 +7165,8 @@ var computer_20241022InputSchema = lazySchema17(
|
|
|
7014
7165
|
"screenshot",
|
|
7015
7166
|
"cursor_position"
|
|
7016
7167
|
]),
|
|
7017
|
-
coordinate:
|
|
7018
|
-
text:
|
|
7168
|
+
coordinate: z20.array(z20.number().int()).optional(),
|
|
7169
|
+
text: z20.string().optional()
|
|
7019
7170
|
})
|
|
7020
7171
|
)
|
|
7021
7172
|
);
|
|
@@ -7027,14 +7178,14 @@ var computer_20241022 = createProviderDefinedToolFactory4({
|
|
|
7027
7178
|
// src/tool/computer_20250124.ts
|
|
7028
7179
|
import {
|
|
7029
7180
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory5,
|
|
7030
|
-
lazySchema as
|
|
7031
|
-
zodSchema as
|
|
7181
|
+
lazySchema as lazySchema20,
|
|
7182
|
+
zodSchema as zodSchema20
|
|
7032
7183
|
} from "@ai-sdk/provider-utils";
|
|
7033
|
-
import { z as
|
|
7034
|
-
var computer_20250124InputSchema =
|
|
7035
|
-
() =>
|
|
7036
|
-
|
|
7037
|
-
action:
|
|
7184
|
+
import { z as z21 } from "zod/v4";
|
|
7185
|
+
var computer_20250124InputSchema = lazySchema20(
|
|
7186
|
+
() => zodSchema20(
|
|
7187
|
+
z21.object({
|
|
7188
|
+
action: z21.enum([
|
|
7038
7189
|
"key",
|
|
7039
7190
|
"hold_key",
|
|
7040
7191
|
"type",
|
|
@@ -7052,12 +7203,12 @@ var computer_20250124InputSchema = lazySchema18(
|
|
|
7052
7203
|
"wait",
|
|
7053
7204
|
"screenshot"
|
|
7054
7205
|
]),
|
|
7055
|
-
coordinate:
|
|
7056
|
-
duration:
|
|
7057
|
-
scroll_amount:
|
|
7058
|
-
scroll_direction:
|
|
7059
|
-
start_coordinate:
|
|
7060
|
-
text:
|
|
7206
|
+
coordinate: z21.tuple([z21.number().int(), z21.number().int()]).optional(),
|
|
7207
|
+
duration: z21.number().optional(),
|
|
7208
|
+
scroll_amount: z21.number().optional(),
|
|
7209
|
+
scroll_direction: z21.enum(["up", "down", "left", "right"]).optional(),
|
|
7210
|
+
start_coordinate: z21.tuple([z21.number().int(), z21.number().int()]).optional(),
|
|
7211
|
+
text: z21.string().optional()
|
|
7061
7212
|
})
|
|
7062
7213
|
)
|
|
7063
7214
|
);
|
|
@@ -7069,14 +7220,14 @@ var computer_20250124 = createProviderDefinedToolFactory5({
|
|
|
7069
7220
|
// src/tool/computer_20251124.ts
|
|
7070
7221
|
import {
|
|
7071
7222
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
|
|
7072
|
-
lazySchema as
|
|
7073
|
-
zodSchema as
|
|
7223
|
+
lazySchema as lazySchema21,
|
|
7224
|
+
zodSchema as zodSchema21
|
|
7074
7225
|
} from "@ai-sdk/provider-utils";
|
|
7075
|
-
import { z as
|
|
7076
|
-
var computer_20251124InputSchema =
|
|
7077
|
-
() =>
|
|
7078
|
-
|
|
7079
|
-
action:
|
|
7226
|
+
import { z as z22 } from "zod/v4";
|
|
7227
|
+
var computer_20251124InputSchema = lazySchema21(
|
|
7228
|
+
() => zodSchema21(
|
|
7229
|
+
z22.object({
|
|
7230
|
+
action: z22.enum([
|
|
7080
7231
|
"key",
|
|
7081
7232
|
"hold_key",
|
|
7082
7233
|
"type",
|
|
@@ -7095,18 +7246,18 @@ var computer_20251124InputSchema = lazySchema19(
|
|
|
7095
7246
|
"screenshot",
|
|
7096
7247
|
"zoom"
|
|
7097
7248
|
]),
|
|
7098
|
-
coordinate:
|
|
7099
|
-
duration:
|
|
7100
|
-
region:
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7249
|
+
coordinate: z22.tuple([z22.number().int(), z22.number().int()]).optional(),
|
|
7250
|
+
duration: z22.number().optional(),
|
|
7251
|
+
region: z22.tuple([
|
|
7252
|
+
z22.number().int(),
|
|
7253
|
+
z22.number().int(),
|
|
7254
|
+
z22.number().int(),
|
|
7255
|
+
z22.number().int()
|
|
7105
7256
|
]).optional(),
|
|
7106
|
-
scroll_amount:
|
|
7107
|
-
scroll_direction:
|
|
7108
|
-
start_coordinate:
|
|
7109
|
-
text:
|
|
7257
|
+
scroll_amount: z22.number().optional(),
|
|
7258
|
+
scroll_direction: z22.enum(["up", "down", "left", "right"]).optional(),
|
|
7259
|
+
start_coordinate: z22.tuple([z22.number().int(), z22.number().int()]).optional(),
|
|
7260
|
+
text: z22.string().optional()
|
|
7110
7261
|
})
|
|
7111
7262
|
)
|
|
7112
7263
|
);
|
|
@@ -7118,43 +7269,43 @@ var computer_20251124 = createProviderDefinedToolFactory6({
|
|
|
7118
7269
|
// src/tool/memory_20250818.ts
|
|
7119
7270
|
import {
|
|
7120
7271
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
|
|
7121
|
-
lazySchema as
|
|
7122
|
-
zodSchema as
|
|
7272
|
+
lazySchema as lazySchema22,
|
|
7273
|
+
zodSchema as zodSchema22
|
|
7123
7274
|
} from "@ai-sdk/provider-utils";
|
|
7124
|
-
import { z as
|
|
7125
|
-
var memory_20250818InputSchema =
|
|
7126
|
-
() =>
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
command:
|
|
7130
|
-
path:
|
|
7131
|
-
view_range:
|
|
7275
|
+
import { z as z23 } from "zod/v4";
|
|
7276
|
+
var memory_20250818InputSchema = lazySchema22(
|
|
7277
|
+
() => zodSchema22(
|
|
7278
|
+
z23.discriminatedUnion("command", [
|
|
7279
|
+
z23.object({
|
|
7280
|
+
command: z23.literal("view"),
|
|
7281
|
+
path: z23.string(),
|
|
7282
|
+
view_range: z23.tuple([z23.number(), z23.number()]).optional()
|
|
7132
7283
|
}),
|
|
7133
|
-
|
|
7134
|
-
command:
|
|
7135
|
-
path:
|
|
7136
|
-
file_text:
|
|
7284
|
+
z23.object({
|
|
7285
|
+
command: z23.literal("create"),
|
|
7286
|
+
path: z23.string(),
|
|
7287
|
+
file_text: z23.string()
|
|
7137
7288
|
}),
|
|
7138
|
-
|
|
7139
|
-
command:
|
|
7140
|
-
path:
|
|
7141
|
-
old_str:
|
|
7142
|
-
new_str:
|
|
7289
|
+
z23.object({
|
|
7290
|
+
command: z23.literal("str_replace"),
|
|
7291
|
+
path: z23.string(),
|
|
7292
|
+
old_str: z23.string(),
|
|
7293
|
+
new_str: z23.string()
|
|
7143
7294
|
}),
|
|
7144
|
-
|
|
7145
|
-
command:
|
|
7146
|
-
path:
|
|
7147
|
-
insert_line:
|
|
7148
|
-
insert_text:
|
|
7295
|
+
z23.object({
|
|
7296
|
+
command: z23.literal("insert"),
|
|
7297
|
+
path: z23.string(),
|
|
7298
|
+
insert_line: z23.number(),
|
|
7299
|
+
insert_text: z23.string()
|
|
7149
7300
|
}),
|
|
7150
|
-
|
|
7151
|
-
command:
|
|
7152
|
-
path:
|
|
7301
|
+
z23.object({
|
|
7302
|
+
command: z23.literal("delete"),
|
|
7303
|
+
path: z23.string()
|
|
7153
7304
|
}),
|
|
7154
|
-
|
|
7155
|
-
command:
|
|
7156
|
-
old_path:
|
|
7157
|
-
new_path:
|
|
7305
|
+
z23.object({
|
|
7306
|
+
command: z23.literal("rename"),
|
|
7307
|
+
old_path: z23.string(),
|
|
7308
|
+
new_path: z23.string()
|
|
7158
7309
|
})
|
|
7159
7310
|
])
|
|
7160
7311
|
)
|
|
@@ -7167,21 +7318,21 @@ var memory_20250818 = createProviderDefinedToolFactory7({
|
|
|
7167
7318
|
// src/tool/text-editor_20241022.ts
|
|
7168
7319
|
import {
|
|
7169
7320
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
|
|
7170
|
-
lazySchema as
|
|
7171
|
-
zodSchema as
|
|
7321
|
+
lazySchema as lazySchema23,
|
|
7322
|
+
zodSchema as zodSchema23
|
|
7172
7323
|
} from "@ai-sdk/provider-utils";
|
|
7173
|
-
import { z as
|
|
7174
|
-
var textEditor_20241022InputSchema =
|
|
7175
|
-
() =>
|
|
7176
|
-
|
|
7177
|
-
command:
|
|
7178
|
-
path:
|
|
7179
|
-
file_text:
|
|
7180
|
-
insert_line:
|
|
7181
|
-
new_str:
|
|
7182
|
-
insert_text:
|
|
7183
|
-
old_str:
|
|
7184
|
-
view_range:
|
|
7324
|
+
import { z as z24 } from "zod/v4";
|
|
7325
|
+
var textEditor_20241022InputSchema = lazySchema23(
|
|
7326
|
+
() => zodSchema23(
|
|
7327
|
+
z24.object({
|
|
7328
|
+
command: z24.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
7329
|
+
path: z24.string(),
|
|
7330
|
+
file_text: z24.string().optional(),
|
|
7331
|
+
insert_line: z24.number().int().optional(),
|
|
7332
|
+
new_str: z24.string().optional(),
|
|
7333
|
+
insert_text: z24.string().optional(),
|
|
7334
|
+
old_str: z24.string().optional(),
|
|
7335
|
+
view_range: z24.array(z24.number().int()).optional()
|
|
7185
7336
|
})
|
|
7186
7337
|
)
|
|
7187
7338
|
);
|
|
@@ -7193,21 +7344,21 @@ var textEditor_20241022 = createProviderDefinedToolFactory8({
|
|
|
7193
7344
|
// src/tool/text-editor_20250124.ts
|
|
7194
7345
|
import {
|
|
7195
7346
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
|
|
7196
|
-
lazySchema as
|
|
7197
|
-
zodSchema as
|
|
7347
|
+
lazySchema as lazySchema24,
|
|
7348
|
+
zodSchema as zodSchema24
|
|
7198
7349
|
} from "@ai-sdk/provider-utils";
|
|
7199
|
-
import { z as
|
|
7200
|
-
var textEditor_20250124InputSchema =
|
|
7201
|
-
() =>
|
|
7202
|
-
|
|
7203
|
-
command:
|
|
7204
|
-
path:
|
|
7205
|
-
file_text:
|
|
7206
|
-
insert_line:
|
|
7207
|
-
new_str:
|
|
7208
|
-
insert_text:
|
|
7209
|
-
old_str:
|
|
7210
|
-
view_range:
|
|
7350
|
+
import { z as z25 } from "zod/v4";
|
|
7351
|
+
var textEditor_20250124InputSchema = lazySchema24(
|
|
7352
|
+
() => zodSchema24(
|
|
7353
|
+
z25.object({
|
|
7354
|
+
command: z25.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
7355
|
+
path: z25.string(),
|
|
7356
|
+
file_text: z25.string().optional(),
|
|
7357
|
+
insert_line: z25.number().int().optional(),
|
|
7358
|
+
new_str: z25.string().optional(),
|
|
7359
|
+
insert_text: z25.string().optional(),
|
|
7360
|
+
old_str: z25.string().optional(),
|
|
7361
|
+
view_range: z25.array(z25.number().int()).optional()
|
|
7211
7362
|
})
|
|
7212
7363
|
)
|
|
7213
7364
|
);
|
|
@@ -7219,21 +7370,21 @@ var textEditor_20250124 = createProviderDefinedToolFactory9({
|
|
|
7219
7370
|
// src/tool/text-editor_20250429.ts
|
|
7220
7371
|
import {
|
|
7221
7372
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory10,
|
|
7222
|
-
lazySchema as
|
|
7223
|
-
zodSchema as
|
|
7373
|
+
lazySchema as lazySchema25,
|
|
7374
|
+
zodSchema as zodSchema25
|
|
7224
7375
|
} from "@ai-sdk/provider-utils";
|
|
7225
|
-
import { z as
|
|
7226
|
-
var textEditor_20250429InputSchema =
|
|
7227
|
-
() =>
|
|
7228
|
-
|
|
7229
|
-
command:
|
|
7230
|
-
path:
|
|
7231
|
-
file_text:
|
|
7232
|
-
insert_line:
|
|
7233
|
-
new_str:
|
|
7234
|
-
insert_text:
|
|
7235
|
-
old_str:
|
|
7236
|
-
view_range:
|
|
7376
|
+
import { z as z26 } from "zod/v4";
|
|
7377
|
+
var textEditor_20250429InputSchema = lazySchema25(
|
|
7378
|
+
() => zodSchema25(
|
|
7379
|
+
z26.object({
|
|
7380
|
+
command: z26.enum(["view", "create", "str_replace", "insert"]),
|
|
7381
|
+
path: z26.string(),
|
|
7382
|
+
file_text: z26.string().optional(),
|
|
7383
|
+
insert_line: z26.number().int().optional(),
|
|
7384
|
+
new_str: z26.string().optional(),
|
|
7385
|
+
insert_text: z26.string().optional(),
|
|
7386
|
+
old_str: z26.string().optional(),
|
|
7387
|
+
view_range: z26.array(z26.number().int()).optional()
|
|
7237
7388
|
})
|
|
7238
7389
|
)
|
|
7239
7390
|
);
|
|
@@ -7244,44 +7395,44 @@ var textEditor_20250429 = createProviderDefinedToolFactory10({
|
|
|
7244
7395
|
|
|
7245
7396
|
// src/tool/tool-search-bm25_20251119.ts
|
|
7246
7397
|
import {
|
|
7247
|
-
createProviderExecutedToolFactory as
|
|
7248
|
-
lazySchema as
|
|
7249
|
-
zodSchema as
|
|
7398
|
+
createProviderExecutedToolFactory as createProviderExecutedToolFactory12,
|
|
7399
|
+
lazySchema as lazySchema26,
|
|
7400
|
+
zodSchema as zodSchema26
|
|
7250
7401
|
} from "@ai-sdk/provider-utils";
|
|
7251
|
-
import { z as
|
|
7252
|
-
var toolSearchBm25_20251119OutputSchema =
|
|
7253
|
-
() =>
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
type:
|
|
7257
|
-
toolName:
|
|
7402
|
+
import { z as z27 } from "zod/v4";
|
|
7403
|
+
var toolSearchBm25_20251119OutputSchema = lazySchema26(
|
|
7404
|
+
() => zodSchema26(
|
|
7405
|
+
z27.array(
|
|
7406
|
+
z27.object({
|
|
7407
|
+
type: z27.literal("tool_reference"),
|
|
7408
|
+
toolName: z27.string()
|
|
7258
7409
|
})
|
|
7259
7410
|
)
|
|
7260
7411
|
)
|
|
7261
7412
|
);
|
|
7262
|
-
var toolSearchBm25_20251119InputSchema =
|
|
7263
|
-
() =>
|
|
7264
|
-
|
|
7413
|
+
var toolSearchBm25_20251119InputSchema = lazySchema26(
|
|
7414
|
+
() => zodSchema26(
|
|
7415
|
+
z27.object({
|
|
7265
7416
|
/**
|
|
7266
7417
|
* A natural language query to search for tools.
|
|
7267
7418
|
* Claude will use BM25 text search to find relevant tools.
|
|
7268
7419
|
*/
|
|
7269
|
-
query:
|
|
7420
|
+
query: z27.string(),
|
|
7270
7421
|
/**
|
|
7271
7422
|
* Maximum number of tools to return. Optional.
|
|
7272
7423
|
*/
|
|
7273
|
-
limit:
|
|
7424
|
+
limit: z27.number().optional()
|
|
7274
7425
|
})
|
|
7275
7426
|
)
|
|
7276
7427
|
);
|
|
7277
|
-
var
|
|
7428
|
+
var factory13 = createProviderExecutedToolFactory12({
|
|
7278
7429
|
id: "anthropic.tool_search_bm25_20251119",
|
|
7279
7430
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
7280
7431
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
7281
7432
|
supportsDeferredResults: true
|
|
7282
7433
|
});
|
|
7283
7434
|
var toolSearchBm25_20251119 = (args = {}) => {
|
|
7284
|
-
return
|
|
7435
|
+
return factory13(args);
|
|
7285
7436
|
};
|
|
7286
7437
|
|
|
7287
7438
|
// src/anthropic-tools.ts
|
|
@@ -7469,6 +7620,18 @@ var anthropicTools = {
|
|
|
7469
7620
|
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
7470
7621
|
*/
|
|
7471
7622
|
webFetch_20260209,
|
|
7623
|
+
/**
|
|
7624
|
+
* Creates a web fetch tool that gives Claude direct access to real-time web content.
|
|
7625
|
+
*
|
|
7626
|
+
* @param maxUses - The max_uses parameter limits the number of web fetches performed
|
|
7627
|
+
* @param allowedDomains - Only fetch from these domains
|
|
7628
|
+
* @param blockedDomains - Never fetch from these domains
|
|
7629
|
+
* @param citations - Unlike web search where citations are always enabled, citations are optional for web fetch. Set "citations": {"enabled": true} to enable Claude to cite specific passages from fetched documents.
|
|
7630
|
+
* @param maxContentTokens - The max_content_tokens parameter limits the amount of content that will be included in the context.
|
|
7631
|
+
* @param useCache - Whether cached content may be returned. Set to false to fetch fresh content.
|
|
7632
|
+
* @param responseInclusion - Whether result blocks consumed by completed code execution calls are returned. Defaults to "full".
|
|
7633
|
+
*/
|
|
7634
|
+
webFetch_20260318,
|
|
7472
7635
|
/**
|
|
7473
7636
|
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
7474
7637
|
*
|
|
@@ -7487,6 +7650,16 @@ var anthropicTools = {
|
|
|
7487
7650
|
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
7488
7651
|
*/
|
|
7489
7652
|
webSearch_20260209,
|
|
7653
|
+
/**
|
|
7654
|
+
* Creates a web search tool that gives Claude direct access to real-time web content.
|
|
7655
|
+
*
|
|
7656
|
+
* @param maxUses - Maximum number of web searches Claude can perform during the conversation.
|
|
7657
|
+
* @param allowedDomains - Optional list of domains that Claude is allowed to search.
|
|
7658
|
+
* @param blockedDomains - Optional list of domains that Claude should avoid when searching.
|
|
7659
|
+
* @param userLocation - Optional user location information to provide geographically relevant search results.
|
|
7660
|
+
* @param responseInclusion - Whether result blocks consumed by completed code execution calls are returned. Defaults to "full".
|
|
7661
|
+
*/
|
|
7662
|
+
webSearch_20260318,
|
|
7490
7663
|
/**
|
|
7491
7664
|
* Creates a tool search tool that uses regex patterns to find tools.
|
|
7492
7665
|
*
|
|
@@ -7528,40 +7701,40 @@ import {
|
|
|
7528
7701
|
} from "@ai-sdk/provider-utils";
|
|
7529
7702
|
|
|
7530
7703
|
// src/skills/anthropic-skills-api.ts
|
|
7531
|
-
import { lazySchema as
|
|
7532
|
-
import { z as
|
|
7533
|
-
var anthropicSkillResponseSchema =
|
|
7534
|
-
() =>
|
|
7535
|
-
|
|
7536
|
-
id:
|
|
7537
|
-
display_title:
|
|
7538
|
-
name:
|
|
7539
|
-
description:
|
|
7540
|
-
latest_version:
|
|
7541
|
-
source:
|
|
7542
|
-
created_at:
|
|
7543
|
-
updated_at:
|
|
7704
|
+
import { lazySchema as lazySchema27, zodSchema as zodSchema27 } from "@ai-sdk/provider-utils";
|
|
7705
|
+
import { z as z28 } from "zod/v4";
|
|
7706
|
+
var anthropicSkillResponseSchema = lazySchema27(
|
|
7707
|
+
() => zodSchema27(
|
|
7708
|
+
z28.object({
|
|
7709
|
+
id: z28.string(),
|
|
7710
|
+
display_title: z28.string().nullish(),
|
|
7711
|
+
name: z28.string().nullish(),
|
|
7712
|
+
description: z28.string().nullish(),
|
|
7713
|
+
latest_version: z28.string().nullish(),
|
|
7714
|
+
source: z28.string(),
|
|
7715
|
+
created_at: z28.string(),
|
|
7716
|
+
updated_at: z28.string()
|
|
7544
7717
|
})
|
|
7545
7718
|
)
|
|
7546
7719
|
);
|
|
7547
|
-
var anthropicSkillVersionListResponseSchema =
|
|
7548
|
-
() =>
|
|
7549
|
-
|
|
7550
|
-
data:
|
|
7551
|
-
|
|
7552
|
-
version:
|
|
7720
|
+
var anthropicSkillVersionListResponseSchema = lazySchema27(
|
|
7721
|
+
() => zodSchema27(
|
|
7722
|
+
z28.object({
|
|
7723
|
+
data: z28.array(
|
|
7724
|
+
z28.object({
|
|
7725
|
+
version: z28.string()
|
|
7553
7726
|
})
|
|
7554
7727
|
)
|
|
7555
7728
|
})
|
|
7556
7729
|
)
|
|
7557
7730
|
);
|
|
7558
|
-
var anthropicSkillVersionResponseSchema =
|
|
7559
|
-
() =>
|
|
7560
|
-
|
|
7561
|
-
type:
|
|
7562
|
-
skill_id:
|
|
7563
|
-
name:
|
|
7564
|
-
description:
|
|
7731
|
+
var anthropicSkillVersionResponseSchema = lazySchema27(
|
|
7732
|
+
() => zodSchema27(
|
|
7733
|
+
z28.object({
|
|
7734
|
+
type: z28.string(),
|
|
7735
|
+
skill_id: z28.string(),
|
|
7736
|
+
name: z28.string().nullish(),
|
|
7737
|
+
description: z28.string().nullish()
|
|
7565
7738
|
})
|
|
7566
7739
|
)
|
|
7567
7740
|
);
|
|
@@ -7652,7 +7825,7 @@ var AnthropicSkills = class {
|
|
|
7652
7825
|
};
|
|
7653
7826
|
|
|
7654
7827
|
// src/version.ts
|
|
7655
|
-
var VERSION = true ? "4.0.
|
|
7828
|
+
var VERSION = true ? "4.0.55" : "0.0.0-test";
|
|
7656
7829
|
|
|
7657
7830
|
// src/anthropic-provider.ts
|
|
7658
7831
|
var ANTHROPIC_API_URL = "https://api.anthropic.com";
|