@cherrystudio/provider-registry 0.2.9 → 0.3.1

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