@cherrystudio/provider-registry 0.2.8 → 0.3.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/dist/index.cjs CHANGED
@@ -1289,6 +1289,14 @@ const REASONING_FAMILY_RULES = [
1289
1289
  ]
1290
1290
  },
1291
1291
  { pattern: "sonar-deep-research" },
1292
+ {
1293
+ pattern: "^step-5-preview$",
1294
+ effort: [
1295
+ "low",
1296
+ "medium",
1297
+ "high"
1298
+ ]
1299
+ },
1292
1300
  { pattern: "step-3" },
1293
1301
  { pattern: "step-r1-v-mini" },
1294
1302
  {
@@ -1473,6 +1481,10 @@ const SERVER_TOOL_FUNCTION_MIXING_MODEL_IDS = [
1473
1481
  "gemini-3-6-flash",
1474
1482
  "gemini-3-7-flash",
1475
1483
  "gemini-3-8-flash",
1484
+ "gemini-3-8-flash-lite-tts",
1485
+ "gemini-3-8-flash-tts",
1486
+ "gemini-3-8-live",
1487
+ "gemini-3-8-live-extended",
1476
1488
  "gemini-3-flash",
1477
1489
  "gemini-3-flash-preview",
1478
1490
  "gemini-3-pro-image",
@@ -1509,9 +1521,11 @@ function isWebSearchEffortUnsupported(rawModelId, effort) {
1509
1521
  }
1510
1522
  //#endregion
1511
1523
  //#region src/patterns/serverToolModelEligibility.ts
1512
- const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1513
- cherryin: {
1514
- "web-search": [
1524
+ const ELIGIBLE_DECLARATIONS = new Map(Object.entries({
1525
+ aihubmix: {
1526
+ "web-search": [{ ids: [
1527
+ "claude-fable-5",
1528
+ "claude-fable-5-1",
1515
1529
  "claude-haiku-4-5",
1516
1530
  "claude-opus-4",
1517
1531
  "claude-opus-4-1",
@@ -1521,6 +1535,9 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1521
1535
  "claude-opus-4-7",
1522
1536
  "claude-opus-4-8",
1523
1537
  "claude-opus-4-8-fast",
1538
+ "claude-opus-5",
1539
+ "claude-opus-5-5",
1540
+ "claude-opus-5-fast",
1524
1541
  "claude-sonnet-4",
1525
1542
  "claude-sonnet-4-5",
1526
1543
  "claude-sonnet-4-6",
@@ -1584,12 +1601,20 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1584
1601
  "gpt-5-mini",
1585
1602
  "gpt-5-nano",
1586
1603
  "gpt-5-pro",
1604
+ "gpt-6-1-sol",
1605
+ "gpt-6-1-terra",
1606
+ "gpt-6-astra",
1607
+ "gpt-6-astra-pro",
1608
+ "gpt-6-luna",
1609
+ "gpt-6-sol",
1587
1610
  "o3",
1588
1611
  "o3-mini",
1589
1612
  "o3-pro",
1590
1613
  "o4-mini"
1591
- ],
1592
- "url-context": [
1614
+ ] }],
1615
+ "url-context": [{ ids: [
1616
+ "claude-fable-5",
1617
+ "claude-fable-5-1",
1593
1618
  "claude-haiku-4-5",
1594
1619
  "claude-opus-4",
1595
1620
  "claude-opus-4-1",
@@ -1599,6 +1624,9 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1599
1624
  "claude-opus-4-7",
1600
1625
  "claude-opus-4-8",
1601
1626
  "claude-opus-4-8-fast",
1627
+ "claude-opus-5",
1628
+ "claude-opus-5-5",
1629
+ "claude-opus-5-fast",
1602
1630
  "claude-sonnet-4",
1603
1631
  "claude-sonnet-4-5",
1604
1632
  "claude-sonnet-4-6",
@@ -1631,13 +1659,12 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1631
1659
  "gemini-flash-latest",
1632
1660
  "gemini-flash-lite-latest",
1633
1661
  "gemini-pro-latest"
1634
- ]
1662
+ ] }]
1635
1663
  },
1636
- aihubmix: {
1637
- "web-search": [
1638
- "claude-fable-5",
1639
- "claude-fable-5-1",
1664
+ anthropic: {
1665
+ "web-search": [{ ids: [
1640
1666
  "claude-haiku-4-5",
1667
+ "claude-haiku-5-5",
1641
1668
  "claude-opus-4",
1642
1669
  "claude-opus-4-1",
1643
1670
  "claude-opus-4-5",
@@ -1646,36 +1673,74 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1646
1673
  "claude-opus-4-7",
1647
1674
  "claude-opus-4-8",
1648
1675
  "claude-opus-4-8-fast",
1649
- "claude-opus-5",
1650
1676
  "claude-opus-5-5",
1651
- "claude-opus-5-fast",
1652
1677
  "claude-sonnet-4",
1653
1678
  "claude-sonnet-4-5",
1654
1679
  "claude-sonnet-4-6",
1655
- "gemini-2-5-computer-use-preview-10-2025",
1656
- "gemini-2-5-flash",
1657
- "gemini-2-5-flash-lite",
1658
- "gemini-2-5-pro",
1659
- "gemini-2-5-pro-preview",
1660
- "gemini-2-5-pro-preview-05-06",
1661
- "gemini-3-1-flash-lite",
1662
- "gemini-3-1-flash-lite-preview",
1663
- "gemini-3-1-flash-live-preview",
1664
- "gemini-3-1-pro-preview",
1665
- "gemini-3-1-pro-preview-customtools",
1666
- "gemini-3-5-flash",
1667
- "gemini-3-5-flash-lite",
1668
- "gemini-3-6-flash",
1669
- "gemini-3-7-flash",
1670
- "gemini-3-8-flash",
1671
- "gemini-3-flash",
1672
- "gemini-3-flash-preview",
1673
- "gemini-3-pro-image",
1674
- "gemini-3-pro-image-preview",
1675
- "gemini-4-argon",
1676
- "gemini-flash-latest",
1677
- "gemini-flash-lite-latest",
1678
- "gemini-pro-latest",
1680
+ "claude-sonnet-5-5"
1681
+ ] }],
1682
+ "url-context": [{ ids: [
1683
+ "claude-haiku-4-5",
1684
+ "claude-haiku-5-5",
1685
+ "claude-opus-4",
1686
+ "claude-opus-4-1",
1687
+ "claude-opus-4-5",
1688
+ "claude-opus-4-6",
1689
+ "claude-opus-4-6-v1",
1690
+ "claude-opus-4-7",
1691
+ "claude-opus-4-8",
1692
+ "claude-opus-4-8-fast",
1693
+ "claude-opus-5-5",
1694
+ "claude-sonnet-4",
1695
+ "claude-sonnet-4-5",
1696
+ "claude-sonnet-4-6",
1697
+ "claude-sonnet-5-5"
1698
+ ] }]
1699
+ },
1700
+ "aws-bedrock": {
1701
+ "web-search": [{ ids: [
1702
+ "claude-haiku-4-5",
1703
+ "claude-opus-4",
1704
+ "claude-opus-4-1",
1705
+ "claude-opus-4-5",
1706
+ "claude-opus-4-6",
1707
+ "claude-opus-4-6-v1",
1708
+ "claude-opus-4-7",
1709
+ "claude-opus-4-8",
1710
+ "claude-opus-4-8-fast",
1711
+ "claude-sonnet-4",
1712
+ "claude-sonnet-4-5",
1713
+ "claude-sonnet-4-6"
1714
+ ] }],
1715
+ "url-context": [{ ids: [
1716
+ "claude-haiku-4-5",
1717
+ "claude-opus-4",
1718
+ "claude-opus-4-1",
1719
+ "claude-opus-4-5",
1720
+ "claude-opus-4-6",
1721
+ "claude-opus-4-6-v1",
1722
+ "claude-opus-4-7",
1723
+ "claude-opus-4-8",
1724
+ "claude-opus-4-8-fast",
1725
+ "claude-sonnet-4",
1726
+ "claude-sonnet-4-5",
1727
+ "claude-sonnet-4-6"
1728
+ ] }]
1729
+ },
1730
+ "azure-openai": {
1731
+ "web-search": [{ ids: [
1732
+ "claude-haiku-4-5",
1733
+ "claude-opus-4",
1734
+ "claude-opus-4-1",
1735
+ "claude-opus-4-5",
1736
+ "claude-opus-4-6",
1737
+ "claude-opus-4-6-v1",
1738
+ "claude-opus-4-7",
1739
+ "claude-opus-4-8",
1740
+ "claude-opus-4-8-fast",
1741
+ "claude-sonnet-4",
1742
+ "claude-sonnet-4-5",
1743
+ "claude-sonnet-4-6",
1679
1744
  "gpt-4-1",
1680
1745
  "gpt-4-1-mini",
1681
1746
  "gpt-4-1-nano",
@@ -1712,20 +1777,12 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1712
1777
  "gpt-5-mini",
1713
1778
  "gpt-5-nano",
1714
1779
  "gpt-5-pro",
1715
- "gpt-6-1-sol",
1716
- "gpt-6-1-terra",
1717
- "gpt-6-astra",
1718
- "gpt-6-astra-pro",
1719
- "gpt-6-luna",
1720
- "gpt-6-sol",
1721
1780
  "o3",
1722
1781
  "o3-mini",
1723
1782
  "o3-pro",
1724
1783
  "o4-mini"
1725
- ],
1726
- "url-context": [
1727
- "claude-fable-5",
1728
- "claude-fable-5-1",
1784
+ ] }],
1785
+ "url-context": [{ ids: [
1729
1786
  "claude-haiku-4-5",
1730
1787
  "claude-opus-4",
1731
1788
  "claude-opus-4-1",
@@ -1735,75 +1792,13 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1735
1792
  "claude-opus-4-7",
1736
1793
  "claude-opus-4-8",
1737
1794
  "claude-opus-4-8-fast",
1738
- "claude-opus-5",
1739
- "claude-opus-5-5",
1740
- "claude-opus-5-fast",
1741
1795
  "claude-sonnet-4",
1742
1796
  "claude-sonnet-4-5",
1743
- "claude-sonnet-4-6",
1744
- "gemini-2-5-computer-use-preview-10-2025",
1745
- "gemini-2-5-flash",
1746
- "gemini-2-5-flash-image",
1747
- "gemini-2-5-flash-image-preview",
1748
- "gemini-2-5-flash-lite",
1749
- "gemini-2-5-pro",
1750
- "gemini-2-5-pro-preview",
1751
- "gemini-2-5-pro-preview-05-06",
1752
- "gemini-3-1-flash-image",
1753
- "gemini-3-1-flash-image-preview",
1754
- "gemini-3-1-flash-lite",
1755
- "gemini-3-1-flash-lite-image",
1756
- "gemini-3-1-flash-lite-preview",
1757
- "gemini-3-1-flash-live-preview",
1758
- "gemini-3-1-pro-preview",
1759
- "gemini-3-1-pro-preview-customtools",
1760
- "gemini-3-5-flash",
1761
- "gemini-3-5-flash-lite",
1762
- "gemini-3-6-flash",
1763
- "gemini-3-7-flash",
1764
- "gemini-3-8-flash",
1765
- "gemini-3-flash",
1766
- "gemini-3-flash-preview",
1767
- "gemini-3-pro-image",
1768
- "gemini-3-pro-image-preview",
1769
- "gemini-4-argon",
1770
- "gemini-flash-latest",
1771
- "gemini-flash-lite-latest",
1772
- "gemini-pro-latest"
1773
- ]
1797
+ "claude-sonnet-4-6"
1798
+ ] }]
1774
1799
  },
1775
- zhipu: { "web-search": [
1776
- "glm-4",
1777
- "glm-4-1v",
1778
- "glm-4-5",
1779
- "glm-4-5-air",
1780
- "glm-4-5-flash",
1781
- "glm-4-5v",
1782
- "glm-4-6",
1783
- "glm-4-6v",
1784
- "glm-4-7",
1785
- "glm-4-7-flash",
1786
- "glm-4-7-flashx",
1787
- "glm-4-7-maas",
1788
- "glm-4-air",
1789
- "glm-4-airx",
1790
- "glm-4-flash",
1791
- "glm-4-flashx",
1792
- "glm-4-long",
1793
- "glm-4-plus",
1794
- "glm-5",
1795
- "glm-5-1",
1796
- "glm-5-2",
1797
- "glm-5-2-fast",
1798
- "glm-5-3",
1799
- "glm-5-3-fast",
1800
- "glm-5-3-flash",
1801
- "glm-5-maas",
1802
- "glm-5-turbo"
1803
- ] },
1804
- deepseek: { "web-search": ["deepseek-flash", "deepseek-v4-pro"] },
1805
- "new-api": {
1806
- "web-search": [
1800
+ cherryin: {
1801
+ "web-search": [{ ids: [
1807
1802
  "claude-haiku-4-5",
1808
1803
  "claude-opus-4",
1809
1804
  "claude-opus-4-1",
@@ -1836,6 +1831,7 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1836
1831
  "gemini-3-flash-preview",
1837
1832
  "gemini-3-pro-image",
1838
1833
  "gemini-3-pro-image-preview",
1834
+ "gemini-4-argon",
1839
1835
  "gemini-flash-latest",
1840
1836
  "gemini-flash-lite-latest",
1841
1837
  "gemini-pro-latest",
@@ -1879,8 +1875,8 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1879
1875
  "o3-mini",
1880
1876
  "o3-pro",
1881
1877
  "o4-mini"
1882
- ],
1883
- "url-context": [
1878
+ ] }],
1879
+ "url-context": [{ ids: [
1884
1880
  "claude-haiku-4-5",
1885
1881
  "claude-opus-4",
1886
1882
  "claude-opus-4-1",
@@ -1918,48 +1914,13 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1918
1914
  "gemini-3-flash-preview",
1919
1915
  "gemini-3-pro-image",
1920
1916
  "gemini-3-pro-image-preview",
1917
+ "gemini-4-argon",
1921
1918
  "gemini-flash-latest",
1922
1919
  "gemini-flash-lite-latest",
1923
1920
  "gemini-pro-latest"
1924
- ]
1925
- },
1926
- anthropic: {
1927
- "web-search": [
1928
- "claude-haiku-4-5",
1929
- "claude-haiku-5-5",
1930
- "claude-opus-4",
1931
- "claude-opus-4-1",
1932
- "claude-opus-4-5",
1933
- "claude-opus-4-6",
1934
- "claude-opus-4-6-v1",
1935
- "claude-opus-4-7",
1936
- "claude-opus-4-8",
1937
- "claude-opus-4-8-fast",
1938
- "claude-opus-5-5",
1939
- "claude-sonnet-4",
1940
- "claude-sonnet-4-5",
1941
- "claude-sonnet-4-6",
1942
- "claude-sonnet-5-5"
1943
- ],
1944
- "url-context": [
1945
- "claude-haiku-4-5",
1946
- "claude-haiku-5-5",
1947
- "claude-opus-4",
1948
- "claude-opus-4-1",
1949
- "claude-opus-4-5",
1950
- "claude-opus-4-6",
1951
- "claude-opus-4-6-v1",
1952
- "claude-opus-4-7",
1953
- "claude-opus-4-8",
1954
- "claude-opus-4-8-fast",
1955
- "claude-opus-5-5",
1956
- "claude-sonnet-4",
1957
- "claude-sonnet-4-5",
1958
- "claude-sonnet-4-6",
1959
- "claude-sonnet-5-5"
1960
- ]
1921
+ ] }]
1961
1922
  },
1962
- "claude-code": { "url-context": [
1923
+ "claude-code": { "url-context": [{ ids: [
1963
1924
  "claude-haiku-4-5",
1964
1925
  "claude-haiku-5-5",
1965
1926
  "claude-opus-4",
@@ -1974,126 +1935,141 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1974
1935
  "claude-sonnet-4-5",
1975
1936
  "claude-sonnet-4-6",
1976
1937
  "claude-sonnet-5-5"
1977
- ] },
1978
- openai: { "web-search": [
1979
- "gpt-4-1",
1980
- "gpt-4-1-mini",
1981
- "gpt-4-1-nano",
1982
- "gpt-4o",
1983
- "gpt-4o-mini",
1984
- "gpt-5",
1985
- "gpt-5-1",
1986
- "gpt-5-1-codex",
1987
- "gpt-5-1-codex-max",
1988
- "gpt-5-1-codex-mini",
1989
- "gpt-5-2",
1990
- "gpt-5-2-chat",
1991
- "gpt-5-2-chat-latest",
1992
- "gpt-5-2-codex",
1993
- "gpt-5-2-pro",
1994
- "gpt-5-3-chat-latest",
1995
- "gpt-5-3-codex",
1996
- "gpt-5-3-codex-spark",
1997
- "gpt-5-4",
1998
- "gpt-5-4-mini",
1999
- "gpt-5-4-nano",
2000
- "gpt-5-4-pro",
2001
- "gpt-5-5",
2002
- "gpt-5-5-pro",
2003
- "gpt-5-6",
2004
- "gpt-5-6-luna",
2005
- "gpt-5-6-luna-pro",
2006
- "gpt-5-6-sol",
2007
- "gpt-5-6-sol-pro",
2008
- "gpt-5-6-terra",
2009
- "gpt-5-6-terra-pro",
2010
- "gpt-5-chat",
2011
- "gpt-5-codex",
2012
- "gpt-5-mini",
2013
- "gpt-5-nano",
2014
- "gpt-5-pro",
2015
- "gpt-6-1-sol",
2016
- "gpt-6-1-terra",
2017
- "gpt-6-astra",
2018
- "gpt-6-luna",
2019
- "gpt-6-sol",
2020
- "o3",
2021
- "o3-mini",
2022
- "o3-pro",
2023
- "o4-mini"
2024
- ] },
2025
- "azure-openai": {
2026
- "web-search": [
2027
- "claude-haiku-4-5",
2028
- "claude-opus-4",
2029
- "claude-opus-4-1",
2030
- "claude-opus-4-5",
2031
- "claude-opus-4-6",
2032
- "claude-opus-4-6-v1",
2033
- "claude-opus-4-7",
2034
- "claude-opus-4-8",
2035
- "claude-opus-4-8-fast",
2036
- "claude-sonnet-4",
2037
- "claude-sonnet-4-5",
2038
- "claude-sonnet-4-6",
2039
- "gpt-4-1",
2040
- "gpt-4-1-mini",
2041
- "gpt-4-1-nano",
2042
- "gpt-4o",
2043
- "gpt-4o-mini",
2044
- "gpt-5",
2045
- "gpt-5-1",
2046
- "gpt-5-1-codex",
2047
- "gpt-5-1-codex-max",
2048
- "gpt-5-1-codex-mini",
2049
- "gpt-5-2",
2050
- "gpt-5-2-chat",
2051
- "gpt-5-2-chat-latest",
2052
- "gpt-5-2-codex",
2053
- "gpt-5-2-pro",
2054
- "gpt-5-3-chat-latest",
2055
- "gpt-5-3-codex",
2056
- "gpt-5-3-codex-spark",
2057
- "gpt-5-4",
2058
- "gpt-5-4-mini",
2059
- "gpt-5-4-nano",
2060
- "gpt-5-4-pro",
2061
- "gpt-5-5",
2062
- "gpt-5-5-pro",
2063
- "gpt-5-6",
2064
- "gpt-5-6-luna",
2065
- "gpt-5-6-luna-pro",
2066
- "gpt-5-6-sol",
2067
- "gpt-5-6-sol-pro",
2068
- "gpt-5-6-terra",
2069
- "gpt-5-6-terra-pro",
2070
- "gpt-5-chat",
2071
- "gpt-5-codex",
2072
- "gpt-5-mini",
2073
- "gpt-5-nano",
2074
- "gpt-5-pro",
2075
- "o3",
2076
- "o3-mini",
2077
- "o3-pro",
2078
- "o4-mini"
2079
- ],
2080
- "url-context": [
2081
- "claude-haiku-4-5",
2082
- "claude-opus-4",
2083
- "claude-opus-4-1",
2084
- "claude-opus-4-5",
2085
- "claude-opus-4-6",
2086
- "claude-opus-4-6-v1",
2087
- "claude-opus-4-7",
2088
- "claude-opus-4-8",
2089
- "claude-opus-4-8-fast",
2090
- "claude-sonnet-4",
2091
- "claude-sonnet-4-5",
2092
- "claude-sonnet-4-6"
2093
- ]
2094
- },
1938
+ ] }] },
1939
+ dashscope: {
1940
+ "web-search": [{
1941
+ ids: [
1942
+ "deepseek-r1",
1943
+ "deepseek-r1-distill-llama-70b",
1944
+ "deepseek-r1-distill-llama-8b",
1945
+ "deepseek-r1-distill-qwen-1-5b",
1946
+ "deepseek-r1-distill-qwen-14b",
1947
+ "deepseek-r1-distill-qwen-32b",
1948
+ "deepseek-r1-distill-qwen-7b",
1949
+ "deepseek-v3",
1950
+ "deepseek-v3-1",
1951
+ "deepseek-v3-1-maas",
1952
+ "deepseek-v3-1-terminus",
1953
+ "deepseek-v3-2",
1954
+ "deepseek-v3-2-exp",
1955
+ "deepseek-v3-2-maas",
1956
+ "deepseek-v4-flash",
1957
+ "deepseek-v4-flash-vision-exp",
1958
+ "deepseek-v4-pro",
1959
+ "glm-5-2",
1960
+ "kimi-k3",
1961
+ "minimax-m2-1",
1962
+ "qwen-flash",
1963
+ "qwen-plus",
1964
+ "qwen-plus-character",
1965
+ "qwen-plus-character-ja",
1966
+ "qwen-turbo",
1967
+ "qwen3-5-flash",
1968
+ "qwen3-5-flash-02-23",
1969
+ "qwen3-5-plus",
1970
+ "qwen3-5-plus-02-15",
1971
+ "qwen3-6-flash",
1972
+ "qwen3-6-max-preview",
1973
+ "qwen3-6-plus",
1974
+ "qwen3-7-max",
1975
+ "qwen3-7-plus",
1976
+ "qwen3-8-flash",
1977
+ "qwen3-8-flash-next",
1978
+ "qwen3-8-max",
1979
+ "qwen3-8-max-preview",
1980
+ "qwen3-max",
1981
+ "qwen3-max-preview",
1982
+ "qwq-plus"
1983
+ ],
1984
+ endpointTypes: ["openai-chat-completions", "openai-responses"]
1985
+ }, {
1986
+ ids: [
1987
+ "deepseek-v4-1-flash",
1988
+ "deepseek-v4-flash",
1989
+ "deepseek-v4-pro",
1990
+ "glm-5-2",
1991
+ "kimi-k3",
1992
+ "qwen3-5-flash",
1993
+ "qwen3-5-flash-02-23",
1994
+ "qwen3-5-plus",
1995
+ "qwen3-5-plus-02-15",
1996
+ "qwen3-6-flash",
1997
+ "qwen3-6-plus",
1998
+ "qwen3-7-flash",
1999
+ "qwen3-7-max",
2000
+ "qwen3-7-plus",
2001
+ "qwen3-8-2-4t-a95b",
2002
+ "qwen3-8-27b",
2003
+ "qwen3-8-flash",
2004
+ "qwen3-8-max"
2005
+ ],
2006
+ endpointTypes: ["anthropic-messages"]
2007
+ }],
2008
+ "url-context": [{
2009
+ ids: [
2010
+ "qwen-flash",
2011
+ "qwen-plus",
2012
+ "qwen-plus-character",
2013
+ "qwen-plus-character-ja",
2014
+ "qwen3-5-flash",
2015
+ "qwen3-5-flash-02-23",
2016
+ "qwen3-5-plus",
2017
+ "qwen3-5-plus-02-15",
2018
+ "qwen3-6-flash",
2019
+ "qwen3-6-max-preview",
2020
+ "qwen3-6-plus",
2021
+ "qwen3-7-max",
2022
+ "qwen3-7-plus",
2023
+ "qwen3-8-flash",
2024
+ "qwen3-8-flash-next",
2025
+ "qwen3-8-max",
2026
+ "qwen3-8-max-preview",
2027
+ "qwen3-max",
2028
+ "qwen3-max-preview"
2029
+ ],
2030
+ endpointTypes: ["openai-chat-completions", "openai-responses"]
2031
+ }, {
2032
+ ids: [
2033
+ "deepseek-v4-1-flash",
2034
+ "deepseek-v4-flash",
2035
+ "deepseek-v4-pro",
2036
+ "glm-5-2",
2037
+ "kimi-k3",
2038
+ "qwen3-5-flash",
2039
+ "qwen3-5-flash-02-23",
2040
+ "qwen3-5-plus",
2041
+ "qwen3-5-plus-02-15",
2042
+ "qwen3-6-flash",
2043
+ "qwen3-6-plus",
2044
+ "qwen3-7-flash",
2045
+ "qwen3-7-max",
2046
+ "qwen3-7-plus",
2047
+ "qwen3-8-2-4t-a95b",
2048
+ "qwen3-8-27b",
2049
+ "qwen3-8-flash",
2050
+ "qwen3-8-max"
2051
+ ],
2052
+ endpointTypes: ["anthropic-messages"]
2053
+ }]
2054
+ },
2055
+ deepseek: { "web-search": [{
2056
+ ids: ["deepseek-flash", "deepseek-v4-pro"],
2057
+ endpointTypes: ["openai-responses"]
2058
+ }] },
2059
+ doubao: { "web-search": [{ ids: [
2060
+ "doubao-seed-1-6",
2061
+ "doubao-seed-1-8",
2062
+ "doubao-seed-2-0-code-preview",
2063
+ "doubao-seed-2-0-lite",
2064
+ "doubao-seed-2-0-mini",
2065
+ "doubao-seed-2-0-pro",
2066
+ "doubao-seed-2-1-pro",
2067
+ "doubao-seed-2-1-turbo",
2068
+ "doubao-seed-character",
2069
+ "doubao-seed-evolving"
2070
+ ] }] },
2095
2071
  gemini: {
2096
- "web-search": [
2072
+ "web-search": [{ ids: [
2097
2073
  "gemini-2-5-computer-use-preview-10-2025",
2098
2074
  "gemini-2-5-flash",
2099
2075
  "gemini-2-5-flash-lite",
@@ -2118,8 +2094,8 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2118
2094
  "gemini-flash-latest",
2119
2095
  "gemini-flash-lite-latest",
2120
2096
  "gemini-pro-latest"
2121
- ],
2122
- "url-context": [
2097
+ ] }],
2098
+ "url-context": [{ ids: [
2123
2099
  "gemini-2-5-computer-use-preview-10-2025",
2124
2100
  "gemini-2-5-flash",
2125
2101
  "gemini-2-5-flash-image",
@@ -2149,10 +2125,62 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2149
2125
  "gemini-flash-latest",
2150
2126
  "gemini-flash-lite-latest",
2151
2127
  "gemini-pro-latest"
2152
- ]
2128
+ ] }]
2153
2129
  },
2154
- vertexai: {
2155
- "web-search": [
2130
+ grok: { "web-search": [{ ids: [
2131
+ "grok-4",
2132
+ "grok-4-1",
2133
+ "grok-4-1-fast",
2134
+ "grok-4-1-fast-non-reasoning",
2135
+ "grok-4-20",
2136
+ "grok-4-20-0309-non-reasoning",
2137
+ "grok-4-20-multi-agent",
2138
+ "grok-4-20-multi-agent-beta",
2139
+ "grok-4-20-non-reasoning",
2140
+ "grok-4-20-non-reasoning-beta",
2141
+ "grok-4-20-reasoning-beta",
2142
+ "grok-4-3",
2143
+ "grok-4-5",
2144
+ "grok-4-6",
2145
+ "grok-4-7",
2146
+ "grok-4-fast"
2147
+ ] }] },
2148
+ moonshot: { "web-search": [{
2149
+ ids: [
2150
+ "kimi-k2",
2151
+ "kimi-k2-5",
2152
+ "kimi-k2-6",
2153
+ "kimi-k2-7-code",
2154
+ "kimi-k2-7-code-highspeed",
2155
+ "kimi-k2-instruct",
2156
+ "kimi-k2-thinking-maas",
2157
+ "kimi-k3",
2158
+ "kimi-k3-1-pro",
2159
+ "kimi-k3-1-pro-highspeed",
2160
+ "kimi-k3-fast",
2161
+ "kimi-latest"
2162
+ ],
2163
+ endpointTypes: ["openai-chat-completions"]
2164
+ }] },
2165
+ "moonshot-global": { "web-search": [{
2166
+ ids: [
2167
+ "kimi-k2",
2168
+ "kimi-k2-5",
2169
+ "kimi-k2-6",
2170
+ "kimi-k2-7-code",
2171
+ "kimi-k2-7-code-highspeed",
2172
+ "kimi-k2-instruct",
2173
+ "kimi-k2-thinking-maas",
2174
+ "kimi-k3",
2175
+ "kimi-k3-1-pro",
2176
+ "kimi-k3-1-pro-highspeed",
2177
+ "kimi-k3-fast",
2178
+ "kimi-latest"
2179
+ ],
2180
+ endpointTypes: ["openai-chat-completions"]
2181
+ }] },
2182
+ "new-api": {
2183
+ "web-search": [{ ids: [
2156
2184
  "claude-haiku-4-5",
2157
2185
  "claude-opus-4",
2158
2186
  "claude-opus-4-1",
@@ -2185,12 +2213,63 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2185
2213
  "gemini-3-flash-preview",
2186
2214
  "gemini-3-pro-image",
2187
2215
  "gemini-3-pro-image-preview",
2188
- "gemini-4-argon",
2189
2216
  "gemini-flash-latest",
2190
2217
  "gemini-flash-lite-latest",
2191
- "gemini-pro-latest"
2192
- ],
2193
- "url-context": [
2218
+ "gemini-pro-latest",
2219
+ "gpt-4-1",
2220
+ "gpt-4-1-mini",
2221
+ "gpt-4-1-nano",
2222
+ "gpt-4o",
2223
+ "gpt-4o-mini",
2224
+ "gpt-5",
2225
+ "gpt-5-1",
2226
+ "gpt-5-1-codex",
2227
+ "gpt-5-1-codex-max",
2228
+ "gpt-5-1-codex-mini",
2229
+ "gpt-5-2",
2230
+ "gpt-5-2-chat",
2231
+ "gpt-5-2-chat-latest",
2232
+ "gpt-5-2-codex",
2233
+ "gpt-5-2-pro",
2234
+ "gpt-5-3-chat-latest",
2235
+ "gpt-5-3-codex",
2236
+ "gpt-5-3-codex-spark",
2237
+ "gpt-5-4",
2238
+ "gpt-5-4-mini",
2239
+ "gpt-5-4-nano",
2240
+ "gpt-5-4-pro",
2241
+ "gpt-5-5",
2242
+ "gpt-5-5-pro",
2243
+ "gpt-5-6",
2244
+ "gpt-5-6-luna",
2245
+ "gpt-5-6-luna-pro",
2246
+ "gpt-5-6-sol",
2247
+ "gpt-5-6-sol-pro",
2248
+ "gpt-5-6-terra",
2249
+ "gpt-5-6-terra-pro",
2250
+ "gpt-5-chat",
2251
+ "gpt-5-codex",
2252
+ "gpt-5-mini",
2253
+ "gpt-5-nano",
2254
+ "gpt-5-pro",
2255
+ "o3",
2256
+ "o3-mini",
2257
+ "o3-pro",
2258
+ "o4-mini"
2259
+ ] }],
2260
+ "url-context": [{ ids: [
2261
+ "claude-haiku-4-5",
2262
+ "claude-opus-4",
2263
+ "claude-opus-4-1",
2264
+ "claude-opus-4-5",
2265
+ "claude-opus-4-6",
2266
+ "claude-opus-4-6-v1",
2267
+ "claude-opus-4-7",
2268
+ "claude-opus-4-8",
2269
+ "claude-opus-4-8-fast",
2270
+ "claude-sonnet-4",
2271
+ "claude-sonnet-4-5",
2272
+ "claude-sonnet-4-6",
2194
2273
  "gemini-2-5-computer-use-preview-10-2025",
2195
2274
  "gemini-2-5-flash",
2196
2275
  "gemini-2-5-flash-image",
@@ -2216,173 +2295,65 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2216
2295
  "gemini-3-flash-preview",
2217
2296
  "gemini-3-pro-image",
2218
2297
  "gemini-3-pro-image-preview",
2219
- "gemini-4-argon",
2220
2298
  "gemini-flash-latest",
2221
2299
  "gemini-flash-lite-latest",
2222
2300
  "gemini-pro-latest"
2223
- ]
2301
+ ] }]
2224
2302
  },
2225
- moonshot: { "web-search": [
2226
- "kimi-k2",
2227
- "kimi-k2-5",
2228
- "kimi-k2-6",
2229
- "kimi-k2-7-code",
2230
- "kimi-k2-7-code-highspeed",
2231
- "kimi-k2-instruct",
2232
- "kimi-k2-thinking-maas",
2233
- "kimi-k3",
2234
- "kimi-k3-1-pro",
2235
- "kimi-k3-1-pro-highspeed",
2236
- "kimi-k3-fast",
2237
- "kimi-latest"
2238
- ] },
2239
- "moonshot-global": { "web-search": [
2240
- "kimi-k2",
2241
- "kimi-k2-5",
2242
- "kimi-k2-6",
2243
- "kimi-k2-7-code",
2244
- "kimi-k2-7-code-highspeed",
2245
- "kimi-k2-instruct",
2246
- "kimi-k2-thinking-maas",
2247
- "kimi-k3",
2248
- "kimi-k3-1-pro",
2249
- "kimi-k3-1-pro-highspeed",
2250
- "kimi-k3-fast",
2251
- "kimi-latest"
2252
- ] },
2253
- dashscope: {
2254
- "web-search": [
2255
- "deepseek-r1",
2256
- "deepseek-r1-distill-llama-70b",
2257
- "deepseek-r1-distill-llama-8b",
2258
- "deepseek-r1-distill-qwen-1-5b",
2259
- "deepseek-r1-distill-qwen-14b",
2260
- "deepseek-r1-distill-qwen-32b",
2261
- "deepseek-r1-distill-qwen-7b",
2262
- "deepseek-v3",
2263
- "deepseek-v3-1",
2264
- "deepseek-v3-1-maas",
2265
- "deepseek-v3-1-terminus",
2266
- "deepseek-v3-2",
2267
- "deepseek-v3-2-exp",
2268
- "deepseek-v3-2-maas",
2269
- "deepseek-v4-flash",
2270
- "deepseek-v4-flash-vision-exp",
2271
- "deepseek-v4-pro",
2272
- "glm-5-2",
2273
- "kimi-k3",
2274
- "minimax-m2-1",
2275
- "qwen-flash",
2276
- "qwen-plus",
2277
- "qwen-plus-character",
2278
- "qwen-plus-character-ja",
2279
- "qwen-turbo",
2280
- "qwen3-5-flash",
2281
- "qwen3-5-flash-02-23",
2282
- "qwen3-5-plus",
2283
- "qwen3-5-plus-02-15",
2284
- "qwen3-6-flash",
2285
- "qwen3-6-max-preview",
2286
- "qwen3-6-plus",
2287
- "qwen3-7-max",
2288
- "qwen3-7-plus",
2289
- "qwen3-8-flash",
2290
- "qwen3-8-flash-next",
2291
- "qwen3-8-max",
2292
- "qwen3-8-max-preview",
2293
- "qwen3-max",
2294
- "qwen3-max-preview",
2295
- "qwq-plus"
2296
- ],
2297
- "url-context": [
2298
- "qwen-flash",
2299
- "qwen-plus",
2300
- "qwen-plus-character",
2301
- "qwen-plus-character-ja",
2302
- "qwen3-5-flash",
2303
- "qwen3-5-flash-02-23",
2304
- "qwen3-5-plus",
2305
- "qwen3-5-plus-02-15",
2306
- "qwen3-6-flash",
2307
- "qwen3-6-max-preview",
2308
- "qwen3-6-plus",
2309
- "qwen3-7-max",
2310
- "qwen3-7-plus",
2311
- "qwen3-8-flash",
2312
- "qwen3-8-flash-next",
2313
- "qwen3-8-max",
2314
- "qwen3-8-max-preview",
2315
- "qwen3-max",
2316
- "qwen3-max-preview"
2317
- ]
2318
- },
2319
- doubao: { "web-search": [
2320
- "doubao-seed-1-6",
2321
- "doubao-seed-1-8",
2322
- "doubao-seed-2-0-code-preview",
2323
- "doubao-seed-2-0-lite",
2324
- "doubao-seed-2-0-mini",
2325
- "doubao-seed-2-0-pro",
2326
- "doubao-seed-2-1-pro",
2327
- "doubao-seed-2-1-turbo",
2328
- "doubao-seed-character",
2329
- "doubao-seed-evolving"
2330
- ] },
2331
- grok: { "web-search": [
2332
- "grok-4",
2333
- "grok-4-1",
2334
- "grok-4-1-fast",
2335
- "grok-4-1-fast-non-reasoning",
2336
- "grok-4-20",
2337
- "grok-4-20-0309-non-reasoning",
2338
- "grok-4-20-multi-agent",
2339
- "grok-4-20-multi-agent-beta",
2340
- "grok-4-20-non-reasoning",
2341
- "grok-4-20-non-reasoning-beta",
2342
- "grok-4-20-reasoning-beta",
2343
- "grok-4-3",
2344
- "grok-4-5",
2345
- "grok-4-6",
2346
- "grok-4-7",
2347
- "grok-4-fast"
2348
- ] },
2349
- perplexity: { "web-search": [
2303
+ openai: { "web-search": [{ ids: [
2304
+ "gpt-4-1",
2305
+ "gpt-4-1-mini",
2306
+ "gpt-4-1-nano",
2307
+ "gpt-4o",
2308
+ "gpt-4o-mini",
2309
+ "gpt-5",
2310
+ "gpt-5-1",
2311
+ "gpt-5-1-codex",
2312
+ "gpt-5-1-codex-max",
2313
+ "gpt-5-1-codex-mini",
2314
+ "gpt-5-2",
2315
+ "gpt-5-2-chat",
2316
+ "gpt-5-2-chat-latest",
2317
+ "gpt-5-2-codex",
2318
+ "gpt-5-2-pro",
2319
+ "gpt-5-3-chat-latest",
2320
+ "gpt-5-3-codex",
2321
+ "gpt-5-3-codex-spark",
2322
+ "gpt-5-4",
2323
+ "gpt-5-4-mini",
2324
+ "gpt-5-4-nano",
2325
+ "gpt-5-4-pro",
2326
+ "gpt-5-5",
2327
+ "gpt-5-5-pro",
2328
+ "gpt-5-6",
2329
+ "gpt-5-6-luna",
2330
+ "gpt-5-6-luna-pro",
2331
+ "gpt-5-6-sol",
2332
+ "gpt-5-6-sol-pro",
2333
+ "gpt-5-6-terra",
2334
+ "gpt-5-6-terra-pro",
2335
+ "gpt-5-chat",
2336
+ "gpt-5-codex",
2337
+ "gpt-5-mini",
2338
+ "gpt-5-nano",
2339
+ "gpt-5-pro",
2340
+ "gpt-6-1-sol",
2341
+ "gpt-6-1-terra",
2342
+ "gpt-6-astra",
2343
+ "gpt-6-luna",
2344
+ "gpt-6-sol",
2345
+ "o3",
2346
+ "o3-mini",
2347
+ "o3-pro",
2348
+ "o4-mini"
2349
+ ] }] },
2350
+ perplexity: { "web-search": [{ ids: [
2350
2351
  "sonar",
2351
2352
  "sonar-deep-research",
2352
2353
  "sonar-pro",
2353
2354
  "sonar-reasoning-pro"
2354
- ] },
2355
- "aws-bedrock": {
2356
- "web-search": [
2357
- "claude-haiku-4-5",
2358
- "claude-opus-4",
2359
- "claude-opus-4-1",
2360
- "claude-opus-4-5",
2361
- "claude-opus-4-6",
2362
- "claude-opus-4-6-v1",
2363
- "claude-opus-4-7",
2364
- "claude-opus-4-8",
2365
- "claude-opus-4-8-fast",
2366
- "claude-sonnet-4",
2367
- "claude-sonnet-4-5",
2368
- "claude-sonnet-4-6"
2369
- ],
2370
- "url-context": [
2371
- "claude-haiku-4-5",
2372
- "claude-opus-4",
2373
- "claude-opus-4-1",
2374
- "claude-opus-4-5",
2375
- "claude-opus-4-6",
2376
- "claude-opus-4-6-v1",
2377
- "claude-opus-4-7",
2378
- "claude-opus-4-8",
2379
- "claude-opus-4-8-fast",
2380
- "claude-sonnet-4",
2381
- "claude-sonnet-4-5",
2382
- "claude-sonnet-4-6"
2383
- ]
2384
- },
2385
- poe: { "web-search": [
2355
+ ] }] },
2356
+ poe: { "web-search": [{ ids: [
2386
2357
  "claude-haiku-4-5",
2387
2358
  "claude-opus-4",
2388
2359
  "claude-opus-4-1",
@@ -2564,13 +2535,171 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2564
2535
  "sonar-deep-research",
2565
2536
  "sonar-pro",
2566
2537
  "sonar-reasoning-pro"
2567
- ] }
2568
- }).map(([providerId, tools]) => [providerId, new Map(Object.entries(tools).map(([tool, ids]) => [tool, new Set(ids)]))]));
2569
- function isServerToolModelEligible(rawModelId, providerId, tool) {
2570
- const ids = ELIGIBLE_MODEL_IDS.get(providerId)?.get(tool);
2571
- if (!ids) return false;
2538
+ ] }] },
2539
+ qwencloud: {
2540
+ "web-search": [
2541
+ {
2542
+ ids: [
2543
+ "qwen3-5-122b-a10b",
2544
+ "qwen3-5-27b",
2545
+ "qwen3-5-35b-a3b",
2546
+ "qwen3-5-397b-a17b",
2547
+ "qwen3-5-flash",
2548
+ "qwen3-5-flash-02-23",
2549
+ "qwen3-5-plus",
2550
+ "qwen3-5-plus-02-15",
2551
+ "qwen3-6-27b",
2552
+ "qwen3-6-35b-a3b",
2553
+ "qwen3-6-flash",
2554
+ "qwen3-6-plus",
2555
+ "qwen3-7-flash",
2556
+ "qwen3-7-max",
2557
+ "qwen3-7-plus",
2558
+ "qwen3-8-2-4t-a95b",
2559
+ "qwen3-8-27b",
2560
+ "qwen3-8-flash",
2561
+ "qwen3-8-flash-next",
2562
+ "qwen3-8-max",
2563
+ "qwen3-8-omni-flash",
2564
+ "qwen3-max",
2565
+ "qwen3-max-preview"
2566
+ ],
2567
+ endpointTypes: ["openai-chat-completions"]
2568
+ },
2569
+ {
2570
+ ids: [
2571
+ "deepseek-v4-1-flash",
2572
+ "deepseek-v4-flash",
2573
+ "deepseek-v4-pro",
2574
+ "glm-5-2",
2575
+ "kimi-k3"
2576
+ ],
2577
+ endpointTypes: ["openai-responses"]
2578
+ },
2579
+ {
2580
+ ids: ["deepseek-v4-1-flash", "qwen3-8-max"],
2581
+ endpointTypes: ["anthropic-messages"]
2582
+ }
2583
+ ],
2584
+ "url-context": [{
2585
+ ids: ["deepseek-v4-1-flash", "qwen3-8-max"],
2586
+ endpointTypes: ["anthropic-messages"]
2587
+ }]
2588
+ },
2589
+ vertexai: {
2590
+ "web-search": [{ ids: [
2591
+ "claude-haiku-4-5",
2592
+ "claude-opus-4",
2593
+ "claude-opus-4-1",
2594
+ "claude-opus-4-5",
2595
+ "claude-opus-4-6",
2596
+ "claude-opus-4-6-v1",
2597
+ "claude-opus-4-7",
2598
+ "claude-opus-4-8",
2599
+ "claude-opus-4-8-fast",
2600
+ "claude-sonnet-4",
2601
+ "claude-sonnet-4-5",
2602
+ "claude-sonnet-4-6",
2603
+ "gemini-2-5-computer-use-preview-10-2025",
2604
+ "gemini-2-5-flash",
2605
+ "gemini-2-5-flash-lite",
2606
+ "gemini-2-5-pro",
2607
+ "gemini-2-5-pro-preview",
2608
+ "gemini-2-5-pro-preview-05-06",
2609
+ "gemini-3-1-flash-lite",
2610
+ "gemini-3-1-flash-lite-preview",
2611
+ "gemini-3-1-flash-live-preview",
2612
+ "gemini-3-1-pro-preview",
2613
+ "gemini-3-1-pro-preview-customtools",
2614
+ "gemini-3-5-flash",
2615
+ "gemini-3-5-flash-lite",
2616
+ "gemini-3-6-flash",
2617
+ "gemini-3-7-flash",
2618
+ "gemini-3-8-flash",
2619
+ "gemini-3-flash",
2620
+ "gemini-3-flash-preview",
2621
+ "gemini-3-pro-image",
2622
+ "gemini-3-pro-image-preview",
2623
+ "gemini-4-argon",
2624
+ "gemini-flash-latest",
2625
+ "gemini-flash-lite-latest",
2626
+ "gemini-pro-latest"
2627
+ ] }],
2628
+ "url-context": [{ ids: [
2629
+ "gemini-2-5-computer-use-preview-10-2025",
2630
+ "gemini-2-5-flash",
2631
+ "gemini-2-5-flash-image",
2632
+ "gemini-2-5-flash-image-preview",
2633
+ "gemini-2-5-flash-lite",
2634
+ "gemini-2-5-pro",
2635
+ "gemini-2-5-pro-preview",
2636
+ "gemini-2-5-pro-preview-05-06",
2637
+ "gemini-3-1-flash-image",
2638
+ "gemini-3-1-flash-image-preview",
2639
+ "gemini-3-1-flash-lite",
2640
+ "gemini-3-1-flash-lite-image",
2641
+ "gemini-3-1-flash-lite-preview",
2642
+ "gemini-3-1-flash-live-preview",
2643
+ "gemini-3-1-pro-preview",
2644
+ "gemini-3-1-pro-preview-customtools",
2645
+ "gemini-3-5-flash",
2646
+ "gemini-3-5-flash-lite",
2647
+ "gemini-3-6-flash",
2648
+ "gemini-3-7-flash",
2649
+ "gemini-3-8-flash",
2650
+ "gemini-3-flash",
2651
+ "gemini-3-flash-preview",
2652
+ "gemini-3-pro-image",
2653
+ "gemini-3-pro-image-preview",
2654
+ "gemini-4-argon",
2655
+ "gemini-flash-latest",
2656
+ "gemini-flash-lite-latest",
2657
+ "gemini-pro-latest"
2658
+ ] }]
2659
+ },
2660
+ zhipu: { "web-search": [{ ids: [
2661
+ "glm-4",
2662
+ "glm-4-1v",
2663
+ "glm-4-5",
2664
+ "glm-4-5-air",
2665
+ "glm-4-5-flash",
2666
+ "glm-4-5v",
2667
+ "glm-4-6",
2668
+ "glm-4-6v",
2669
+ "glm-4-7",
2670
+ "glm-4-7-flash",
2671
+ "glm-4-7-flashx",
2672
+ "glm-4-7-maas",
2673
+ "glm-4-air",
2674
+ "glm-4-airx",
2675
+ "glm-4-flash",
2676
+ "glm-4-flashx",
2677
+ "glm-4-long",
2678
+ "glm-4-plus",
2679
+ "glm-5",
2680
+ "glm-5-1",
2681
+ "glm-5-2",
2682
+ "glm-5-2-fast",
2683
+ "glm-5-3",
2684
+ "glm-5-3-fast",
2685
+ "glm-5-3-flash",
2686
+ "glm-5-maas",
2687
+ "glm-5-turbo"
2688
+ ] }] }
2689
+ }).map(([providerId, tools]) => [providerId, new Map(Object.entries(tools).map(([tool, declarations]) => [tool, declarations.map((declaration) => ({
2690
+ ids: new Set(declaration.ids),
2691
+ ...declaration.endpointTypes ? { endpointTypes: new Set(declaration.endpointTypes) } : {}
2692
+ }))]))]));
2693
+ /**
2694
+ * A model is eligible when SOME declaration claims it and — once the caller pins the request's
2695
+ * endpoint — that same declaration serves the endpoint. An undefined endpoint never excludes by
2696
+ * endpoint, so broad "is this model declared" queries keep working.
2697
+ */
2698
+ function isServerToolModelEligible(rawModelId, providerId, tool, endpointType) {
2699
+ const declarations = ELIGIBLE_DECLARATIONS.get(providerId)?.get(tool);
2700
+ if (!declarations?.length) return false;
2572
2701
  const exact = require_catalog.normalizeModelId(rawModelId, { keepParameterSize: true });
2573
- return ids.has(exact) || ids.has(require_catalog.normalizeModelId(rawModelId));
2702
+ return declarations.some((declaration) => (declaration.ids.has(exact) || declaration.ids.has(require_catalog.normalizeModelId(rawModelId))) && (!declaration.endpointTypes?.size || endpointType === void 0 || declaration.endpointTypes.has(endpointType)));
2574
2703
  }
2575
2704
  //#endregion
2576
2705
  exports.CANONICAL_PARAM_KEY = require_model.CANONICAL_PARAM_KEY;