@fased/fased 0.1.48 → 0.1.51

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.
Files changed (157) hide show
  1. package/dist/agents/auth-health.js +11 -5
  2. package/dist/agents/current-model-catalog.js +45 -0
  3. package/dist/agents/model-catalog-source.js +28 -3
  4. package/dist/agents/provider-id.js +1 -1
  5. package/dist/brand.js +1 -1
  6. package/dist/build-info.json +3 -3
  7. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  8. package/dist/cli/lightweight/gateway-runtime-probe.js +50 -0
  9. package/dist/cli/update-cli/update-command.js +120 -0
  10. package/dist/commands/doctor-state-integrity.js +25 -2
  11. package/dist/config/sessions/transcript.js +30 -16
  12. package/dist/config/sessions.js +2 -2
  13. package/dist/control-ui/assets/{app-CHqTx3P_.js → app-wJm5kuje.js} +1274 -1259
  14. package/dist/control-ui/assets/{chat-model-ref-BbrdMKjQ.js → chat-model-ref-Cs2TTOtF.js} +2 -2
  15. package/dist/control-ui/assets/{config-FFZLTSLS.js → config-CU5Zi8Dh.js} +2 -2
  16. package/dist/control-ui/assets/{index-CFHfNlLv.js → index-vTDTf5Zv.js} +3 -3
  17. package/dist/control-ui/assets/{mining-D_VAMFMY.js → mining-BdhMn18r.js} +3 -3
  18. package/dist/control-ui/assets/{providers-DqFL6WrJ.js → providers-C0DEXi8e.js} +14 -3
  19. package/dist/control-ui/index.html +1 -1
  20. package/dist/gateway/probe-payload.js +14 -0
  21. package/dist/gateway/probe.js +8 -4
  22. package/dist/gateway/protocol/schema/agents-models-skills.js +1 -0
  23. package/dist/gateway/protocol/schema/frames.js +5 -0
  24. package/dist/gateway/protocol/schema/snapshot.js +1 -0
  25. package/dist/gateway/server/ws-connection/message-handler.js +2 -1
  26. package/dist/gateway/server-http-lazy.js +2 -4
  27. package/dist/gateway/server-http.js +3 -4
  28. package/dist/gateway/server-methods/chat.js +4 -29
  29. package/dist/gateway/server-methods/models.js +3 -2
  30. package/dist/infra/system-presence.js +4 -2
  31. package/dist/light-update-precheck.js +1 -1
  32. package/dist/light-update-status.js +1 -1
  33. package/dist/memory/inventory.js +19 -0
  34. package/dist/plugin-sdk/{accounts-DI5226U8.js → accounts-BfdIB9Ud.js} +1 -1
  35. package/dist/plugin-sdk/{actions-CEj4gOU2.js → actions-DHN_x97P.js} +2 -2
  36. package/dist/plugin-sdk/{active-listener-Ss4UKXZb.js → active-listener-CIP_Ht8d.js} +1 -1
  37. package/dist/plugin-sdk/{audio-preflight-Cu4alGjb.js → audio-preflight-CKGhXtyV.js} +26 -26
  38. package/dist/plugin-sdk/{audit-BTskqjJ_.js → audit-Cmg38KPG.js} +1 -1
  39. package/dist/plugin-sdk/{channel-access-B1KciKmw.js → channel-access-JHDguu4T.js} +1 -1
  40. package/dist/plugin-sdk/{channel-access-configure-Y91FLOJc.js → channel-access-configure-B8mwKp-Z.js} +1 -1
  41. package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
  42. package/dist/plugin-sdk/channel-plugin-common.js +4 -4
  43. package/dist/plugin-sdk/{chunk-items-Q8HhMuSe.js → chunk-items-iKdlZyWZ.js} +1 -1
  44. package/dist/plugin-sdk/{chunk-CSUjIQSx.js → chunk-oJRyTNTL.js} +1 -1
  45. package/dist/plugin-sdk/command-status.js +26 -26
  46. package/dist/plugin-sdk/{commands-registry-DJ0pfCcY.js → commands-registry-Cjo7OjIf.js} +2 -2
  47. package/dist/plugin-sdk/{common-Cjm8psuW.js → common-Dx4sUa9f.js} +1 -1
  48. package/dist/plugin-sdk/{config-DutIeFge.js → config-DdS0zHiU.js} +80 -4
  49. package/dist/plugin-sdk/{config-schema-Cg6PYSHR.js → config-schema-BJQEjMPz.js} +2090 -523
  50. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  51. package/dist/plugin-sdk/discord.d.ts +4 -4
  52. package/dist/plugin-sdk/discord.js +19 -19
  53. package/dist/plugin-sdk/{handle-action-Dp2741iu.js → handle-action-wR0x9b0c.js} +13 -13
  54. package/dist/plugin-sdk/{helpers-BCZ9d3fl.js → helpers-DkauqZNP.js} +1 -1
  55. package/dist/plugin-sdk/{image-ops-B-QR_M9Z.js → image-ops-DmSjpAeh.js} +1 -1
  56. package/dist/plugin-sdk/index.d.ts +17 -17
  57. package/dist/plugin-sdk/index.js +28 -28
  58. package/dist/plugin-sdk/{login-BFvQxf9o.js → login-DB9LIbi8.js} +3 -3
  59. package/dist/plugin-sdk/{login-qr-CERTe_nD.js → login-qr-CDhMa-c7.js} +3 -3
  60. package/dist/plugin-sdk/{manager-Dhq3SXpO.js → manager-DGZsMQWR.js} +2 -2
  61. package/dist/plugin-sdk/{markdown-tables-B1Tx7c77.js → markdown-tables-BX7JXDUV.js} +1 -1
  62. package/dist/plugin-sdk/{media-BwsqooWC.js → media-DyzsScOp.js} +2 -2
  63. package/dist/plugin-sdk/{monitor-BYzN5Qr4.js → monitor-B91PZ2mD.js} +31 -31
  64. package/dist/plugin-sdk/{monitor-CJiacqtR.js → monitor-BH9rTJFq.js} +30 -30
  65. package/dist/plugin-sdk/{openresponses-http-VLSSqCZZ.js → openresponses-http-CmBLZ9bH.js} +26 -26
  66. package/dist/plugin-sdk/{optional-runtime-dependency-BEBP4VFJ.js → optional-runtime-dependency-DaMkPVe_.js} +1 -1
  67. package/dist/plugin-sdk/{outbound-BqWgaC5M.js → outbound-X-m2mBZn.js} +6 -6
  68. package/dist/plugin-sdk/{outbound-attachment-L1q40kiu.js → outbound-attachment-M0NCUSG-.js} +2 -2
  69. package/dist/plugin-sdk/{pairing-message-DWXHX-jt.d.ts → pairing-message-BaQiXKLE.d.ts} +1 -1
  70. package/dist/plugin-sdk/{pairing-message-CZBahREg.js → pairing-message-hnmpJlW2.js} +1 -1
  71. package/dist/plugin-sdk/{pairing-store-D7I1Qmiw.js → pairing-store-DyghUm9G.js} +2 -2
  72. package/dist/plugin-sdk/{pi-model-discovery-C5klknQZ.js → pi-model-discovery-ReorOh7W.js} +1 -1
  73. package/dist/plugin-sdk/{pi-model-discovery-runtime-DIEMhCZ5.js → pi-model-discovery-runtime-C-CHZo03.js} +2 -2
  74. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
  75. package/dist/plugin-sdk/{pw-ai-Bv-q25gY.js → pw-ai-D_gli3_r.js} +3 -3
  76. package/dist/plugin-sdk/{replies-Bd9ktEkq.js → replies-Djyehmcu.js} +2 -2
  77. package/dist/plugin-sdk/{resolve-outbound-target-CCIyBb5H.js → resolve-outbound-target-Chznq8rS.js} +1 -1
  78. package/dist/plugin-sdk/{resolve-route-B7vZ3nKp.js → resolve-route-Ce08Fx-G.js} +1 -1
  79. package/dist/plugin-sdk/{retry-policy-ChC3G4lv.js → retry-policy-eS25atAo.js} +1 -1
  80. package/dist/plugin-sdk/{runtime-BLknHFGz.js → runtime-Cv3gX3Wc.js} +31 -18
  81. package/dist/plugin-sdk/{runtime-dependency-C5rJfC0u.js → runtime-dependency-p_iKbESf.js} +2 -2
  82. package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
  83. package/dist/plugin-sdk/sat-runtime.js +5 -5
  84. package/dist/plugin-sdk/{send-Bd3Z-jAd.js → send-B3RAELvw.js} +6 -6
  85. package/dist/plugin-sdk/{send-Bmtz9ICm.js → send-BuPGxx3-.js} +8 -8
  86. package/dist/plugin-sdk/{send-mkyZzhCO.js → send-C-jaxZJG.js} +5 -5
  87. package/dist/plugin-sdk/{send-CUGEhiUa.js → send-CSob7dn9.js} +6 -6
  88. package/dist/plugin-sdk/{send-CMoWt-EX.js → send-CsLJsIvv.js} +7 -7
  89. package/dist/plugin-sdk/{session-D2zmelOL.js → session-DKJGakm1.js} +2 -2
  90. package/dist/plugin-sdk/{skill-commands-BybEjJ1_.js → skill-commands-BqpZG5nW.js} +2 -2
  91. package/dist/plugin-sdk/{slack-DogXvGG3.js → slack-CQqN9uBH.js} +38 -38
  92. package/dist/plugin-sdk/{slack-actions-uXb55QWW.js → slack-actions-DlbVH5SS.js} +11 -11
  93. package/dist/plugin-sdk/slack.d.ts +4 -4
  94. package/dist/plugin-sdk/slack.js +9 -9
  95. package/dist/plugin-sdk/{sticker-cache-BuPw7fTf.js → sticker-cache-CDyt2ZMh.js} +3 -3
  96. package/dist/plugin-sdk/{tables-CVDOT5dX.js → tables-Cij4iAXw.js} +1 -1
  97. package/dist/plugin-sdk/{targets-DskkhJAp.js → targets-VrYeAmeT.js} +1 -1
  98. package/dist/plugin-sdk/{telegram-actions-_KQPbjpI.js → telegram-actions-ZwUBOkwa.js} +29 -29
  99. package/dist/plugin-sdk/telegram.d.ts +4 -4
  100. package/dist/plugin-sdk/telegram.js +8 -8
  101. package/dist/plugin-sdk/{thread-bindings.lifecycle-CrhQXYEU.js → thread-bindings.lifecycle-BWIzwpPM.js} +3 -3
  102. package/dist/plugin-sdk/{thread-bindings.state-ssxdG7xV.js → thread-bindings.state-CpAQrGco.js} +2 -2
  103. package/dist/plugin-sdk/{tmp-fased-dir-Be1wBhVz.d.ts → tmp-fased-dir-DLba1ePP.d.ts} +1 -1
  104. package/dist/plugin-sdk/{types-CXLEOrJX.d.ts → types-CKR2Lvsa.d.ts} +1 -1
  105. package/dist/plugin-sdk/{types-CJGVZX6j.d.ts → types-NR-f-rw-.d.ts} +3 -3
  106. package/dist/plugin-sdk/{wallet-status-CQI89c_6.js → wallet-status-ClmXigGN.js} +10 -3
  107. package/dist/plugin-sdk/{web-C8DwA0eO.js → web-BK2j9z6c.js} +31 -31
  108. package/dist/plugin-sdk/{whatsapp-actions-DfvM-mlZ.js → whatsapp-actions-CaenMy79.js} +13 -13
  109. package/dist/plugin-sdk/{whatsapp-heartbeat-DyJasLDB.js → whatsapp-heartbeat-Cr9K5Sil.js} +2 -2
  110. package/dist/plugin-sdk/whatsapp.d.ts +11 -11
  111. package/dist/plugin-sdk/whatsapp.js +12 -12
  112. package/dist/plugin-sdk/{wsl-JwmI6Zu8.js → wsl-D_I-iL4U.js} +3 -3
  113. package/dist/plugin-sdk/{zod-schema.providers-core-BE_5DNhj.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +71 -71
  114. package/dist/plugins/status-cache.js +1 -1
  115. package/dist/providers/refresh.js +1 -1
  116. package/dist/providers/refreshed-model-capabilities.js +1935 -406
  117. package/dist/providers/registry.js +14 -3
  118. package/dist/version.js +11 -1
  119. package/extensions/acpx/package.json +1 -1
  120. package/extensions/bluebubbles/package.json +1 -1
  121. package/extensions/copilot-proxy/package.json +1 -1
  122. package/extensions/diagnostics-otel/package.json +1 -1
  123. package/extensions/fased-federation/package.json +1 -1
  124. package/extensions/google-gemini-cli-auth/package.json +1 -1
  125. package/extensions/imessage/package.json +1 -1
  126. package/extensions/irc/package.json +1 -1
  127. package/extensions/line/package.json +1 -1
  128. package/extensions/llm-task/package.json +1 -1
  129. package/extensions/lobster/package.json +1 -1
  130. package/extensions/matrix/CHANGELOG.md +18 -0
  131. package/extensions/matrix/package.json +1 -1
  132. package/extensions/mattermost/package.json +1 -1
  133. package/extensions/memory-core/package.json +2 -2
  134. package/extensions/memory-lancedb/package.json +1 -1
  135. package/extensions/minimax-portal-auth/package.json +1 -1
  136. package/extensions/msteams/CHANGELOG.md +18 -0
  137. package/extensions/msteams/package.json +1 -1
  138. package/extensions/nextcloud-talk/package.json +1 -1
  139. package/extensions/nostr/CHANGELOG.md +18 -0
  140. package/extensions/nostr/package.json +1 -1
  141. package/extensions/open-prose/package.json +1 -1
  142. package/extensions/sat-mining/index.ts +121 -12
  143. package/extensions/sat-mining/package.json +1 -1
  144. package/extensions/sat-mining/src/runtime.ts +9 -3
  145. package/extensions/signal/package.json +1 -1
  146. package/extensions/synology-chat/package.json +1 -1
  147. package/extensions/tlon/package.json +1 -1
  148. package/extensions/twitch/CHANGELOG.md +18 -0
  149. package/extensions/twitch/package.json +1 -1
  150. package/extensions/voice-call/CHANGELOG.md +18 -0
  151. package/extensions/voice-call/package.json +1 -1
  152. package/extensions/zalo/CHANGELOG.md +18 -0
  153. package/extensions/zalo/package.json +1 -1
  154. package/extensions/zalouser/CHANGELOG.md +18 -0
  155. package/extensions/zalouser/package.json +1 -1
  156. package/package.json +1 -1
  157. package/scripts/start-managed.sh +35 -1
@@ -1,2 +1,2 @@
1
- var e=[`off`,`minimal`,`low`,`medium`,`high`],t=[...e,`xhigh`],n=[`openai/gpt-5.6`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-luna`,`openai/gpt-5.5`,`openai/gpt-5.4`,`openai/gpt-5.4-mini`,`openai/gpt-5.4-nano`,`openai-codex/gpt-5.5`,`openai-codex/gpt-5.4`,`openai-codex/gpt-5.4-mini`,`openai-codex/gpt-5.3-codex-spark`,`github-copilot/gpt-5.5`,`github-copilot/gpt-5.4`,`github-copilot/gpt-5.4-mini`,`github-copilot/gpt-5.3-codex-spark`],r=new Set(n.map(e=>e.toLowerCase())),i=new Set(n.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e));function a(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function o(e){return a(e)===`zai`}function ee(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if(t===`off`)return`off`;if([`on`,`enable`,`enabled`].includes(t))return`low`;if([`min`,`minimal`].includes(t))return`minimal`;if([`low`,`thinkhard`,`think-hard`,`think_hard`].includes(t))return`low`;if([`mid`,`med`,`medium`,`thinkharder`,`think-harder`,`harder`].includes(t))return`medium`;if([`high`,`ultra`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`,`max`].includes(t))return`high`;if(t===`think`)return`minimal`}function te(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let a=e?.trim().toLowerCase();return a?r.has(`${a}/${n}`):i.has(n)}function ne(e){let t=new Set,n=[];for(let r of e??[]){let e=ee(r);!e||t.has(e)||(t.add(e),n.push(e))}return n}function re(n,r){return te(n,r)?[...t]:[...e]}function ie(e){let t=e?.trim().toLowerCase()??``;return t.includes(`fable-5`)||t.includes(`opus-4-8`)||t.includes(`opus-4.8`)||t.includes(`opus-4-6`)||t.includes(`opus-4.6`)||t.includes(`opus-4-7`)||t.includes(`opus-4.7`)||t.includes(`sonnet-5`)||t.includes(`sonnet-4-6`)||t.includes(`sonnet-4.6`)||t.includes(`sonnet-4-7`)||t.includes(`sonnet-4.7`)}function ae(e,t){let n=a(e);return n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?{thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:n===`anthropic`?{thinkingMode:ie(t)?`anthropic-adaptive`:`anthropic-thinking-budget`,reasoningBudgetSupported:!ie(t)}:n===`google`||n===`google-gemini-cli`?{thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:n===`zai`?{thinkingMode:`zai-binary`,reasoningBudgetSupported:!1}:n===`qwen`||n===`qwen-coding-plan`?{thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}:n===`moonshot`||n===`kimi-coding`?{thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}:{thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}}function oe(e,t){let n=a(e),r=t?.trim().toLowerCase()??``;return!n||!r?!1:n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?/^gpt-5(?:[.-]|$)/.test(r):n===`anthropic`?r.startsWith(`claude-`)||r.includes(`claude-`):n===`google`||n===`google-gemini-cli`?r.startsWith(`gemini-`):n===`zai`?r.startsWith(`glm-`):n===`qwen`||n===`qwen-coding-plan`?r.includes(`qwen`):n===`moonshot`||n===`kimi-coding`?r.includes(`kimi`):n===`minimax`||n===`minimax-cn`?r.includes(`minimax-m2`):[`openrouter`,`vercel-ai-gateway`,`opencode`,`huggingface`,`venice`,`together`,`synthetic`,`litellm`].includes(n)?/(gpt-5|claude-|gemini-|grok-|qwen|kimi|glm-|deepseek-r1|reasoning|thinking)/.test(r):!1}function s(e){let t=ne(e.capabilities?.thinkingLevels),n=t.length>0||typeof e.capabilities?.thinkingMode==`string`||typeof e.capabilities?.defaultThinkingLevel==`string`;if(e.capabilities?.fixedReasoning===!0&&!n||!(e.reasoning===!0||e.reasoning!==!1&&oe(e.provider,e.model))&&!n)return null;let r=ae(e.provider,e.model),i=r.thinkingMode===`zai-binary`?[`off`,`low`]:re(e.provider,e.model),a=t.length>0?t:i,o=ee(e.capabilities?.defaultThinkingLevel);return{thinkingLevels:a,defaultThinkingLevel:o&&a.includes(o)?o:a.includes(`low`)?`low`:a[0]??`off`,thinkingMode:e.capabilities?.thinkingMode??r.thinkingMode,reasoningBudgetSupported:e.capabilities?.reasoningBudgetSupported??r.reasoningBudgetSupported}}function se(e,t){return o(e)?[`off`,`low`]:re(e,t)}function ce(e,t){return se(e,t)}var le=`cloudflare-ai-gateway`,c=`cloudflare-ai-gateway`,ue=`claude-sonnet-5`;`${c}${ue}`;var de={input:0,output:0,cacheRead:0,cacheWrite:0},fe={tools:!0,json:!0},pe={thinkingLevels:[...e],defaultThinkingLevel:`low`,reasoningBudgetSupported:!0},me=[{id:ue,name:`Claude Sonnet 5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`}},{id:`claude-opus-4-8`,name:`Claude Opus 4.8`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1}},{id:`claude-haiku-4-5`,name:`Claude Haiku 4.5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:2e5,maxTokens:64e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-thinking-budget`}}],he=me.map(e=>e.id).map(e=>`${c}/${e}`);function ge(e=c){return Object.fromEntries(me.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var _e=`openai/gpt-oss-120b`;`${_e}`;var l={tools:!0,json:!0},ve=[{id:_e,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.15,output:.75,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:1.69,output:3.38,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Flash`,name:`DeepSeek V4 Flash`,reasoning:!1,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},capabilities:l},{id:`moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.95,output:4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:204800,maxTokens:8192,cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},capabilities:l},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:8192,cost:{input:1.4,output:4.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.6-35B-A3B`,name:`Qwen3.6 35B A3B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.15,output:.95,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-Coder-Next`,name:`Qwen3 Coder Next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.2,output:1.5,cacheRead:0,cacheWrite:0},capabilities:{tools:!0,json:!1}},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:1.3,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-26B-A4B-it`,name:`Gemma 4 26B A4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.13,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.269,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-VL-235B-A22B-Instruct`,name:`Qwen3 VL 235B A22B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:131072,maxTokens:8192,cost:{input:.3,output:1.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.09,output:.58,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-Coder-Next-FP8`,name:`Qwen3 Coder Next FP8`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:0,cacheWrite:0},capabilities:{tools:!1,json:!0}},{id:`EssentialAI/rnj-1-instruct`,name:`Rnj-1 Instruct`,reasoning:!1,input:[`text`],contextWindow:32768,maxTokens:8192,cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},capabilities:l},{id:`inclusionAI/Ling-2.6-1T`,name:`Ling 2.6 1T`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l}],ye=ve.map(e=>e.id).map(e=>`huggingface/${e}`);function be(e){return{...e.capabilities?{...e.capabilities}:{},...e.reasoning?{fixedReasoning:!0}:{}}}function xe(e=`huggingface`){return Object.fromEntries(ve.map(t=>[`${e}/${t.id}`.toLowerCase(),be(t)]))}var Se=`default`;`${Se}`;var Ce=[{id:Se,name:`LiteLLM proxy default`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,cost:{input:0,output:0,cacheRead:0,cacheWrite:0},capabilities:{}}],we=Ce.map(e=>e.id).map(e=>`litellm/${e}`);function Te(e=`litellm`){return Object.fromEntries(Ce.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ee=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.4-nano`,`gpt-5.3-codex-spark`,`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`qwen3.7-plus`,`minimax-m2.7`,`glm-5.2`,`kimi-k2.6`].map(e=>`opencode/${e}`);function De(e){let t=e.trim().toLowerCase();return t.startsWith(`claude-`)?{provider:`anthropic`,model:t}:t.startsWith(`gemini-`)?{provider:`google`,model:t}:t.startsWith(`glm-`)?{provider:`zai`,model:t}:t.startsWith(`kimi-`)?{provider:`moonshot`,model:t}:t.startsWith(`qwen`)?{provider:`qwen`,model:t}:t.startsWith(`gpt-`)?{provider:`openai`,model:t}:{provider:`opencode`,model:t}}function Oe(e){let t=De(e),n=s({provider:t.provider,model:t.model,reasoning:!0});return{tools:!0,json:!0,...n?{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}:{}}}function ke(e){return Object.fromEntries(e.map(e=>[e,Oe(e.replace(/^opencode\//,``))]))}var Ae=`hf:MiniMaxAI/MiniMax-M2.5`;`${Ae}`;var u={tools:!0,json:!0},je=[{id:`hf:zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:Ae,name:`MiniMax M2.5`,reasoning:!1,input:[`text`],contextWindow:191488,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7-Flash`,name:`GLM-4.7 Flash`,reasoning:!1,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`,name:`NVIDIA Nemotron 3 Super 120B`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7`,name:`GLM-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:65536,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:159e3,maxTokens:8192,capabilities:u},{id:`hf:openai/gpt-oss-120b`,name:`GPT OSS 120B`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-R1-0528`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3`,name:`DeepSeek V3`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:nvidia/Kimi-K2.5-NVFP4`,name:`Kimi K2.5 NVFP4`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-235B-A22B-Thinking-2507`,name:`Qwen3 235B A22B Thinking 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u}],Me=je.map(e=>e.id);function Ne(e=`synthetic`){return Object.fromEntries(je.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Pe=`moonshotai/Kimi-K2.6`;`${Pe}`;var d={tools:!0,json:!0},f={tools:!1,json:!1},Fe=[{id:Pe,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:16384,cost:{input:1.2,output:4.5,cacheRead:.2,cacheWrite:1.2},capabilities:{...d,video:!0}},{id:`moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:2.8,cacheRead:.5,cacheWrite:2.8},capabilities:d},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:32768,cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.3},capabilities:d},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1.4,output:4.4,cacheRead:1.4,cacheWrite:1.4},capabilities:d},{id:`zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1,output:3.2,cacheRead:1,cacheWrite:1},capabilities:d},{id:`Qwen/Qwen3.6-Plus`,name:`Qwen3.6 Plus`,reasoning:!0,input:[`text`],contextWindow:1e6,maxTokens:32768,cost:{input:.5,output:3,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.6,output:3.6,cacheRead:.6,cacheWrite:.6},capabilities:d},{id:`Qwen/Qwen3.5-9B`,name:`Qwen3.5 9B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.1,output:.15,cacheRead:.1,cacheWrite:.1},capabilities:d},{id:`openai/gpt-oss-120b`,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.15,output:.6,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.05,output:.2,cacheRead:.05,cacheWrite:.05},capabilities:d},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:512e3,maxTokens:32768,cost:{input:2.1,output:4.4,cacheRead:.2,cacheWrite:2.1},capabilities:d},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:32768,cost:{input:3,output:7,cacheRead:3,cacheWrite:3},capabilities:f},{id:`deepseek-ai/DeepSeek-V3.1`,name:`DeepSeek V3.1`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:32768,cost:{input:.6,output:1.7,cacheRead:.6,cacheWrite:.6},capabilities:f},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8`,name:`Qwen3 Coder 480B A35B Instruct FP8`,reasoning:!1,input:[`text`],contextWindow:256e3,maxTokens:32768,cost:{input:2,output:2,cacheRead:2,cacheWrite:2},capabilities:d},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507-tput`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.6,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`Qwen/Qwen3-Coder-Next-FP8`,name:`Qwen3 Coder Next FP8`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:1.2,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`meta-llama/Llama-3.3-70B-Instruct-Turbo`,name:`Llama 3.3 70B Instruct Turbo`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.88,output:.88,cacheRead:.88,cacheWrite:.88},capabilities:d},{id:`essentialai/rnj-1-instruct`,name:`Rnj-1 Instruct`,reasoning:!1,input:[`text`],contextWindow:32768,maxTokens:8192,cost:{input:.15,output:.15,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.5,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:.06,cacheWrite:.06},capabilities:{tools:!1,json:!0}}],Ie=Fe.map(e=>e.id).map(e=>`together/${e}`);function Le(e=`together`){return Object.fromEntries(Fe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Re=`zai-org-glm-5-1`;`${Re}`;var p={thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},m={tools:!0,json:!0},ze={tools:!0,json:!1},Be=[{id:Re,name:`GLM 5.1`,reasoning:!0,input:[`text`],cost:{input:1.75,output:5.5,cacheRead:.325,cacheWrite:0},contextWindow:2e5,maxTokens:24e3,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`venice-uncensored-1-2`,name:`Venice Uncensored 1.2`,reasoning:!1,input:[`text`,`image`],cost:{input:.2,output:.9,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192,capabilities:m},{id:`qwen-3-6-plus`,name:`Qwen 3.6 Plus Uncensored`,reasoning:!0,input:[`text`,`image`],cost:{input:.625,output:3.75,cacheRead:.0625,cacheWrite:.78},contextWindow:1e6,maxTokens:65536,capabilities:{...m,video:!0,fixedReasoning:!0}},{id:`qwen3-5-397b-a17b`,name:`Qwen 3.5 397B`,reasoning:!0,input:[`text`,`image`],cost:{input:.75,output:4.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-235b-a22b-thinking-2507`,name:`Qwen 3 235B A22B Thinking`,reasoning:!0,input:[`text`],cost:{input:.45,output:3.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...m,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-coder-480b-a35b-instruct-turbo`,name:`Qwen 3 Coder 480B Turbo`,reasoning:!1,input:[`text`],cost:{input:.35,output:1.5,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:m},{id:`qwen3-vl-235b-a22b`,name:`Qwen3 VL 235B`,reasoning:!1,input:[`text`,`image`],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,capabilities:m},{id:`deepseek-v4-pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],cost:{input:1.73,output:3.796,cacheRead:.33,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`deepseek-v4-flash`,name:`DeepSeek V4 Flash`,reasoning:!0,input:[`text`],cost:{input:.17,output:.35,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`kimi-k2-6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],cost:{input:.85,output:4.655,cacheRead:.22,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`claude-opus-4-7`,name:`Claude Opus 4.7`,reasoning:!0,input:[`text`,`image`],cost:{input:6,output:30,cacheRead:.6,cacheWrite:7.5},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`claude-sonnet-4-6`,name:`Claude Sonnet 4.6`,reasoning:!0,input:[`text`,`image`],cost:{input:3.6,output:18,cacheRead:.36,cacheWrite:4.5},contextWindow:1e6,maxTokens:64e3,capabilities:{...m,fixedReasoning:!0}},{id:`openai-gpt-55`,name:`GPT-5.5`,reasoning:!0,input:[`text`,`image`],cost:{input:6.25,output:37.5,cacheRead:.625,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-55-pro`,name:`GPT-5.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:37.5,output:225,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`medium`,...p}},{id:`openai-gpt-54`,name:`GPT-5.4`,reasoning:!0,input:[`text`,`image`],cost:{input:3.13,output:18.8,cacheRead:.313,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-54-mini`,name:`GPT-5.4 Mini`,reasoning:!0,input:[`text`,`image`],cost:{input:.9375,output:5.625,cacheRead:.09375,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`gemini-3-1-pro-preview`,name:`Gemini 3.1 Pro Preview`,reasoning:!0,input:[`text`,`image`],cost:{input:2.5,output:15,cacheRead:.5,cacheWrite:.5},contextWindow:1e6,maxTokens:32768,capabilities:{...m,audio:!0,video:!0,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`grok-4-20`,name:`Grok 4.20`,reasoning:!0,input:[`text`,`image`],cost:{input:1.42,output:2.83,cacheRead:.23,cacheWrite:0},contextWindow:2e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`minimax-m27`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],cost:{input:.375,output:1.5,cacheRead:.075,cacheWrite:0},contextWindow:198e3,maxTokens:32768,capabilities:{...ze,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`openai-gpt-oss-120b`,name:`OpenAI GPT OSS 120B`,reasoning:!0,input:[`text`],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...ze,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`google-gemma-4-31b-it`,name:`Google Gemma 4 31B Instruct`,reasoning:!0,input:[`text`,`image`],cost:{input:.175,output:.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`mistral-small-2603`,name:`Mistral Small 4`,reasoning:!0,input:[`text`,`image`],cost:{input:.1875,output:.75,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`high`],defaultThinkingLevel:`high`,...p}}],Ve=Be.map(e=>e.id).map(e=>`venice/${e}`);function He(e=`venice`){return Object.fromEntries(Be.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ue=[{id:`openai/gpt-5.5`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`web-search`,`implicit-caching`,`file-input`,`vision`]},{id:`openai/gpt-5.4`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-mini`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-nano`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`web-search`,`vision`,`file-input`]},{id:`anthropic/claude-fable-5`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-opus-4.8`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-sonnet-5`,contextWindow:1e6,maxTokens:128e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-haiku-4.5`,contextWindow:2e5,maxTokens:64e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`]},{id:`google/gemini-3.5-flash`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`file-input`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-pro-preview`,contextWindow:1e6,maxTokens:64e3,tags:[`file-input`,`tool-use`,`reasoning`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3-flash-preview`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`file-input`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-flash-lite`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-4.3`,contextWindow:1e6,maxTokens:1e6,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-build-0.1`,contextWindow:256e3,maxTokens:256e3,tags:[`tool-use`,`implicit-caching`]},{id:`mistral/mistral-medium-3.5`,contextWindow:256e3,maxTokens:256e3,tags:[`reasoning`,`tool-use`,`vision`]},{id:`mistral/mistral-small-2603`,contextWindow:256e3,maxTokens:256e3,tags:[`reasoning`,`tool-use`,`vision`]},{id:`mistral/mistral-large-2512`,contextWindow:256e3,maxTokens:256e3,tags:[`vision`]},{id:`mistral/devstral-2512`,contextWindow:256e3,maxTokens:256e3,tags:[`tool-use`]},{id:`minimax/minimax-m2.7`,contextWindow:204800,maxTokens:131e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`]},{id:`minimax/minimax-m2.7-highspeed`,contextWindow:204800,maxTokens:131100,tags:[`reasoning`,`tool-use`,`implicit-caching`,`vision`]},{id:`moonshotai/kimi-k2.6`,contextWindow:262e3,maxTokens:262e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`]}],We=Ue.map(e=>e.id).map(e=>`vercel-ai-gateway/${e}`);function Ge(e){let t=e.trim().replace(/^vercel-ai-gateway\//,``).toLowerCase();return Ue.find(e=>e.id.toLowerCase()===t)}function Ke(e){let[t,...n]=e.trim().replace(/^vercel-ai-gateway\//,``).split(`/`),r=n.join(`/`);switch(t){case`anthropic`:return{provider:`anthropic`,model:r};case`google`:return{provider:`google`,model:r};case`minimax`:return{provider:`minimax`,model:r};case`moonshotai`:return{provider:`moonshot`,model:r};case`openai`:return{provider:`openai`,model:r};case`xai`:return{provider:`xai`,model:r};default:return{provider:`vercel-ai-gateway`,model:e}}}function qe(e){let t=Ge(e);if(!t)return;let n=new Set(t.tags.map(e=>e.toLowerCase())),r=Ke(t.id),i=n.has(`reasoning`)?s({provider:r.provider,model:r.model,reasoning:!0}):null;return{tools:n.has(`tool-use`),...i?{thinkingLevels:i.thinkingLevels,defaultThinkingLevel:i.defaultThinkingLevel,thinkingMode:i.thinkingMode,reasoningBudgetSupported:i.reasoningBudgetSupported}:{}}}function Je(e){return Object.fromEntries(e.flatMap(e=>{let t=qe(e);return t?[[e,t]]:[]}))}var h={tools:!0,json:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},Ye={...h,audio:!0,video:!0},Xe=[{id:`mimo-v2.5-pro`,name:`Xiaomi MiMo V2.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2.5`,name:`Xiaomi MiMo V2.5`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:Ye},{id:`mimo-v2-pro`,name:`Xiaomi MiMo V2 Pro`,reasoning:!0,input:[`text`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2-omni`,name:`Xiaomi MiMo V2 Omni`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:262144,maxTokens:128e3,capabilities:Ye},{id:`mimo-v2-flash`,name:`Xiaomi MiMo V2 Flash`,reasoning:!0,input:[`text`],cost:{input:.11,output:.32,cacheRead:.01,cacheWrite:0},contextWindow:262144,maxTokens:64e3,capabilities:h}],Ze=Xe.map(e=>e.id);function Qe(e=`xiaomi`){return Object.fromEntries(Xe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}new Map(`openai.anthropic.chutes.ollama.lmstudio.vllm.minimax.moonshot.google.xai.mistral.volcengine.byteplus.openrouter.qwen.zai.qianfan.copilot.ai-gateway.opencode-zen.xiaomi.synthetic.together.huggingface.venice.litellm.cloudflare-ai-gateway.custom`.split(`.`).map((e,t)=>[e,t]));var $e=`openai`,et=`openai`,g=`openai-codex`,tt=`anthropic`,_=`anthropic`,nt=`chutes`,v=`chutes`,rt=`ollama`,y=`ollama`,it=`lmstudio`,b=`lmstudio`,at=`vllm`,x=`vllm`,ot=`minimax`,S=`minimax`,C=`minimax-cn`,w=`minimax-portal`,st=`moonshot`,T=`moonshot`,E=`kimi-coding`,ct=`google`,D=`google`,O=`google-gemini-cli`,lt=`mistral`,k=`mistral`,ut=`volcengine`,A=`volcengine`,j=`volcengine-coding`,M=`volcengine-plan`,dt=`byteplus`,N=`byteplus`,ft=`byteplus-coding`,P=`byteplus-plan`,pt=`openrouter`,F=`openrouter`,mt=`qwen`,I=`qwen`,L=`qwen-coding-plan`,ht=`qianfan`,R=`qianfan`,gt=`copilot`,z=`github-copilot`,B=`copilot-proxy`,_t=`ai-gateway`,V=`vercel-ai-gateway`,vt=`opencode-zen`,H=`opencode`,yt=`xiaomi`,U=`xiaomi`,bt=`synthetic`,W=`synthetic`,xt=`together`,G=`together`,St=`huggingface`,K=`huggingface`,Ct=`venice`,q=`venice`,wt=`litellm`,J=`litellm`,Tt=`custom`,Y=`custom`,Et=[`gpt-5.6`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.4-nano`],Dt=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`],Ot=Et.map(e=>`${et}/${e}`),kt=Dt.map(e=>`${g}/${e}`),At=[`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`].map(e=>`${_}/${e}`),jt=[`google/gemma-4-31B-turbo-TEE`,`Qwen/Qwen3-32B-TEE`,`deepseek-ai/DeepSeek-V3.2-TEE`,`zai-org/GLM-5.1-TEE`,`moonshotai/Kimi-K2.6-TEE`,`Qwen/Qwen3.6-27B-TEE`,`Qwen/Qwen3.5-397B-A17B-TEE`,`zai-org/GLM-5-TEE`],Mt=jt.map(e=>`${v}/${e}`),Nt=[],Pt=[],Ft=[],It=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`,`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`],Lt=It.map(e=>`${S}/${e}`),Rt=It.map(e=>`${C}/${e}`),zt=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`].map(e=>`${w}/${e}`),Bt=[`kimi-k2.6`,`kimi-k2.5`].map(e=>`${T}/${e}`),Vt=[`kimi-for-coding`].map(e=>`${E}/${e}`),Ht=[`gemini-3.5-flash`,`gemini-3.1-pro-preview`,`gemini-3-flash-preview`,`gemini-3.1-flash-lite`],Ut=Ht.map(e=>`${D}/${e}`),Wt=Ht.map(e=>`${O}/${e}`),Gt=[`grok-4.5`,`grok-4.3`,`grok-build-0.1`].map(e=>`xai/${e}`),Kt=[`mistral-medium-3.5`,`mistral-small-2603`,`mistral-large-2512`,`devstral-2512`,`ministral-14b-2512`,`ministral-8b-2512`,`ministral-3b-2512`].map(e=>`${k}/${e}`),qt=[`doubao-seed-2-0-pro-260215`,`doubao-seed-2-0-lite-260215`,`doubao-seed-2-0-mini-260215`,`doubao-seed-2-0-code-preview-260215`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${A}/${e}`),Jt=[`ark-code-latest`,`doubao-seed-2.0-code`,`doubao-seed-2.0-pro`,`doubao-seed-2.0-lite`,`doubao-seed-code`,`minimax-m2.5`,`glm-4.7`,`deepseek-v3.2`,`kimi-k2.5`].flatMap(e=>[`${j}/${e}`,`${M}/${e}`]),Yt=[`seed-2-0-pro-260328`,`seed-2-0-lite-260228`,`seed-2-0-mini-260215`,`seed-2-0-code-preview-260328`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${N}/${e}`),Xt=[`ark-code-latest`,`dola-seed-2.0-pro`,`dola-seed-2.0-lite`,`dola-seed-2.0-code`,`bytedance-seed-code`,`glm-5.1`,`glm-4.7`,`kimi-k2.5`,`gpt-oss-120b`].flatMap(e=>[`${ft}/${e}`,`${P}/${e}`]),Zt=`openrouter/owl-alpha,openai/gpt-5.6-sol,openai/gpt-5.6-terra,openai/gpt-5.6-luna,openai/gpt-5.5,openai/gpt-5.4,openai/gpt-5.4-mini,openai/gpt-5.4-nano,anthropic/claude-fable-5,anthropic/claude-opus-4.8,anthropic/claude-sonnet-5,anthropic/claude-haiku-4.5,google/gemini-3.5-flash,google/gemini-3.1-pro-preview,google/gemini-3-flash-preview,google/gemini-3.1-flash-lite,x-ai/grok-4.5,x-ai/grok-4.3,x-ai/grok-build-0.1,mistralai/mistral-medium-3-5,mistralai/mistral-small-2603,mistralai/mistral-large-2512,mistralai/devstral-2512,qwen/qwen3.7-max,qwen/qwen3.7-plus,qwen/qwen3.6-flash,z-ai/glm-5.2,deepseek/deepseek-v4-pro,deepseek/deepseek-v4-flash,minimax/minimax-m2.7,moonshotai/kimi-k2.6`.split(`,`).map(e=>`${F}/${e}`),Qt=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`].map(e=>`${I}/${e}`),$t=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`,`deepseek-v4-pro`,`deepseek-v4-flash`,`kimi-k2.7-code`,`glm-5.2`,`MiniMax-M2.5`].map(e=>`${L}/${e}`),en=[`glm-5.2`,`glm-5.1`,`glm-5`,`glm-5-turbo`,`glm-5v-turbo`,`glm-4.7`,`glm-4.7-flashx`,`glm-4.7-flash`].map(e=>`zai/${e}`),tn={tools:!0,json:!0,thinkingLevels:[`off`,`low`],defaultThinkingLevel:`low`,thinkingMode:`zai-binary`,reasoningBudgetSupported:!1},nn=Object.fromEntries(en.map(e=>[e,e.endsWith(`/glm-5v-turbo`)?{...tn,video:!0}:tn])),rn=[`ernie-5.1`,`ernie-5.0`,`ernie-5.0-thinking-latest`,`ernie-5.0-thinking-preview`,`ernie-x1.1-preview`,`ernie-x1.1`,`ernie-x1-turbo-32k`,`deepseek-v4-pro`,`deepseek-v4-flash`,`deepseek-v3.2-think`,`deepseek-v3.2`].map(e=>`${R}/${e}`),an=new Set([`qianfan/ernie-5.1`,`qianfan/ernie-5.0`,`qianfan/ernie-5.0-thinking-latest`,`qianfan/ernie-5.0-thinking-preview`,`qianfan/ernie-x1.1-preview`,`qianfan/ernie-x1.1`,`qianfan/ernie-x1-turbo-32k`]),on=new Set([`qianfan/deepseek-v4-pro`,`qianfan/deepseek-v4-flash`,`qianfan/deepseek-v3.2-think`,`qianfan/deepseek-v3.2`]),sn=Object.fromEntries(rn.map(t=>[t,{tools:!0,json:!0,...an.has(t)?{fixedReasoning:!0}:on.has(t)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!0}:{}}])),cn=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`,`gpt-4.1`,`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`,`claude-haiku-4.5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`grok-build-0.1`],ln=cn.map(e=>`${z}/${e}`),un=[...cn].map(e=>`${B}/${e}`);`${z}`;var dn=new Set([`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`]),fn=new Set([`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`]),pn=new Set([`claude-haiku-4.5`]),mn=new Set([`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`]);function hn(t){return Object.fromEntries(t.map(t=>{let n=t.slice(t.indexOf(`/`)+1);return[t,{tools:!0,json:!0,...dn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:fn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!0}:pn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}:mn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:{}}]}))}var gn={...hn(ln),...hn(un)},_n=Je(We),vn=ke(Ee),yn=Ze.map(e=>`${U}/${e}`);`${U}`;var bn=Qe(U),xn=Me.map(e=>`${W}/${e}`);`${W}`;var Sn=Ne(W),Cn=Le(G),wn=xe(K),Tn=He(q),En=Te(J),Dn=ge(c),On=[];function kn(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?null:{route:e.slice(0,t).trim(),model:e.slice(t+1).trim()}}function An(e,t){let n=t.trim().toLowerCase(),r=(e,r)=>n.startsWith(`${e}/`)?{provider:r,model:t.slice(e.length+1)}:null;return r(`openai`,`openai`)??r(`anthropic`,`anthropic`)??r(`google`,`google`)??r(`x-ai`,`xai`)??r(`xai`,`xai`)??r(`mistralai`,`mistral`)??r(`minimax`,`minimax`)??r(`qwen`,`qwen`)??r(`moonshotai`,`moonshot`)??r(`z-ai`,`zai`)??r(`zai-org`,`zai`)??r(`glm`,`zai`)??{provider:n.includes(`claude-`)||n.includes(`claude_`)?`anthropic`:n.includes(`gemini-`)?`google`:n.includes(`qwen`)?`qwen`:n.includes(`kimi`)?`moonshot`:n.includes(`glm-`)?`zai`:e,model:t}}function jn(e){let t=An(e.route,e.model),n=s({provider:t.provider,model:t.model,reasoning:e.reasoning});if(n)return{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}}function Mn(e){let t=kn(e);if(t)return jn({route:t.route,model:t.model})}function X(e){return Object.fromEntries(e.map(e=>[e.toLowerCase(),Mn(e)??{}]))}function Z(e,t){let n=X(e);for(let[e,r]of Object.entries(t))n[e.toLowerCase()]={...n[e.toLowerCase()],...r};return n}var Nn=[...e],Pn={"anthropic/claude-fable-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-opus-4-8":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-sonnet-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!0},"anthropic/claude-haiku-4-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}},Fn=Object.fromEntries(jt.map(e=>[`${v}/${e}`,{tools:!0,json:!0,...jn({route:v,model:e,reasoning:!0}),...e===`moonshotai/Kimi-K2.6-TEE`?{video:!0}:{}}])),In=[...e],Ln=Object.fromEntries([...Lt,...Rt,...zt].map(e=>[e,{tools:!0,thinkingLevels:In,defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}])),Rn=Object.fromEntries([...Bt,...Vt].map(t=>[t,{tools:!0,...t===`moonshot/kimi-k2.6`?{video:!0}:{},thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}])),zn=Object.fromEntries([...Ut,...Wt].map(t=>[t,{tools:!0,json:!0,audio:!0,video:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}])),Bn={"xai/grok-4.5":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-4.3":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-build-0.1":{tools:!0,json:!0}},Vn=[`off`,`high`],Hn=Object.fromEntries(Kt.map(e=>[e,{tools:!0,json:!0,...e===`mistral/mistral-medium-3.5`||e===`mistral/mistral-small-2603`?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),Un=[`minimal`,`low`,`medium`,`high`],Wn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Gn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Kn=Object.fromEntries([...qt,...Jt].map(e=>[e,{tools:!0,json:!0,...Wn.has(e)?{thinkingLevels:[...Un],defaultThinkingLevel:`medium`,thinkingMode:`volcengine-reasoning-effort`,reasoningBudgetSupported:!1}:{},...Gn.has(e)?{video:!0}:{}}])),qn=[`off`,`high`],Jn=new Set([`byteplus/seed-2-0-pro-260328`,`byteplus/seed-2-0-lite-260228`,`byteplus/seed-2-0-mini-260215`,`byteplus/seed-2-0-code-preview-260328`,`byteplus-coding/dola-seed-2.0-pro`,`byteplus-plan/dola-seed-2.0-pro`,`byteplus-coding/dola-seed-2.0-lite`,`byteplus-plan/dola-seed-2.0-lite`,`byteplus-coding/dola-seed-2.0-code`,`byteplus-plan/dola-seed-2.0-code`,`byteplus-coding/bytedance-seed-code`,`byteplus-plan/bytedance-seed-code`]),Yn=Object.fromEntries([...Yt,...Xt].map(e=>[e,{tools:!0,json:!0,...Jn.has(e)?{thinkingLevels:[...qn],defaultThinkingLevel:`high`,thinkingMode:`byteplus-thinking-type`,reasoningBudgetSupported:!1}:{}}])),Xn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`]),Zn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`,`openrouter/qwen/qwen3.7-max`,`openrouter/qwen/qwen3.7-plus`,`openrouter/qwen/qwen3.6-flash`]),Qn=new Set([`openrouter/mistralai/mistral-medium-3-5`,`openrouter/mistralai/mistral-small-2603`]),$n=new Set([`openrouter/minimax/minimax-m2.7`]),er=new Set([`openrouter/deepseek/deepseek-v4-pro`,`openrouter/deepseek/deepseek-v4-flash`]),tr=new Set([`openrouter/openai/gpt-5.6-sol`,`openrouter/openai/gpt-5.6-terra`,`openrouter/openai/gpt-5.6-luna`,`openrouter/openai/gpt-5.5`,`openrouter/openai/gpt-5.4`,`openrouter/openai/gpt-5.4-mini`,`openrouter/openai/gpt-5.4-nano`]),nr=new Set([`openrouter/x-ai/grok-4.5`,`openrouter/x-ai/grok-4.3`]),rr=Object.fromEntries(Zt.map(n=>[n,{tools:!0,json:!0,...Xn.has(n)?{audio:!0}:{},...Zn.has(n)?{video:!0}:{},...Qn.has(n)?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{},...$n.has(n)?{thinkingLevels:[...In],defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}:{},...er.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}:{},...tr.has(n)?{thinkingLevels:[...t],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:{},...nr.has(n)?{thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),ir=new Set([`qwen-coding-plan/kimi-k2.7-code`,`qwen-coding-plan/glm-5.2`,`qwen-coding-plan/MiniMax-M2.5`]),ar=Object.fromEntries([...Qt,...$t].map(t=>[t,{tools:!0,json:!0,...ir.has(t)?{}:{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}}])),or={id:$e,label:`OpenAI`,priority:1,hint:`OpenAI sign-in + API key`,methods:[{id:`openai-codex`,route:g,kind:`oauth`,label:`Sign in`,hint:`Open the OpenAI sign-in URL, finish login in the browser, then Fased completes the OAuth flow.`},{id:`openai-api-key`,route:et,kind:`api-key`,label:`API key`}],models:{recommended:[...Ot,...kt],routeRules:{[et]:[`${et}/*`],[g]:[`${g}/*`]}},modelCapabilities:X([...Ot,...kt])},sr={id:tt,label:`Anthropic`,priority:2,hint:`Claude Code OAuth + setup-token + API key`,methods:[{id:`anthropic-oauth`,route:_,kind:`oauth`,label:`Sign in (Claude Code)`,hint:`Claude or Console account; Pro, Max, Team, Enterprise, or Console access`,buttonLabel:`Sign in`},{id:`token`,route:_,kind:`token`,label:`Token (setup-token)`,hint:"run `claude setup-token` elsewhere, then paste the token here",buttonLabel:`Paste token`},{id:`apiKey`,route:_,kind:`api-key`,label:`API key`}],models:{recommended:[...At],routeRules:{[_]:[`${_}/*`]}},modelCapabilities:Z(At,Pn)},cr={id:nt,label:`Chutes`,priority:3,hint:`Sign in + API key`,methods:[{id:`chutes`,route:v,kind:`oauth`,label:`Sign in`,hint:`Requires a Chutes OAuth app client id. Enter the cid, then Fased generates the Chutes sign-in URL.`,buttonLabel:`Sign in`},{id:`chutes-api-key`,route:v,kind:`api-key`,label:`API key`}],models:{recommended:[...Mt],routeRules:{[v]:[`${v}/*`]}},modelCapabilities:Z(Mt,Fn)},lr={id:rt,label:`Ollama`,priority:4,hint:`Local, cloud, or hybrid Ollama through the native API`,modelProviderIds:[y],methods:[{id:`ollama`,route:y,kind:`manual`,label:`Ollama native URL + model`,hint:`Use the native Ollama base URL, for example http://127.0.0.1:11434. Do not use /v1.`,buttonLabel:`Configure`}],models:{recommended:Nt,dynamic:!0,routeRules:{[y]:[`${y}/*`]}},modelCapabilities:X(Nt)},ur={id:it,label:`LM Studio`,priority:4,hint:`Local LM Studio server on localhost:1234`,modelProviderIds:[b],methods:[{id:`lmstudio`,route:b,kind:`manual`,label:`LM Studio URL + model`,hint:`Use http://127.0.0.1:1234/v1, optional API token, and a model key from LM Studio.`,buttonLabel:`Configure`}],models:{recommended:Pt,dynamic:!0,routeRules:{[b]:[`${b}/*`]}},modelCapabilities:X(Pt)},dr={id:at,label:`vLLM-compatible`,priority:4,hint:`OpenAI-compatible local server: vLLM, SGLang, TGI, LocalAI, or FastChat`,modelProviderIds:[x],methods:[{id:`vllm`,route:x,kind:`manual`,label:`vLLM-compatible URL + model`,hint:`Enter the /v1 base URL, API key or local placeholder, and served model ID for vLLM, SGLang, TGI, LocalAI, or FastChat.`,buttonLabel:`Configure`}],models:{recommended:Ft,dynamic:!0,routeRules:{[x]:[`${x}/*`]}},modelCapabilities:X(Ft)},fr={id:ot,label:`MiniMax`,priority:5,hint:`MiniMax OAuth + API key`,modelProviderIds:[S,C,w],methods:[{id:`minimax-portal`,route:w,kind:`oauth`,label:`Sign in`,hint:`Global or CN endpoint; uses MiniMax portal sign-in`,setupRequirement:`Requires MiniMax portal/coding-plan access. Choose Global or CN, then open the approval URL and approve before the code expires.`,buttonLabel:`Sign in`},{id:`minimax-api`,route:S,kind:`api-key`,label:`API key`},{id:`minimax-api-key-cn`,route:C,kind:`api-key`,label:`API key (CN)`,hint:`China endpoint (api.minimaxi.com)`},{id:`minimax-api-lightning`,route:S,configProviderId:`minimax-lightning`,statusRoute:S,kind:`api-key`,label:`Highspeed API key`,hint:`Fast M2.7 tier`}],models:{recommended:[...Lt,...Rt,...zt],routeRules:{[S]:[`${S}/*`],[C]:[`${C}/*`],[w]:[`${w}/*`]}},modelCapabilities:Z([...Lt,...Rt,...zt],Ln)},pr={id:st,label:`Moonshot AI`,priority:6,hint:`Kimi API + Kimi Code`,modelProviderIds:[T,E],methods:[{id:`moonshot-api-key`,route:T,kind:`api-key`,label:`Kimi API key (.ai)`,hint:`Kimi Open Platform endpoint (api.moonshot.ai)`},{id:`moonshot-api-key-cn`,route:T,configProviderId:`moonshot-cn`,statusRoute:T,kind:`api-key`,label:`Kimi API key (.cn)`,hint:`China endpoint (api.moonshot.cn)`},{id:`kimi-code-api-key`,route:E,kind:`api-key`,label:`Kimi Code API key (subscription)`,hint:`Kimi Code membership endpoint (api.kimi.com/coding)`}],models:{recommended:[...Bt,...Vt],routeRules:{[T]:[`${T}/*`],[E]:[`${E}/*`]}},modelCapabilities:Z([...Bt,...Vt],Rn)},mr={id:ct,label:`Google`,priority:7,hint:`Gemini API key + OAuth`,routeAliases:[`gemini`],modelProviderIds:[D,`gemini`,O],methods:[{id:`gemini-api-key`,route:D,kind:`api-key`,label:`Gemini API key`},{id:`google-gemini-cli`,route:O,kind:`oauth`,label:`Sign in (Gemini CLI)`,hint:`Unofficial flow; review account-risk warning before use`,setupRequirement:`Requires gemini-cli installed on the gateway machine, or GEMINI_CLI_OAUTH_CLIENT_ID set before sign-in.`}],models:{recommended:[...Ut,...Wt],routeRules:{[D]:[`${D}/*`,`gemini/*`],[O]:[`${O}/*`]}},modelCapabilities:Z([...Ut,...Wt],zn)},hr={id:`xai`,label:`xAI (Grok)`,priority:8,hint:`Grok API key or xAI account sign-in`,methods:[{id:`xai-oauth`,route:`xai`,kind:`oauth`,label:`xAI sign-in`,hint:`Browser sign-in for eligible xAI/Grok accounts`,buttonLabel:`Sign in`},{id:`xai-device-code`,route:`xai`,kind:`device`,label:`xAI device code`,hint:`Remote-friendly sign-in for eligible xAI/Grok accounts`,buttonLabel:`Device code`},{id:`xai-api-key`,route:`xai`,kind:`api-key`,label:`xAI API key`}],models:{recommended:[...Gt],routeRules:{xai:[`xai/*`]}},modelCapabilities:Z(Gt,Bn)},gr={id:lt,label:`Mistral AI`,priority:9,hint:`Mistral API key`,methods:[{id:`mistral-api-key`,route:k,kind:`api-key`,label:`Mistral API key`}],models:{recommended:[...Kt],routeRules:{[k]:[`${k}/*`]}},modelCapabilities:Z(Kt,Hn)},_r={id:ut,label:`Volcano Engine`,priority:10,hint:`Ark API key + Coding Plan`,modelProviderIds:[A,j,M],methods:[{id:`volcengine-api-key`,route:A,kind:`api-key`,label:`Volcano Engine API key`}],models:{recommended:[...qt,...Jt],routeRules:{[A]:[`${A}/*`],[j]:[`${j}/*`],[M]:[`${M}/*`]}},modelCapabilities:Z([...qt,...Jt],Kn)},vr={id:dt,label:`BytePlus`,priority:11,hint:`ModelArk API key + Coding Plan`,modelProviderIds:[N,ft,P],methods:[{id:`byteplus-api-key`,route:N,kind:`api-key`,label:`BytePlus API key`}],models:{recommended:[...Yt,...Xt],routeRules:{[N]:[`${N}/*`],[ft]:[`${ft}/*`],[P]:[`${P}/*`]}},modelCapabilities:Z([...Yt,...Xt],Yn)},yr={id:pt,label:`OpenRouter`,priority:12,hint:`API key`,methods:[{id:`openrouter-api-key`,route:F,kind:`api-key`,label:`OpenRouter API key`}],models:{recommended:[...Zt],dynamic:!0,routeRules:{[F]:[`${F}/*`]}},modelCapabilities:Z(Zt,rr)},br={id:mt,label:`Qwen`,priority:14,hint:`Coding Plan + DashScope API key`,modelProviderIds:[L,I],methods:[{id:`qwen-coding-plan-api-key`,route:L,kind:`api-key`,label:`Coding Plan API key`,hint:`Alibaba Cloud Coding Plan endpoint (coding.dashscope.aliyuncs.com)`},{id:`qwen-api-key`,route:I,kind:`api-key`,label:`DashScope API key`,hint:`DashScope OpenAI-compatible endpoint (dashscope.aliyuncs.com)`}],models:{recommended:[...$t,...Qt],routeRules:{[L]:[`${L}/*`],[I]:[`${I}/*`]}},modelCapabilities:Z([...$t,...Qt],ar)},xr={id:`zai`,label:`Z.AI`,priority:15,hint:`GLM Coding Plan / Global / CN`,modelProviderIds:[`zai`],methods:[{id:`zai-coding-global`,route:`zai`,configProviderId:`zai-coding-global`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-Global`,hint:`GLM Coding Plan Global (api.z.ai)`},{id:`zai-coding-cn`,route:`zai`,configProviderId:`zai-coding-cn`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-CN`,hint:`GLM Coding Plan CN (open.bigmodel.cn)`},{id:`zai-global`,route:`zai`,configProviderId:`zai`,kind:`api-key`,label:`Global`,hint:`Z.AI Global (api.z.ai)`},{id:`zai-cn`,route:`zai`,configProviderId:`zai-cn`,statusRoute:`zai`,kind:`api-key`,label:`CN`,hint:`Z.AI CN (open.bigmodel.cn)`}],models:{recommended:[...en],routeRules:{zai:[`zai/*`]}},modelCapabilities:Z(en,nn)},Sr={id:ht,label:`Qianfan`,priority:16,hint:`Baidu Qianfan API key`,methods:[{id:`qianfan-api-key`,route:R,kind:`api-key`,label:`Qianfan API key`}],models:{recommended:[...rn],routeRules:{[R]:[`${R}/*`]}},modelCapabilities:Z(rn,sn)},Cr={id:gt,label:`Copilot`,priority:17,hint:`GitHub device login + local proxy`,modelProviderIds:[z,B],methods:[{id:`github-copilot`,route:z,kind:`device`,label:`GitHub sign in`,hint:`GitHub OAuth device flow; requires an active Copilot subscription`,buttonLabel:`Sign in`},{id:`copilot-proxy`,route:B,kind:`device`,label:`Proxy sign in`,hint:`Local VS Code Copilot Proxy bridge`,buttonLabel:`Configure`}],models:{recommended:[...ln,...un],dynamic:!0,routeRules:{[z]:[`${z}/*`],[B]:[`${B}/*`]}},modelCapabilities:Z([...ln,...un],gn)},wr={id:_t,label:`Vercel AI`,priority:18,hint:`API key`,modelProviderIds:[V],methods:[{id:`ai-gateway-api-key`,route:V,kind:`api-key`,label:`Vercel AI API key`}],models:{recommended:[...We],dynamic:!0,routeRules:{[V]:[`${V}/*`]}},modelCapabilities:Z(We,_n)},Tr={id:vt,label:`OpenCode Zen`,priority:19,hint:`API key`,modelProviderIds:[H],methods:[{id:`opencode-zen`,route:H,kind:`api-key`,label:`OpenCode Zen API key`,hint:`Sign in to OpenCode Zen, then paste the API key`}],models:{recommended:[...Ee],dynamic:!0,routeRules:{[H]:[`${H}/*`]}},modelCapabilities:Z(Ee,vn)},Er={id:yt,label:`Xiaomi`,priority:20,hint:`MiMo API key`,modelProviderIds:[U],methods:[{id:`xiaomi-api-key`,route:U,kind:`api-key`,label:`Xiaomi API key`,hint:`Create an API key in the Xiaomi MiMo API Open Platform`}],models:{recommended:[...yn],routeRules:{[U]:[`${U}/*`]}},modelCapabilities:Z(yn,bn)},Dr={id:bt,label:`Synthetic`,priority:21,hint:`Anthropic-compatible API key`,modelProviderIds:[W],methods:[{id:`synthetic-api-key`,route:W,kind:`api-key`,label:`Synthetic API key`,hint:`Create an API key in Synthetic`}],models:{recommended:[...xn],routeRules:{[W]:[`${W}/*`]}},modelCapabilities:Z(xn,Sn)},Or={id:xt,label:`Together AI`,priority:22,hint:`API key`,modelProviderIds:[G],methods:[{id:`together-api-key`,route:G,kind:`api-key`,label:`Together AI API key`,hint:`Create an API key in Together AI`}],models:{recommended:[...Ie],routeRules:{[G]:[`${G}/*`]}},modelCapabilities:Z(Ie,Cn)},kr={id:St,label:`Hugging Face`,priority:23,hint:`Inference Providers token`,modelProviderIds:[K],methods:[{id:`huggingface-api-key`,route:K,kind:`api-key`,label:`Hugging Face token`,hint:`Create a fine-grained token with Inference Providers access`}],models:{recommended:[...ye],dynamic:!0,routeRules:{[K]:[`${K}/*`]}},modelCapabilities:wn},Ar={id:Ct,label:`Venice AI`,priority:24,hint:`Privacy-focused API key`,modelProviderIds:[q],methods:[{id:`venice-api-key`,route:q,kind:`api-key`,label:`Venice AI API key`,hint:`Create an API key in Venice settings`}],models:{recommended:[...Ve],dynamic:!0,routeRules:{[q]:[`${q}/*`]}},modelCapabilities:Tn},jr={id:wt,label:`LiteLLM`,priority:25,hint:`OpenAI-compatible LLM proxy`,modelProviderIds:[J],methods:[{id:`litellm-api-key`,route:J,kind:`api-key`,label:`LiteLLM API key`,hint:`LiteLLM Proxy virtual key or master key plus /v1 base URL`}],models:{recommended:[...we],dynamic:!0,routeRules:{[J]:[`${J}/*`]}},modelCapabilities:En},Mr={id:le,label:`Cloudflare AI`,priority:26,hint:`Anthropic through Cloudflare AI`,modelProviderIds:[c],methods:[{id:`cloudflare-ai-gateway-api-key`,route:c,kind:`manual`,label:`Cloudflare AI API key`,hint:`Requires Cloudflare Account ID, Gateway ID, and Anthropic provider API key`,buttonLabel:`Configure`}],models:{recommended:[...he],routeRules:{[c]:[`${c}/*`]}},modelCapabilities:Dn},Nr={id:Tt,label:`Custom Provider`,priority:27,hint:`OpenAI or Anthropic-compatible endpoint outside the built-in provider cards`,modelProviderIds:[Y],methods:[{id:`custom-api-key`,route:Y,kind:`manual`,label:`Custom Provider`,hint:`Requires base URL, endpoint compatibility, model ID, and optional API key. Use this for SGLang or other compatible endpoints when the vLLM-compatible shortcut does not fit.`,buttonLabel:`Configure`}],models:{recommended:On,dynamic:!0,routeRules:{[Y]:[`${Y}/*`]}},modelCapabilities:X(On)},Q=[or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr],Pr=new Map(Q.map(e=>[e.id,e])),Fr=new Map(Q.flatMap(e=>[...e.methods.map(t=>[t.route,e]),...(e.routeAliases??[]).map(t=>[t,e]),...(e.modelProviderIds??[]).map(t=>[t,e])])),Ir=new Set(Q.flatMap(e=>e.models.recommended.map(e=>e.toLowerCase()))),Lr=new Map(Q.flatMap(e=>Object.entries(e.modelCapabilities??{}).map(([e,t])=>[e.toLowerCase(),t])));new Set(Dt);function Rr(){return[...Q]}function zr(e){return Pr.get(e.trim().toLowerCase())}function $(e){return Fr.get(e.trim().toLowerCase())}function Br(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();if(!(!n||!r))return Lr.get(`${n}/${r}`)}function Vr(e){let t=e.trim();if(!t)return!1;let n=t.indexOf(`/`);if(n===-1)return!0;let r=t.slice(0,n).trim().toLowerCase();return $(r)?$(r)?.models.dynamic?!0:Ir.has(t.toLowerCase()):!1}function Hr(e){let t=e.provider.trim(),n=e.id.trim();return!t||!n?!1:Vr(`${t}/${n}`)}function Ur(e,t){let n=e.trim();if(!n)return``;if(n.includes(`/`))return n;let r=t?.trim();return r?`${r}/${n}`:n}function Wr(e){let t=e.trim();return t?t.includes(`/`)?{kind:`qualified`,value:t}:{kind:`raw`,value:t}:null}function Gr(e,t){return Kr(e,t).value}function Kr(e,t){if(!e)return{value:``,source:`empty`,reason:`empty`};let n=e?.value.trim();if(!n)return{value:``,source:`empty`,reason:`empty`};if(e.kind===`qualified`)return{value:n,source:`qualified`};let r=``;for(let e of t){if(e.id.trim().toLowerCase()!==n.toLowerCase())continue;let t=Ur(e.id,e.provider);if(!r){r=t;continue}if(r.toLowerCase()!==t.toLowerCase())return{value:n,source:`raw`,reason:`ambiguous`}}return r?{value:r,source:`catalog`}:{value:n,source:`raw`,reason:`missing`}}function qr(e,t){return typeof e==`string`?Ur(e,t):``}function Jr(e,t,n){if(typeof e!=`string`)return{value:``,source:`empty`,reason:`empty`};let r=e.trim();if(!r)return{value:``,source:`empty`,reason:`empty`};let i=t?.trim();if(i){let e=n.find(e=>e.provider?.trim().toLowerCase()===i.toLowerCase()&&e.id.trim().toLowerCase()===r.toLowerCase());if(e)return{value:Qr(e).value,source:`server`}}let a=Kr(Wr(r),n);return a.source===`qualified`||a.source===`catalog`?a:{value:qr(r,t),source:`server`,reason:a.reason}}function Yr(e,t,n){return Jr(e,t,n).value}function Xr(e){let t=e.trim();if(!t)return``;let n=t.indexOf(`/`);if(n<=0)return t;let r=t.slice(0,n);return`${t.slice(n+1)} · ${Zr(r)}`}function Zr(e){return $(e)?.label??e}function Qr(e){let t=e.provider?.trim();return{value:(()=>{if(!t)return e.id;let n=`${t.toLowerCase()}/`;return e.id.toLowerCase().startsWith(n)?e.id:`${t}/${e.id}`})(),label:t?`${e.id} · ${Zr(t)}`:e.id}}export{dr as A,Br as B,yr as C,Or as D,Dr as E,zr as F,ee as H,$ as I,Hr as L,hr as M,Er as N,Ar as O,xr as P,Vr as R,Tr as S,br as T,s as U,ce as V,fr as _,Kr as a,lr as b,vr as c,Cr as d,Nr as f,ur as g,jr as h,Gr as i,_r as j,wr as k,cr as l,kr as m,Wr as n,Yr as o,mr as p,Xr as r,sr as s,Qr as t,Mr as u,gr as v,Sr as w,or as x,pr as y,Rr as z};
2
- //# sourceMappingURL=chat-model-ref-BbrdMKjQ.js.map
1
+ var e=[`off`,`minimal`,`low`,`medium`,`high`],t=[...e,`xhigh`],n=[`openai/gpt-5.6`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-luna`,`openai/gpt-5.5`,`openai/gpt-5.4`,`openai/gpt-5.4-mini`,`openai/gpt-5.4-nano`,`openai-codex/gpt-5.5`,`openai-codex/gpt-5.4`,`openai-codex/gpt-5.4-mini`,`openai-codex/gpt-5.3-codex-spark`,`github-copilot/gpt-5.5`,`github-copilot/gpt-5.4`,`github-copilot/gpt-5.4-mini`,`github-copilot/gpt-5.3-codex-spark`],r=new Set(n.map(e=>e.toLowerCase())),i=new Set(n.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e));function a(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function o(e){return a(e)===`zai`}function ee(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if(t===`off`)return`off`;if([`on`,`enable`,`enabled`].includes(t))return`low`;if([`min`,`minimal`].includes(t))return`minimal`;if([`low`,`thinkhard`,`think-hard`,`think_hard`].includes(t))return`low`;if([`mid`,`med`,`medium`,`thinkharder`,`think-harder`,`harder`].includes(t))return`medium`;if([`high`,`ultra`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`,`max`].includes(t))return`high`;if(t===`think`)return`minimal`}function te(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let a=e?.trim().toLowerCase();return a?r.has(`${a}/${n}`):i.has(n)}function ne(e){let t=new Set,n=[];for(let r of e??[]){let e=ee(r);!e||t.has(e)||(t.add(e),n.push(e))}return n}function re(n,r){return te(n,r)?[...t]:[...e]}function ie(e){let t=e?.trim().toLowerCase()??``;return t.includes(`fable-5`)||t.includes(`opus-4-8`)||t.includes(`opus-4.8`)||t.includes(`opus-4-6`)||t.includes(`opus-4.6`)||t.includes(`opus-4-7`)||t.includes(`opus-4.7`)||t.includes(`sonnet-5`)||t.includes(`sonnet-4-6`)||t.includes(`sonnet-4.6`)||t.includes(`sonnet-4-7`)||t.includes(`sonnet-4.7`)}function ae(e,t){let n=a(e);return n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?{thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:n===`anthropic`?{thinkingMode:ie(t)?`anthropic-adaptive`:`anthropic-thinking-budget`,reasoningBudgetSupported:!ie(t)}:n===`google`||n===`google-gemini-cli`?{thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:n===`zai`?{thinkingMode:`zai-binary`,reasoningBudgetSupported:!1}:n===`qwen`||n===`qwen-coding-plan`?{thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}:n===`moonshot`||n===`kimi-coding`?{thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}:{thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}}function oe(e,t){let n=a(e),r=t?.trim().toLowerCase()??``;return!n||!r?!1:n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?/^gpt-5(?:[.-]|$)/.test(r):n===`anthropic`?r.startsWith(`claude-`)||r.includes(`claude-`):n===`google`||n===`google-gemini-cli`?r.startsWith(`gemini-`):n===`zai`?r.startsWith(`glm-`):n===`qwen`||n===`qwen-coding-plan`?r.includes(`qwen`):n===`moonshot`||n===`kimi-coding`?r.includes(`kimi`):n===`minimax`||n===`minimax-cn`?r.includes(`minimax-m2`):[`openrouter`,`vercel-ai-gateway`,`opencode`,`huggingface`,`venice`,`together`,`synthetic`,`litellm`].includes(n)?/(gpt-5|claude-|gemini-|grok-|qwen|kimi|glm-|deepseek-r1|reasoning|thinking)/.test(r):!1}function s(e){let t=ne(e.capabilities?.thinkingLevels),n=t.length>0||typeof e.capabilities?.thinkingMode==`string`||typeof e.capabilities?.defaultThinkingLevel==`string`;if(e.capabilities?.fixedReasoning===!0&&!n||!(e.reasoning===!0||e.reasoning!==!1&&oe(e.provider,e.model))&&!n)return null;let r=ae(e.provider,e.model),i=r.thinkingMode===`zai-binary`?[`off`,`low`]:re(e.provider,e.model),a=t.length>0?t:i,o=ee(e.capabilities?.defaultThinkingLevel);return{thinkingLevels:a,defaultThinkingLevel:o&&a.includes(o)?o:a.includes(`low`)?`low`:a[0]??`off`,thinkingMode:e.capabilities?.thinkingMode??r.thinkingMode,reasoningBudgetSupported:e.capabilities?.reasoningBudgetSupported??r.reasoningBudgetSupported}}function se(e,t){return o(e)?[`off`,`low`]:re(e,t)}function ce(e,t){return se(e,t)}var le=`cloudflare-ai-gateway`,c=`cloudflare-ai-gateway`,ue=`claude-sonnet-5`;`${c}${ue}`;var de={input:0,output:0,cacheRead:0,cacheWrite:0},fe={tools:!0,json:!0},pe={thinkingLevels:[...e],defaultThinkingLevel:`low`,reasoningBudgetSupported:!0},me=[{id:ue,name:`Claude Sonnet 5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`}},{id:`claude-opus-4-8`,name:`Claude Opus 4.8`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:1e6,maxTokens:128e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1}},{id:`claude-haiku-4-5`,name:`Claude Haiku 4.5`,reasoning:!0,input:[`text`,`image`],cost:de,contextWindow:2e5,maxTokens:64e3,capabilities:{...fe,...pe,thinkingMode:`anthropic-thinking-budget`}}],he=me.map(e=>e.id).map(e=>`${c}/${e}`);function ge(e=c){return Object.fromEntries(me.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var _e=`openai/gpt-oss-120b`;`${_e}`;var l={tools:!0,json:!0},ve=[{id:_e,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.15,output:.75,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:1.69,output:3.38,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V4-Flash`,name:`DeepSeek V4 Flash`,reasoning:!1,input:[`text`],contextWindow:1048576,maxTokens:8192,cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},capabilities:l},{id:`moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.95,output:4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:204800,maxTokens:8192,cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},capabilities:l},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:8192,cost:{input:1.4,output:4.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.6-35B-A3B`,name:`Qwen3.6 35B A3B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.15,output:.95,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-Coder-Next`,name:`Qwen3 Coder Next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.2,output:1.5,cacheRead:0,cacheWrite:0},capabilities:{tools:!0,json:!1}},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:1.3,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-4-26B-A4B-it`,name:`Gemma 4 26B A4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,cost:{input:.13,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:163840,maxTokens:8192,cost:{input:.269,output:.4,cacheRead:0,cacheWrite:0},capabilities:l},{id:`meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-VL-235B-A22B-Instruct`,name:`Qwen3 VL 235B A22B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:131072,maxTokens:8192,cost:{input:.3,output:1.5,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.09,output:.58,cacheRead:0,cacheWrite:0},capabilities:l},{id:`Qwen/Qwen3-Coder-Next-FP8`,name:`Qwen3 Coder Next FP8`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},capabilities:l},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:0,cacheWrite:0},capabilities:{tools:!1,json:!0}},{id:`EssentialAI/rnj-1-instruct`,name:`Rnj-1 Instruct`,reasoning:!1,input:[`text`],contextWindow:32768,maxTokens:8192,cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},capabilities:l},{id:`inclusionAI/Ling-2.6-1T`,name:`Ling 2.6 1T`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,cost:{input:.3,output:2.5,cacheRead:0,cacheWrite:0},capabilities:l}],ye=ve.map(e=>e.id).map(e=>`huggingface/${e}`);function be(e){return{...e.capabilities?{...e.capabilities}:{},...e.reasoning?{fixedReasoning:!0}:{}}}function xe(e=`huggingface`){return Object.fromEntries(ve.map(t=>[`${e}/${t.id}`.toLowerCase(),be(t)]))}var Se=`default`;`${Se}`;var Ce=[{id:Se,name:`LiteLLM proxy default`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,cost:{input:0,output:0,cacheRead:0,cacheWrite:0},capabilities:{}}],we=Ce.map(e=>e.id).map(e=>`litellm/${e}`);function Te(e=`litellm`){return Object.fromEntries(Ce.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ee=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.4-nano`,`gpt-5.3-codex-spark`,`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`qwen3.7-plus`,`minimax-m2.7`,`glm-5.2`,`kimi-k2.6`].map(e=>`opencode/${e}`);function De(e){let t=e.trim().toLowerCase();return t.startsWith(`claude-`)?{provider:`anthropic`,model:t}:t.startsWith(`gemini-`)?{provider:`google`,model:t}:t.startsWith(`glm-`)?{provider:`zai`,model:t}:t.startsWith(`kimi-`)?{provider:`moonshot`,model:t}:t.startsWith(`qwen`)?{provider:`qwen`,model:t}:t.startsWith(`gpt-`)?{provider:`openai`,model:t}:{provider:`opencode`,model:t}}function Oe(e){let t=De(e),n=s({provider:t.provider,model:t.model,reasoning:!0});return{tools:!0,json:!0,...n?{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}:{}}}function ke(e){return Object.fromEntries(e.map(e=>[e,Oe(e.replace(/^opencode\//,``))]))}var Ae=`hf:MiniMaxAI/MiniMax-M2.5`;`${Ae}`;var u={tools:!0,json:!0},je=[{id:`hf:zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:Ae,name:`MiniMax M2.5`,reasoning:!1,input:[`text`],contextWindow:191488,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7-Flash`,name:`GLM-4.7 Flash`,reasoning:!1,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:u},{id:`hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4`,name:`NVIDIA Nemotron 3 Super 120B`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536,capabilities:u},{id:`hf:zai-org/GLM-4.7`,name:`GLM-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:65536,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:159e3,maxTokens:8192,capabilities:u},{id:`hf:openai/gpt-oss-120b`,name:`GPT OSS 120B`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-R1-0528`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:deepseek-ai/DeepSeek-V3`,name:`DeepSeek V3`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:u},{id:`hf:moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:nvidia/Kimi-K2.5-NVFP4`,name:`Kimi K2.5 NVFP4`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-235B-A22B-Thinking-2507`,name:`Qwen3 235B A22B Thinking 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:u},{id:`hf:Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:u}],Me=je.map(e=>e.id);function Ne(e=`synthetic`){return Object.fromEntries(je.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Pe=`moonshotai/Kimi-K2.6`;`${Pe}`;var d={tools:!0,json:!0},f={tools:!1,json:!1},Fe=[{id:Pe,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:16384,cost:{input:1.2,output:4.5,cacheRead:.2,cacheWrite:1.2},capabilities:{...d,video:!0}},{id:`moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:2.8,cacheRead:.5,cacheWrite:2.8},capabilities:d},{id:`MiniMaxAI/MiniMax-M2.7`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:32768,cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.3},capabilities:d},{id:`zai-org/GLM-5.1`,name:`GLM-5.1`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1.4,output:4.4,cacheRead:1.4,cacheWrite:1.4},capabilities:d},{id:`zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:202752,maxTokens:128e3,cost:{input:1,output:3.2,cacheRead:1,cacheWrite:1},capabilities:d},{id:`Qwen/Qwen3.6-Plus`,name:`Qwen3.6 Plus`,reasoning:!0,input:[`text`],contextWindow:1e6,maxTokens:32768,cost:{input:.5,output:3,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.6,output:3.6,cacheRead:.6,cacheWrite:.6},capabilities:d},{id:`Qwen/Qwen3.5-9B`,name:`Qwen3.5 9B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.1,output:.15,cacheRead:.1,cacheWrite:.1},capabilities:d},{id:`openai/gpt-oss-120b`,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.15,output:.6,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`openai/gpt-oss-20b`,name:`GPT-OSS 20B`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:32768,cost:{input:.05,output:.2,cacheRead:.05,cacheWrite:.05},capabilities:d},{id:`deepseek-ai/DeepSeek-V4-Pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],contextWindow:512e3,maxTokens:32768,cost:{input:2.1,output:4.4,cacheRead:.2,cacheWrite:2.1},capabilities:d},{id:`deepseek-ai/DeepSeek-R1`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:163840,maxTokens:32768,cost:{input:3,output:7,cacheRead:3,cacheWrite:3},capabilities:f},{id:`deepseek-ai/DeepSeek-V3.1`,name:`DeepSeek V3.1`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:32768,cost:{input:.6,output:1.7,cacheRead:.6,cacheWrite:.6},capabilities:f},{id:`Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8`,name:`Qwen3 Coder 480B A35B Instruct FP8`,reasoning:!1,input:[`text`],contextWindow:256e3,maxTokens:32768,cost:{input:2,output:2,cacheRead:2,cacheWrite:2},capabilities:d},{id:`Qwen/Qwen3-235B-A22B-Instruct-2507-tput`,name:`Qwen3 235B A22B Instruct 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.6,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`Qwen/Qwen3-Coder-Next-FP8`,name:`Qwen3 Coder Next FP8`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:32768,cost:{input:.5,output:1.2,cacheRead:.5,cacheWrite:.5},capabilities:f},{id:`meta-llama/Llama-3.3-70B-Instruct-Turbo`,name:`Llama 3.3 70B Instruct Turbo`,reasoning:!1,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.88,output:.88,cacheRead:.88,cacheWrite:.88},capabilities:d},{id:`essentialai/rnj-1-instruct`,name:`Rnj-1 Instruct`,reasoning:!1,input:[`text`],contextWindow:32768,maxTokens:8192,cost:{input:.15,output:.15,cacheRead:.15,cacheWrite:.15},capabilities:d},{id:`google/gemma-4-31B-it`,name:`Gemma 4 31B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768,cost:{input:.2,output:.5,cacheRead:.2,cacheWrite:.2},capabilities:d},{id:`google/gemma-3n-E4B-it`,name:`Gemma 3N E4B Instruct`,reasoning:!1,input:[`text`,`image`],contextWindow:32768,maxTokens:8192,cost:{input:.06,output:.12,cacheRead:.06,cacheWrite:.06},capabilities:{tools:!1,json:!0}}],Ie=Fe.map(e=>e.id).map(e=>`together/${e}`);function Le(e=`together`){return Object.fromEntries(Fe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var Re=`zai-org-glm-5-1`;`${Re}`;var p={thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},m={tools:!0,json:!0},ze={tools:!0,json:!1},Be=[{id:Re,name:`GLM 5.1`,reasoning:!0,input:[`text`],cost:{input:1.75,output:5.5,cacheRead:.325,cacheWrite:0},contextWindow:2e5,maxTokens:24e3,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`venice-uncensored-1-2`,name:`Venice Uncensored 1.2`,reasoning:!1,input:[`text`,`image`],cost:{input:.2,output:.9,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192,capabilities:m},{id:`qwen-3-6-plus`,name:`Qwen 3.6 Plus Uncensored`,reasoning:!0,input:[`text`,`image`],cost:{input:.625,output:3.75,cacheRead:.0625,cacheWrite:.78},contextWindow:1e6,maxTokens:65536,capabilities:{...m,video:!0,fixedReasoning:!0}},{id:`qwen3-5-397b-a17b`,name:`Qwen 3.5 397B`,reasoning:!0,input:[`text`,`image`],cost:{input:.75,output:4.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-235b-a22b-thinking-2507`,name:`Qwen 3 235B A22B Thinking`,reasoning:!0,input:[`text`],cost:{input:.45,output:3.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...m,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`qwen3-coder-480b-a35b-instruct-turbo`,name:`Qwen 3 Coder 480B Turbo`,reasoning:!1,input:[`text`],cost:{input:.35,output:1.5,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:m},{id:`qwen3-vl-235b-a22b`,name:`Qwen3 VL 235B`,reasoning:!1,input:[`text`,`image`],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,capabilities:m},{id:`deepseek-v4-pro`,name:`DeepSeek V4 Pro`,reasoning:!0,input:[`text`],cost:{input:1.73,output:3.796,cacheRead:.33,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`deepseek-v4-flash`,name:`DeepSeek V4 Flash`,reasoning:!0,input:[`text`],cost:{input:.17,output:.35,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:32768,capabilities:{...m,fixedReasoning:!0}},{id:`kimi-k2-6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],cost:{input:.85,output:4.655,cacheRead:.22,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`claude-opus-4-7`,name:`Claude Opus 4.7`,reasoning:!0,input:[`text`,`image`],cost:{input:6,output:30,cacheRead:.6,cacheWrite:7.5},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`claude-sonnet-4-6`,name:`Claude Sonnet 4.6`,reasoning:!0,input:[`text`,`image`],cost:{input:3.6,output:18,cacheRead:.36,cacheWrite:4.5},contextWindow:1e6,maxTokens:64e3,capabilities:{...m,fixedReasoning:!0}},{id:`openai-gpt-55`,name:`GPT-5.5`,reasoning:!0,input:[`text`,`image`],cost:{input:6.25,output:37.5,cacheRead:.625,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-55-pro`,name:`GPT-5.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:37.5,output:225,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`medium`,...p}},{id:`openai-gpt-54`,name:`GPT-5.4`,reasoning:!0,input:[`text`,`image`],cost:{input:3.13,output:18.8,cacheRead:.313,cacheWrite:0},contextWindow:1e6,maxTokens:131072,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`openai-gpt-54-mini`,name:`GPT-5.4 Mini`,reasoning:!0,input:[`text`,`image`],cost:{input:.9375,output:5.625,cacheRead:.09375,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,capabilities:{...m,thinkingLevels:[`off`,`minimal`,`low`,`medium`,`high`],defaultThinkingLevel:`high`,...p}},{id:`gemini-3-1-pro-preview`,name:`Gemini 3.1 Pro Preview`,reasoning:!0,input:[`text`,`image`],cost:{input:2.5,output:15,cacheRead:.5,cacheWrite:.5},contextWindow:1e6,maxTokens:32768,capabilities:{...m,audio:!0,video:!0,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`grok-4-20`,name:`Grok 4.20`,reasoning:!0,input:[`text`,`image`],cost:{input:1.42,output:2.83,cacheRead:.23,cacheWrite:0},contextWindow:2e6,maxTokens:128e3,capabilities:{...m,fixedReasoning:!0}},{id:`minimax-m27`,name:`MiniMax M2.7`,reasoning:!0,input:[`text`],cost:{input:.375,output:1.5,cacheRead:.075,cacheWrite:0},contextWindow:198e3,maxTokens:32768,capabilities:{...ze,thinkingLevels:[`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`openai-gpt-oss-120b`,name:`OpenAI GPT OSS 120B`,reasoning:!0,input:[`text`],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,capabilities:{...ze,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`google-gemma-4-31b-it`,name:`Google Gemma 4 31B Instruct`,reasoning:!0,input:[`text`,`image`],cost:{input:.175,output:.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,capabilities:{...m,video:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,...p}},{id:`mistral-small-2603`,name:`Mistral Small 4`,reasoning:!0,input:[`text`,`image`],cost:{input:.1875,output:.75,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:65536,capabilities:{...m,thinkingLevels:[`off`,`high`],defaultThinkingLevel:`high`,...p}}],Ve=Be.map(e=>e.id).map(e=>`venice/${e}`);function He(e=`venice`){return Object.fromEntries(Be.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var Ue=[{id:`openai/gpt-5.5`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`web-search`,`implicit-caching`,`file-input`,`vision`]},{id:`openai/gpt-5.4`,contextWindow:1e6,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-mini`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`,`web-search`]},{id:`openai/gpt-5.4-nano`,contextWindow:4e5,maxTokens:128e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`web-search`,`vision`,`file-input`]},{id:`anthropic/claude-fable-5`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-opus-4.8`,contextWindow:1e6,maxTokens:128e3,tags:[`tool-use`,`reasoning`,`vision`,`file-input`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-sonnet-5`,contextWindow:1e6,maxTokens:128e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`,`web-search`]},{id:`anthropic/claude-haiku-4.5`,contextWindow:2e5,maxTokens:64e3,tags:[`file-input`,`reasoning`,`tool-use`,`vision`,`explicit-caching`]},{id:`google/gemini-3.5-flash`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`file-input`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-pro-preview`,contextWindow:1e6,maxTokens:64e3,tags:[`file-input`,`tool-use`,`reasoning`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3-flash-preview`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`file-input`,`vision`,`web-search`,`implicit-caching`]},{id:`google/gemini-3.1-flash-lite`,contextWindow:1e6,maxTokens:65e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-4.3`,contextWindow:1e6,maxTokens:1e6,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`,`web-search`]},{id:`xai/grok-build-0.1`,contextWindow:256e3,maxTokens:256e3,tags:[`tool-use`,`implicit-caching`]},{id:`mistral/mistral-medium-3.5`,contextWindow:256e3,maxTokens:256e3,tags:[`reasoning`,`tool-use`,`vision`]},{id:`mistral/mistral-small-2603`,contextWindow:256e3,maxTokens:256e3,tags:[`reasoning`,`tool-use`,`vision`]},{id:`mistral/mistral-large-2512`,contextWindow:256e3,maxTokens:256e3,tags:[`vision`]},{id:`mistral/devstral-2512`,contextWindow:256e3,maxTokens:256e3,tags:[`tool-use`]},{id:`minimax/minimax-m2.7`,contextWindow:204800,maxTokens:131e3,tags:[`reasoning`,`tool-use`,`implicit-caching`,`file-input`,`vision`]},{id:`minimax/minimax-m2.7-highspeed`,contextWindow:204800,maxTokens:131100,tags:[`reasoning`,`tool-use`,`implicit-caching`,`vision`]},{id:`moonshotai/kimi-k2.6`,contextWindow:262e3,maxTokens:262e3,tags:[`reasoning`,`tool-use`,`vision`,`file-input`,`implicit-caching`]}],We=Ue.map(e=>e.id).map(e=>`vercel-ai-gateway/${e}`);function Ge(e){let t=e.trim().replace(/^vercel-ai-gateway\//,``).toLowerCase();return Ue.find(e=>e.id.toLowerCase()===t)}function Ke(e){let[t,...n]=e.trim().replace(/^vercel-ai-gateway\//,``).split(`/`),r=n.join(`/`);switch(t){case`anthropic`:return{provider:`anthropic`,model:r};case`google`:return{provider:`google`,model:r};case`minimax`:return{provider:`minimax`,model:r};case`moonshotai`:return{provider:`moonshot`,model:r};case`openai`:return{provider:`openai`,model:r};case`xai`:return{provider:`xai`,model:r};default:return{provider:`vercel-ai-gateway`,model:e}}}function qe(e){let t=Ge(e);if(!t)return;let n=new Set(t.tags.map(e=>e.toLowerCase())),r=Ke(t.id),i=n.has(`reasoning`)?s({provider:r.provider,model:r.model,reasoning:!0}):null;return{tools:n.has(`tool-use`),...i?{thinkingLevels:i.thinkingLevels,defaultThinkingLevel:i.defaultThinkingLevel,thinkingMode:i.thinkingMode,reasoningBudgetSupported:i.reasoningBudgetSupported}:{}}}function Je(e){return Object.fromEntries(e.flatMap(e=>{let t=qe(e);return t?[[e,t]]:[]}))}var h={tools:!0,json:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},Ye={...h,audio:!0,video:!0},Xe=[{id:`mimo-v2.5-pro`,name:`Xiaomi MiMo V2.5 Pro`,reasoning:!0,input:[`text`,`image`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2.5`,name:`Xiaomi MiMo V2.5`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:Ye},{id:`mimo-v2-pro`,name:`Xiaomi MiMo V2 Pro`,reasoning:!0,input:[`text`],cost:{input:1,output:3,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:131072,capabilities:h},{id:`mimo-v2-omni`,name:`Xiaomi MiMo V2 Omni`,reasoning:!0,input:[`text`,`image`],cost:{input:.4,output:2,cacheRead:.08,cacheWrite:0},contextWindow:262144,maxTokens:128e3,capabilities:Ye},{id:`mimo-v2-flash`,name:`Xiaomi MiMo V2 Flash`,reasoning:!0,input:[`text`],cost:{input:.11,output:.32,cacheRead:.01,cacheWrite:0},contextWindow:262144,maxTokens:64e3,capabilities:h}],Ze=Xe.map(e=>e.id);function Qe(e=`xiaomi`){return Object.fromEntries(Xe.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}new Map(`openai.anthropic.chutes.ollama.lmstudio.vllm.minimax.moonshot.google.xai.mistral.volcengine.byteplus.openrouter.qwen.zai.qianfan.copilot.ai-gateway.opencode-zen.xiaomi.synthetic.together.huggingface.venice.litellm.cloudflare-ai-gateway.custom`.split(`.`).map((e,t)=>[e,t]));var $e=`openai`,et=`openai`,g=`openai-codex`,tt=`anthropic`,_=`anthropic`,nt=`chutes`,v=`chutes`,rt=`ollama`,y=`ollama`,it=`lmstudio`,b=`lmstudio`,at=`vllm`,x=`vllm`,ot=`minimax`,S=`minimax`,C=`minimax-cn`,w=`minimax-portal`,st=`moonshot`,T=`moonshot`,E=`kimi-coding`,ct=`google`,D=`google`,O=`google-gemini-cli`,lt=`mistral`,k=`mistral`,ut=`volcengine`,A=`volcengine`,j=`volcengine-coding`,M=`volcengine-plan`,dt=`byteplus`,N=`byteplus`,ft=`byteplus-coding`,P=`byteplus-plan`,pt=`openrouter`,F=`openrouter`,mt=`qwen`,I=`qwen`,L=`qwen-coding-plan`,ht=`qianfan`,R=`qianfan`,gt=`copilot`,z=`github-copilot`,B=`copilot-proxy`,_t=`ai-gateway`,V=`vercel-ai-gateway`,vt=`opencode-zen`,H=`opencode`,yt=`xiaomi`,U=`xiaomi`,bt=`synthetic`,W=`synthetic`,xt=`together`,G=`together`,St=`huggingface`,K=`huggingface`,Ct=`venice`,q=`venice`,wt=`litellm`,J=`litellm`,Tt=`custom`,Y=`custom`,Et=[`gpt-5.6`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.4-nano`],Dt=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`],Ot=Et.map(e=>`${et}/${e}`),kt=Dt.map(e=>`${g}/${e}`),At=[`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`].map(e=>`${_}/${e}`),jt=[`google/gemma-4-31B-turbo-TEE`,`Qwen/Qwen3-32B-TEE`,`deepseek-ai/DeepSeek-V3.2-TEE`,`zai-org/GLM-5.1-TEE`,`moonshotai/Kimi-K2.6-TEE`,`Qwen/Qwen3.6-27B-TEE`,`Qwen/Qwen3.5-397B-A17B-TEE`,`zai-org/GLM-5-TEE`,`Qwen/Qwen3-235B-A22B-Thinking-2507-TEE`,`zai-org/GLM-5.2-TEE`],Mt=jt.map(e=>`${v}/${e}`),Nt=[],Pt=[],Ft=[],It=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`,`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`],Lt=It.map(e=>`${S}/${e}`),Rt=It.map(e=>`${C}/${e}`),zt=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`].map(e=>`${w}/${e}`),Bt=[`kimi-k2.6`,`kimi-k2.5`].map(e=>`${T}/${e}`),Vt=[`kimi-for-coding`].map(e=>`${E}/${e}`),Ht=[`gemini-3.5-flash`,`gemini-3.1-pro-preview`,`gemini-3-flash-preview`,`gemini-3.1-flash-lite`],Ut=Ht.map(e=>`${D}/${e}`),Wt=Ht.map(e=>`${O}/${e}`),Gt=[`grok-4.5`,`grok-4.3`,`grok-build-0.1`].map(e=>`xai/${e}`),Kt=[`mistral-medium-3.5`,`mistral-small-2603`,`mistral-large-2512`,`devstral-2512`,`ministral-14b-2512`,`ministral-8b-2512`,`ministral-3b-2512`].map(e=>`${k}/${e}`),qt=[`doubao-seed-2-0-pro-260215`,`doubao-seed-2-0-lite-260215`,`doubao-seed-2-0-mini-260215`,`doubao-seed-2-0-code-preview-260215`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${A}/${e}`),Jt=[`ark-code-latest`,`doubao-seed-2.0-code`,`doubao-seed-2.0-pro`,`doubao-seed-2.0-lite`,`doubao-seed-code`,`minimax-m2.5`,`glm-4.7`,`deepseek-v3.2`,`kimi-k2.5`].flatMap(e=>[`${j}/${e}`,`${M}/${e}`]),Yt=[`seed-2-0-pro-260328`,`seed-2-0-lite-260228`,`seed-2-0-mini-260215`,`seed-2-0-code-preview-260328`,`deepseek-v3-2-251201`,`glm-4-7-251222`].map(e=>`${N}/${e}`),Xt=[`ark-code-latest`,`dola-seed-2.0-pro`,`dola-seed-2.0-lite`,`dola-seed-2.0-code`,`bytedance-seed-code`,`glm-5.1`,`glm-4.7`,`kimi-k2.5`,`gpt-oss-120b`].flatMap(e=>[`${ft}/${e}`,`${P}/${e}`]),Zt=`openrouter/owl-alpha,openai/gpt-5.6-sol,openai/gpt-5.6-terra,openai/gpt-5.6-luna,openai/gpt-5.5,openai/gpt-5.4,openai/gpt-5.4-mini,openai/gpt-5.4-nano,anthropic/claude-fable-5,anthropic/claude-opus-4.8,anthropic/claude-sonnet-5,anthropic/claude-haiku-4.5,google/gemini-3.5-flash,google/gemini-3.1-pro-preview,google/gemini-3-flash-preview,google/gemini-3.1-flash-lite,x-ai/grok-4.5,x-ai/grok-4.3,x-ai/grok-build-0.1,mistralai/mistral-medium-3-5,mistralai/mistral-small-2603,mistralai/mistral-large-2512,mistralai/devstral-2512,qwen/qwen3.7-max,qwen/qwen3.7-plus,qwen/qwen3.6-flash,z-ai/glm-5.2,deepseek/deepseek-v4-pro,deepseek/deepseek-v4-flash,minimax/minimax-m2.7,moonshotai/kimi-k2.6`.split(`,`).map(e=>`${F}/${e}`),Qt=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`].map(e=>`${I}/${e}`),$t=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`,`deepseek-v4-pro`,`deepseek-v4-flash`,`kimi-k2.7-code`,`glm-5.2`,`MiniMax-M2.5`].map(e=>`${L}/${e}`),en=[`glm-5.2`,`glm-5.1`,`glm-5`,`glm-5-turbo`,`glm-5v-turbo`,`glm-4.7`,`glm-4.7-flashx`,`glm-4.7-flash`].map(e=>`zai/${e}`),tn={tools:!0,json:!0,thinkingLevels:[`off`,`low`],defaultThinkingLevel:`low`,thinkingMode:`zai-binary`,reasoningBudgetSupported:!1},nn=Object.fromEntries(en.map(e=>[e,e.endsWith(`/glm-5v-turbo`)?{...tn,video:!0}:tn])),rn=[`ernie-5.1`,`ernie-5.0`,`ernie-5.0-thinking-latest`,`ernie-5.0-thinking-preview`,`ernie-x1.1-preview`,`ernie-x1.1`,`ernie-x1-turbo-32k`,`deepseek-v4-pro`,`deepseek-v4-flash`,`deepseek-v3.2-think`,`deepseek-v3.2`].map(e=>`${R}/${e}`),an=new Set([`qianfan/ernie-5.1`,`qianfan/ernie-5.0`,`qianfan/ernie-5.0-thinking-latest`,`qianfan/ernie-5.0-thinking-preview`,`qianfan/ernie-x1.1-preview`,`qianfan/ernie-x1.1`,`qianfan/ernie-x1-turbo-32k`]),on=new Set([`qianfan/deepseek-v4-pro`,`qianfan/deepseek-v4-flash`,`qianfan/deepseek-v3.2-think`,`qianfan/deepseek-v3.2`]),sn=Object.fromEntries(rn.map(t=>[t,{tools:!0,json:!0,...an.has(t)?{fixedReasoning:!0}:on.has(t)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!0}:{}}])),cn=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`,`gpt-4.1`,`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`,`claude-haiku-4.5`,`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`,`grok-build-0.1`],ln=cn.map(e=>`${z}/${e}`),un=[...cn].map(e=>`${B}/${e}`);`${z}`;var dn=new Set([`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`]),fn=new Set([`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`]),pn=new Set([`claude-haiku-4.5`]),mn=new Set([`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`]);function hn(t){return Object.fromEntries(t.map(t=>{let n=t.slice(t.indexOf(`/`)+1);return[t,{tools:!0,json:!0,...dn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:fn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!0}:pn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}:mn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:{}}]}))}var gn={...hn(ln),...hn(un)},_n=Je(We),vn=ke(Ee),yn=Ze.map(e=>`${U}/${e}`);`${U}`;var bn=Qe(U),xn=Me.map(e=>`${W}/${e}`);`${W}`;var Sn=Ne(W),Cn=Le(G),wn=xe(K),Tn=He(q),En=Te(J),Dn=ge(c),On=[];function kn(e){let t=e.indexOf(`/`);return t<=0||t===e.length-1?null:{route:e.slice(0,t).trim(),model:e.slice(t+1).trim()}}function An(e,t){let n=t.trim().toLowerCase(),r=(e,r)=>n.startsWith(`${e}/`)?{provider:r,model:t.slice(e.length+1)}:null;return r(`openai`,`openai`)??r(`anthropic`,`anthropic`)??r(`google`,`google`)??r(`x-ai`,`xai`)??r(`xai`,`xai`)??r(`mistralai`,`mistral`)??r(`minimax`,`minimax`)??r(`qwen`,`qwen`)??r(`moonshotai`,`moonshot`)??r(`z-ai`,`zai`)??r(`zai-org`,`zai`)??r(`glm`,`zai`)??{provider:n.includes(`claude-`)||n.includes(`claude_`)?`anthropic`:n.includes(`gemini-`)?`google`:n.includes(`qwen`)?`qwen`:n.includes(`kimi`)?`moonshot`:n.includes(`glm-`)?`zai`:e,model:t}}function jn(e){let t=An(e.route,e.model),n=s({provider:t.provider,model:t.model,reasoning:e.reasoning});if(n)return{thinkingLevels:n.thinkingLevels,defaultThinkingLevel:n.defaultThinkingLevel,thinkingMode:n.thinkingMode,reasoningBudgetSupported:n.reasoningBudgetSupported}}function Mn(e){let t=kn(e);if(t)return jn({route:t.route,model:t.model})}function X(e){return Object.fromEntries(e.map(e=>[e.toLowerCase(),Mn(e)??{}]))}function Z(e,t){let n=X(e);for(let[e,r]of Object.entries(t))n[e.toLowerCase()]={...n[e.toLowerCase()],...r};return n}var Nn=[...e],Pn={"anthropic/claude-fable-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-opus-4-8":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-sonnet-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1},"anthropic/claude-haiku-4-5":{thinkingLevels:Nn,defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}},Fn=Object.fromEntries(jt.map(e=>[`${v}/${e}`,{tools:!0,json:!0,...jn({route:v,model:e,reasoning:!0}),...e===`moonshotai/Kimi-K2.6-TEE`?{video:!0}:{}}])),In=[...e],Ln=Object.fromEntries([...Lt,...Rt,...zt].map(e=>[e,{tools:!0,thinkingLevels:In,defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}])),Rn=Object.fromEntries([...Bt,...Vt].map(t=>[t,{tools:!0,...t===`moonshot/kimi-k2.6`?{video:!0}:{},thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}])),zn=Object.fromEntries([...Ut,...Wt].map(t=>[t,{tools:!0,json:!0,audio:!0,video:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}])),Bn={"xai/grok-4.5":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-4.3":{tools:!0,json:!0,thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1},"xai/grok-build-0.1":{tools:!0,json:!0}},Vn=[`off`,`high`],Hn=Object.fromEntries(Kt.map(e=>[e,{tools:!0,json:!0,...e===`mistral/mistral-medium-3.5`||e===`mistral/mistral-small-2603`?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),Un=[`minimal`,`low`,`medium`,`high`],Wn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Gn=new Set([`volcengine/doubao-seed-2-0-pro-260215`,`volcengine/doubao-seed-2-0-lite-260215`,`volcengine/doubao-seed-2-0-mini-260215`,`volcengine/doubao-seed-2-0-code-preview-260215`,`volcengine-coding/doubao-seed-2.0-code`,`volcengine-plan/doubao-seed-2.0-code`,`volcengine-coding/doubao-seed-2.0-pro`,`volcengine-plan/doubao-seed-2.0-pro`,`volcengine-coding/doubao-seed-2.0-lite`,`volcengine-plan/doubao-seed-2.0-lite`,`volcengine-coding/doubao-seed-code`,`volcengine-plan/doubao-seed-code`]),Kn=Object.fromEntries([...qt,...Jt].map(e=>[e,{tools:!0,json:!0,...Wn.has(e)?{thinkingLevels:[...Un],defaultThinkingLevel:`medium`,thinkingMode:`volcengine-reasoning-effort`,reasoningBudgetSupported:!1}:{},...Gn.has(e)?{video:!0}:{}}])),qn=[`off`,`high`],Jn=new Set([`byteplus/seed-2-0-pro-260328`,`byteplus/seed-2-0-lite-260228`,`byteplus/seed-2-0-mini-260215`,`byteplus/seed-2-0-code-preview-260328`,`byteplus-coding/dola-seed-2.0-pro`,`byteplus-plan/dola-seed-2.0-pro`,`byteplus-coding/dola-seed-2.0-lite`,`byteplus-plan/dola-seed-2.0-lite`,`byteplus-coding/dola-seed-2.0-code`,`byteplus-plan/dola-seed-2.0-code`,`byteplus-coding/bytedance-seed-code`,`byteplus-plan/bytedance-seed-code`]),Yn=Object.fromEntries([...Yt,...Xt].map(e=>[e,{tools:!0,json:!0,...Jn.has(e)?{thinkingLevels:[...qn],defaultThinkingLevel:`high`,thinkingMode:`byteplus-thinking-type`,reasoningBudgetSupported:!1}:{}}])),Xn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`]),Zn=new Set([`openrouter/google/gemini-3.5-flash`,`openrouter/google/gemini-3.1-pro-preview`,`openrouter/google/gemini-3-flash-preview`,`openrouter/google/gemini-3.1-flash-lite`,`openrouter/qwen/qwen3.7-max`,`openrouter/qwen/qwen3.7-plus`,`openrouter/qwen/qwen3.6-flash`]),Qn=new Set([`openrouter/mistralai/mistral-medium-3-5`,`openrouter/mistralai/mistral-small-2603`]),$n=new Set([`openrouter/minimax/minimax-m2.7`]),er=new Set([`openrouter/deepseek/deepseek-v4-pro`,`openrouter/deepseek/deepseek-v4-flash`]),tr=new Set([`openrouter/openai/gpt-5.6-sol`,`openrouter/openai/gpt-5.6-terra`,`openrouter/openai/gpt-5.6-luna`,`openrouter/openai/gpt-5.5`,`openrouter/openai/gpt-5.4`,`openrouter/openai/gpt-5.4-mini`,`openrouter/openai/gpt-5.4-nano`]),nr=new Set([`openrouter/x-ai/grok-4.5`,`openrouter/x-ai/grok-4.3`]),rr=Object.fromEntries(Zt.map(n=>[n,{tools:!0,json:!0,...Xn.has(n)?{audio:!0}:{},...Zn.has(n)?{video:!0}:{},...Qn.has(n)?{thinkingLevels:[...Vn],defaultThinkingLevel:`high`,thinkingMode:`mistral-reasoning-effort`,reasoningBudgetSupported:!1}:{},...$n.has(n)?{thinkingLevels:[...In],defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}:{},...er.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1}:{},...tr.has(n)?{thinkingLevels:[...t],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:{},...nr.has(n)?{thinkingLevels:[`off`,`low`,`medium`,`high`],defaultThinkingLevel:`low`,thinkingMode:`xai-reasoning-effort`,reasoningBudgetSupported:!1}:{}}])),ir=new Set([`qwen-coding-plan/kimi-k2.7-code`,`qwen-coding-plan/glm-5.2`,`qwen-coding-plan/MiniMax-M2.5`]),ar=Object.fromEntries([...Qt,...$t].map(t=>[t,{tools:!0,json:!0,...ir.has(t)?{}:{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}}])),or={id:$e,label:`OpenAI`,priority:1,hint:`OpenAI sign-in + API key`,methods:[{id:`openai-codex`,route:g,kind:`oauth`,label:`Sign in`,hint:`Open the OpenAI sign-in URL, finish login in the browser, then Fased completes the OAuth flow.`},{id:`openai-api-key`,route:et,kind:`api-key`,label:`API key`}],models:{recommended:[...Ot,...kt],routeRules:{[et]:[`${et}/*`],[g]:[`${g}/*`]}},modelCapabilities:X([...Ot,...kt])},sr={id:tt,label:`Anthropic`,priority:2,hint:`Claude Code OAuth + setup-token + API key`,methods:[{id:`anthropic-oauth`,route:_,kind:`oauth`,label:`Sign in (Claude Code)`,hint:`Claude or Console account; Pro, Max, Team, Enterprise, or Console access`,buttonLabel:`Sign in`},{id:`token`,route:_,kind:`token`,label:`Token (setup-token)`,hint:"run `claude setup-token` elsewhere, then paste the token here",buttonLabel:`Paste token`},{id:`apiKey`,route:_,kind:`api-key`,label:`API key`}],models:{recommended:[...At],routeRules:{[_]:[`${_}/*`]}},modelCapabilities:Z(At,Pn)},cr={id:nt,label:`Chutes`,priority:3,hint:`Sign in + API key`,methods:[{id:`chutes`,route:v,kind:`oauth`,label:`Sign in`,hint:`Requires a Chutes OAuth app client id. Enter the cid, then Fased generates the Chutes sign-in URL.`,buttonLabel:`Sign in`},{id:`chutes-api-key`,route:v,kind:`api-key`,label:`API key`}],models:{recommended:[...Mt],routeRules:{[v]:[`${v}/*`]}},modelCapabilities:Z(Mt,Fn)},lr={id:rt,label:`Ollama`,priority:4,hint:`Local, cloud, or hybrid Ollama through the native API`,modelProviderIds:[y],methods:[{id:`ollama`,route:y,kind:`manual`,label:`Ollama native URL + model`,hint:`Use the native Ollama base URL, for example http://127.0.0.1:11434. Do not use /v1.`,buttonLabel:`Configure`}],models:{recommended:Nt,dynamic:!0,operatorCatalog:!0,routeRules:{[y]:[`${y}/*`]}},modelCapabilities:X(Nt)},ur={id:it,label:`LM Studio`,priority:4,hint:`Local LM Studio server on localhost:1234`,modelProviderIds:[b],methods:[{id:`lmstudio`,route:b,kind:`manual`,label:`LM Studio URL + model`,hint:`Use http://127.0.0.1:1234/v1, optional API token, and a model key from LM Studio.`,buttonLabel:`Configure`}],models:{recommended:Pt,dynamic:!0,operatorCatalog:!0,routeRules:{[b]:[`${b}/*`]}},modelCapabilities:X(Pt)},dr={id:at,label:`vLLM-compatible`,priority:4,hint:`OpenAI-compatible local server: vLLM, SGLang, TGI, LocalAI, or FastChat`,modelProviderIds:[x],methods:[{id:`vllm`,route:x,kind:`manual`,label:`vLLM-compatible URL + model`,hint:`Enter the /v1 base URL, API key or local placeholder, and served model ID for vLLM, SGLang, TGI, LocalAI, or FastChat.`,buttonLabel:`Configure`}],models:{recommended:Ft,dynamic:!0,operatorCatalog:!0,routeRules:{[x]:[`${x}/*`]}},modelCapabilities:X(Ft)},fr={id:ot,label:`MiniMax`,priority:5,hint:`MiniMax OAuth + API key`,modelProviderIds:[S,C,w],methods:[{id:`minimax-portal`,route:w,kind:`oauth`,label:`Sign in`,hint:`Global or CN endpoint; uses MiniMax portal sign-in`,setupRequirement:`Requires MiniMax portal/coding-plan access. Choose Global or CN, then open the approval URL and approve before the code expires.`,buttonLabel:`Sign in`},{id:`minimax-api`,route:S,kind:`api-key`,label:`API key`},{id:`minimax-api-key-cn`,route:C,kind:`api-key`,label:`API key (CN)`,hint:`China endpoint (api.minimaxi.com)`},{id:`minimax-api-lightning`,route:S,configProviderId:`minimax-lightning`,statusRoute:S,kind:`api-key`,label:`Highspeed API key`,hint:`Fast M2.7 tier`}],models:{recommended:[...Lt,...Rt,...zt],routeRules:{[S]:[`${S}/*`],[C]:[`${C}/*`],[w]:[`${w}/*`]}},modelCapabilities:Z([...Lt,...Rt,...zt],Ln)},pr={id:st,label:`Moonshot AI`,priority:6,hint:`Kimi API + Kimi Code`,modelProviderIds:[T,E],methods:[{id:`moonshot-api-key`,route:T,kind:`api-key`,label:`Kimi API key (.ai)`,hint:`Kimi Open Platform endpoint (api.moonshot.ai)`},{id:`moonshot-api-key-cn`,route:T,configProviderId:`moonshot-cn`,statusRoute:T,kind:`api-key`,label:`Kimi API key (.cn)`,hint:`China endpoint (api.moonshot.cn)`},{id:`kimi-code-api-key`,route:E,kind:`api-key`,label:`Kimi Code API key (subscription)`,hint:`Kimi Code membership endpoint (api.kimi.com/coding)`}],models:{recommended:[...Bt,...Vt],routeRules:{[T]:[`${T}/*`],[E]:[`${E}/*`]}},modelCapabilities:Z([...Bt,...Vt],Rn)},mr={id:ct,label:`Google`,priority:7,hint:`Gemini API key + OAuth`,routeAliases:[`gemini`],modelProviderIds:[D,`gemini`,O],methods:[{id:`gemini-api-key`,route:D,kind:`api-key`,label:`Gemini API key`},{id:`google-gemini-cli`,route:O,kind:`oauth`,label:`Sign in (Gemini CLI)`,hint:`Unofficial flow; review account-risk warning before use`,setupRequirement:`Requires gemini-cli installed on the gateway machine, or GEMINI_CLI_OAUTH_CLIENT_ID set before sign-in.`}],models:{recommended:[...Ut,...Wt],routeRules:{[D]:[`${D}/*`,`gemini/*`],[O]:[`${O}/*`]}},modelCapabilities:Z([...Ut,...Wt],zn)},hr={id:`xai`,label:`xAI (Grok)`,priority:8,hint:`Grok API key or xAI account sign-in`,methods:[{id:`xai-oauth`,route:`xai`,kind:`oauth`,label:`xAI sign-in`,hint:`Browser sign-in for eligible xAI/Grok accounts`,buttonLabel:`Sign in`},{id:`xai-device-code`,route:`xai`,kind:`device`,label:`xAI device code`,hint:`Remote-friendly sign-in for eligible xAI/Grok accounts`,buttonLabel:`Device code`},{id:`xai-api-key`,route:`xai`,kind:`api-key`,label:`xAI API key`}],models:{recommended:[...Gt],routeRules:{xai:[`xai/*`]}},modelCapabilities:Z(Gt,Bn)},gr={id:lt,label:`Mistral AI`,priority:9,hint:`Mistral API key`,methods:[{id:`mistral-api-key`,route:k,kind:`api-key`,label:`Mistral API key`}],models:{recommended:[...Kt],routeRules:{[k]:[`${k}/*`]}},modelCapabilities:Z(Kt,Hn)},_r={id:ut,label:`Volcano Engine`,priority:10,hint:`Ark API key + Coding Plan`,modelProviderIds:[A,j,M],methods:[{id:`volcengine-api-key`,route:A,kind:`api-key`,label:`Volcano Engine API key`}],models:{recommended:[...qt,...Jt],routeRules:{[A]:[`${A}/*`],[j]:[`${j}/*`],[M]:[`${M}/*`]}},modelCapabilities:Z([...qt,...Jt],Kn)},vr={id:dt,label:`BytePlus`,priority:11,hint:`ModelArk API key + Coding Plan`,modelProviderIds:[N,ft,P],methods:[{id:`byteplus-api-key`,route:N,kind:`api-key`,label:`BytePlus API key`}],models:{recommended:[...Yt,...Xt],routeRules:{[N]:[`${N}/*`],[ft]:[`${ft}/*`],[P]:[`${P}/*`]}},modelCapabilities:Z([...Yt,...Xt],Yn)},yr={id:pt,label:`OpenRouter`,priority:12,hint:`API key`,methods:[{id:`openrouter-api-key`,route:F,kind:`api-key`,label:`OpenRouter API key`}],models:{recommended:[...Zt],dynamic:!0,routeRules:{[F]:[`${F}/*`]}},modelCapabilities:Z(Zt,rr)},br={id:mt,label:`Qwen`,priority:14,hint:`Coding Plan + DashScope API key`,modelProviderIds:[L,I],methods:[{id:`qwen-coding-plan-api-key`,route:L,kind:`api-key`,label:`Coding Plan API key`,hint:`Alibaba Cloud Coding Plan endpoint (coding.dashscope.aliyuncs.com)`},{id:`qwen-api-key`,route:I,kind:`api-key`,label:`DashScope API key`,hint:`DashScope OpenAI-compatible endpoint (dashscope.aliyuncs.com)`}],models:{recommended:[...$t,...Qt],routeRules:{[L]:[`${L}/*`],[I]:[`${I}/*`]}},modelCapabilities:Z([...$t,...Qt],ar)},xr={id:`zai`,label:`Z.AI`,priority:15,hint:`GLM Coding Plan / Global / CN`,modelProviderIds:[`zai`],methods:[{id:`zai-coding-global`,route:`zai`,configProviderId:`zai-coding-global`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-Global`,hint:`GLM Coding Plan Global (api.z.ai)`},{id:`zai-coding-cn`,route:`zai`,configProviderId:`zai-coding-cn`,statusRoute:`zai`,kind:`api-key`,label:`Coding-Plan-CN`,hint:`GLM Coding Plan CN (open.bigmodel.cn)`},{id:`zai-global`,route:`zai`,configProviderId:`zai`,kind:`api-key`,label:`Global`,hint:`Z.AI Global (api.z.ai)`},{id:`zai-cn`,route:`zai`,configProviderId:`zai-cn`,statusRoute:`zai`,kind:`api-key`,label:`CN`,hint:`Z.AI CN (open.bigmodel.cn)`}],models:{recommended:[...en],routeRules:{zai:[`zai/*`]}},modelCapabilities:Z(en,nn)},Sr={id:ht,label:`Qianfan`,priority:16,hint:`Baidu Qianfan API key`,methods:[{id:`qianfan-api-key`,route:R,kind:`api-key`,label:`Qianfan API key`}],models:{recommended:[...rn],routeRules:{[R]:[`${R}/*`]}},modelCapabilities:Z(rn,sn)},Cr={id:gt,label:`Copilot`,priority:17,hint:`GitHub device login + local proxy`,modelProviderIds:[z,B],methods:[{id:`github-copilot`,route:z,kind:`device`,label:`GitHub sign in`,hint:`GitHub OAuth device flow; requires an active Copilot subscription`,buttonLabel:`Sign in`},{id:`copilot-proxy`,route:B,kind:`device`,label:`Proxy sign in`,hint:`Local VS Code Copilot Proxy bridge`,buttonLabel:`Configure`}],models:{recommended:[...ln,...un],dynamic:!0,routeRules:{[z]:[`${z}/*`],[B]:[`${B}/*`]}},modelCapabilities:Z([...ln,...un],gn)},wr={id:_t,label:`Vercel AI`,priority:18,hint:`API key`,modelProviderIds:[V],methods:[{id:`ai-gateway-api-key`,route:V,kind:`api-key`,label:`Vercel AI API key`}],models:{recommended:[...We],dynamic:!0,routeRules:{[V]:[`${V}/*`]}},modelCapabilities:Z(We,_n)},Tr={id:vt,label:`OpenCode Zen`,priority:19,hint:`API key`,modelProviderIds:[H],methods:[{id:`opencode-zen`,route:H,kind:`api-key`,label:`OpenCode Zen API key`,hint:`Sign in to OpenCode Zen, then paste the API key`}],models:{recommended:[...Ee],dynamic:!0,routeRules:{[H]:[`${H}/*`]}},modelCapabilities:Z(Ee,vn)},Er={id:yt,label:`Xiaomi`,priority:20,hint:`MiMo API key`,modelProviderIds:[U],methods:[{id:`xiaomi-api-key`,route:U,kind:`api-key`,label:`Xiaomi API key`,hint:`Create an API key in the Xiaomi MiMo API Open Platform`}],models:{recommended:[...yn],routeRules:{[U]:[`${U}/*`]}},modelCapabilities:Z(yn,bn)},Dr={id:bt,label:`Synthetic`,priority:21,hint:`Anthropic-compatible API key`,modelProviderIds:[W],methods:[{id:`synthetic-api-key`,route:W,kind:`api-key`,label:`Synthetic API key`,hint:`Create an API key in Synthetic`}],models:{recommended:[...xn],routeRules:{[W]:[`${W}/*`]}},modelCapabilities:Z(xn,Sn)},Or={id:xt,label:`Together AI`,priority:22,hint:`API key`,modelProviderIds:[G],methods:[{id:`together-api-key`,route:G,kind:`api-key`,label:`Together AI API key`,hint:`Create an API key in Together AI`}],models:{recommended:[...Ie],routeRules:{[G]:[`${G}/*`]}},modelCapabilities:Z(Ie,Cn)},kr={id:St,label:`Hugging Face`,priority:23,hint:`Inference Providers token`,modelProviderIds:[K],methods:[{id:`huggingface-api-key`,route:K,kind:`api-key`,label:`Hugging Face token`,hint:`Create a fine-grained token with Inference Providers access`}],models:{recommended:[...ye],dynamic:!0,routeRules:{[K]:[`${K}/*`]}},modelCapabilities:wn},Ar={id:Ct,label:`Venice AI`,priority:24,hint:`Privacy-focused API key`,modelProviderIds:[q],methods:[{id:`venice-api-key`,route:q,kind:`api-key`,label:`Venice AI API key`,hint:`Create an API key in Venice settings`}],models:{recommended:[...Ve],dynamic:!0,routeRules:{[q]:[`${q}/*`]}},modelCapabilities:Tn},jr={id:wt,label:`LiteLLM`,priority:25,hint:`OpenAI-compatible LLM proxy`,modelProviderIds:[J],methods:[{id:`litellm-api-key`,route:J,kind:`api-key`,label:`LiteLLM API key`,hint:`LiteLLM Proxy virtual key or master key plus /v1 base URL`}],models:{recommended:[...we],dynamic:!0,operatorCatalog:!0,routeRules:{[J]:[`${J}/*`]}},modelCapabilities:En},Mr={id:le,label:`Cloudflare AI`,priority:26,hint:`Anthropic through Cloudflare AI`,modelProviderIds:[c],methods:[{id:`cloudflare-ai-gateway-api-key`,route:c,kind:`manual`,label:`Cloudflare AI API key`,hint:`Requires Cloudflare Account ID, Gateway ID, and Anthropic provider API key`,buttonLabel:`Configure`}],models:{recommended:[...he],routeRules:{[c]:[`${c}/*`]}},modelCapabilities:Dn},Nr={id:Tt,label:`Custom Provider`,priority:27,hint:`OpenAI or Anthropic-compatible endpoint outside the built-in provider cards`,modelProviderIds:[Y],methods:[{id:`custom-api-key`,route:Y,kind:`manual`,label:`Custom Provider`,hint:`Requires base URL, endpoint compatibility, model ID, and optional API key. Use this for SGLang or other compatible endpoints when the vLLM-compatible shortcut does not fit.`,buttonLabel:`Configure`}],models:{recommended:On,dynamic:!0,operatorCatalog:!0,routeRules:{[Y]:[`${Y}/*`]}},modelCapabilities:X(On)},Q=[or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr],Pr=new Map(Q.map(e=>[e.id,e])),Fr=new Map(Q.flatMap(e=>[...e.methods.map(t=>[t.route,e]),...(e.routeAliases??[]).map(t=>[t,e]),...(e.modelProviderIds??[]).map(t=>[t,e])])),Ir=new Set(Q.flatMap(e=>e.models.recommended.map(e=>e.toLowerCase()))),Lr=new Map(Q.flatMap(e=>Object.entries(e.modelCapabilities??{}).map(([e,t])=>[e.toLowerCase(),t])));new Set(Dt);function Rr(){return[...Q]}function zr(e){return Pr.get(e.trim().toLowerCase())}function $(e){return Fr.get(e.trim().toLowerCase())}function Br(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();if(!(!n||!r))return Lr.get(`${n}/${r}`)}function Vr(e){let t=e.trim();if(!t)return!1;let n=t.indexOf(`/`);if(n===-1)return!0;let r=t.slice(0,n).trim().toLowerCase();if(!$(r))return!1;let i=$(r);return i?i.models.operatorCatalog?!0:Ir.has(t.toLowerCase()):!1}function Hr(e){let t=e.provider.trim(),n=e.id.trim();return!t||!n?!1:Vr(`${t}/${n}`)}function Ur(e,t){let n=e.trim();if(!n)return``;if(n.includes(`/`))return n;let r=t?.trim();return r?`${r}/${n}`:n}function Wr(e){let t=e.trim();return t?t.includes(`/`)?{kind:`qualified`,value:t}:{kind:`raw`,value:t}:null}function Gr(e,t){return Kr(e,t).value}function Kr(e,t){if(!e)return{value:``,source:`empty`,reason:`empty`};let n=e?.value.trim();if(!n)return{value:``,source:`empty`,reason:`empty`};if(e.kind===`qualified`)return{value:n,source:`qualified`};let r=``;for(let e of t){if(e.id.trim().toLowerCase()!==n.toLowerCase())continue;let t=Ur(e.id,e.provider);if(!r){r=t;continue}if(r.toLowerCase()!==t.toLowerCase())return{value:n,source:`raw`,reason:`ambiguous`}}return r?{value:r,source:`catalog`}:{value:n,source:`raw`,reason:`missing`}}function qr(e,t){return typeof e==`string`?Ur(e,t):``}function Jr(e,t,n){if(typeof e!=`string`)return{value:``,source:`empty`,reason:`empty`};let r=e.trim();if(!r)return{value:``,source:`empty`,reason:`empty`};let i=t?.trim();if(i){let e=n.find(e=>e.provider?.trim().toLowerCase()===i.toLowerCase()&&e.id.trim().toLowerCase()===r.toLowerCase());if(e)return{value:Qr(e).value,source:`server`}}let a=Kr(Wr(r),n);return a.source===`qualified`||a.source===`catalog`?a:{value:qr(r,t),source:`server`,reason:a.reason}}function Yr(e,t,n){return Jr(e,t,n).value}function Xr(e){let t=e.trim();if(!t)return``;let n=t.indexOf(`/`);if(n<=0)return t;let r=t.slice(0,n);return`${t.slice(n+1)} · ${Zr(r)}`}function Zr(e){return $(e)?.label??e}function Qr(e){let t=e.provider?.trim();return{value:(()=>{if(!t)return e.id;let n=`${t.toLowerCase()}/`;return e.id.toLowerCase().startsWith(n)?e.id:`${t}/${e.id}`})(),label:t?`${e.id} · ${Zr(t)}`:e.id}}export{dr as A,Br as B,yr as C,Or as D,Dr as E,zr as F,ee as H,$ as I,Hr as L,hr as M,Er as N,Ar as O,xr as P,Vr as R,Tr as S,br as T,s as U,ce as V,fr as _,Kr as a,lr as b,vr as c,Cr as d,Nr as f,ur as g,jr as h,Gr as i,_r as j,wr as k,cr as l,kr as m,Wr as n,Yr as o,mr as p,Xr as r,sr as s,Qr as t,Mr as u,gr as v,Sr as w,or as x,pr as y,Rr as z};
2
+ //# sourceMappingURL=chat-model-ref-Cs2TTOtF.js.map
@@ -300,7 +300,7 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{a as r,b as i,i as
300
300
  `})}
301
301
  </div>
302
302
  </section>
303
- `}function T(e,t){return r[e]||{label:t?.title??u(e),description:t?.description??``}}function E(e){let{key:t,schema:n,uiHints:r}=e;if(!n||i(n)!==`object`||!n.properties)return[];let a=Object.entries(n.properties).map(([e,n])=>{let i=l([t,e],r);return{key:e,label:i?.label??n.title??u(e),description:i?.help??n.description??``,order:i?.order??50}});return a.sort((e,t)=>e.order===t.order?e.key.localeCompare(t.key):e.order-t.order),a}function ee(e,t){if(!e||!t)return[];let n=[];function r(e,t,i){if(e===t)return;if(typeof e!=typeof t){n.push({path:i,from:e,to:t});return}if(typeof e!=`object`||!e||t===null){e!==t&&n.push({path:i,from:e,to:t});return}if(Array.isArray(e)&&Array.isArray(t)){JSON.stringify(e)!==JSON.stringify(t)&&n.push({path:i,from:e,to:t});return}let a=e,o=t,s=new Set([...Object.keys(a),...Object.keys(o)]);for(let e of s)r(a[e],o[e],i?`${i}.${e}`:e)}return r(e,t,``),n}function D(e,t=40){let n;try{n=JSON.stringify(e)??String(e)}catch{n=String(e)}return n.length<=t?n:n.slice(0,t-3)+`...`}function O(e){let t=_(e)??{},n=_(t.auth)??{},r=_(n.profiles)??{},i=_(n.order)??{},a=_((_(t.models)??{}).providers)??{},o=_((_(t.gateway)??{}).auth),s=o&&typeof o.mode==`string`?o.mode:null,c=new Set([...Object.keys(a),...Object.keys(i),...Object.values(r).map(e=>{let t=_(e);return t&&typeof t.provider==`string`?t.provider.trim():``}).filter(Boolean)]),l=Array.from(c).toSorted((e,t)=>e.localeCompare(t)).map(e=>{let t=_(a[e]),n=[];for(let[t,i]of Object.entries(r)){let r=_(i);if((r&&typeof r.provider==`string`?r.provider.trim():``)!==e)continue;let a=r&&typeof r.mode==`string`?r.mode:`unknown`,o=a===`api_key`||a===`oauth`||a===`token`?a:`unknown`;n.push({id:t,mode:o,email:r&&typeof r.email==`string`&&r.email.trim()||void 0})}return{id:e,modelCount:Array.isArray(t?.models)?t.models.length:0,authMode:t&&typeof t.auth==`string`?t.auth:null,hasApiKey:!!(t&&`apiKey`in t),profiles:n,orderedProfileIds:v(i[e])}}),u={api_key:0,oauth:0,token:0,unknown:0};for(let e of l)for(let t of e.profiles)u[t.mode]+=1;return{gatewayAuthMode:s,totalProfiles:Object.keys(r).length,totalProviders:l.length,profileModeCounts:u,providers:l}}function k(e){switch(e){case`api_key`:return`api-key`;case`oauth`:return`oauth`;case`token`:return`token`;default:return null}}function A(e){return e===`oauth`||e===`token`?e:`api_key`}function te(e){return e.trim()||void 0}function ne(e){return/^[^\s@]+@[^\s@]+$/.test(e)}function j(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function M(e,t){let n=e.indexOf(`:`);return n<0?!0:e.slice(0,n)===t}function N(e){return Object.values(e).some(Boolean)}function P(e,t){let n=e.elements.namedItem(t);return n instanceof HTMLInputElement||n instanceof HTMLSelectElement?n:null}function F(e){(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&e.setCustomValidity(``)}function I(e,t){let n=null;for(let r of[`id`,`provider`,`mode`,`email`]){let i=P(e,r);if(!i)continue;let a=t[r]??``;i.setCustomValidity(a),!n&&a&&(n=i)}n?.reportValidity()}function L(e){let t=new Set;(e.authMode===`api-key`||e.authMode===`oauth`||e.authMode===`token`)&&t.add(e.authMode),e.hasApiKey&&t.add(`api-key`);for(let n of e.profiles){let e=k(n.mode);e&&t.add(e)}return m.filter(e=>t.has(e))}function R(e,t){let n=new Set(e.profiles.map(e=>e.id)),r=e.orderedProfileIds.filter(e=>n.has(e)),i=e.profiles.map(e=>e.id).filter(e=>e!==t&&!r.includes(e));return n.has(t)?[t,...r.filter(e=>e!==t),...i]:[...r,...i]}function z(e){let t=new Map(e.profiles.map(e=>[e.id,e])),n=e.orderedProfileIds.map(e=>t.get(e)??null).filter(e=>!!e),r=e.profiles.filter(t=>!e.orderedProfileIds.includes(t.id));return[...n,...r]}function B(e){let t={},n={};for(let r of e.providers){let e=r.profiles.map(e=>e.id),i=r.orderedProfileIds.filter(t=>e.includes(t)),a=e.filter(e=>!i.includes(e));(i.length>0||a.length>0)&&(n[r.id]=[...i,...a]);for(let e of r.profiles)t[e.id]={provider:r.id,mode:A(e.mode),email:e.email}}return{profiles:t,order:n}}function V(e,t){let n=t.id.trim(),r=t.provider.trim();if(!n||!r)return e;let i=e.profiles[n],a={...e.profiles};a[n]={provider:r,mode:A(t.mode),email:te(t.email??``)};let o=Object.fromEntries(Object.entries(e.order).map(([e,t])=>[e,[...t]])),s=o[r]??[],c=i&&i.provider===r?s.indexOf(n):-1;for(let[e,t]of Object.entries(o))o[e]=t.filter(e=>e!==n);let l=o[r]??[];c>=0?l.splice(Math.min(c,l.length),0,n):l.push(n),o[r]=l;for(let[e,t]of Object.entries(o))t.length===0&&delete o[e];return{profiles:a,order:o}}function H(e,t){if(!e.profiles[t])return e;let n={...e.profiles};delete n[t];let r={};for(let[n,i]of Object.entries(e.order)){let e=i.filter(e=>e!==t);e.length>0&&(r[n]=e)}return{profiles:n,order:r}}function U(e,t,n,r){if(!e.profiles[n]||e.profiles[n]?.provider!==t)return e;let i=Object.entries(e.profiles).filter(([,e])=>e.provider===t).map(([e])=>e),a=[...(e.order[t]??[]).filter(e=>i.includes(e)),...i.filter(n=>!(e.order[t]??[]).includes(n))],o=a.indexOf(n);if(o<0)return e;let s=r===`up`?o-1:o+1;if(s<0||s>=a.length)return e;let c=[...a];return[c[o],c[s]]=[c[s],c[o]],{profiles:{...e.profiles},order:{...e.order,[t]:c}}}function W(e,t,n){let r=t.id.trim(),i=t.provider.trim(),a=t.mode.trim(),o=t.email?.trim()??``,s={};return r?/\s/.test(r)?s.id=`Profile id cannot contain spaces.`:r!==n&&e.profiles[r]&&(s.id=`Profile id already exists.`):s.id=`Profile id is required.`,i?/\s/.test(i)&&(s.provider=`Provider id cannot contain spaces.`):s.provider=`Provider is required.`,h.includes(a)||(s.mode=`Select a supported auth mode.`),o&&!ne(o)&&(s.email=`Enter a valid email address.`),r&&i&&!s.id&&!s.provider&&!M(r,i)&&(s.provider=`Provider should match the profile id prefix "${r.split(`:`,1)[0]}".`),s}function G(e){switch(e){case`ok`:case`static`:return`chip chip-ok`;case`expiring`:return`chip chip-warn`;case`expired`:case`missing`:return`chip chip-danger`;default:return`chip`}}function K(e){if(typeof e!=`number`||!Number.isFinite(e))return null;if(e<=0)return`now`;let t=Math.ceil(e/6e4);if(t<60)return`${t}m`;let n=Math.ceil(t/60);return n<48?`${n}h`:`${Math.ceil(n/24)}d`}function q(e){if(e.unusableKind===`disabled`)return e.unusableReason?`disabled: ${e.unusableReason}`:`disabled`;if(e.unusableKind===`cooldown`){let t=K(e.remainingMs);return t?`cooldown · ${t}`:`cooldown`}switch(e.status){case`ok`:{let t=K(e.remainingMs);return t?`ok · ${t}`:`ok`}case`expiring`:{let t=K(e.remainingMs);return t?`expiring · ${t}`:`expiring`}case`expired`:return`expired`;case`missing`:return`missing`;case`static`:return`static`;default:return`unknown`}}function J(e){let t=e.provider.trim(),n=e.profileId.trim();return t?e.mode===`token`?`pnpm fased models auth paste-token --provider ${t} --profile-id ${n||`${t}:manual`}`:`pnpm fased models auth login --provider ${t}`:`pnpm fased models auth login`}function re(e){return e===`api_key`||e===`token`}function ie(e){return e===`token`?`Save token`:`Save API key`}function ae(e){return e===`oauth`}function Y(e){switch(e){case`success`:return`callout info`;case`warn`:return`callout warn`;case`danger`:return`callout danger`;default:return`callout info`}}function oe(e,t){if(!e)return`Run sign-in`;switch(t?.stepType){case`note`:case`action`:return t.hasUrl?`Open browser…`:`Reading step…`;case`confirm`:return`Awaiting confirm…`;case`text`:return`Awaiting text…`;case`select`:case`multiselect`:return`Awaiting choice…`;default:return`Signing in…`}}function X(e){switch(e?.stepType){case`note`:case`action`:return e.hasUrl?`browser step`:`instruction step`;case`confirm`:return`confirmation`;case`text`:return`text input`;case`select`:return`single choice`;case`multiselect`:return`multiple choice`;default:return null}}function Z(e){return!!(e?.actionKind===`interactive`&&!e.active&&e.retryable)}function se(e){return!!(e?.actionKind===`interactive`&&e.url)}function Q(e){if(!e)return null;let t=[e.provider,e.profileId].filter(Boolean).join(` · `)||`provider auth`;switch(e.actionKind){case`interactive`:return e.active?`${t} sign-in is in progress.`:e.tone===`success`?`${t} sign-in completed.`:e.tone===`warn`?`${t} sign-in stopped before completion.`:e.tone===`danger`?`${t} sign-in needs attention.`:`${t} sign-in updated.`;case`store`:return e.active?`${t} credential update is running.`:e.tone===`success`?`${t} credential was updated.`:e.tone===`danger`?`${t} credential update failed.`:`${t} credential update changed state.`;case`clear`:return e.active?`${t} credential clear is running.`:e.tone===`success`?`${t} credential was cleared.`:e.tone===`warn`?`${t} had no stored credential to clear.`:e.tone===`danger`?`${t} credential clear failed.`:`${t} credential clear changed state.`;default:return t}}function $(e){if(!e)return[];if(e.actionKind===`interactive`){if(e.active)switch(e.stepType){case`note`:case`action`:return e.hasUrl?[`Finish the provider page in your browser, then return here for the next prompt.`,`Keep this Config card open so the next step stays visible.`]:[`Read the instruction fully, then return here to continue.`,`Keep this Config card open so the next step stays visible.`];case`confirm`:return[`Approve the confirmation prompt to keep the sign-in flow moving.`,e.hasUrl?`If needed, reopen the sign-in page from this card before confirming.`:`Return here after confirming to continue.`];case`text`:return[`Paste the requested code or value exactly into the prompt dialog.`,`Submit the prompt, then return here for the next step.`];case`select`:case`multiselect`:return[`Choose the option that matches the provider account or workspace you want.`,`If the choices look wrong, cancel and restart before storing the wrong profile.`];default:return[`Follow the current prompt, then return here for the next step.`]}if(e.tone===`success`)return[`Check the refreshed runtime status below to confirm the provider is now usable.`,`If you need a different account, rerun sign-in from this same profile.`];if(e.tone===`warn`)return[`Use Retry sign-in to continue from this profile.`,e.url?`Use Open sign-in page again if the provider browser page was already opened.`:`Restart the sign-in flow from this profile when you are ready.`];if(e.tone===`danger`)return[`Review the error detail, then retry sign-in from this profile.`,`If the browser flow keeps failing, use the terminal command fallback below.`]}return e.actionKind===`store`?e.tone===`danger`?[`Paste the credential again and verify the selected provider/profile.`,`If needed, clear the credential first to start from a clean state.`]:[`Check the refreshed runtime status below to confirm the stored credential is now active.`]:e.actionKind===`clear`?e.tone===`danger`?[`Retry the clear action if you still need to remove the stored credential.`,`If the profile looks wrong, update it in the config form first.`]:[`Check the refreshed runtime status below to confirm the profile no longer has a stored credential.`]:[]}function ce(e,t){return e?.providers.find(e=>e.provider===t)??null}function le(e,t,n){return ce(e,t)?.profiles.find(e=>e.profileId===n)??null}function ue(n,r,i,a){let o=e=>{a.onSectionChange(e),a.onSubsectionChange(null)},c=n.providers.length>0,l=a.authAction,u=Q(l),d=$(l),f=a.activeSection===`auth`,p=a.activeSection===`models`,m=B(n),g=(i?Object.entries(i.sourceCounts).toSorted((e,t)=>e[0].localeCompare(t[0])):[]).slice(0,4),_=i?.providers.filter(e=>!e.configured).slice(0,6).map(e=>e.provider).join(`, `)??``,v=e=>{a.onFormPatch([`auth`,`profiles`],e.profiles),a.onFormPatch([`auth`,`order`],e.order)},y=(e,t)=>{e.preventDefault();let n=e.currentTarget,r=new FormData(n),i={id:t,provider:j(r,`provider`),mode:j(r,`mode`),email:j(r,`email`)},a=W(m,i,t);if(N(a)){I(n,a);return}v(V(m,i))},b=e=>{e.preventDefault();let t=e.currentTarget,n=new FormData(t),r={id:j(n,`id`),provider:j(n,`provider`),mode:j(n,`mode`),email:j(n,`email`)},i=W(m,r);if(N(i)){I(t,i);return}v(V(m,r)),t.reset()},x=(e,t,n,r)=>{if(typeof window>`u`)return;let i=n===`token`?`token`:`API key`,o=window.prompt(`Paste ${e} ${i} for ${t}`,``)?.trim();o&&a.onStoreProfileCredential({profileId:t,provider:e,mode:n,secret:o,...r?{email:r}:{}})},S=e=>{typeof window<`u`&&!window.confirm(`Clear the stored credential for "${e}"?`)||a.onClearProfileCredential(e)},C=(e,t)=>{a.onRunInteractiveProfileAuth({profileId:t,provider:e})},w=e=>{!e?.url||typeof window>`u`||s(e.url)};return e`
303
+ `}function T(e,t){return r[e]||{label:t?.title??u(e),description:t?.description??``}}function E(e){let{key:t,schema:n,uiHints:r}=e;if(!n||i(n)!==`object`||!n.properties)return[];let a=Object.entries(n.properties).map(([e,n])=>{let i=l([t,e],r);return{key:e,label:i?.label??n.title??u(e),description:i?.help??n.description??``,order:i?.order??50}});return a.sort((e,t)=>e.order===t.order?e.key.localeCompare(t.key):e.order-t.order),a}function ee(e,t){if(!e||!t)return[];let n=[];function r(e,t,i){if(e===t)return;if(typeof e!=typeof t){n.push({path:i,from:e,to:t});return}if(typeof e!=`object`||!e||t===null){e!==t&&n.push({path:i,from:e,to:t});return}if(Array.isArray(e)&&Array.isArray(t)){JSON.stringify(e)!==JSON.stringify(t)&&n.push({path:i,from:e,to:t});return}let a=e,o=t,s=new Set([...Object.keys(a),...Object.keys(o)]);for(let e of s)r(a[e],o[e],i?`${i}.${e}`:e)}return r(e,t,``),n}function D(e,t=40){let n;try{n=JSON.stringify(e)??String(e)}catch{n=String(e)}return n.length<=t?n:n.slice(0,t-3)+`...`}function O(e){let t=_(e)??{},n=_(t.auth)??{},r=_(n.profiles)??{},i=_(n.order)??{},a=_((_(t.models)??{}).providers)??{},o=_((_(t.gateway)??{}).auth),s=o&&typeof o.mode==`string`?o.mode:null,c=new Set([...Object.keys(a),...Object.keys(i),...Object.values(r).map(e=>{let t=_(e);return t&&typeof t.provider==`string`?t.provider.trim():``}).filter(Boolean)]),l=Array.from(c).toSorted((e,t)=>e.localeCompare(t)).map(e=>{let t=_(a[e]),n=[];for(let[t,i]of Object.entries(r)){let r=_(i);if((r&&typeof r.provider==`string`?r.provider.trim():``)!==e)continue;let a=r&&typeof r.mode==`string`?r.mode:`unknown`,o=a===`api_key`||a===`oauth`||a===`token`?a:`unknown`;n.push({id:t,mode:o,email:r&&typeof r.email==`string`&&r.email.trim()||void 0})}return{id:e,modelCount:Array.isArray(t?.models)?t.models.length:0,authMode:t&&typeof t.auth==`string`?t.auth:null,hasApiKey:!!(t&&`apiKey`in t),profiles:n,orderedProfileIds:v(i[e])}}),u={api_key:0,oauth:0,token:0,unknown:0};for(let e of l)for(let t of e.profiles)u[t.mode]+=1;return{gatewayAuthMode:s,totalProfiles:Object.keys(r).length,totalProviders:l.length,profileModeCounts:u,providers:l}}function k(e){switch(e){case`api_key`:return`api-key`;case`oauth`:return`oauth`;case`token`:return`token`;default:return null}}function A(e){return e===`oauth`||e===`token`?e:`api_key`}function te(e){return e.trim()||void 0}function ne(e){return/^[^\s@]+@[^\s@]+$/.test(e)}function j(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function M(e,t){let n=e.indexOf(`:`);return n<0?!0:e.slice(0,n)===t}function N(e){return Object.values(e).some(Boolean)}function P(e,t){let n=e.elements.namedItem(t);return n instanceof HTMLInputElement||n instanceof HTMLSelectElement?n:null}function F(e){(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&e.setCustomValidity(``)}function I(e,t){let n=null;for(let r of[`id`,`provider`,`mode`,`email`]){let i=P(e,r);if(!i)continue;let a=t[r]??``;i.setCustomValidity(a),!n&&a&&(n=i)}n?.reportValidity()}function L(e){let t=new Set;(e.authMode===`api-key`||e.authMode===`oauth`||e.authMode===`token`)&&t.add(e.authMode),e.hasApiKey&&t.add(`api-key`);for(let n of e.profiles){let e=k(n.mode);e&&t.add(e)}return m.filter(e=>t.has(e))}function R(e,t){let n=new Set(e.profiles.map(e=>e.id)),r=e.orderedProfileIds.filter(e=>n.has(e)),i=e.profiles.map(e=>e.id).filter(e=>e!==t&&!r.includes(e));return n.has(t)?[t,...r.filter(e=>e!==t),...i]:[...r,...i]}function z(e){let t=new Map(e.profiles.map(e=>[e.id,e])),n=e.orderedProfileIds.map(e=>t.get(e)??null).filter(e=>!!e),r=e.profiles.filter(t=>!e.orderedProfileIds.includes(t.id));return[...n,...r]}function B(e){let t={},n={};for(let r of e.providers){let e=r.profiles.map(e=>e.id),i=r.orderedProfileIds.filter(t=>e.includes(t)),a=e.filter(e=>!i.includes(e));(i.length>0||a.length>0)&&(n[r.id]=[...i,...a]);for(let e of r.profiles)t[e.id]={provider:r.id,mode:A(e.mode),email:e.email}}return{profiles:t,order:n}}function V(e,t){let n=t.id.trim(),r=t.provider.trim();if(!n||!r)return e;let i=e.profiles[n],a={...e.profiles};a[n]={provider:r,mode:A(t.mode),email:te(t.email??``)};let o=Object.fromEntries(Object.entries(e.order).map(([e,t])=>[e,[...t]])),s=o[r]??[],c=i&&i.provider===r?s.indexOf(n):-1;for(let[e,t]of Object.entries(o))o[e]=t.filter(e=>e!==n);let l=o[r]??[];c>=0?l.splice(Math.min(c,l.length),0,n):l.push(n),o[r]=l;for(let[e,t]of Object.entries(o))t.length===0&&delete o[e];return{profiles:a,order:o}}function H(e,t){if(!e.profiles[t])return e;let n={...e.profiles};delete n[t];let r={};for(let[n,i]of Object.entries(e.order)){let e=i.filter(e=>e!==t);e.length>0&&(r[n]=e)}return{profiles:n,order:r}}function U(e,t,n,r){if(!e.profiles[n]||e.profiles[n]?.provider!==t)return e;let i=Object.entries(e.profiles).filter(([,e])=>e.provider===t).map(([e])=>e),a=[...(e.order[t]??[]).filter(e=>i.includes(e)),...i.filter(n=>!(e.order[t]??[]).includes(n))],o=a.indexOf(n);if(o<0)return e;let s=r===`up`?o-1:o+1;if(s<0||s>=a.length)return e;let c=[...a];return[c[o],c[s]]=[c[s],c[o]],{profiles:{...e.profiles},order:{...e.order,[t]:c}}}function W(e,t,n){let r=t.id.trim(),i=t.provider.trim(),a=t.mode.trim(),o=t.email?.trim()??``,s={};return r?/\s/.test(r)?s.id=`Profile id cannot contain spaces.`:r!==n&&e.profiles[r]&&(s.id=`Profile id already exists.`):s.id=`Profile id is required.`,i?/\s/.test(i)&&(s.provider=`Provider id cannot contain spaces.`):s.provider=`Provider is required.`,h.includes(a)||(s.mode=`Select a supported auth mode.`),o&&!ne(o)&&(s.email=`Enter a valid email address.`),r&&i&&!s.id&&!s.provider&&!M(r,i)&&(s.provider=`Provider should match the profile id prefix "${r.split(`:`,1)[0]}".`),s}function G(e){switch(e){case`ok`:case`static`:return`chip chip-ok`;case`expiring`:return`chip chip-warn`;case`expired`:case`missing`:return`chip chip-danger`;default:return`chip`}}function K(e){if(typeof e!=`number`||!Number.isFinite(e))return null;if(e<=0)return`now`;let t=Math.ceil(e/6e4);if(t<60)return`${t}m`;let n=Math.ceil(t/60);return n<48?`${n}h`:`${Math.ceil(n/24)}d`}function q(e){if(e.unusableKind===`disabled`)return e.unusableReason?`disabled: ${e.unusableReason}`:`disabled`;if(e.unusableKind===`cooldown`){let t=K(e.remainingMs);return t?`cooldown · ${t}`:`cooldown`}switch(e.status){case`ok`:{let t=K(e.remainingMs);return t?`ok · ${t}`:`ok`}case`expiring`:{let t=K(e.remainingMs);return t?`expiring · ${t}`:`expiring`}case`refresh-required`:return`refresh required · sign in or test the provider`;case`expired`:return`expired`;case`missing`:return`missing`;case`static`:return`static`;default:return`unknown`}}function J(e){let t=e.provider.trim(),n=e.profileId.trim();return t?e.mode===`token`?`pnpm fased models auth paste-token --provider ${t} --profile-id ${n||`${t}:manual`}`:`pnpm fased models auth login --provider ${t}`:`pnpm fased models auth login`}function re(e){return e===`api_key`||e===`token`}function ie(e){return e===`token`?`Save token`:`Save API key`}function ae(e){return e===`oauth`}function Y(e){switch(e){case`success`:return`callout info`;case`warn`:return`callout warn`;case`danger`:return`callout danger`;default:return`callout info`}}function oe(e,t){if(!e)return`Run sign-in`;switch(t?.stepType){case`note`:case`action`:return t.hasUrl?`Open browser…`:`Reading step…`;case`confirm`:return`Awaiting confirm…`;case`text`:return`Awaiting text…`;case`select`:case`multiselect`:return`Awaiting choice…`;default:return`Signing in…`}}function X(e){switch(e?.stepType){case`note`:case`action`:return e.hasUrl?`browser step`:`instruction step`;case`confirm`:return`confirmation`;case`text`:return`text input`;case`select`:return`single choice`;case`multiselect`:return`multiple choice`;default:return null}}function Z(e){return!!(e?.actionKind===`interactive`&&!e.active&&e.retryable)}function se(e){return!!(e?.actionKind===`interactive`&&e.url)}function Q(e){if(!e)return null;let t=[e.provider,e.profileId].filter(Boolean).join(` · `)||`provider auth`;switch(e.actionKind){case`interactive`:return e.active?`${t} sign-in is in progress.`:e.tone===`success`?`${t} sign-in completed.`:e.tone===`warn`?`${t} sign-in stopped before completion.`:e.tone===`danger`?`${t} sign-in needs attention.`:`${t} sign-in updated.`;case`store`:return e.active?`${t} credential update is running.`:e.tone===`success`?`${t} credential was updated.`:e.tone===`danger`?`${t} credential update failed.`:`${t} credential update changed state.`;case`clear`:return e.active?`${t} credential clear is running.`:e.tone===`success`?`${t} credential was cleared.`:e.tone===`warn`?`${t} had no stored credential to clear.`:e.tone===`danger`?`${t} credential clear failed.`:`${t} credential clear changed state.`;default:return t}}function $(e){if(!e)return[];if(e.actionKind===`interactive`){if(e.active)switch(e.stepType){case`note`:case`action`:return e.hasUrl?[`Finish the provider page in your browser, then return here for the next prompt.`,`Keep this Config card open so the next step stays visible.`]:[`Read the instruction fully, then return here to continue.`,`Keep this Config card open so the next step stays visible.`];case`confirm`:return[`Approve the confirmation prompt to keep the sign-in flow moving.`,e.hasUrl?`If needed, reopen the sign-in page from this card before confirming.`:`Return here after confirming to continue.`];case`text`:return[`Paste the requested code or value exactly into the prompt dialog.`,`Submit the prompt, then return here for the next step.`];case`select`:case`multiselect`:return[`Choose the option that matches the provider account or workspace you want.`,`If the choices look wrong, cancel and restart before storing the wrong profile.`];default:return[`Follow the current prompt, then return here for the next step.`]}if(e.tone===`success`)return[`Check the refreshed runtime status below to confirm the provider is now usable.`,`If you need a different account, rerun sign-in from this same profile.`];if(e.tone===`warn`)return[`Use Retry sign-in to continue from this profile.`,e.url?`Use Open sign-in page again if the provider browser page was already opened.`:`Restart the sign-in flow from this profile when you are ready.`];if(e.tone===`danger`)return[`Review the error detail, then retry sign-in from this profile.`,`If the browser flow keeps failing, use the terminal command fallback below.`]}return e.actionKind===`store`?e.tone===`danger`?[`Paste the credential again and verify the selected provider/profile.`,`If needed, clear the credential first to start from a clean state.`]:[`Check the refreshed runtime status below to confirm the stored credential is now active.`]:e.actionKind===`clear`?e.tone===`danger`?[`Retry the clear action if you still need to remove the stored credential.`,`If the profile looks wrong, update it in the config form first.`]:[`Check the refreshed runtime status below to confirm the profile no longer has a stored credential.`]:[]}function ce(e,t){return e?.providers.find(e=>e.provider===t)??null}function le(e,t,n){return ce(e,t)?.profiles.find(e=>e.profileId===n)??null}function ue(n,r,i,a){let o=e=>{a.onSectionChange(e),a.onSubsectionChange(null)},c=n.providers.length>0,l=a.authAction,u=Q(l),d=$(l),f=a.activeSection===`auth`,p=a.activeSection===`models`,m=B(n),g=(i?Object.entries(i.sourceCounts).toSorted((e,t)=>e[0].localeCompare(t[0])):[]).slice(0,4),_=i?.providers.filter(e=>!e.configured).slice(0,6).map(e=>e.provider).join(`, `)??``,v=e=>{a.onFormPatch([`auth`,`profiles`],e.profiles),a.onFormPatch([`auth`,`order`],e.order)},y=(e,t)=>{e.preventDefault();let n=e.currentTarget,r=new FormData(n),i={id:t,provider:j(r,`provider`),mode:j(r,`mode`),email:j(r,`email`)},a=W(m,i,t);if(N(a)){I(n,a);return}v(V(m,i))},b=e=>{e.preventDefault();let t=e.currentTarget,n=new FormData(t),r={id:j(n,`id`),provider:j(n,`provider`),mode:j(n,`mode`),email:j(n,`email`)},i=W(m,r);if(N(i)){I(t,i);return}v(V(m,r)),t.reset()},x=(e,t,n,r)=>{if(typeof window>`u`)return;let i=n===`token`?`token`:`API key`,o=window.prompt(`Paste ${e} ${i} for ${t}`,``)?.trim();o&&a.onStoreProfileCredential({profileId:t,provider:e,mode:n,secret:o,...r?{email:r}:{}})},S=e=>{typeof window<`u`&&!window.confirm(`Clear the stored credential for "${e}"?`)||a.onClearProfileCredential(e)},C=(e,t)=>{a.onRunInteractiveProfileAuth({profileId:t,provider:e})},w=e=>{!e?.url||typeof window>`u`||s(e.url)};return e`
304
304
  <section class="card" style="margin-bottom: 16px;">
305
305
  <div class="row" style="justify-content: space-between; gap: 12px; align-items: flex-start;">
306
306
  <div>
@@ -1050,4 +1050,4 @@ ${JSON.stringify(r.issues,null,2)}</pre
1050
1050
  </main>
1051
1051
  </div>
1052
1052
  `}export{z as buildOrderedProviderProfiles,R as buildPreferredProviderOrder,J as buildProviderAuthActionCommand,$ as buildProviderAuthActionGuidance,Q as buildProviderAuthActionSummary,B as buildProviderAuthState,O as buildProviderAuthSummary,Y as calloutClassForProviderAuthActionTone,se as canReopenProviderAuthActionUrl,Z as canRetryProviderAuthAction,q as formatProviderAuthRuntimeStatus,oe as labelForInteractiveProviderAuthAction,X as labelForProviderAuthActionStep,U as moveProviderAuthProfile,H as removeProviderAuthProfile,de as renderConfig,L as resolveEditableProviderAuthModes,le as resolveProviderAuthLiveProfileStatus,V as upsertProviderAuthProfile,W as validateProviderAuthProfileDraft};
1053
- //# sourceMappingURL=config-FFZLTSLS.js.map
1053
+ //# sourceMappingURL=config-CU5Zi8Dh.js.map
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-CHqTx3P_.js","./icons-D3-vEvih.js","./open-external-url-DwSiwMPl.js","./chat-model-ref-BbrdMKjQ.js","./marketplace-order-evidence-DkR0ZRHa.js","./mining-commit-R-6nu87p.js","./task-ledger-source-route-C-yTp0QU.js","./wallet-policy-C3ZS66Rl.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-wJm5kuje.js","./icons-D3-vEvih.js","./open-external-url-DwSiwMPl.js","./chat-model-ref-Cs2TTOtF.js","./marketplace-order-evidence-DkR0ZRHa.js","./mining-commit-R-6nu87p.js","./task-ledger-source-route-C-yTp0QU.js","./wallet-policy-C3ZS66Rl.js"])))=>i.map(i=>d[i]);
2
2
  (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={"entry-loaded":10,"app-import-start":20,"app-imported":30,"custom-element-defined":40,connected:50,"first-updated":60,rendered:70,"boot-failed":100};function t(t,n){if(typeof window>`u`)return;let r=window.__FASED_CONTROL_UI_BOOT=window.__FASED_CONTROL_UI_BOOT??{},i=e[r.stage]??0;e[t]<i&&r.stage!==`boot-failed`||(r.stage=t,r.detail=n??``,r.updatedAt=Date.now(),typeof r.mark==`function`&&r.mark(t,n),typeof window.dispatchEvent==`function`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(`fased-control-ui-boot`,{detail:{stage:t,detail:n??``}})))}var n=`modulepreload`,r=function(e,t){return new URL(e,t).href},i={},a=function(e,t,a){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}o=l(t.map(t=>{if(t=r(t,a),t=u(t),t in i)return;i[t]=!0;let o=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:n,o||(s.as=`script`),s.crossOrigin=``,s.href=t,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,n)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})};function o(e){let n=e instanceof Error?e.stack??e.message:String(e);t(`boot-failed`,n||`Unknown dashboard boot error.`);let r=document.querySelector(`fased-app`);if(!r)return;r.innerHTML=``;let i=document.createElement(`style`);i.textContent=`
3
3
  body {
4
4
  margin: 0;
@@ -57,5 +57,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-CHqTx3P_.js","./
57
57
  font-weight: 650;
58
58
  cursor: pointer;
59
59
  }
60
- `;let a=document.createElement(`div`);a.className=`boot-page`;let o=document.createElement(`section`);o.className=`boot-card`;let s=document.createElement(`h1`);s.className=`boot-title`,s.textContent=`Dashboard bundle could not load`;let c=document.createElement(`p`);c.className=`boot-desc`,c.textContent=`The gateway page loaded, but the browser could not start the dashboard bundle. Reload first. If it keeps happening after an update, clear this site's browser data and sign in again.`;let l=document.createElement(`div`);l.className=`boot-error`,l.textContent=n||`Unknown dashboard boot error.`;let u=document.createElement(`button`);u.className=`boot-button`,u.textContent=`Reload`,u.addEventListener(`click`,()=>window.location.reload()),o.append(s,c,l,u),a.append(o),r.append(i,a)}t(`entry-loaded`),t(`app-import-start`),a(()=>import(`./app-CHqTx3P_.js`).then(()=>t(`app-imported`)),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).catch(o);export{t as n,a as t};
61
- //# sourceMappingURL=index-CFHfNlLv.js.map
60
+ `;let a=document.createElement(`div`);a.className=`boot-page`;let o=document.createElement(`section`);o.className=`boot-card`;let s=document.createElement(`h1`);s.className=`boot-title`,s.textContent=`Dashboard bundle could not load`;let c=document.createElement(`p`);c.className=`boot-desc`,c.textContent=`The gateway page loaded, but the browser could not start the dashboard bundle. Reload first. If it keeps happening after an update, clear this site's browser data and sign in again.`;let l=document.createElement(`div`);l.className=`boot-error`,l.textContent=n||`Unknown dashboard boot error.`;let u=document.createElement(`button`);u.className=`boot-button`,u.textContent=`Reload`,u.addEventListener(`click`,()=>window.location.reload()),o.append(s,c,l,u),a.append(o),r.append(i,a)}t(`entry-loaded`),t(`app-import-start`),a(()=>import(`./app-wJm5kuje.js`).then(()=>t(`app-imported`)),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).catch(o);export{t as n,a as t};
61
+ //# sourceMappingURL=index-vTDTf5Zv.js.map