@fased/fased 0.1.55 → 0.1.57

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 (278) hide show
  1. package/config/capability-catalog.json +12 -0
  2. package/dist/agents/authenticated-model-catalog.js +3 -2
  3. package/dist/agents/bash-tools.exec-host-node.js +1 -1
  4. package/dist/agents/bash-tools.exec.js +1 -1
  5. package/dist/agents/copilot-dynamic-headers.js +37 -0
  6. package/dist/agents/current-model-catalog.js +6 -3
  7. package/dist/agents/model-catalog-snapshot.js +124 -0
  8. package/dist/agents/model-catalog-source.js +2 -2
  9. package/dist/agents/model-catalog.js +1 -1
  10. package/dist/agents/model-metadata.js +34 -6
  11. package/dist/agents/openai-codex-app-server.js +524 -0
  12. package/dist/agents/openai-codex-runtime-component.js +39 -0
  13. package/dist/agents/pi-embedded-runner/compact.js +3 -3
  14. package/dist/agents/pi-embedded-runner/extra-params.js +170 -94
  15. package/dist/agents/pi-embedded-runner/model.js +62 -1
  16. package/dist/agents/pi-embedded-runner/moonshot-stream-wrappers.js +46 -0
  17. package/dist/agents/pi-embedded-runner/openai-stream-wrappers.js +221 -0
  18. package/dist/agents/pi-embedded-runner/run/attempt.js +6 -4
  19. package/dist/agents/pi-embedded-runner/run.js +5 -2
  20. package/dist/agents/pi-embedded-runner/utils.js +1 -1
  21. package/dist/agents/pi-embedded-runner.js +1 -1
  22. package/dist/agents/pi-tools.js +2 -2
  23. package/dist/agents/tools/discord-actions-messaging.js +1 -1
  24. package/dist/agents/tools/message-tool.js +1 -1
  25. package/dist/agents/tools/session-status-tool.js +3 -3
  26. package/dist/agents/tools/slack-actions.js +1 -1
  27. package/dist/agents/tools/tts-tool.js +1 -1
  28. package/dist/auto-reply/reply/commands-models.js +1 -1
  29. package/dist/auto-reply/reply/directive-handling.impl.js +4 -1
  30. package/dist/auto-reply/reply/dispatch-acp.js +1 -1
  31. package/dist/auto-reply/reply/dispatch-from-config.js +1 -1
  32. package/dist/auto-reply/reply/get-reply-run.js +20 -2
  33. package/dist/auto-reply/reply/model-selection.js +1 -1
  34. package/dist/auto-reply/reply/session-reset-model.js +1 -1
  35. package/dist/auto-reply/status.js +1 -1
  36. package/dist/auto-reply/thinking.js +1 -1
  37. package/dist/brand.js +1 -1
  38. package/dist/browser/cdp.helpers.js +2 -2
  39. package/dist/browser/chrome.js +2 -2
  40. package/dist/browser/extension-relay.js +7 -7
  41. package/dist/build-info.json +3 -3
  42. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  43. package/dist/capabilities/install.js +43 -0
  44. package/dist/cli/components-cli.js +9 -31
  45. package/dist/cli/cron-cli/register.cron-add.js +1 -1
  46. package/dist/cli/hooks-cli.js +1 -1
  47. package/dist/cli/plugins-cli.js +3 -3
  48. package/dist/cli/program/register.agent.js +1 -1
  49. package/dist/cli/update-cli/update-command.js +50 -12
  50. package/dist/commands/agent.js +22 -3
  51. package/dist/commands/auth-choice.apply.openai.js +9 -0
  52. package/dist/commands/auth-choice.apply.plugin-provider.js +1 -1
  53. package/dist/commands/doctor-config-flow.js +1 -1
  54. package/dist/commands/hosted-dashboard-probe.js +3 -3
  55. package/dist/commands/model-picker.js +4 -3
  56. package/dist/commands/models/list.probe.js +1 -1
  57. package/dist/commands/models/list.registry.js +3 -2
  58. package/dist/commands/models/list.status-command.js +2 -2
  59. package/dist/commands/onboard-channels.js +1 -1
  60. package/dist/commands/onboarding/plugin-install.js +2 -2
  61. package/dist/commands/openai-codex-model-default.js +3 -2
  62. package/dist/config/zod-schema.agent-defaults.js +4 -2
  63. package/dist/config/zod-schema.agent-runtime.js +4 -2
  64. package/dist/config/zod-schema.core.js +4 -2
  65. package/dist/control-ui/assets/{app-D2RaTXoV.js → app-DltSyY4Y.js} +1723 -1716
  66. package/dist/control-ui/assets/chat-model-ref-Djkv93yn.js +2 -0
  67. package/dist/control-ui/assets/{index-D2nC6I-9.js → index-D5JlBp7f.js} +3 -3
  68. package/dist/control-ui/assets/{providers-CyjiG5Jw.js → providers-Cc89iMdx.js} +3 -3
  69. package/dist/control-ui/index.html +1 -1
  70. package/dist/control-ui/version.json +1 -1
  71. package/dist/cron/isolated-agent/run.js +6 -2
  72. package/dist/cron/service/jobs.js +11 -1
  73. package/dist/discord/monitor/gateway-plugin.js +2 -2
  74. package/dist/discord/voice/manager.js +1 -1
  75. package/dist/gateway/client.js +4 -4
  76. package/dist/gateway/protocol/schema/agents-models-skills.js +106 -5
  77. package/dist/gateway/server-methods/hooks.js +1 -1
  78. package/dist/gateway/server-methods/models.js +15 -7
  79. package/dist/gateway/server-methods/plugins-marketplace.js +3 -3
  80. package/dist/gateway/server-methods/services.js +1 -1
  81. package/dist/gateway/server-methods/sessions.js +1 -1
  82. package/dist/gateway/server-methods/tts.js +2 -2
  83. package/dist/gateway/server-model-catalog.js +1 -1
  84. package/dist/gateway/sessions-patch.js +27 -24
  85. package/dist/light-update-status.js +11 -11
  86. package/dist/plugin-sdk/{accounts-CeRNo5Ae.js → accounts-CmMwe9Dt.js} +1 -1
  87. package/dist/plugin-sdk/{actions-OMRHtXPj.js → actions-DYViFQiX.js} +4 -4
  88. package/dist/plugin-sdk/{active-listener-BlIkS3iR.js → active-listener-DVbpcisf.js} +1 -1
  89. package/dist/plugin-sdk/{agent-scope-BbgPlhtw.js → agent-scope-CCjfjKoO.js} +1 -1
  90. package/dist/plugin-sdk/{allow-list-BYeKk0Sy.js → allow-list-DyAxs4yw.js} +1 -1
  91. package/dist/plugin-sdk/{audio-preflight-B2n3a2Tj.js → audio-preflight-D-Mfay8i.js} +44 -48
  92. package/dist/plugin-sdk/{audit-Ppg6dR_b.js → audit-JImYFOzJ.js} +1 -1
  93. package/dist/plugin-sdk/{channel-access-configure-B6IAGlE0.js → channel-access-configure-B_qYjml8.js} +1 -1
  94. package/dist/plugin-sdk/{channel-access-af8dWWRv.js → channel-access-cxCK2mci.js} +1 -1
  95. package/dist/plugin-sdk/{channel-adapters.discord-IOZP8Cv5.js → channel-adapters.discord-BS4S4Svh.js} +1 -1
  96. package/dist/plugin-sdk/channel-plugin-common.d.ts +3 -3
  97. package/dist/plugin-sdk/channel-plugin-common.js +5 -5
  98. package/dist/plugin-sdk/{chunk-CD76Byie.js → chunk-CF8nvZNj.js} +1 -1
  99. package/dist/plugin-sdk/{chunk-items-Bu19zrYH.js → chunk-items-yLFoO571.js} +1 -1
  100. package/dist/plugin-sdk/command-status.d.ts +2 -2
  101. package/dist/plugin-sdk/command-status.js +44 -48
  102. package/dist/plugin-sdk/{commands-registry-DgS55tNj.js → commands-registry-CK4KmMG0.js} +2 -2
  103. package/dist/plugin-sdk/{common-CWvfeiX0.js → common-Cky4hpqr.js} +1 -1
  104. package/dist/plugin-sdk/{config-CYDETqcF.js → config-Dbxj_jUP.js} +1153 -17
  105. package/dist/plugin-sdk/{config-schema-CQ4EVcQG.js → config-schema-aKPMn6ML.js} +96084 -81132
  106. package/dist/plugin-sdk/device-pair.d.ts +1 -1
  107. package/dist/plugin-sdk/device-pair.js +2 -3
  108. package/dist/plugin-sdk/{diagnostic-Dfn1iERm.js → diagnostic-DLL_zekv.js} +3 -3
  109. package/dist/plugin-sdk/{directory-live-DatqU-eS.js → directory-live-CSuYxdwk.js} +1 -1
  110. package/dist/plugin-sdk/{directory-live-ClwN5KKq.js → directory-live-Dw7ZgC9_.js} +1 -1
  111. package/dist/plugin-sdk/discord.d.ts +6 -6
  112. package/dist/plugin-sdk/discord.js +32 -33
  113. package/dist/plugin-sdk/{draft-stream-controls-D4Tb_iS_.js → draft-stream-controls-BqchW1vi.js} +1 -1
  114. package/dist/plugin-sdk/{fetch-guard-BuYrl6q2.js → fetch-guard-CeG6u6ld.js} +1 -1
  115. package/dist/plugin-sdk/{filesystem-manager-B9DDPgfU.js → filesystem-manager-ZoHU8oA7.js} +3 -3
  116. package/dist/plugin-sdk/{fs-safe-BG-VzVkL.js → fs-safe-g4g7GT02.js} +2 -2
  117. package/dist/plugin-sdk/{group-mentions-BxDgHCgj.d.ts → group-mentions-BHRff6j8.d.ts} +1 -1
  118. package/dist/plugin-sdk/{guilds-BeT3iHHJ.js → guilds-CDhRIX57.js} +1 -1
  119. package/dist/plugin-sdk/{handle-action-B75UVKxF.js → handle-action-BSNDD2Vc.js} +25 -26
  120. package/dist/plugin-sdk/{helpers-BuEwju6y.js → helpers-CDo2XBSr.js} +1 -1
  121. package/dist/plugin-sdk/{image-ops-C66HPeAZ.js → image-ops-DbeBxbn4.js} +1 -1
  122. package/dist/plugin-sdk/index.d.ts +18 -18
  123. package/dist/plugin-sdk/index.js +48 -52
  124. package/dist/plugin-sdk/{login-Amr2DpKU.js → login-CWXvFTd8.js} +3 -3
  125. package/dist/plugin-sdk/{login-qr-DMQNEi9m.js → login-qr-CJB2zjmM.js} +4 -4
  126. package/dist/plugin-sdk/{manager-Bvpq49BI.js → manager-CbiFFLKS.js} +8 -8
  127. package/dist/plugin-sdk/{markdown-tables-DmQ7oXOm.js → markdown-tables-Bskt9r8i.js} +1 -1
  128. package/dist/plugin-sdk/{media-ByLQbEwJ.js → media-B3aAg5rh.js} +5 -5
  129. package/dist/plugin-sdk/{memory-search-C3C0bD2H.js → memory-search-DTjIMw8J.js} +1 -1
  130. package/dist/plugin-sdk/{monitor-K_u6daGa.js → monitor-BJs6z7AT.js} +52 -56
  131. package/dist/plugin-sdk/{monitor-S_7LrvSj.js → monitor-BYGbTI5V.js} +62 -66
  132. package/dist/plugin-sdk/{openresponses-http-BrDJUZXR.js → openresponses-http-BGCl2dS2.js} +44 -48
  133. package/dist/plugin-sdk/{optional-runtime-dependency-CbYjAC2b.js → optional-runtime-dependency-BlTVkcAg.js} +1 -1
  134. package/dist/plugin-sdk/{outbound-BuDafBBI.js → outbound-CIemga5_.js} +9 -9
  135. package/dist/plugin-sdk/{outbound-attachment-DmZmUqFP.js → outbound-attachment-2RckWqrk.js} +2 -2
  136. package/dist/plugin-sdk/{pairing-message-D0-UWGFJ.d.ts → pairing-message-C403mq4K.d.ts} +2 -2
  137. package/dist/plugin-sdk/{pairing-message-e4D4eBDA.js → pairing-message-r-VQfhFB.js} +1 -1
  138. package/dist/plugin-sdk/{pairing-store-T3IGoGZg.js → pairing-store-uPnLfGgB.js} +2 -2
  139. package/dist/plugin-sdk/{path-alias-guards-Dg3gU-MA.js → path-alias-guards-DjgDArrp.js} +1 -1
  140. package/dist/plugin-sdk/{pi-model-discovery-DvAG_Png.js → pi-model-discovery-BpEilAym.js} +1 -1
  141. package/dist/plugin-sdk/{pi-model-discovery-runtime-NjkUgjIf.js → pi-model-discovery-runtime-DwNdFaz-.js} +3 -3
  142. package/dist/plugin-sdk/{probe-Dlk0Jxpw.js → probe-BFroeK3g.js} +1 -1
  143. package/dist/plugin-sdk/{probe-Cyb-DGA3.js → probe-CJb5uR8B.js} +2 -2
  144. package/dist/plugin-sdk/{probe-D8JAILir.js → probe-l_whvGLY.js} +1 -1
  145. package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +2 -2
  146. package/dist/plugin-sdk/{pw-ai-D7eW43DL.js → pw-ai-H7UgunQQ.js} +7 -9
  147. package/dist/plugin-sdk/{qmd-manager-DCUE21Kj.js → qmd-manager-DSyx77KY.js} +4 -4
  148. package/dist/plugin-sdk/{query-expansion-Zr9qQixm.js → query-expansion-CAI2kKLQ.js} +1 -1
  149. package/dist/plugin-sdk/{replies-BMIPmEoP.js → replies-CKMwkH4G.js} +4 -4
  150. package/dist/plugin-sdk/{reply-prefix-Bqzm6DC1.js → reply-prefix-CeVw7Mn2.js} +1 -1
  151. package/dist/plugin-sdk/{resolve-channels-ChWKWtA9.js → resolve-channels-87LZrFk_.js} +2 -2
  152. package/dist/plugin-sdk/{resolve-channels-zEnvugag.js → resolve-channels-_-nV-EK2.js} +1 -1
  153. package/dist/plugin-sdk/{resolve-outbound-target-CXCqUUPV.js → resolve-outbound-target-B68fSoGi.js} +2 -2
  154. package/dist/plugin-sdk/{resolve-route-DJN-SUSt.js → resolve-route-B8fOfihG.js} +2 -2
  155. package/dist/plugin-sdk/{resolve-users-BTvjQuui.js → resolve-users-DN9VQBwv.js} +1 -1
  156. package/dist/plugin-sdk/{resolve-users-CTzoruIZ.js → resolve-users-V6dHh_2B.js} +2 -2
  157. package/dist/plugin-sdk/{retry-policy-CY1qY6d7.js → retry-policy-B6GQldxB.js} +1 -1
  158. package/dist/plugin-sdk/{runtime-dependency-DvdRNMvs.js → runtime-dependency-DlqVSsSs.js} +124 -16
  159. package/dist/plugin-sdk/{runtime-CgOkQe0w.js → runtime-nVJl3PlS.js} +4 -4
  160. package/dist/plugin-sdk/{sandbox-paths-lj7_EVuA.js → sandbox-paths-Dx2lUqCu.js} +2 -2
  161. package/dist/plugin-sdk/sat-runtime.d.ts +3 -3
  162. package/dist/plugin-sdk/sat-runtime.js +45 -11
  163. package/dist/plugin-sdk/{send-2ITqny2W.js → send-BCJ4hi3t.js} +10 -10
  164. package/dist/plugin-sdk/{send-Cr-dj6S-.js → send-BHokB4TR.js} +6 -6
  165. package/dist/plugin-sdk/{send-BAz22RZr.js → send-CPK_HlYW.js} +9 -9
  166. package/dist/plugin-sdk/{send-eTxqFFsw.js → send-D3DQOg2a.js} +8 -8
  167. package/dist/plugin-sdk/{send-BG3RWyil.js → send-hSu1HWms.js} +13 -13
  168. package/dist/plugin-sdk/{session-C8nJmmVE.js → session-DQ4Dr-mf.js} +3 -3
  169. package/dist/plugin-sdk/{skill-commands-Rm5by9S8.js → skill-commands-CmdoKLh_.js} +103 -103
  170. package/dist/plugin-sdk/{slack-xvIVvyEM.js → slack-B70NHpMF.js} +65 -69
  171. package/dist/plugin-sdk/{slack-actions-BNIALJTA.js → slack-actions-fSmP981b.js} +21 -22
  172. package/dist/plugin-sdk/slack.d.ts +6 -6
  173. package/dist/plugin-sdk/slack.js +14 -14
  174. package/dist/plugin-sdk/{ssrf-BZG8Ztod.js → ssrf-fG4UHKBw.js} +180 -2
  175. package/dist/plugin-sdk/{sticker-cache-D3oDiu2u.js → sticker-cache-B4dG2sKU.js} +3 -3
  176. package/dist/plugin-sdk/{tables-DS5L7lCA.js → tables-EX4Hy-a-.js} +2 -2
  177. package/dist/plugin-sdk/{device-pairing-D2Yq-_U6.js → tailscale-status-DwpNdO3Z.js} +104 -2
  178. package/dist/plugin-sdk/{targets-D6lUomJc.js → targets-BeGUCGWK.js} +2 -2
  179. package/dist/plugin-sdk/{telegram-actions-MSFkDn0m.js → telegram-actions-CM8SJgc9.js} +49 -53
  180. package/dist/plugin-sdk/telegram.d.ts +6 -6
  181. package/dist/plugin-sdk/telegram.js +12 -12
  182. package/dist/plugin-sdk/{thread-bindings.lifecycle-Ry6Vcgw3.js → thread-bindings.lifecycle-tHK_1mvp.js} +3 -3
  183. package/dist/plugin-sdk/{thread-bindings.state-C0stmvNk.js → thread-bindings.state-D7xG1GHu.js} +2 -2
  184. package/dist/plugin-sdk/{tmp-fased-dir-D91GExk4.d.ts → tmp-fased-dir-Ouj58axY.d.ts} +2 -2
  185. package/dist/plugin-sdk/{types-DVTIpopt.d.ts → types-B4hj6HgR.d.ts} +2 -2
  186. package/dist/plugin-sdk/{types-BzadOItY.d.ts → types-DyhXnYUr.d.ts} +1 -1
  187. package/dist/plugin-sdk/{types-DKvBJHfH.d.ts → types-dWZFX1fk.d.ts} +28 -3
  188. package/dist/plugin-sdk/{types.plugin-BiHPaDTF.d.ts → types.plugin-_fbu40Re.d.ts} +7 -5
  189. package/dist/plugin-sdk/{web-DRNJxHXA.js → web-BFolfZ3i.js} +53 -57
  190. package/dist/plugin-sdk/{whatsapp-actions-BDXZF2R5.js → whatsapp-actions-CYmleHCz.js} +19 -20
  191. package/dist/plugin-sdk/{whatsapp-heartbeat-CKgmwCGr.js → whatsapp-heartbeat-BEwm4GK3.js} +2 -2
  192. package/dist/plugin-sdk/whatsapp.d.ts +11 -11
  193. package/dist/plugin-sdk/whatsapp.js +15 -15
  194. package/dist/plugin-sdk/{wsl-Biw7Mj39.js → wsl-BtMDzMv5.js} +53 -53
  195. package/dist/plugin-sdk/{zod-schema.providers-core-CIzCjXH9.d.ts → zod-schema.providers-core-FaYR6KdD.d.ts} +61 -61
  196. package/dist/plugins/lifecycle.js +1 -1
  197. package/dist/plugins/manifest-registry.js +26 -0
  198. package/dist/plugins/manifest.js +2 -0
  199. package/dist/plugins/marketplace.js +1 -1
  200. package/dist/plugins/runtime/index.js +1 -1
  201. package/dist/plugins/update.js +1 -1
  202. package/dist/providers/github-copilot-model-discovery.js +51 -0
  203. package/dist/providers/openai-codex-model-discovery.js +176 -0
  204. package/dist/providers/refresh.js +116 -34
  205. package/dist/providers/registry.js +2 -2
  206. package/dist/providers/runtime-model-catalog.js +97 -28
  207. package/dist/shared/model-thinking.js +13 -2
  208. package/dist/telegram/bot-message-context.js +1 -1
  209. package/dist/wizard/onboarding.finalize.js +1 -1
  210. package/extensions/acpx/package.json +1 -1
  211. package/extensions/bluebubbles/package.json +1 -1
  212. package/extensions/copilot-proxy/package.json +1 -1
  213. package/extensions/diagnostics-otel/package.json +1 -1
  214. package/extensions/fased-federation/package.json +1 -1
  215. package/extensions/google-gemini-cli-auth/package.json +1 -1
  216. package/extensions/imessage/package.json +1 -1
  217. package/extensions/irc/package.json +1 -1
  218. package/extensions/line/package.json +1 -1
  219. package/extensions/llm-task/package.json +1 -1
  220. package/extensions/lobster/package.json +1 -1
  221. package/extensions/matrix/CHANGELOG.md +12 -0
  222. package/extensions/matrix/package.json +1 -1
  223. package/extensions/mattermost/package.json +1 -1
  224. package/extensions/memory-core/package.json +2 -2
  225. package/extensions/memory-lancedb/package.json +1 -1
  226. package/extensions/minimax-portal-auth/package.json +1 -1
  227. package/extensions/msteams/CHANGELOG.md +12 -0
  228. package/extensions/msteams/package.json +1 -1
  229. package/extensions/nextcloud-talk/package.json +1 -1
  230. package/extensions/nostr/CHANGELOG.md +12 -0
  231. package/extensions/nostr/package.json +1 -1
  232. package/extensions/open-prose/package.json +1 -1
  233. package/extensions/sat-mining/package.json +1 -1
  234. package/extensions/signal/package.json +1 -1
  235. package/extensions/synology-chat/package.json +1 -1
  236. package/extensions/tlon/package.json +1 -1
  237. package/extensions/twitch/CHANGELOG.md +12 -0
  238. package/extensions/twitch/package.json +1 -1
  239. package/extensions/voice-call/CHANGELOG.md +12 -0
  240. package/extensions/voice-call/package.json +1 -1
  241. package/extensions/zalo/CHANGELOG.md +12 -0
  242. package/extensions/zalo/package.json +1 -1
  243. package/extensions/zalouser/CHANGELOG.md +12 -0
  244. package/extensions/zalouser/package.json +1 -1
  245. package/package.json +2 -1
  246. package/dist/control-ui/assets/chat-model-ref-BZFblCeY.js +0 -2
  247. package/dist/plugin-sdk/ip-C70a-YlD.js +0 -181
  248. package/dist/plugin-sdk/tailscale-status-ClsquRGs.js +0 -104
  249. package/dist/plugin-sdk/wallet-status-f0HagNeO.js +0 -11947
  250. package/dist/plugin-sdk/ws-CocpWGhl.js +0 -114
  251. /package/dist/plugin-sdk/{blocks-input-Dcitfh7h.js → blocks-input-Bg-8S2pl.js} +0 -0
  252. /package/dist/plugin-sdk/{channel-activity-Cg1xRoc2.js → channel-activity-DBDMQ3yI.js} +0 -0
  253. /package/dist/plugin-sdk/{channel-core-BOkyXXLa.js → channel-core-CFRs8LPy.js} +0 -0
  254. /package/dist/plugin-sdk/{client-D2N7hqVu.js → client-pI228AVT.js} +0 -0
  255. /package/dist/plugin-sdk/{command-poll-backoff-NAePk3eL.js → command-poll-backoff-yJU83wEq.js} +0 -0
  256. /package/dist/plugin-sdk/{date-time-CE3Uer3C.js → date-time-uUevHscU.js} +0 -0
  257. /package/dist/plugin-sdk/{diagnostic-session-state-HO94DMou.js → diagnostic-session-state-DqgfGYqZ.js} +0 -0
  258. /package/dist/plugin-sdk/{draft-stream-loop-CKyHn8IX.js → draft-stream-loop-CrOPfV3F.js} +0 -0
  259. /package/dist/plugin-sdk/{fetch-Cu-ahkie.js → fetch-BtmoPIlf.js} +0 -0
  260. /package/dist/plugin-sdk/{gateway-registry-DFsoY6C0.js → gateway-registry-DZDsqicG.js} +0 -0
  261. /package/dist/plugin-sdk/{inbound-context-BFnIdcqI.js → inbound-context-DrAcXE0y.js} +0 -0
  262. /package/dist/plugin-sdk/{internal-qo16nNU1.js → internal-CG_nHo-2.js} +0 -0
  263. /package/dist/plugin-sdk/{pairing-token-N_6Jbt1L.js → pairing-token-Cs3BRKc0.js} +0 -0
  264. /package/dist/plugin-sdk/{polls-DQrR-qT3.js → polls-DKQXVfJp.js} +0 -0
  265. /package/dist/plugin-sdk/{proxy-7xs_rsnV.js → proxy-DWpYcsvR.js} +0 -0
  266. /package/dist/plugin-sdk/{qmd-scope-D1sSG_Rx.js → qmd-scope-CdX34VCV.js} +0 -0
  267. /package/dist/plugin-sdk/{redact-identifier-Q3tkvxhm.js → redact-identifier-Lt7t3l7S.js} +0 -0
  268. /package/dist/plugin-sdk/{redact-sensitive-url-dPvnFFsK.js → redact-sensitive-url-g-ukZjwA.js} +0 -0
  269. /package/dist/plugin-sdk/{render-Bwu_WxwA.js → render-e7fENCYH.js} +0 -0
  270. /package/dist/plugin-sdk/{reply-reference-BkbK_DWT.js → reply-reference-Bqk-7HXE.js} +0 -0
  271. /package/dist/plugin-sdk/{secure-random-Bl-AVLVb.js → secure-random-BIkG-k4s.js} +0 -0
  272. /package/dist/plugin-sdk/{shared-clhhbWN3.js → shared-CBgp_GBw.js} +0 -0
  273. /package/dist/plugin-sdk/{target-errors-C_SVKoEv.js → target-errors-Ckufe179.js} +0 -0
  274. /package/dist/plugin-sdk/{targets-BDvvnlph.js → targets-CoMJ1ry1.js} +0 -0
  275. /package/dist/plugin-sdk/{tokens-BvtlOzVP.js → tokens-BbnqfVuu.js} +0 -0
  276. /package/dist/plugin-sdk/{tool-loop-detection-CWphm1k_.js → tool-loop-detection-Bp8bPJLs.js} +0 -0
  277. /package/dist/plugin-sdk/{ui-e020ouhJ.js → ui-Be8cLHIS.js} +0 -0
  278. /package/dist/plugin-sdk/{with-timeout-BYrRAYFV.js → with-timeout-ckWB8rTo.js} +0 -0
@@ -0,0 +1,2 @@
1
+ var e=[`off`,`minimal`,`low`,`medium`,`high`],t=[...e,`xhigh`],n=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],r=[...n,`ultra`],i=[`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.6-sol`,`openai-codex/gpt-5.6-terra`,`openai-codex/gpt-5.6-luna`,`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`],a=new Set(i.map(e=>e.toLowerCase())),o=new Set(i.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e)),ee=new Set([`openai/gpt-5.6`,`openai/gpt-5.6-sol`,`openai/gpt-5.6-terra`,`openai/gpt-5.6-luna`,`openai-codex/gpt-5.6-sol`,`openai-codex/gpt-5.6-terra`,`openai-codex/gpt-5.6-luna`].map(e=>e.toLowerCase())),te=new Set([`gpt-5.6`,`gpt-5.6-sol`,`gpt-5.6-terra`,`gpt-5.6-luna`]);function s(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function ne(e){return s(e)===`zai`}function re(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if(t===`max`)return`max`;if(t===`ultra`)return`ultra`;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`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`].includes(t))return`high`;if(t===`think`)return`minimal`}function ie(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let r=e?.trim().toLowerCase();return r?ee.has(`${r}/${n}`):te.has(n)}function ae(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let r=e?.trim().toLowerCase();return r?a.has(`${r}/${n}`):o.has(n)}function oe(e){let t=new Set,n=[];for(let r of e??[]){let e=re(r);!e||t.has(e)||(t.add(e),n.push(e))}return n}function se(i,a){let o=s(i),ee=a?.trim().toLowerCase();return o===`openai-codex`&&(ee===`gpt-5.6-sol`||ee===`gpt-5.6-terra`)?[...r]:ie(i,a)?[...n]:ae(i,a)?[...t]:[...e]}function ce(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 le(e,t){let n=s(e);return n===`openai`||n===`openai-codex`||n===`github-copilot`||n===`copilot-proxy`?{thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:n===`anthropic`?{thinkingMode:ce(t)?`anthropic-adaptive`:`anthropic-thinking-budget`,reasoningBudgetSupported:!ce(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 ue(e,t){let n=s(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 c(e){let t=oe(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&&ue(e.provider,e.model))&&!n)return null;let r=le(e.provider,e.model),i=r.thinkingMode===`zai-binary`?[`off`,`low`]:se(e.provider,e.model),a=t.length>0?t:i,o=re(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 de(e,t){return ne(e)?[`off`,`low`]:se(e,t)}function fe(e,t){return de(e,t)}var pe=`cloudflare-ai-gateway`,l=`cloudflare-ai-gateway`,me=`claude-sonnet-5`;`${l}${me}`;var he={input:0,output:0,cacheRead:0,cacheWrite:0},ge={tools:!0,json:!0},_e={thinkingLevels:[...e],defaultThinkingLevel:`low`,reasoningBudgetSupported:!0},ve=[{id:me,name:`Claude Sonnet 5`,reasoning:!0,input:[`text`,`image`],cost:he,contextWindow:1e6,maxTokens:128e3,capabilities:{...ge,..._e,thinkingMode:`anthropic-adaptive`}},{id:`claude-opus-4-8`,name:`Claude Opus 4.8`,reasoning:!0,input:[`text`,`image`],cost:he,contextWindow:1e6,maxTokens:128e3,capabilities:{...ge,..._e,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!1}},{id:`claude-haiku-4-5`,name:`Claude Haiku 4.5`,reasoning:!0,input:[`text`,`image`],cost:he,contextWindow:2e5,maxTokens:64e3,capabilities:{...ge,..._e,thinkingMode:`anthropic-thinking-budget`}}],ye=ve.map(e=>e.id).map(e=>`${l}/${e}`);function be(e=l){return Object.fromEntries(ve.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var xe=`openai/gpt-oss-120b`;`${xe}`;var u={tools:!0,json:!0},Se=[{id:xe,name:`GPT-OSS 120B`,reasoning:!0,input:[`text`],contextWindow:131072,maxTokens:8192,cost:{input:.15,output:.75,cacheRead:0,cacheWrite:0},capabilities:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:u},{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:`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:u}],Ce=Se.map(e=>e.id).map(e=>`huggingface/${e}`);function we(e){return{...e.capabilities?{...e.capabilities}:{},...e.reasoning?{fixedReasoning:!0}:{}}}function Te(e=`huggingface`){return Object.fromEntries(Se.map(t=>[`${e}/${t.id}`.toLowerCase(),we(t)]))}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`,`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=c({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 d={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:d},{id:`hf:moonshotai/Kimi-K2.6`,name:`Kimi K2.6`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:65536,capabilities:d},{id:Ae,name:`MiniMax M2.5`,reasoning:!1,input:[`text`],contextWindow:191488,maxTokens:65536,capabilities:d},{id:`hf:zai-org/GLM-4.7-Flash`,name:`GLM-4.7 Flash`,reasoning:!1,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:d},{id:`hf:zai-org/GLM-5`,name:`GLM-5`,reasoning:!0,input:[`text`],contextWindow:196608,maxTokens:65536,capabilities:d},{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:d},{id:`hf:zai-org/GLM-4.7`,name:`GLM-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:65536,capabilities:d},{id:`hf:deepseek-ai/DeepSeek-V3.2`,name:`DeepSeek V3.2`,reasoning:!1,input:[`text`],contextWindow:159e3,maxTokens:8192,capabilities:d},{id:`hf:openai/gpt-oss-120b`,name:`GPT OSS 120B`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:d},{id:`hf:deepseek-ai/DeepSeek-R1-0528`,name:`DeepSeek R1 0528`,reasoning:!0,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:d},{id:`hf:deepseek-ai/DeepSeek-V3`,name:`DeepSeek V3`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:d},{id:`hf:meta-llama/Llama-3.3-70B-Instruct`,name:`Llama 3.3 70B Instruct`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,capabilities:d},{id:`hf:moonshotai/Kimi-K2.5`,name:`Kimi K2.5`,reasoning:!0,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:d},{id:`hf:nvidia/Kimi-K2.5-NVFP4`,name:`Kimi K2.5 NVFP4`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:d},{id:`hf:Qwen/Qwen3-235B-A22B-Thinking-2507`,name:`Qwen3 235B A22B Thinking 2507`,reasoning:!0,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:d},{id:`hf:Qwen/Qwen3-Coder-480B-A35B-Instruct`,name:`Qwen3 Coder 480B A35B Instruct`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:8192,capabilities:d},{id:`hf:Qwen/Qwen3.5-397B-A17B`,name:`Qwen3.5 397B A17B`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:8192,capabilities:d}],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 f={tools:!0,json:!0},Fe={tools:!1,json:!1},Ie=[{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:{...f,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:f},{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:f},{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:f},{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:f},{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:Fe},{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:f},{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:f},{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:f},{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:f},{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:f},{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:Fe},{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:Fe},{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:f},{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:f},{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:Fe},{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:f},{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:f},{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:f},{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}}],Le=Ie.map(e=>e.id).map(e=>`together/${e}`);function Re(e=`together`){return Object.fromEntries(Ie.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var ze=`zai-org-glm-5-1`;`${ze}`;var p={thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},m={tools:!0,json:!0},Be={tools:!0,json:!1},Ve=[{id:ze,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:{...Be,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:{...Be,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}}],He=Ve.map(e=>e.id).map(e=>`venice/${e}`);function Ue(e=`venice`){return Object.fromEntries(Ve.map(t=>[`${e}/${t.id}`.toLowerCase(),t.capabilities?{...t.capabilities}:{}]))}var We=[{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.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:`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`]}],Ge=We.map(e=>e.id).map(e=>`vercel-ai-gateway/${e}`);function Ke(e){let t=e.trim().replace(/^vercel-ai-gateway\//,``).toLowerCase();return We.find(e=>e.id.toLowerCase()===t)}function qe(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 Je(e){let t=Ke(e);if(!t)return;let n=new Set(t.tags.map(e=>e.toLowerCase())),r=qe(t.id),i=n.has(`reasoning`)?c({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 Ye(e){return Object.fromEntries(e.flatMap(e=>{let t=Je(e);return t?[[e,t]]:[]}))}var h={tools:!0,json:!0,thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!1},Xe={...h,audio:!0,video:!0},Ze=[{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:Xe},{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:Xe},{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}],Qe=Ze.map(e=>e.id);function $e(e=`xiaomi`){return Object.fromEntries(Ze.map(t=>[`${e}/${t.id}`,t.capabilities?{...t.capabilities}:{}]))}var et=`default`;`${et}`,[{id:et,name:`LiteLLM proxy default`,reasoning:!1,input:[`text`],contextWindow:128e3,maxTokens:8192,cost:{input:0,output:0,cacheRead:0,cacheWrite:0},capabilities:{}}].map(e=>e.id).map(e=>`litellm/${e}`),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 tt=`openai`,g=`openai`,_=`openai-codex`,nt=`anthropic`,v=`anthropic`,rt=`chutes`,y=`chutes`,it=`ollama`,b=`ollama`,at=`lmstudio`,x=`lmstudio`,ot=`vllm`,S=`vllm`,st=`minimax`,C=`minimax`,w=`minimax-cn`,T=`minimax-portal`,ct=`moonshot`,E=`moonshot`,D=`kimi-coding`,lt=`google`,O=`google`,k=`google-gemini-cli`,ut=`mistral`,A=`mistral`,dt=`volcengine`,j=`volcengine`,M=`volcengine-coding`,N=`volcengine-plan`,ft=`byteplus`,P=`byteplus`,F=`byteplus-coding`,I=`byteplus-plan`,pt=`openrouter`,L=`openrouter`,mt=`qwen`,R=`qwen`,z=`qwen-coding-plan`,ht=`qianfan`,B=`qianfan`,gt=`copilot`,V=`github-copilot`,H=`copilot-proxy`,_t=`ai-gateway`,U=`vercel-ai-gateway`,vt=`opencode-zen`,W=`opencode`,yt=`xiaomi`,G=`xiaomi`,bt=`synthetic`,K=`synthetic`,xt=`together`,q=`together`,St=`huggingface`,J=`huggingface`,Ct=`venice`,Y=`venice`,wt=`litellm`,X=`litellm`,Tt=`custom`,Z=`custom`,Et=[`gpt-5.6`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`],Dt=[`gpt-5.6-sol`,`gpt-5.6-terra`,`gpt-5.6-luna`,`gpt-5.5`],Ot=[`gpt-5.3-codex`,`gpt-5.3-codex-spark`,`gpt-5.4`,`gpt-5.4-mini`],kt=Et.map(e=>`${g}/${e}`),At=Dt.map(e=>`${_}/${e}`),jt=[`claude-fable-5`,`claude-opus-4-8`,`claude-sonnet-5`,`claude-haiku-4-5`].map(e=>`${v}/${e}`),Mt=[`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`],Nt=Mt.map(e=>`${y}/${e}`),Pt=[],Ft=[],It=[],Lt=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`,`MiniMax-M2.5`,`MiniMax-M2.5-highspeed`],Rt=Lt.map(e=>`${C}/${e}`),zt=Lt.map(e=>`${w}/${e}`),Bt=[`MiniMax-M2.7`,`MiniMax-M2.7-highspeed`].map(e=>`${T}/${e}`),Vt=[`kimi-k2.6`,`kimi-k2.5`].map(e=>`${E}/${e}`),Ht=[`kimi-for-coding`].map(e=>`${D}/${e}`),Ut=[`gemini-3.5-flash`,`gemini-3.1-pro-preview`,`gemini-3-flash-preview`,`gemini-3.1-flash-lite`],Wt=Ut.map(e=>`${O}/${e}`),Gt=Ut.map(e=>`${k}/${e}`),Kt=[`grok-4.5`,`grok-4.3`,`grok-build-0.1`].map(e=>`xai/${e}`),qt=[`mistral-medium-3.5`,`mistral-small-2603`,`mistral-large-2512`,`devstral-2512`,`ministral-14b-2512`,`ministral-8b-2512`,`ministral-3b-2512`].map(e=>`${A}/${e}`),Jt=[`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=>`${j}/${e}`),Yt=[`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=>[`${M}/${e}`,`${N}/${e}`]),Xt=[`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=>`${P}/${e}`),Zt=[`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=>[`${F}/${e}`,`${I}/${e}`]),Qt=`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=>`${L}/${e}`),$t=[`qwen3.7-max`,`qwen3.7-plus`,`qwen3.6-flash`].map(e=>`${R}/${e}`),en=[`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=>`${z}/${e}`),tn=[`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}`),nn={tools:!0,json:!0,thinkingLevels:[`off`,`low`],defaultThinkingLevel:`low`,thinkingMode:`zai-binary`,reasoningBudgetSupported:!1},rn=Object.fromEntries(tn.map(e=>[e,e.endsWith(`/glm-5v-turbo`)?{...nn,video:!0}:nn])),an=[`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=>`${B}/${e}`),on=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`]),sn=new Set([`qianfan/deepseek-v4-pro`,`qianfan/deepseek-v4-flash`,`qianfan/deepseek-v3.2-think`,`qianfan/deepseek-v3.2`]),cn=Object.fromEntries(an.map(t=>[t,{tools:!0,json:!0,...on.has(t)?{fixedReasoning:!0}:sn.has(t)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`generic-reasoning`,reasoningBudgetSupported:!0}:{}}])),ln=[`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`],un=ln.map(e=>`${V}/${e}`),dn=[...ln].map(e=>`${H}/${e}`);`${V}`;var fn=new Set([`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.3-codex-spark`]),pn=new Set([`claude-fable-5`,`claude-opus-4.8`,`claude-sonnet-5`]),mn=new Set([`claude-haiku-4.5`]),hn=new Set([`gemini-3.5-flash`,`gemini-3.1-pro`,`gemini-3-flash`]);function gn(t){return Object.fromEntries(t.map(t=>{let n=t.slice(t.indexOf(`/`)+1);return[t,{tools:!0,json:!0,...fn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`openai-reasoning-effort`,reasoningBudgetSupported:!1}:pn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-adaptive`,reasoningBudgetSupported:!0}:mn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!0}:hn.has(n)?{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`google-thinking-budget`,reasoningBudgetSupported:!0}:{}}]}))}var _n={...gn(un),...gn(dn)},vn=Ye(Ge),yn=ke(Ee),bn=Qe.map(e=>`${G}/${e}`);`${G}`;var xn=$e(G),Sn=Me.map(e=>`${K}/${e}`);`${K}`;var Cn=Ne(K),wn=Re(q),Tn=Te(J),En=Ue(Y),Dn=be(l),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=c({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 Q(e){return Object.fromEntries(e.map(e=>[e.toLowerCase(),Mn(e)??{}]))}function $(e,t){let n=Q(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(Mt.map(e=>[`${y}/${e}`,{tools:!0,json:!0,...jn({route:y,model:e,reasoning:!0}),...e===`moonshotai/Kimi-K2.6-TEE`?{video:!0}:{}}])),In=[...e],Ln=Object.fromEntries([...Rt,...zt,...Bt].map(e=>[e,{tools:!0,thinkingLevels:In,defaultThinkingLevel:`off`,thinkingMode:`anthropic-thinking-budget`,reasoningBudgetSupported:!1}])),Rn=Object.fromEntries([...Vt,...Ht].map(t=>[t,{tools:!0,...t===`moonshot/kimi-k2.6`?{video:!0}:{},thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`moonshot-thinking`,reasoningBudgetSupported:!1}])),zn=Object.fromEntries([...Wt,...Gt].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(qt.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([...Jt,...Yt].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([...Xt,...Zt].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(Qt.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([...$t,...en].map(t=>[t,{tools:!0,json:!0,...ir.has(t)?{}:{thinkingLevels:[...e],defaultThinkingLevel:`low`,thinkingMode:`qwen-thinking`,reasoningBudgetSupported:!0}}])),or={id:tt,label:`OpenAI`,priority:1,hint:`OpenAI sign-in + API key`,methods:[{id:`openai-codex`,route:_,kind:`oauth`,label:`ChatGPT 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:g,kind:`api-key`,label:`API key`}],models:{recommended:[...kt,...At],routeRules:{[g]:[`${g}/*`],[_]:[`${_}/*`]}},modelCapabilities:Q([...kt,...At])},sr={id:nt,label:`Anthropic`,priority:2,hint:`Claude Code OAuth + setup-token + API key`,methods:[{id:`anthropic-oauth`,route:v,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:v,kind:`token`,label:`Token (setup-token)`,hint:"run `claude setup-token` elsewhere, then paste the token here",buttonLabel:`Paste token`},{id:`apiKey`,route:v,kind:`api-key`,label:`API key`}],models:{recommended:[...jt],routeRules:{[v]:[`${v}/*`]}},modelCapabilities:$(jt,Pn)},cr={id:rt,label:`Chutes`,priority:3,hint:`Sign in + API key`,methods:[{id:`chutes`,route:y,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:y,kind:`api-key`,label:`API key`}],models:{recommended:[...Nt],routeRules:{[y]:[`${y}/*`]}},modelCapabilities:$(Nt,Fn)},lr={id:it,label:`Ollama`,priority:4,hint:`Local, cloud, or hybrid Ollama through the native API`,modelProviderIds:[b],methods:[{id:`ollama`,route:b,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:Pt,dynamic:!0,operatorCatalog:!0,routeRules:{[b]:[`${b}/*`]}},modelCapabilities:Q(Pt)},ur={id:at,label:`LM Studio`,priority:4,hint:`Local LM Studio server on localhost:1234`,modelProviderIds:[x],methods:[{id:`lmstudio`,route:x,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:Ft,dynamic:!0,operatorCatalog:!0,routeRules:{[x]:[`${x}/*`]}},modelCapabilities:Q(Ft)},dr={id:ot,label:`vLLM-compatible`,priority:4,hint:`OpenAI-compatible local server: vLLM, SGLang, TGI, LocalAI, or FastChat`,modelProviderIds:[S],methods:[{id:`vllm`,route:S,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:It,dynamic:!0,operatorCatalog:!0,routeRules:{[S]:[`${S}/*`]}},modelCapabilities:Q(It)},fr={id:st,label:`MiniMax`,priority:5,hint:`MiniMax OAuth + API key`,modelProviderIds:[C,w,T],methods:[{id:`minimax-portal`,route:T,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:C,kind:`api-key`,label:`API key`},{id:`minimax-api-key-cn`,route:w,kind:`api-key`,label:`API key (CN)`,hint:`China endpoint (api.minimaxi.com)`},{id:`minimax-api-lightning`,route:C,configProviderId:`minimax-lightning`,statusRoute:C,kind:`api-key`,label:`Highspeed API key`,hint:`Fast M2.7 tier`}],models:{recommended:[...Rt,...zt,...Bt],routeRules:{[C]:[`${C}/*`],[w]:[`${w}/*`],[T]:[`${T}/*`]}},modelCapabilities:$([...Rt,...zt,...Bt],Ln)},pr={id:ct,label:`Moonshot AI`,priority:6,hint:`Kimi API + Kimi Code`,modelProviderIds:[E,D],methods:[{id:`moonshot-api-key`,route:E,kind:`api-key`,label:`Kimi API key (.ai)`,hint:`Kimi Open Platform endpoint (api.moonshot.ai)`},{id:`moonshot-api-key-cn`,route:E,configProviderId:`moonshot-cn`,statusRoute:E,kind:`api-key`,label:`Kimi API key (.cn)`,hint:`China endpoint (api.moonshot.cn)`},{id:`kimi-code-api-key`,route:D,kind:`api-key`,label:`Kimi Code API key (subscription)`,hint:`Kimi Code membership endpoint (api.kimi.com/coding)`}],models:{recommended:[...Vt,...Ht],routeRules:{[E]:[`${E}/*`],[D]:[`${D}/*`]}},modelCapabilities:$([...Vt,...Ht],Rn)},mr={id:lt,label:`Google`,priority:7,hint:`Gemini API key + OAuth`,routeAliases:[`gemini`],modelProviderIds:[O,`gemini`,k],methods:[{id:`gemini-api-key`,route:O,kind:`api-key`,label:`Gemini API key`},{id:`google-gemini-cli`,route:k,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:[...Wt,...Gt],routeRules:{[O]:[`${O}/*`,`gemini/*`],[k]:[`${k}/*`]}},modelCapabilities:$([...Wt,...Gt],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:[...Kt],routeRules:{xai:[`xai/*`]}},modelCapabilities:$(Kt,Bn)},gr={id:ut,label:`Mistral AI`,priority:9,hint:`Mistral API key`,methods:[{id:`mistral-api-key`,route:A,kind:`api-key`,label:`Mistral API key`}],models:{recommended:[...qt],routeRules:{[A]:[`${A}/*`]}},modelCapabilities:$(qt,Hn)},_r={id:dt,label:`Volcano Engine`,priority:10,hint:`Ark API key + Coding Plan`,modelProviderIds:[j,M,N],methods:[{id:`volcengine-api-key`,route:j,kind:`api-key`,label:`Volcano Engine API key`}],models:{recommended:[...Jt,...Yt],routeRules:{[j]:[`${j}/*`],[M]:[`${M}/*`],[N]:[`${N}/*`]}},modelCapabilities:$([...Jt,...Yt],Kn)},vr={id:ft,label:`BytePlus`,priority:11,hint:`ModelArk API key + Coding Plan`,modelProviderIds:[P,F,I],methods:[{id:`byteplus-api-key`,route:P,kind:`api-key`,label:`BytePlus API key`}],models:{recommended:[...Xt,...Zt],routeRules:{[P]:[`${P}/*`],[F]:[`${F}/*`],[I]:[`${I}/*`]}},modelCapabilities:$([...Xt,...Zt],Yn)},yr={id:pt,label:`OpenRouter`,priority:12,hint:`API key`,methods:[{id:`openrouter-api-key`,route:L,kind:`api-key`,label:`OpenRouter API key`}],models:{recommended:[...Qt],dynamic:!0,routeRules:{[L]:[`${L}/*`]}},modelCapabilities:$(Qt,rr)},br={id:mt,label:`Qwen`,priority:14,hint:`Coding Plan + DashScope API key`,modelProviderIds:[z,R],methods:[{id:`qwen-coding-plan-api-key`,route:z,kind:`api-key`,label:`Coding Plan API key`,hint:`Alibaba Cloud Coding Plan endpoint (coding.dashscope.aliyuncs.com)`},{id:`qwen-api-key`,route:R,kind:`api-key`,label:`DashScope API key`,hint:`DashScope OpenAI-compatible endpoint (dashscope.aliyuncs.com)`}],models:{recommended:[...en,...$t],routeRules:{[z]:[`${z}/*`],[R]:[`${R}/*`]}},modelCapabilities:$([...en,...$t],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:[...tn],routeRules:{zai:[`zai/*`]}},modelCapabilities:$(tn,rn)},Sr={id:ht,label:`Qianfan`,priority:16,hint:`Baidu Qianfan API key`,methods:[{id:`qianfan-api-key`,route:B,kind:`api-key`,label:`Qianfan API key`}],models:{recommended:[...an],routeRules:{[B]:[`${B}/*`]}},modelCapabilities:$(an,cn)},Cr={id:gt,label:`Copilot`,priority:17,hint:`GitHub device login + local proxy`,modelProviderIds:[V,H],methods:[{id:`github-copilot`,route:V,kind:`device`,label:`GitHub sign in`,hint:`GitHub OAuth device flow; requires an active Copilot subscription`,buttonLabel:`Sign in`},{id:`copilot-proxy`,route:H,kind:`device`,label:`Proxy sign in`,hint:`Local VS Code Copilot Proxy bridge`,buttonLabel:`Configure`}],models:{recommended:[...un,...dn],dynamic:!0,routeRules:{[V]:[`${V}/*`],[H]:[`${H}/*`]}},modelCapabilities:$([...un,...dn],_n)},wr={id:_t,label:`Vercel AI`,priority:18,hint:`API key`,modelProviderIds:[U],methods:[{id:`ai-gateway-api-key`,route:U,kind:`api-key`,label:`Vercel AI API key`}],models:{recommended:[...Ge],dynamic:!0,routeRules:{[U]:[`${U}/*`]}},modelCapabilities:$(Ge,vn)},Tr={id:vt,label:`OpenCode Zen`,priority:19,hint:`API key`,modelProviderIds:[W],methods:[{id:`opencode-zen`,route:W,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:{[W]:[`${W}/*`]}},modelCapabilities:$(Ee,yn)},Er={id:yt,label:`Xiaomi`,priority:20,hint:`MiMo API key`,modelProviderIds:[G],methods:[{id:`xiaomi-api-key`,route:G,kind:`api-key`,label:`Xiaomi API key`,hint:`Create an API key in the Xiaomi MiMo API Open Platform`}],models:{recommended:[...bn],routeRules:{[G]:[`${G}/*`]}},modelCapabilities:$(bn,xn)},Dr={id:bt,label:`Synthetic`,priority:21,hint:`Anthropic-compatible API key`,modelProviderIds:[K],methods:[{id:`synthetic-api-key`,route:K,kind:`api-key`,label:`Synthetic API key`,hint:`Create an API key in Synthetic`}],models:{recommended:[...Sn],routeRules:{[K]:[`${K}/*`]}},modelCapabilities:$(Sn,Cn)},Or={id:xt,label:`Together AI`,priority:22,hint:`API key`,modelProviderIds:[q],methods:[{id:`together-api-key`,route:q,kind:`api-key`,label:`Together AI API key`,hint:`Create an API key in Together AI`}],models:{recommended:[...Le],routeRules:{[q]:[`${q}/*`]}},modelCapabilities:$(Le,wn)},kr={id:St,label:`Hugging Face`,priority:23,hint:`Inference Providers token`,modelProviderIds:[J],methods:[{id:`huggingface-api-key`,route:J,kind:`api-key`,label:`Hugging Face token`,hint:`Create a fine-grained token with Inference Providers access`}],models:{recommended:[...Ce],dynamic:!0,routeRules:{[J]:[`${J}/*`]}},modelCapabilities:Tn},Ar={id:Ct,label:`Venice AI`,priority:24,hint:`Privacy-focused API key`,modelProviderIds:[Y],methods:[{id:`venice-api-key`,route:Y,kind:`api-key`,label:`Venice AI API key`,hint:`Create an API key in Venice settings`}],models:{recommended:[...He],dynamic:!0,routeRules:{[Y]:[`${Y}/*`]}},modelCapabilities:En},jr={id:wt,label:`LiteLLM`,priority:25,hint:`OpenAI-compatible LLM proxy`,modelProviderIds:[X],methods:[{id:`litellm-api-key`,route:X,kind:`api-key`,label:`LiteLLM API key`,hint:`LiteLLM Proxy virtual key or master key plus /v1 base URL`}],models:{recommended:[],dynamic:!0,operatorCatalog:!0,routeRules:{[X]:[`${X}/*`]}},modelCapabilities:{}},Mr={id:pe,label:`Cloudflare AI`,priority:26,hint:`Anthropic through Cloudflare AI`,modelProviderIds:[l],methods:[{id:`cloudflare-ai-gateway-api-key`,route:l,kind:`manual`,label:`Cloudflare AI API key`,hint:`Requires Cloudflare Account ID, Gateway ID, and Anthropic provider API key`,buttonLabel:`Configure`}],models:{recommended:[...ye],routeRules:{[l]:[`${l}/*`]}},modelCapabilities:Dn},Nr={id:Tt,label:`Custom Provider`,priority:27,hint:`OpenAI or Anthropic-compatible endpoint outside the built-in provider cards`,modelProviderIds:[Z],methods:[{id:`custom-api-key`,route:Z,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:{[Z]:[`${Z}/*`]}},modelCapabilities:Q(On)},Pr=[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],Fr=new Map(Pr.map(e=>[e.id,e])),Ir=new Map(Pr.flatMap(e=>[...e.methods.map(t=>[t.route,e]),...(e.routeAliases??[]).map(t=>[t,e]),...(e.modelProviderIds??[]).map(t=>[t,e])])),Lr=new Set(Pr.flatMap(e=>e.models.recommended.map(e=>e.toLowerCase())));new Map(Pr.flatMap(e=>Object.entries(e.modelCapabilities??{}).map(([e,t])=>[e.toLowerCase(),t]))),new Set(Dt),[...Dt,...Ot];function Rr(e){return Fr.get(e.trim().toLowerCase())}function zr(e){return Ir.get(e.trim().toLowerCase())}function Br(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(!zr(r))return!1;let i=zr(r);return i?i.models.operatorCatalog?!0:Lr.has(t.toLowerCase()):!1}function Vr(e,t){let n=e.trim();if(!n)return``;if(n.includes(`/`))return n;let r=t?.trim();return r?`${r}/${n}`:n}function Hr(e){let t=e.trim();return t?t.includes(`/`)?{kind:`qualified`,value:t}:{kind:`raw`,value:t}:null}function Ur(e,t){return Wr(e,t).value}function Wr(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=Vr(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 Gr(e,t){return typeof e==`string`?Vr(e,t):``}function Kr(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:Xr(e).value,source:`server`}}let a=Wr(Hr(r),n);return a.source===`qualified`||a.source===`catalog`?a:{value:Gr(r,t),source:`server`,reason:a.reason}}function qr(e,t,n){return Kr(e,t,n).value}function Jr(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)} · ${Yr(r)}`}function Yr(e){return zr(e)?.label??e}function Xr(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} · ${Yr(t)}`:e.id}}export{dr as A,c as B,yr as C,Or as D,Dr as E,Rr as F,zr as I,Br as L,hr as M,Er as N,Ar as O,xr as P,fe as R,Tr as S,br as T,fr as _,Wr as a,lr as b,vr as c,Cr as d,Nr as f,ur as g,jr as h,Ur as i,_r as j,wr as k,cr as l,kr as m,Hr as n,qr as o,mr as p,Jr as r,sr as s,Xr as t,Mr as u,gr as v,Sr as w,or as x,pr as y,re as z};
2
+ //# sourceMappingURL=chat-model-ref-Djkv93yn.js.map
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-D2RaTXoV.js","./icons-D3-vEvih.js","./open-external-url-DwSiwMPl.js","./chat-model-ref-BZFblCeY.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-DltSyY4Y.js","./icons-D3-vEvih.js","./open-external-url-DwSiwMPl.js","./marketplace-order-evidence-DkR0ZRHa.js","./mining-commit-R-6nu87p.js","./chat-model-ref-Djkv93yn.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-D2RaTXoV.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-D2RaTXoV.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-D2nC6I-9.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-DltSyY4Y.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-D5JlBp7f.js.map
@@ -1,4 +1,4 @@
1
- import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as a,E as o,F as s,I as c,M as l,N as u,O as d,P as f,R as p,S as m,T as h,_ as g,b as _,c as v,d as y,f as b,g as x,h as S,j as ee,k as te,l as ne,m as re,p as ie,s as ae,t as oe,u as C,v as w,w as T,x as E,y as D}from"./chat-model-ref-BZFblCeY.js";import{buildOrderedProviderProfiles as se,buildProviderAuthSummary as O,calloutClassForProviderAuthActionTone as k}from"./config-CU5Zi8Dh.js";function A(e){return e===`api-key`?`api`:e===`token`?`token`:e===`manual`?`manual`:`interactive`}function j(e){return{id:e.id,label:e.label,routeIds:[...new Set([...e.methods.map(e=>e.route),...e.routeAliases??[]])],authMethods:e.methods.map(e=>({kind:A(e.kind),providerId:e.configProviderId??e.route,statusProviderId:e.statusRoute,methodId:e.id,label:e.label,buttonLabel:e.buttonLabel,reason:e.hint,setupRequirement:e.setupRequirement})),modelProviderIds:e.modelProviderIds,modelRefs:e.models.recommended}}var M=[j(E),j(ae),j(ne),j(_),j(x),j(r),j(g),j(D),j(ie),j(l),j(w),j(ee),j(v),j(i),j(h),j(f),j(T),j(y),j(te),j(m),j(u),j(o),j(a),j(re),j(d),j(S),j(C),j(b)],N={anthropic:`Anthropic API key`,byteplus:`BytePlus API key`,chutes:`Chutes API key`,gemini:`Google Gemini API key`,google:`Google Gemini API key`,huggingface:`Hugging Face token`,"kimi-code":`Kimi Code API key`,"kimi-coding":`Kimi Code API key`,litellm:`LiteLLM API key`,minimax:`MiniMax API key`,"minimax-cn":`MiniMax CN API key`,"minimax-lightning":`MiniMax Highspeed API key`,mistral:`Mistral API key`,moonshot:`Moonshot API key`,"moonshot-cn":`Moonshot CN API key`,opencode:`OpenCode Zen API key`,"opencode-zen":`OpenCode Zen API key`,openai:`OpenAI API key`,openrouter:`OpenRouter API key`,qianfan:`Qianfan API key`,qwen:`Qwen DashScope API key`,"qwen-coding-plan":`Qwen Coding Plan API key`,synthetic:`Synthetic API key`,together:`Together AI API key`,venice:`Venice API key`,"vercel-ai-gateway":`Vercel AI API key`,volcengine:`Volcano Engine API key`,xai:`xAI API key`,xiaomi:`Xiaomi API key`,zai:`Z.AI API key`,"zai-cn":`Z.AI CN API key`,"zai-coding-cn":`Z.AI Coding CN API key`,"zai-coding-global":`Z.AI Coding Global API key`},P={anthropic:`Sign in`,chutes:`Sign in`,"copilot-proxy":`Proxy sign in`,"github-copilot":`GitHub sign in`,"google-gemini-cli":`Sign in`,"minimax-portal":`Sign in`,"openai-codex":`Sign in`,xai:`xAI sign-in`},F={"cloudflare-ai-gateway":`Cloudflare AI uses the Configure form for Account ID, Gateway ID, and Anthropic API key.`,"copilot-proxy":`Copilot Proxy uses a local sign-in/proxy flow, not API-key setup.`,"github-copilot":`GitHub Copilot uses GitHub device login, not API-key setup.`,"google-gemini-cli":`Google Gemini CLI uses OAuth. Use the Google provider row for Gemini API keys.`,"minimax-portal":`MiniMax Portal uses OAuth. Use the MiniMax provider row for API keys.`,"openai-codex":`OpenAI sign-in uses ChatGPT OAuth. Use the OpenAI provider row for OpenAI API keys.`,ollama:`Ollama needs native endpoint/model fields, not generic API-key setup.`,lmstudio:`LM Studio needs endpoint/model fields, not generic API-key setup.`,vllm:`vLLM needs endpoint/model fields, not API-key setup.`},I={gemini:`Use the Google Gemini CLI row for OAuth, or save a Gemini API key here.`,google:`Use the Google Gemini CLI row for OAuth, or save a Gemini API key here.`,minimax:`Use the MiniMax Portal row for OAuth, or save a MiniMax API key here.`,openai:`Use OpenAI sign-in for ChatGPT OAuth, or save an OpenAI API key here.`};function L(e,t){return e?.providers.find(e=>e.provider===t)??null}function R(e,t){return e?.providers.find(e=>e.provider===t)??null}function z(e){return e===`ready`||e===`ok`||e===`configured`||e===`expiring`||e===`static`?`chip ok`:e===`missing`||e===`unauthenticated`||e===`unconfigured`||e===`refresh-required`?`chip warn`:e===`error`?`chip danger`:`chip`}function B(e){return e===`ready`||e===`ok`||e===`configured`||e===`expiring`||e===`static`}function V(e){return e?B(e.status)||e.profiles.some(e=>B(e.status)):!1}function H(e,t){return(t.modelProviderIds??t.routeIds).map(t=>L(e,t)).filter(e=>!!e)}function U(e){return e===`ok`?`chip ok`:e===`fail`?`chip danger`:`chip`}function W(e,t,n){return e===`ok`?t:e===`fail`?n:`unknown`}function G(n){let r=n.find(e=>e.health)?.health;return r?e`
1
+ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,S as m,T as h,_ as g,b as _,c as v,d as y,f as b,g as x,h as S,j as ee,k as te,l as ne,m as re,p as ie,s as ae,t as oe,u as C,v as w,w as T,x as E,y as D}from"./chat-model-ref-Djkv93yn.js";import{buildOrderedProviderProfiles as se,buildProviderAuthSummary as O,calloutClassForProviderAuthActionTone as k}from"./config-CU5Zi8Dh.js";function A(e){return e===`api-key`?`api`:e===`token`?`token`:e===`manual`?`manual`:`interactive`}function j(e){return{id:e.id,label:e.label,routeIds:[...new Set([...e.methods.map(e=>e.route),...e.routeAliases??[]])],authMethods:e.methods.map(e=>({kind:A(e.kind),providerId:e.configProviderId??e.route,statusProviderId:e.statusRoute,methodId:e.id,label:e.label,buttonLabel:e.buttonLabel,reason:e.hint,setupRequirement:e.setupRequirement})),modelProviderIds:e.modelProviderIds,modelRefs:e.models.recommended}}var M=[j(E),j(ae),j(ne),j(_),j(x),j(r),j(g),j(D),j(ie),j(u),j(w),j(ee),j(v),j(i),j(h),j(p),j(T),j(y),j(te),j(m),j(d),j(o),j(a),j(re),j(f),j(S),j(C),j(b)],N={anthropic:`Anthropic API key`,byteplus:`BytePlus API key`,chutes:`Chutes API key`,gemini:`Google Gemini API key`,google:`Google Gemini API key`,huggingface:`Hugging Face token`,"kimi-code":`Kimi Code API key`,"kimi-coding":`Kimi Code API key`,litellm:`LiteLLM API key`,minimax:`MiniMax API key`,"minimax-cn":`MiniMax CN API key`,"minimax-lightning":`MiniMax Highspeed API key`,mistral:`Mistral API key`,moonshot:`Moonshot API key`,"moonshot-cn":`Moonshot CN API key`,opencode:`OpenCode Zen API key`,"opencode-zen":`OpenCode Zen API key`,openai:`OpenAI API key`,openrouter:`OpenRouter API key`,qianfan:`Qianfan API key`,qwen:`Qwen DashScope API key`,"qwen-coding-plan":`Qwen Coding Plan API key`,synthetic:`Synthetic API key`,together:`Together AI API key`,venice:`Venice API key`,"vercel-ai-gateway":`Vercel AI API key`,volcengine:`Volcano Engine API key`,xai:`xAI API key`,xiaomi:`Xiaomi API key`,zai:`Z.AI API key`,"zai-cn":`Z.AI CN API key`,"zai-coding-cn":`Z.AI Coding CN API key`,"zai-coding-global":`Z.AI Coding Global API key`},P={anthropic:`Sign in`,chutes:`Sign in`,"copilot-proxy":`Proxy sign in`,"github-copilot":`GitHub sign in`,"google-gemini-cli":`Sign in`,"minimax-portal":`Sign in`,"openai-codex":`Sign in`,xai:`xAI sign-in`},F={"cloudflare-ai-gateway":`Cloudflare AI uses the Configure form for Account ID, Gateway ID, and Anthropic API key.`,"copilot-proxy":`Copilot Proxy uses a local sign-in/proxy flow, not API-key setup.`,"github-copilot":`GitHub Copilot uses GitHub device login, not API-key setup.`,"google-gemini-cli":`Google Gemini CLI uses OAuth. Use the Google provider row for Gemini API keys.`,"minimax-portal":`MiniMax Portal uses OAuth. Use the MiniMax provider row for API keys.`,"openai-codex":`OpenAI sign-in uses ChatGPT OAuth. Use the OpenAI provider row for OpenAI API keys.`,ollama:`Ollama needs native endpoint/model fields, not generic API-key setup.`,lmstudio:`LM Studio needs endpoint/model fields, not generic API-key setup.`,vllm:`vLLM needs endpoint/model fields, not API-key setup.`},I={gemini:`Use the Google Gemini CLI row for OAuth, or save a Gemini API key here.`,google:`Use the Google Gemini CLI row for OAuth, or save a Gemini API key here.`,minimax:`Use the MiniMax Portal row for OAuth, or save a MiniMax API key here.`,openai:`Use OpenAI sign-in for ChatGPT OAuth, or save an OpenAI API key here.`};function L(e,t){return e?.providers.find(e=>e.provider===t)??null}function R(e,t){return e?.providers.find(e=>e.provider===t)??null}function z(e){return e===`ready`||e===`ok`||e===`configured`||e===`expiring`||e===`static`?`chip ok`:e===`missing`||e===`unauthenticated`||e===`unconfigured`||e===`refresh-required`?`chip warn`:e===`error`?`chip danger`:`chip`}function B(e){return e===`ready`||e===`ok`||e===`configured`||e===`expiring`||e===`static`}function V(e){return e?B(e.status)||e.profiles.some(e=>B(e.status)):!1}function H(e,t){return(t.modelProviderIds??t.routeIds).map(t=>L(e,t)).filter(e=>!!e)}function U(e){return e===`ok`?`chip ok`:e===`fail`?`chip danger`:`chip`}function W(e,t,n){return e===`ok`?t:e===`fail`?n:`unknown`}function G(n){let r=n.find(e=>e.health)?.health;return r?e`
2
2
  <div class="providers-health" role="note">
3
3
  <span class=${U(r.reachable)}>
4
4
  reachable ${W(r.reachable,`ok`,`failed`)}
@@ -24,7 +24,7 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as
24
24
  <span class=${u>0?`chip warn`:`chip`}>local/private ${u}</span>
25
25
  ${d>0?e`<span class="chip">unknown ${d}</span>`:t}
26
26
  </div>
27
- `}function q(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function J(e,t){return e.get(t)===`on`}async function ce(e){let t=e?.trim();!t||typeof navigator>`u`||await navigator.clipboard?.writeText(t).catch(()=>{})}function le(e){let t=e?.trim();if(!t)return`browser sign-in`;try{return new URL(t).host||`browser sign-in`}catch{return`browser sign-in`}}function ue(e){let t=e?.trim();if(!t)return`Open sign-in link`;try{let e=new URL(t),n=e.pathname&&e.pathname!==`/`?e.pathname:``;return`${e.host}${n}`}catch{return`Open sign-in link`}}function Y(e,t,n){let r=t.trim();!r||e.has(r)||!p(r)||e.set(r,{value:r,label:n?.trim()||r})}function de(e){let t=new Map;for(let n of e.modelCatalog){let e=oe(n);Y(t,e.value,e.label)}return e.current&&Y(t,e.current,`Current (${e.current})`),Array.from(t.values()).toSorted((e,t)=>e.label.localeCompare(t.label))}function fe(e){let t=e.trim();return t?`${t}:default`:``}function pe(e){let t=e.runtimeProvider?.profiles??[],n=e.preferOauth?t.find(e=>e.type===`oauth`)??null:null;if(n?.profileId)return n.profileId;let r=e.preferOauth?e.orderedProfiles.find(e=>e.mode===`oauth`)??null:null;if(r?.id)return r.id;let i=t.find(e=>B(e.status));return i?.profileId?i.profileId:e.orderedProfiles[0]?.id??t[0]?.profileId??fe(e.providerId)}function me(e){let t=e.runtimeProvider?.profiles??[];return t.find(e=>B(e.status))?.profileId??t[0]?.profileId??null}function he(e,t){return e?.profiles.find(e=>e.type===t&&B(e.status))??null}function ge(e){return e?.authModes.some(e=>e===`api-key`||e===`api_key`)??!1}function _e(e){return e?.authModes.some(e=>e===`oauth`||e===`device-code`||e===`device_code`)??!1}function ve(e,t){let n=e.trim(),r=F[n];if(r)return{supported:!1,label:`API key`,buttonLabel:`Save API`,reason:r};let i=N[n];return i||ge(t)?{supported:!0,label:i??`${X(n)} API key`,buttonLabel:`Save API`}:{supported:!1,label:`API key`,buttonLabel:`Save API`,reason:`No API-key setup is available for this provider in the UI.`}}function ye(e,t,n){let r=e.trim(),i=I[r];if(i)return{supported:!1,label:`Sign-in`,buttonLabel:`Sign in`,reason:i};let a=P[r],o=n.some(e=>e.mode===`oauth`);return a||_e(t)||o?{supported:!0,label:a??`${X(r)} sign-in`,buttonLabel:`Sign in`}:{supported:!1,label:`Sign-in`,buttonLabel:`Sign in`,reason:`No OAuth/device/setup-token flow is available for this provider in the UI.`}}function X(e){let t=s(e)??c(e);return t?t.label:{anthropic:`Anthropic`,chutes:`Chutes`,gemini:`Google Gemini`,google:`Google`,"google-gemini-cli":`Google Gemini CLI`,"github-copilot":`GitHub Copilot`,minimax:`MiniMax`,"minimax-portal":`MiniMax Portal`,"openai-codex":`OpenAI sign-in`,openai:`OpenAI`,openrouter:`OpenRouter`,lmstudio:`LM Studio`,ollama:`Ollama`,"qwen-coding-plan":`Qwen Coding Plan`,qwen:`Qwen`,vllm:`Custom/vLLM`,xai:`xAI`}[e]??e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Z(e){return e.kind===`token`||e.methodId===`token`||e.methodId===`setup-token`?`Token`:e.kind===`api`?`API key`:e.kind===`interactive`?`Sign in`:e.label??X(e.providerId)}function be(e,t){let n=[e.label,e.reason,e.setupRequirement,t?.reason,t?.label&&t.label!==Z(e)?t.label:void 0].map(e=>e?.trim()).filter(e=>!!e),r=[...new Set(n)];return r.length>0?r.join(` · `):`${X(e.providerId)} ${Z(e)}`}function Q(t,n,r){return e`
27
+ `}function q(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function J(e,t){return e.get(t)===`on`}async function ce(e){let t=e?.trim();!t||typeof navigator>`u`||await navigator.clipboard?.writeText(t).catch(()=>{})}function le(e){let t=e?.trim();if(!t)return`browser sign-in`;try{return new URL(t).host||`browser sign-in`}catch{return`browser sign-in`}}function ue(e){let t=e?.trim();if(!t)return`Open sign-in link`;try{let e=new URL(t),n=e.pathname&&e.pathname!==`/`?e.pathname:``;return`${e.host}${n}`}catch{return`Open sign-in link`}}function Y(e,t,n){let r=t.trim();!r||e.has(r)||!l(r)||e.set(r,{value:r,label:n?.trim()||r})}function de(e){let t=new Map;for(let n of e.modelCatalog){let e=oe(n);Y(t,e.value,e.label)}return e.current&&Y(t,e.current,`Current (${e.current})`),Array.from(t.values()).toSorted((e,t)=>e.label.localeCompare(t.label))}function fe(e){let t=e.trim();return t?`${t}:default`:``}function pe(e){let t=e.runtimeProvider?.profiles??[],n=e.preferOauth?t.find(e=>e.type===`oauth`)??null:null;if(n?.profileId)return n.profileId;let r=e.preferOauth?e.orderedProfiles.find(e=>e.mode===`oauth`)??null:null;if(r?.id)return r.id;let i=t.find(e=>B(e.status));return i?.profileId?i.profileId:e.orderedProfiles[0]?.id??t[0]?.profileId??fe(e.providerId)}function me(e){let t=e.runtimeProvider?.profiles??[];return t.find(e=>B(e.status))?.profileId??t[0]?.profileId??null}function he(e,t){return e?.profiles.find(e=>e.type===t&&B(e.status))??null}function ge(e){return e?.authModes.some(e=>e===`api-key`||e===`api_key`)??!1}function _e(e){return e?.authModes.some(e=>e===`oauth`||e===`device-code`||e===`device_code`)??!1}function ve(e,t){let n=e.trim(),r=F[n];if(r)return{supported:!1,label:`API key`,buttonLabel:`Save API`,reason:r};let i=N[n];return i||ge(t)?{supported:!0,label:i??`${X(n)} API key`,buttonLabel:`Save API`}:{supported:!1,label:`API key`,buttonLabel:`Save API`,reason:`No API-key setup is available for this provider in the UI.`}}function ye(e,t,n){let r=e.trim(),i=I[r];if(i)return{supported:!1,label:`Sign-in`,buttonLabel:`Sign in`,reason:i};let a=P[r],o=n.some(e=>e.mode===`oauth`);return a||_e(t)||o?{supported:!0,label:a??`${X(r)} sign-in`,buttonLabel:`Sign in`}:{supported:!1,label:`Sign-in`,buttonLabel:`Sign in`,reason:`No OAuth/device/setup-token flow is available for this provider in the UI.`}}function X(e){let t=s(e)??c(e);return t?t.label:{anthropic:`Anthropic`,chutes:`Chutes`,gemini:`Google Gemini`,google:`Google`,"google-gemini-cli":`Google Gemini CLI`,"github-copilot":`GitHub Copilot`,minimax:`MiniMax`,"minimax-portal":`MiniMax Portal`,"openai-codex":`OpenAI sign-in`,openai:`OpenAI`,openrouter:`OpenRouter`,lmstudio:`LM Studio`,ollama:`Ollama`,"qwen-coding-plan":`Qwen Coding Plan`,qwen:`Qwen`,vllm:`Custom/vLLM`,xai:`xAI`}[e]??e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Z(e){return e.kind===`token`||e.methodId===`token`||e.methodId===`setup-token`?`Token`:e.kind===`api`?`API key`:e.kind===`interactive`?`Sign in`:e.label??X(e.providerId)}function be(e,t){let n=[e.label,e.reason,e.setupRequirement,t?.reason,t?.label&&t.label!==Z(e)?t.label:void 0].map(e=>e?.trim()).filter(e=>!!e),r=[...new Set(n)];return r.length>0?r.join(` · `):`${X(e.providerId)} ${Z(e)}`}function Q(t,n,r){return e`
28
28
  <span
29
29
  class="providers-method-help"
30
30
  role="img"
@@ -1141,4 +1141,4 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as
1141
1141
  </section>
1142
1142
  </section>
1143
1143
  `}export{Ae as renderProviders};
1144
- //# sourceMappingURL=providers-CyjiG5Jw.js.map
1144
+ //# sourceMappingURL=providers-Cc89iMdx.js.map
@@ -14,7 +14,7 @@
14
14
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
15
15
  <link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png" />
16
16
  <script data-fased-boot-watchdog src="./boot-watchdog.js" defer></script>
17
- <script type="module" crossorigin src="./assets/index-D2nC6I-9.js"></script>
17
+ <script type="module" crossorigin src="./assets/index-D5JlBp7f.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="./assets/index-RwVraC3c.css">
19
19
  </head>
20
20
  <body>
@@ -1 +1 @@
1
- {"version":"0.1.55"}
1
+ {"version":"0.1.57"}
@@ -1,4 +1,4 @@
1
- import { normalizeThinkLevel, supportsXHighThinking } from "../../shared/model-thinking.js";
1
+ import { formatThinkingLevels, normalizeThinkLevel, supportsThinkingLevel, supportsXHighThinking } from "../../shared/model-thinking.js";
2
2
  import { normalizeVerboseLevel } from "../../auto-reply/thinking.js";
3
3
  import { normalizeAgentId } from "../../routing/session-key.js";
4
4
  import { logWarn } from "../../logger.js";
@@ -14,11 +14,11 @@ import "../../config/sessions.js";
14
14
  import { lookupContextTokens } from "../../agents/context.js";
15
15
  import "../../agents/pi-embedded.js";
16
16
  import { registerAgentRunContext } from "../../infra/agent-events.js";
17
+ import { loadModelCatalog } from "../../agents/model-catalog.js";
17
18
  import { buildSafeExternalPrompt, detectSuspiciousPatterns, getHookType, isExternalHookSession } from "../../security/external-content.js";
18
19
  import { runWithModelFallback } from "../../agents/model-fallback.js";
19
20
  import { deriveSessionTotalTokens, hasNonzeroUsage } from "../../agents/usage.js";
20
21
  import { estimateUsageCost, resolveModelCostConfig } from "../../utils/usage-format.js";
21
- import { loadModelCatalog } from "../../agents/model-catalog.js";
22
22
  import { createFasedAgentCodingTools } from "../../agents/pi-tools.js";
23
23
  import { runEmbeddedPiAgent } from "../../agents/pi-embedded-runner/run.js";
24
24
  import { resolveCronStyleNow } from "../../agents/current-time.js";
@@ -1043,6 +1043,10 @@ async function runCronIsolatedAgentTurn(params) {
1043
1043
  logWarn(`[cron:${params.job.id}] Thinking level "xhigh" is not supported for ${provider}/${model}; downgrading to "high".`);
1044
1044
  thinkLevel = "high";
1045
1045
  }
1046
+ if ((thinkLevel === "max" || thinkLevel === "ultra") && !supportsThinkingLevel(provider, model, thinkLevel)) {
1047
+ logWarn(`[cron:${params.job.id}] Thinking level "${thinkLevel}" is not supported for ${provider}/${model}; supported levels are ${formatThinkingLevels(provider, model)}; downgrading to "high".`);
1048
+ thinkLevel = "high";
1049
+ }
1046
1050
  const timeoutMs = resolveAgentTimeoutMs({
1047
1051
  cfg: cfgWithAgentDefaults,
1048
1052
  overrideSeconds: params.job.payload.kind === "agentTurn" ? params.job.payload.timeoutSeconds : undefined
@@ -18,10 +18,20 @@ function planJobTaskPolicy(params) {
18
18
  if (!params.executionPolicy && params.payload.kind !== "agentTurn") {
19
19
  return undefined;
20
20
  }
21
+ const explicitModel = params.payload.kind === "agentTurn" ? params.payload.model?.trim() : undefined;
22
+ const policy = explicitModel ? {
23
+ ...params.executionPolicy,
24
+ executionMode: "agent-turn",
25
+ modelPolicy: {
26
+ ...params.executionPolicy?.modelPolicy,
27
+ mode: "task-override",
28
+ model: explicitModel
29
+ }
30
+ } : params.executionPolicy;
21
31
  return planTaskExecutionPolicy({
22
32
  name: params.name,
23
33
  message: payloadTaskText(params.payload),
24
- policy: params.executionPolicy,
34
+ policy,
25
35
  trustedSources: matchingTrustedSourcesForTask({
26
36
  store: params.state?.store,
27
37
  agentId: params.agentId,
@@ -1,6 +1,6 @@
1
1
  import { danger } from "../../globals.js";
2
2
  import { ProxyAgent, fetch } from "undici";
3
- import WebSocket from "ws";
3
+ import WebSocket$1 from "ws";
4
4
  import { GatewayIntents, GatewayPlugin } from "@buape/carbon/gateway";
5
5
  import { HttpsProxyAgent } from "https-proxy-agent";
6
6
 
@@ -49,7 +49,7 @@ function createDiscordGatewayPlugin(params) {
49
49
  return super.registerClient(client);
50
50
  }
51
51
  createWebSocket(url) {
52
- return new WebSocket(url, { agent: wsAgent });
52
+ return new WebSocket$1(url, { agent: wsAgent });
53
53
  }
54
54
  }
55
55
  return new ProxyGatewayPlugin();
@@ -3,9 +3,9 @@ import { logVerbose, shouldLogVerbose } from "../../globals.js";
3
3
  import { createSubsystemLogger } from "../../logging/subsystem.js";
4
4
  import { resolveAgentDir } from "../../agents/agent-scope.js";
5
5
  import { formatErrorMessage } from "../../infra/errors.js";
6
+ import { resolveAgentRoute } from "../../routing/resolve-route.js";
6
7
  import { parseTtsDirectives } from "../../tts/tts-core.js";
7
8
  import { resolveTtsConfig, textToSpeech } from "../../tts/tts.js";
8
- import { resolveAgentRoute } from "../../routing/resolve-route.js";
9
9
  import { agentCommand } from "../../commands/agent.js";
10
10
  import { buildProviderRegistry, createMediaAttachmentCache, normalizeMediaAttachments, runCapability } from "../../media-understanding/runner.js";
11
11
  import { createRequire } from "node:module";
@@ -11,7 +11,7 @@ import { buildDeviceAuthPayloadV3 } from "./device-auth.js";
11
11
  import { PROTOCOL_VERSION } from "./protocol/schema/protocol-schemas.js";
12
12
  import { validateEventFrame, validateRequestFrame, validateResponseFrame } from "./protocol/index.js";
13
13
  import { randomUUID } from "node:crypto";
14
- import { WebSocket as WebSocket$1 } from "ws";
14
+ import { WebSocket } from "ws";
15
15
 
16
16
  //#region src/gateway/client.ts
17
17
  const GATEWAY_CLOSE_CODE_HINTS = {
@@ -81,7 +81,7 @@ var GatewayClient = class {
81
81
  return undefined;
82
82
  });
83
83
  }
84
- this.ws = new WebSocket$1(url, wsOptions);
84
+ this.ws = new WebSocket(url, wsOptions);
85
85
  this.ws.on("open", () => {
86
86
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
87
87
  const tlsError = this.validateTlsFingerprint();
@@ -302,7 +302,7 @@ var GatewayClient = class {
302
302
  clearTimeout(this.connectTimer);
303
303
  }
304
304
  this.connectTimer = setTimeout(() => {
305
- if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) {
305
+ if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) {
306
306
  return;
307
307
  }
308
308
  this.opts.onConnectError?.(new Error("gateway connect challenge timeout"));
@@ -370,7 +370,7 @@ var GatewayClient = class {
370
370
  return null;
371
371
  }
372
372
  async request(method, params, opts) {
373
- if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) {
373
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
374
374
  throw new Error("gateway not connected");
375
375
  }
376
376
  const id = randomUUID();
@@ -16,12 +16,28 @@ const ModelChoiceSchema = Type.Object({
16
16
  catalogSource: Type.Optional(Type.Union([
17
17
  Type.Literal("configured"),
18
18
  Type.Literal("runtime"),
19
+ Type.Literal("provider-api"),
19
20
  Type.Literal("current-preview"),
20
21
  Type.Literal("provider-index"),
21
22
  Type.Literal("manifest")
22
23
  ])),
24
+ available: Type.Optional(Type.Boolean()),
25
+ runnable: Type.Optional(Type.Boolean()),
26
+ recommended: Type.Optional(Type.Boolean()),
27
+ assignedRoles: Type.Optional(Type.Array(Type.Union([
28
+ Type.Literal("primary"),
29
+ Type.Literal("fallback"),
30
+ Type.Literal("cheapCheck"),
31
+ Type.Literal("strong"),
32
+ Type.Literal("escalation"),
33
+ Type.Literal("coding"),
34
+ Type.Literal("summarizer")
35
+ ]))),
23
36
  metadata: Type.Optional(Type.Object({
37
+ ref: NonEmptyString,
24
38
  provider: NonEmptyString,
39
+ publicProviderId: NonEmptyString,
40
+ publicProviderLabel: NonEmptyString,
25
41
  model: NonEmptyString,
26
42
  label: NonEmptyString,
27
43
  contextWindow: Type.Optional(Type.Integer({ minimum: 1 })),
@@ -44,7 +60,8 @@ const ModelChoiceSchema = Type.Object({
44
60
  Type.Literal("medium"),
45
61
  Type.Literal("high"),
46
62
  Type.Literal("xhigh"),
47
- Type.Literal("max")
63
+ Type.Literal("max"),
64
+ Type.Literal("ultra")
48
65
  ]))),
49
66
  defaultThinkingLevel: Type.Optional(Type.Union([
50
67
  Type.Literal("off"),
@@ -53,7 +70,8 @@ const ModelChoiceSchema = Type.Object({
53
70
  Type.Literal("medium"),
54
71
  Type.Literal("high"),
55
72
  Type.Literal("xhigh"),
56
- Type.Literal("max")
73
+ Type.Literal("max"),
74
+ Type.Literal("ultra")
57
75
  ])),
58
76
  thinkingMode: Type.Optional(Type.Union([
59
77
  Type.Literal("openai-reasoning-effort"),
@@ -72,15 +90,68 @@ const ModelChoiceSchema = Type.Object({
72
90
  ])),
73
91
  reasoningBudgetSupported: Type.Optional(Type.Boolean()),
74
92
  streaming: Type.Boolean(),
75
- capabilityConfidence: Type.Union([Type.Literal("declared"), Type.Literal("unknown")]),
93
+ capabilityConfidence: Type.Union([
94
+ Type.Literal("verified"),
95
+ Type.Literal("declared"),
96
+ Type.Literal("inferred"),
97
+ Type.Literal("unknown")
98
+ ]),
99
+ capabilitySource: Type.Union([
100
+ Type.Literal("provider-api"),
101
+ Type.Literal("official-docs"),
102
+ Type.Literal("runtime"),
103
+ Type.Literal("configured"),
104
+ Type.Literal("inferred"),
105
+ Type.Literal("unknown")
106
+ ]),
107
+ capabilityRetrievedAt: Type.Optional(NonEmptyString),
108
+ retrievedAt: NonEmptyString,
109
+ availabilitySource: Type.Union([
110
+ Type.Literal("provider-api"),
111
+ Type.Literal("runtime-catalog"),
112
+ Type.Literal("configured"),
113
+ Type.Literal("provider-plugin"),
114
+ Type.Literal("reviewed-catalog"),
115
+ Type.Literal("curated-recommendation")
116
+ ]),
117
+ authRoute: NonEmptyString,
76
118
  authMode: Type.Union([
77
119
  Type.Literal("api-key"),
78
120
  Type.Literal("oauth"),
79
- Type.Literal("token")
121
+ Type.Literal("token"),
122
+ Type.Literal("aws-sdk")
80
123
  ]),
124
+ credentialRoute: Type.Object({
125
+ id: NonEmptyString,
126
+ label: NonEmptyString,
127
+ authMode: Type.Union([
128
+ Type.Literal("api-key"),
129
+ Type.Literal("oauth"),
130
+ Type.Literal("token"),
131
+ Type.Literal("aws-sdk")
132
+ ])
133
+ }, { additionalProperties: false }),
134
+ credentialRoutes: Type.Array(Type.Object({
135
+ id: NonEmptyString,
136
+ label: NonEmptyString,
137
+ authMode: Type.Union([
138
+ Type.Literal("api-key"),
139
+ Type.Literal("oauth"),
140
+ Type.Literal("token"),
141
+ Type.Literal("aws-sdk")
142
+ ])
143
+ }, { additionalProperties: false }), { minItems: 1 }),
144
+ price: Type.Optional(Type.Object({
145
+ input: Type.Number({ minimum: 0 }),
146
+ output: Type.Number({ minimum: 0 }),
147
+ cacheRead: Type.Number({ minimum: 0 }),
148
+ cacheWrite: Type.Number({ minimum: 0 }),
149
+ unit: Type.Literal("usd-per-million-tokens")
150
+ }, { additionalProperties: false })),
81
151
  privateNetwork: Type.Boolean(),
82
152
  privateNetworkAllowed: Type.Boolean(),
83
153
  recommended: Type.Optional(Type.Boolean()),
154
+ recommendationRank: Type.Optional(Type.Integer({ minimum: 1 })),
84
155
  default: Type.Optional(Type.Boolean())
85
156
  }, { additionalProperties: false }))
86
157
  }, { additionalProperties: false });
@@ -193,7 +264,37 @@ const ModelsListParamsSchema = Type.Object({
193
264
  sessionKey: Type.Optional(NonEmptyString),
194
265
  includeMetadata: Type.Optional(Type.Boolean())
195
266
  }, { additionalProperties: false });
196
- const ModelsListResultSchema = Type.Object({ models: Type.Array(ModelChoiceSchema) }, { additionalProperties: false });
267
+ const ModelsListResultSchema = Type.Object({
268
+ models: Type.Array(ModelChoiceSchema),
269
+ generatedAt: Type.Optional(NonEmptyString),
270
+ agentId: Type.Optional(NonEmptyString),
271
+ providers: Type.Optional(Type.Array(Type.Object({
272
+ id: NonEmptyString,
273
+ label: NonEmptyString,
274
+ routes: Type.Array(NonEmptyString),
275
+ credentialRoutes: Type.Array(Type.Object({
276
+ id: NonEmptyString,
277
+ label: NonEmptyString,
278
+ authMode: NonEmptyString
279
+ }, { additionalProperties: false })),
280
+ available: Type.Integer({ minimum: 0 }),
281
+ recommended: Type.Integer({ minimum: 0 }),
282
+ assigned: Type.Integer({ minimum: 0 })
283
+ }, { additionalProperties: false }))),
284
+ assignments: Type.Optional(Type.Array(Type.Object({
285
+ role: Type.Union([
286
+ Type.Literal("primary"),
287
+ Type.Literal("fallback"),
288
+ Type.Literal("cheapCheck"),
289
+ Type.Literal("strong"),
290
+ Type.Literal("escalation"),
291
+ Type.Literal("coding"),
292
+ Type.Literal("summarizer")
293
+ ]),
294
+ ref: NonEmptyString,
295
+ available: Type.Boolean()
296
+ }, { additionalProperties: false })))
297
+ }, { additionalProperties: false });
197
298
  const ModelsCatalogStatusParamsSchema = Type.Object({}, { additionalProperties: false });
198
299
  const ModelsCatalogStatusProviderSchema = Type.Object({
199
300
  provider: NonEmptyString,
@@ -3,9 +3,9 @@ import { loadConfig, writeConfigFile } from "../../config/io.js";
3
3
  import "../../config/config.js";
4
4
  import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
5
5
  import "../protocol/index.js";
6
+ import { buildPluginStatusReport } from "../../plugins/status.js";
6
7
  import { completeTaskRunByRunId, createRunningTaskRun, failTaskRunByRunId } from "../../tasks/task-executor.js";
7
8
  import { applyHookMappings, resolveHookMappings } from "../hooks-mapping.js";
8
- import { buildPluginStatusReport } from "../../plugins/status.js";
9
9
  import { loadWorkspaceHookEntries } from "../../hooks/workspace.js";
10
10
  import { buildWorkspaceHookStatus } from "../../hooks/hooks-status.js";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
@@ -11,18 +11,18 @@ import { loadConfig, writeConfigFile } from "../../config/io.js";
11
11
  import "../../config/config.js";
12
12
  import { resolveProfileUnusableUntilForDisplay } from "../../agents/auth-profiles/usage.js";
13
13
  import "../../agents/auth-profiles.js";
14
+ import { deriveModelMetadata } from "../../agents/model-metadata.js";
14
15
  import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
15
16
  import { formatValidationErrors, validateModelsAuthClearParams, validateModelsAuthConfigureParams, validateModelsAuthInteractiveStartParams, validateModelsAuthStatusParams, validateModelsAuthStoreParams, validateModelsCatalogStatusParams, validateModelsListParams } from "../protocol/index.js";
16
- import { deriveModelMetadata } from "../../agents/model-metadata.js";
17
17
  import { loadProviderExtensionCatalogIndex } from "../../agents/provider-extension-catalog-index.js";
18
18
  import { buildModelCatalogStatus } from "../../agents/model-catalog-status.js";
19
19
  import { DEFAULT_OAUTH_WARN_MS, buildAuthHealthSummary } from "../../agents/auth-health.js";
20
20
  import { normalizeLegacyOnboardAuthChoice } from "../../commands/auth-choice-legacy.js";
21
- import { resolveAuthenticatedModelCatalog } from "../../agents/authenticated-model-catalog.js";
22
21
  import { configureLmStudioProvider, configureOllamaProvider, configureVllmProvider } from "../../commands/vllm-setup.js";
23
22
  import { applyAuthChoice } from "../../commands/auth-choice.apply.js";
24
23
  import "../../commands/auth-choice.js";
25
24
  import { CustomApiError, applyCustomApiConfig, detectCustomApiCompatibility } from "../../commands/onboard-custom.js";
25
+ import { resolveCanonicalModelCatalogSnapshot } from "../../agents/model-catalog-snapshot.js";
26
26
  import { resolveProviderAuthOverview } from "../../commands/models/list.auth-overview.js";
27
27
  import { probeConfiguredModelProviderHealth } from "../../providers/health.js";
28
28
  import { WizardSession } from "../../wizard/session.js";
@@ -854,15 +854,17 @@ const modelsHandlers = {
854
854
  }) : defaultAgentId;
855
855
  const agentDir = resolveAgentDir(cfg, authAgentId);
856
856
  const store = ensureAuthProfileStore(agentDir);
857
- const { usableCatalog, allowedCatalog } = await resolveAuthenticatedModelCatalog({
857
+ const snapshot = await resolveCanonicalModelCatalogSnapshot({
858
858
  cfg,
859
859
  store,
860
860
  catalog,
861
- defaultProvider: DEFAULT_PROVIDER
861
+ defaultProvider: DEFAULT_PROVIDER,
862
+ agentId: authAgentId,
863
+ agentDir
862
864
  });
863
865
  const providerFilter = typeof params.provider === "string" && params.provider.trim() ? normalizeProviderId(params.provider) : "";
864
- const modelSource = params.all === true || params.available === true ? usableCatalog : allowedCatalog.length > 0 ? allowedCatalog : usableCatalog;
865
- const models = providerFilter ? modelSource.filter((model) => normalizeProviderId(model.provider) === providerFilter) : modelSource;
866
+ const modelSource = params.all === true || params.available === true ? snapshot.models : snapshot.models.filter((model) => model.runnable);
867
+ const models = providerFilter ? modelSource.filter((model) => normalizeProviderId(model.provider) === providerFilter || normalizeProviderId(model.metadata.publicProviderId) === providerFilter) : modelSource;
866
868
  const payloadModels = params.includeMetadata === true ? models.map((model) => ({
867
869
  ...model,
868
870
  metadata: model.metadata ?? deriveModelMetadata({
@@ -870,7 +872,13 @@ const modelsHandlers = {
870
872
  cfg
871
873
  })
872
874
  })) : models;
873
- respond(true, { models: payloadModels.toSorted((left, right) => left.provider.localeCompare(right.provider) || (left.metadata?.recommendationRank ?? Number.MAX_SAFE_INTEGER) - (right.metadata?.recommendationRank ?? Number.MAX_SAFE_INTEGER) || left.name.localeCompare(right.name)) }, undefined);
875
+ respond(true, {
876
+ models: payloadModels.toSorted((left, right) => left.provider.localeCompare(right.provider) || (left.metadata?.recommendationRank ?? Number.MAX_SAFE_INTEGER) - (right.metadata?.recommendationRank ?? Number.MAX_SAFE_INTEGER) || left.name.localeCompare(right.name)),
877
+ generatedAt: snapshot.generatedAt,
878
+ agentId: snapshot.agentId,
879
+ providers: providerFilter ? snapshot.providers.filter((provider) => [provider.id, ...provider.routes].map(normalizeProviderId).includes(providerFilter)) : snapshot.providers,
880
+ assignments: providerFilter ? snapshot.assignments.filter((assignment) => models.some((model) => `${model.provider}/${model.id}` === assignment.ref)) : snapshot.assignments
881
+ }, undefined);
874
882
  } catch (err) {
875
883
  respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, String(err)));
876
884
  }
@@ -4,13 +4,13 @@ import { clearPluginManifestRegistryCache } from "../../plugins/manifest-registr
4
4
  import { installPluginFromNpmSpec } from "../../plugins/install.js";
5
5
  import { loadConfig, writeConfigFile } from "../../config/io.js";
6
6
  import "../../config/config.js";
7
+ import { buildNpmResolutionInstallFields } from "../../plugins/installs.js";
7
8
  import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
8
9
  import { validatePluginsMarketplaceAdminRpcGrantSetParams, validatePluginsMarketplaceInfoParams, validatePluginsMarketplaceInstallParams, validatePluginsMarketplaceListParams, validatePluginsMarketplaceRestartParams, validatePluginsMarketplaceRuntimeHelperSetParams, validatePluginsMarketplaceUninstallParams, validatePluginsMarketplaceUpdateParams, validatePluginsMarketplaceUpdatePreviewParams } from "../protocol/index.js";
9
- import { resolveChannelPluginExpectedPluginIds } from "../../channels/plugins/catalog.js";
10
- import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
11
- import { buildNpmResolutionInstallFields } from "../../plugins/installs.js";
12
10
  import { executePluginUninstallLifecycle, executePluginUpdateLifecycle, finalizeInstalledPluginConfig } from "../../plugins/lifecycle.js";
11
+ import { resolveChannelPluginExpectedPluginIds } from "../../channels/plugins/catalog.js";
13
12
  import { buildPluginMarketplaceReport, resolvePluginMarketplaceEntry } from "../../plugins/marketplace.js";
13
+ import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
14
14
  import { assertValidParams } from "./validation.js";
15
15
  import { buildPluginMarketplaceUpdateReview, formatPluginMarketplaceUpdateReviewWarnings } from "../../plugins/marketplace-update-review.js";
16
16
  import { setPluginAdminRpcActionGrant, setPluginRuntimeSessionReadGrant } from "../../plugins/runtime-helper-grants.js";
@@ -2,8 +2,8 @@ import { loadConfig } from "../../config/io.js";
2
2
  import "../../config/config.js";
3
3
  import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
4
4
  import "../protocol/index.js";
5
- import { formatForLog } from "../ws-log.js";
6
5
  import { buildCapabilityReadinessReport } from "../../capabilities/catalog.js";
6
+ import { formatForLog } from "../ws-log.js";
7
7
  import { runGmailSetup } from "../../hooks/gmail-ops.js";
8
8
  import { listConfiguredWebSearchProviders, runWebSearch } from "../../web-search/runtime.js";
9
9