@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.cjs CHANGED
@@ -1481,6 +1481,10 @@ const SERVER_TOOL_FUNCTION_MIXING_MODEL_IDS = [
1481
1481
  "gemini-3-6-flash",
1482
1482
  "gemini-3-7-flash",
1483
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",
1484
1488
  "gemini-3-flash",
1485
1489
  "gemini-3-flash-preview",
1486
1490
  "gemini-3-pro-image",
@@ -1517,9 +1521,11 @@ function isWebSearchEffortUnsupported(rawModelId, effort) {
1517
1521
  }
1518
1522
  //#endregion
1519
1523
  //#region src/patterns/serverToolModelEligibility.ts
1520
- const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1521
- cherryin: {
1522
- "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",
1523
1529
  "claude-haiku-4-5",
1524
1530
  "claude-opus-4",
1525
1531
  "claude-opus-4-1",
@@ -1529,6 +1535,9 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1529
1535
  "claude-opus-4-7",
1530
1536
  "claude-opus-4-8",
1531
1537
  "claude-opus-4-8-fast",
1538
+ "claude-opus-5",
1539
+ "claude-opus-5-5",
1540
+ "claude-opus-5-fast",
1532
1541
  "claude-sonnet-4",
1533
1542
  "claude-sonnet-4-5",
1534
1543
  "claude-sonnet-4-6",
@@ -1592,12 +1601,20 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1592
1601
  "gpt-5-mini",
1593
1602
  "gpt-5-nano",
1594
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",
1595
1610
  "o3",
1596
1611
  "o3-mini",
1597
1612
  "o3-pro",
1598
1613
  "o4-mini"
1599
- ],
1600
- "url-context": [
1614
+ ] }],
1615
+ "url-context": [{ ids: [
1616
+ "claude-fable-5",
1617
+ "claude-fable-5-1",
1601
1618
  "claude-haiku-4-5",
1602
1619
  "claude-opus-4",
1603
1620
  "claude-opus-4-1",
@@ -1607,6 +1624,9 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1607
1624
  "claude-opus-4-7",
1608
1625
  "claude-opus-4-8",
1609
1626
  "claude-opus-4-8-fast",
1627
+ "claude-opus-5",
1628
+ "claude-opus-5-5",
1629
+ "claude-opus-5-fast",
1610
1630
  "claude-sonnet-4",
1611
1631
  "claude-sonnet-4-5",
1612
1632
  "claude-sonnet-4-6",
@@ -1639,13 +1659,12 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1639
1659
  "gemini-flash-latest",
1640
1660
  "gemini-flash-lite-latest",
1641
1661
  "gemini-pro-latest"
1642
- ]
1662
+ ] }]
1643
1663
  },
1644
- aihubmix: {
1645
- "web-search": [
1646
- "claude-fable-5",
1647
- "claude-fable-5-1",
1664
+ anthropic: {
1665
+ "web-search": [{ ids: [
1648
1666
  "claude-haiku-4-5",
1667
+ "claude-haiku-5-5",
1649
1668
  "claude-opus-4",
1650
1669
  "claude-opus-4-1",
1651
1670
  "claude-opus-4-5",
@@ -1654,36 +1673,74 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1654
1673
  "claude-opus-4-7",
1655
1674
  "claude-opus-4-8",
1656
1675
  "claude-opus-4-8-fast",
1657
- "claude-opus-5",
1658
1676
  "claude-opus-5-5",
1659
- "claude-opus-5-fast",
1660
1677
  "claude-sonnet-4",
1661
1678
  "claude-sonnet-4-5",
1662
1679
  "claude-sonnet-4-6",
1663
- "gemini-2-5-computer-use-preview-10-2025",
1664
- "gemini-2-5-flash",
1665
- "gemini-2-5-flash-lite",
1666
- "gemini-2-5-pro",
1667
- "gemini-2-5-pro-preview",
1668
- "gemini-2-5-pro-preview-05-06",
1669
- "gemini-3-1-flash-lite",
1670
- "gemini-3-1-flash-lite-preview",
1671
- "gemini-3-1-flash-live-preview",
1672
- "gemini-3-1-pro-preview",
1673
- "gemini-3-1-pro-preview-customtools",
1674
- "gemini-3-5-flash",
1675
- "gemini-3-5-flash-lite",
1676
- "gemini-3-6-flash",
1677
- "gemini-3-7-flash",
1678
- "gemini-3-8-flash",
1679
- "gemini-3-flash",
1680
- "gemini-3-flash-preview",
1681
- "gemini-3-pro-image",
1682
- "gemini-3-pro-image-preview",
1683
- "gemini-4-argon",
1684
- "gemini-flash-latest",
1685
- "gemini-flash-lite-latest",
1686
- "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",
1687
1744
  "gpt-4-1",
1688
1745
  "gpt-4-1-mini",
1689
1746
  "gpt-4-1-nano",
@@ -1720,20 +1777,12 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1720
1777
  "gpt-5-mini",
1721
1778
  "gpt-5-nano",
1722
1779
  "gpt-5-pro",
1723
- "gpt-6-1-sol",
1724
- "gpt-6-1-terra",
1725
- "gpt-6-astra",
1726
- "gpt-6-astra-pro",
1727
- "gpt-6-luna",
1728
- "gpt-6-sol",
1729
1780
  "o3",
1730
1781
  "o3-mini",
1731
1782
  "o3-pro",
1732
1783
  "o4-mini"
1733
- ],
1734
- "url-context": [
1735
- "claude-fable-5",
1736
- "claude-fable-5-1",
1784
+ ] }],
1785
+ "url-context": [{ ids: [
1737
1786
  "claude-haiku-4-5",
1738
1787
  "claude-opus-4",
1739
1788
  "claude-opus-4-1",
@@ -1743,75 +1792,13 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1743
1792
  "claude-opus-4-7",
1744
1793
  "claude-opus-4-8",
1745
1794
  "claude-opus-4-8-fast",
1746
- "claude-opus-5",
1747
- "claude-opus-5-5",
1748
- "claude-opus-5-fast",
1749
1795
  "claude-sonnet-4",
1750
1796
  "claude-sonnet-4-5",
1751
- "claude-sonnet-4-6",
1752
- "gemini-2-5-computer-use-preview-10-2025",
1753
- "gemini-2-5-flash",
1754
- "gemini-2-5-flash-image",
1755
- "gemini-2-5-flash-image-preview",
1756
- "gemini-2-5-flash-lite",
1757
- "gemini-2-5-pro",
1758
- "gemini-2-5-pro-preview",
1759
- "gemini-2-5-pro-preview-05-06",
1760
- "gemini-3-1-flash-image",
1761
- "gemini-3-1-flash-image-preview",
1762
- "gemini-3-1-flash-lite",
1763
- "gemini-3-1-flash-lite-image",
1764
- "gemini-3-1-flash-lite-preview",
1765
- "gemini-3-1-flash-live-preview",
1766
- "gemini-3-1-pro-preview",
1767
- "gemini-3-1-pro-preview-customtools",
1768
- "gemini-3-5-flash",
1769
- "gemini-3-5-flash-lite",
1770
- "gemini-3-6-flash",
1771
- "gemini-3-7-flash",
1772
- "gemini-3-8-flash",
1773
- "gemini-3-flash",
1774
- "gemini-3-flash-preview",
1775
- "gemini-3-pro-image",
1776
- "gemini-3-pro-image-preview",
1777
- "gemini-4-argon",
1778
- "gemini-flash-latest",
1779
- "gemini-flash-lite-latest",
1780
- "gemini-pro-latest"
1781
- ]
1797
+ "claude-sonnet-4-6"
1798
+ ] }]
1782
1799
  },
1783
- zhipu: { "web-search": [
1784
- "glm-4",
1785
- "glm-4-1v",
1786
- "glm-4-5",
1787
- "glm-4-5-air",
1788
- "glm-4-5-flash",
1789
- "glm-4-5v",
1790
- "glm-4-6",
1791
- "glm-4-6v",
1792
- "glm-4-7",
1793
- "glm-4-7-flash",
1794
- "glm-4-7-flashx",
1795
- "glm-4-7-maas",
1796
- "glm-4-air",
1797
- "glm-4-airx",
1798
- "glm-4-flash",
1799
- "glm-4-flashx",
1800
- "glm-4-long",
1801
- "glm-4-plus",
1802
- "glm-5",
1803
- "glm-5-1",
1804
- "glm-5-2",
1805
- "glm-5-2-fast",
1806
- "glm-5-3",
1807
- "glm-5-3-fast",
1808
- "glm-5-3-flash",
1809
- "glm-5-maas",
1810
- "glm-5-turbo"
1811
- ] },
1812
- deepseek: { "web-search": ["deepseek-flash", "deepseek-v4-pro"] },
1813
- "new-api": {
1814
- "web-search": [
1800
+ cherryin: {
1801
+ "web-search": [{ ids: [
1815
1802
  "claude-haiku-4-5",
1816
1803
  "claude-opus-4",
1817
1804
  "claude-opus-4-1",
@@ -1844,6 +1831,7 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1844
1831
  "gemini-3-flash-preview",
1845
1832
  "gemini-3-pro-image",
1846
1833
  "gemini-3-pro-image-preview",
1834
+ "gemini-4-argon",
1847
1835
  "gemini-flash-latest",
1848
1836
  "gemini-flash-lite-latest",
1849
1837
  "gemini-pro-latest",
@@ -1887,8 +1875,8 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1887
1875
  "o3-mini",
1888
1876
  "o3-pro",
1889
1877
  "o4-mini"
1890
- ],
1891
- "url-context": [
1878
+ ] }],
1879
+ "url-context": [{ ids: [
1892
1880
  "claude-haiku-4-5",
1893
1881
  "claude-opus-4",
1894
1882
  "claude-opus-4-1",
@@ -1926,48 +1914,13 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1926
1914
  "gemini-3-flash-preview",
1927
1915
  "gemini-3-pro-image",
1928
1916
  "gemini-3-pro-image-preview",
1917
+ "gemini-4-argon",
1929
1918
  "gemini-flash-latest",
1930
1919
  "gemini-flash-lite-latest",
1931
1920
  "gemini-pro-latest"
1932
- ]
1933
- },
1934
- anthropic: {
1935
- "web-search": [
1936
- "claude-haiku-4-5",
1937
- "claude-haiku-5-5",
1938
- "claude-opus-4",
1939
- "claude-opus-4-1",
1940
- "claude-opus-4-5",
1941
- "claude-opus-4-6",
1942
- "claude-opus-4-6-v1",
1943
- "claude-opus-4-7",
1944
- "claude-opus-4-8",
1945
- "claude-opus-4-8-fast",
1946
- "claude-opus-5-5",
1947
- "claude-sonnet-4",
1948
- "claude-sonnet-4-5",
1949
- "claude-sonnet-4-6",
1950
- "claude-sonnet-5-5"
1951
- ],
1952
- "url-context": [
1953
- "claude-haiku-4-5",
1954
- "claude-haiku-5-5",
1955
- "claude-opus-4",
1956
- "claude-opus-4-1",
1957
- "claude-opus-4-5",
1958
- "claude-opus-4-6",
1959
- "claude-opus-4-6-v1",
1960
- "claude-opus-4-7",
1961
- "claude-opus-4-8",
1962
- "claude-opus-4-8-fast",
1963
- "claude-opus-5-5",
1964
- "claude-sonnet-4",
1965
- "claude-sonnet-4-5",
1966
- "claude-sonnet-4-6",
1967
- "claude-sonnet-5-5"
1968
- ]
1921
+ ] }]
1969
1922
  },
1970
- "claude-code": { "url-context": [
1923
+ "claude-code": { "url-context": [{ ids: [
1971
1924
  "claude-haiku-4-5",
1972
1925
  "claude-haiku-5-5",
1973
1926
  "claude-opus-4",
@@ -1982,126 +1935,141 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
1982
1935
  "claude-sonnet-4-5",
1983
1936
  "claude-sonnet-4-6",
1984
1937
  "claude-sonnet-5-5"
1985
- ] },
1986
- openai: { "web-search": [
1987
- "gpt-4-1",
1988
- "gpt-4-1-mini",
1989
- "gpt-4-1-nano",
1990
- "gpt-4o",
1991
- "gpt-4o-mini",
1992
- "gpt-5",
1993
- "gpt-5-1",
1994
- "gpt-5-1-codex",
1995
- "gpt-5-1-codex-max",
1996
- "gpt-5-1-codex-mini",
1997
- "gpt-5-2",
1998
- "gpt-5-2-chat",
1999
- "gpt-5-2-chat-latest",
2000
- "gpt-5-2-codex",
2001
- "gpt-5-2-pro",
2002
- "gpt-5-3-chat-latest",
2003
- "gpt-5-3-codex",
2004
- "gpt-5-3-codex-spark",
2005
- "gpt-5-4",
2006
- "gpt-5-4-mini",
2007
- "gpt-5-4-nano",
2008
- "gpt-5-4-pro",
2009
- "gpt-5-5",
2010
- "gpt-5-5-pro",
2011
- "gpt-5-6",
2012
- "gpt-5-6-luna",
2013
- "gpt-5-6-luna-pro",
2014
- "gpt-5-6-sol",
2015
- "gpt-5-6-sol-pro",
2016
- "gpt-5-6-terra",
2017
- "gpt-5-6-terra-pro",
2018
- "gpt-5-chat",
2019
- "gpt-5-codex",
2020
- "gpt-5-mini",
2021
- "gpt-5-nano",
2022
- "gpt-5-pro",
2023
- "gpt-6-1-sol",
2024
- "gpt-6-1-terra",
2025
- "gpt-6-astra",
2026
- "gpt-6-luna",
2027
- "gpt-6-sol",
2028
- "o3",
2029
- "o3-mini",
2030
- "o3-pro",
2031
- "o4-mini"
2032
- ] },
2033
- "azure-openai": {
2034
- "web-search": [
2035
- "claude-haiku-4-5",
2036
- "claude-opus-4",
2037
- "claude-opus-4-1",
2038
- "claude-opus-4-5",
2039
- "claude-opus-4-6",
2040
- "claude-opus-4-6-v1",
2041
- "claude-opus-4-7",
2042
- "claude-opus-4-8",
2043
- "claude-opus-4-8-fast",
2044
- "claude-sonnet-4",
2045
- "claude-sonnet-4-5",
2046
- "claude-sonnet-4-6",
2047
- "gpt-4-1",
2048
- "gpt-4-1-mini",
2049
- "gpt-4-1-nano",
2050
- "gpt-4o",
2051
- "gpt-4o-mini",
2052
- "gpt-5",
2053
- "gpt-5-1",
2054
- "gpt-5-1-codex",
2055
- "gpt-5-1-codex-max",
2056
- "gpt-5-1-codex-mini",
2057
- "gpt-5-2",
2058
- "gpt-5-2-chat",
2059
- "gpt-5-2-chat-latest",
2060
- "gpt-5-2-codex",
2061
- "gpt-5-2-pro",
2062
- "gpt-5-3-chat-latest",
2063
- "gpt-5-3-codex",
2064
- "gpt-5-3-codex-spark",
2065
- "gpt-5-4",
2066
- "gpt-5-4-mini",
2067
- "gpt-5-4-nano",
2068
- "gpt-5-4-pro",
2069
- "gpt-5-5",
2070
- "gpt-5-5-pro",
2071
- "gpt-5-6",
2072
- "gpt-5-6-luna",
2073
- "gpt-5-6-luna-pro",
2074
- "gpt-5-6-sol",
2075
- "gpt-5-6-sol-pro",
2076
- "gpt-5-6-terra",
2077
- "gpt-5-6-terra-pro",
2078
- "gpt-5-chat",
2079
- "gpt-5-codex",
2080
- "gpt-5-mini",
2081
- "gpt-5-nano",
2082
- "gpt-5-pro",
2083
- "o3",
2084
- "o3-mini",
2085
- "o3-pro",
2086
- "o4-mini"
2087
- ],
2088
- "url-context": [
2089
- "claude-haiku-4-5",
2090
- "claude-opus-4",
2091
- "claude-opus-4-1",
2092
- "claude-opus-4-5",
2093
- "claude-opus-4-6",
2094
- "claude-opus-4-6-v1",
2095
- "claude-opus-4-7",
2096
- "claude-opus-4-8",
2097
- "claude-opus-4-8-fast",
2098
- "claude-sonnet-4",
2099
- "claude-sonnet-4-5",
2100
- "claude-sonnet-4-6"
2101
- ]
2102
- },
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
+ ] }] },
2103
2071
  gemini: {
2104
- "web-search": [
2072
+ "web-search": [{ ids: [
2105
2073
  "gemini-2-5-computer-use-preview-10-2025",
2106
2074
  "gemini-2-5-flash",
2107
2075
  "gemini-2-5-flash-lite",
@@ -2126,8 +2094,8 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2126
2094
  "gemini-flash-latest",
2127
2095
  "gemini-flash-lite-latest",
2128
2096
  "gemini-pro-latest"
2129
- ],
2130
- "url-context": [
2097
+ ] }],
2098
+ "url-context": [{ ids: [
2131
2099
  "gemini-2-5-computer-use-preview-10-2025",
2132
2100
  "gemini-2-5-flash",
2133
2101
  "gemini-2-5-flash-image",
@@ -2157,10 +2125,62 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2157
2125
  "gemini-flash-latest",
2158
2126
  "gemini-flash-lite-latest",
2159
2127
  "gemini-pro-latest"
2160
- ]
2128
+ ] }]
2161
2129
  },
2162
- vertexai: {
2163
- "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: [
2164
2184
  "claude-haiku-4-5",
2165
2185
  "claude-opus-4",
2166
2186
  "claude-opus-4-1",
@@ -2193,12 +2213,63 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2193
2213
  "gemini-3-flash-preview",
2194
2214
  "gemini-3-pro-image",
2195
2215
  "gemini-3-pro-image-preview",
2196
- "gemini-4-argon",
2197
2216
  "gemini-flash-latest",
2198
2217
  "gemini-flash-lite-latest",
2199
- "gemini-pro-latest"
2200
- ],
2201
- "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",
2202
2273
  "gemini-2-5-computer-use-preview-10-2025",
2203
2274
  "gemini-2-5-flash",
2204
2275
  "gemini-2-5-flash-image",
@@ -2224,173 +2295,65 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2224
2295
  "gemini-3-flash-preview",
2225
2296
  "gemini-3-pro-image",
2226
2297
  "gemini-3-pro-image-preview",
2227
- "gemini-4-argon",
2228
2298
  "gemini-flash-latest",
2229
2299
  "gemini-flash-lite-latest",
2230
2300
  "gemini-pro-latest"
2231
- ]
2232
- },
2233
- moonshot: { "web-search": [
2234
- "kimi-k2",
2235
- "kimi-k2-5",
2236
- "kimi-k2-6",
2237
- "kimi-k2-7-code",
2238
- "kimi-k2-7-code-highspeed",
2239
- "kimi-k2-instruct",
2240
- "kimi-k2-thinking-maas",
2241
- "kimi-k3",
2242
- "kimi-k3-1-pro",
2243
- "kimi-k3-1-pro-highspeed",
2244
- "kimi-k3-fast",
2245
- "kimi-latest"
2246
- ] },
2247
- "moonshot-global": { "web-search": [
2248
- "kimi-k2",
2249
- "kimi-k2-5",
2250
- "kimi-k2-6",
2251
- "kimi-k2-7-code",
2252
- "kimi-k2-7-code-highspeed",
2253
- "kimi-k2-instruct",
2254
- "kimi-k2-thinking-maas",
2255
- "kimi-k3",
2256
- "kimi-k3-1-pro",
2257
- "kimi-k3-1-pro-highspeed",
2258
- "kimi-k3-fast",
2259
- "kimi-latest"
2260
- ] },
2261
- dashscope: {
2262
- "web-search": [
2263
- "deepseek-r1",
2264
- "deepseek-r1-distill-llama-70b",
2265
- "deepseek-r1-distill-llama-8b",
2266
- "deepseek-r1-distill-qwen-1-5b",
2267
- "deepseek-r1-distill-qwen-14b",
2268
- "deepseek-r1-distill-qwen-32b",
2269
- "deepseek-r1-distill-qwen-7b",
2270
- "deepseek-v3",
2271
- "deepseek-v3-1",
2272
- "deepseek-v3-1-maas",
2273
- "deepseek-v3-1-terminus",
2274
- "deepseek-v3-2",
2275
- "deepseek-v3-2-exp",
2276
- "deepseek-v3-2-maas",
2277
- "deepseek-v4-flash",
2278
- "deepseek-v4-flash-vision-exp",
2279
- "deepseek-v4-pro",
2280
- "glm-5-2",
2281
- "kimi-k3",
2282
- "minimax-m2-1",
2283
- "qwen-flash",
2284
- "qwen-plus",
2285
- "qwen-plus-character",
2286
- "qwen-plus-character-ja",
2287
- "qwen-turbo",
2288
- "qwen3-5-flash",
2289
- "qwen3-5-flash-02-23",
2290
- "qwen3-5-plus",
2291
- "qwen3-5-plus-02-15",
2292
- "qwen3-6-flash",
2293
- "qwen3-6-max-preview",
2294
- "qwen3-6-plus",
2295
- "qwen3-7-max",
2296
- "qwen3-7-plus",
2297
- "qwen3-8-flash",
2298
- "qwen3-8-flash-next",
2299
- "qwen3-8-max",
2300
- "qwen3-8-max-preview",
2301
- "qwen3-max",
2302
- "qwen3-max-preview",
2303
- "qwq-plus"
2304
- ],
2305
- "url-context": [
2306
- "qwen-flash",
2307
- "qwen-plus",
2308
- "qwen-plus-character",
2309
- "qwen-plus-character-ja",
2310
- "qwen3-5-flash",
2311
- "qwen3-5-flash-02-23",
2312
- "qwen3-5-plus",
2313
- "qwen3-5-plus-02-15",
2314
- "qwen3-6-flash",
2315
- "qwen3-6-max-preview",
2316
- "qwen3-6-plus",
2317
- "qwen3-7-max",
2318
- "qwen3-7-plus",
2319
- "qwen3-8-flash",
2320
- "qwen3-8-flash-next",
2321
- "qwen3-8-max",
2322
- "qwen3-8-max-preview",
2323
- "qwen3-max",
2324
- "qwen3-max-preview"
2325
- ]
2301
+ ] }]
2326
2302
  },
2327
- doubao: { "web-search": [
2328
- "doubao-seed-1-6",
2329
- "doubao-seed-1-8",
2330
- "doubao-seed-2-0-code-preview",
2331
- "doubao-seed-2-0-lite",
2332
- "doubao-seed-2-0-mini",
2333
- "doubao-seed-2-0-pro",
2334
- "doubao-seed-2-1-pro",
2335
- "doubao-seed-2-1-turbo",
2336
- "doubao-seed-character",
2337
- "doubao-seed-evolving"
2338
- ] },
2339
- grok: { "web-search": [
2340
- "grok-4",
2341
- "grok-4-1",
2342
- "grok-4-1-fast",
2343
- "grok-4-1-fast-non-reasoning",
2344
- "grok-4-20",
2345
- "grok-4-20-0309-non-reasoning",
2346
- "grok-4-20-multi-agent",
2347
- "grok-4-20-multi-agent-beta",
2348
- "grok-4-20-non-reasoning",
2349
- "grok-4-20-non-reasoning-beta",
2350
- "grok-4-20-reasoning-beta",
2351
- "grok-4-3",
2352
- "grok-4-5",
2353
- "grok-4-6",
2354
- "grok-4-7",
2355
- "grok-4-fast"
2356
- ] },
2357
- 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: [
2358
2351
  "sonar",
2359
2352
  "sonar-deep-research",
2360
2353
  "sonar-pro",
2361
2354
  "sonar-reasoning-pro"
2362
- ] },
2363
- "aws-bedrock": {
2364
- "web-search": [
2365
- "claude-haiku-4-5",
2366
- "claude-opus-4",
2367
- "claude-opus-4-1",
2368
- "claude-opus-4-5",
2369
- "claude-opus-4-6",
2370
- "claude-opus-4-6-v1",
2371
- "claude-opus-4-7",
2372
- "claude-opus-4-8",
2373
- "claude-opus-4-8-fast",
2374
- "claude-sonnet-4",
2375
- "claude-sonnet-4-5",
2376
- "claude-sonnet-4-6"
2377
- ],
2378
- "url-context": [
2379
- "claude-haiku-4-5",
2380
- "claude-opus-4",
2381
- "claude-opus-4-1",
2382
- "claude-opus-4-5",
2383
- "claude-opus-4-6",
2384
- "claude-opus-4-6-v1",
2385
- "claude-opus-4-7",
2386
- "claude-opus-4-8",
2387
- "claude-opus-4-8-fast",
2388
- "claude-sonnet-4",
2389
- "claude-sonnet-4-5",
2390
- "claude-sonnet-4-6"
2391
- ]
2392
- },
2393
- poe: { "web-search": [
2355
+ ] }] },
2356
+ poe: { "web-search": [{ ids: [
2394
2357
  "claude-haiku-4-5",
2395
2358
  "claude-opus-4",
2396
2359
  "claude-opus-4-1",
@@ -2572,13 +2535,171 @@ const ELIGIBLE_MODEL_IDS = new Map(Object.entries({
2572
2535
  "sonar-deep-research",
2573
2536
  "sonar-pro",
2574
2537
  "sonar-reasoning-pro"
2575
- ] }
2576
- }).map(([providerId, tools]) => [providerId, new Map(Object.entries(tools).map(([tool, ids]) => [tool, new Set(ids)]))]));
2577
- function isServerToolModelEligible(rawModelId, providerId, tool) {
2578
- const ids = ELIGIBLE_MODEL_IDS.get(providerId)?.get(tool);
2579
- 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;
2580
2701
  const exact = require_catalog.normalizeModelId(rawModelId, { keepParameterSize: true });
2581
- 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)));
2582
2703
  }
2583
2704
  //#endregion
2584
2705
  exports.CANONICAL_PARAM_KEY = require_model.CANONICAL_PARAM_KEY;