@rsalmn/extremerouter 0.8.5 → 0.8.7

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 (1221) hide show
  1. package/README.id.md +130 -0
  2. package/README.md +73 -32
  3. package/README.zh-CN.md +130 -0
  4. package/app/.next-cli-build/BUILD_ID +1 -1
  5. package/app/.next-cli-build/app-path-routes-manifest.json +31 -14
  6. package/app/.next-cli-build/build-manifest.json +2 -2
  7. package/app/.next-cli-build/prerender-manifest.json +3 -3
  8. package/app/.next-cli-build/routes-manifest.json +106 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -0
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -0
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -0
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  97. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  108. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  113. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  115. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  117. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  118. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -11
  139. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +5 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +4 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +5 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +7 -4
  159. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +10 -9
  163. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +5 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +5 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +5 -2
  171. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -0
  175. package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -0
  176. package/app/.next-cli-build/server/app/api/combos/lab/route_client-reference-manifest.js +1 -0
  177. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -0
  180. package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -0
  181. package/app/.next-cli-build/server/app/api/combos/simulate/route_client-reference-manifest.js +1 -0
  182. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -0
  193. package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -0
  194. package/app/.next-cli-build/server/app/api/health/overview/route_client-reference-manifest.js +1 -0
  195. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  200. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  212. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -0
  228. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  229. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  230. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  247. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js +1 -0
  251. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -0
  252. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route_client-reference-manifest.js +1 -0
  253. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js +1 -0
  280. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js.nft.json +1 -0
  281. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route_client-reference-manifest.js +1 -0
  282. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +3 -0
  297. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -0
  298. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route_client-reference-manifest.js +1 -0
  299. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +3 -1
  306. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js +1 -0
  324. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -0
  325. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route_client-reference-manifest.js +1 -0
  326. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -0
  329. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -0
  330. package/app/.next-cli-build/server/app/api/providers/capture/launch/route_client-reference-manifest.js +1 -0
  331. package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -0
  332. package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -0
  333. package/app/.next-cli-build/server/app/api/providers/capture/route_client-reference-manifest.js +1 -0
  334. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -0
  337. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -0
  338. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route_client-reference-manifest.js +1 -0
  339. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -0
  340. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -0
  341. package/app/.next-cli-build/server/app/api/providers/felo-capture/route_client-reference-manifest.js +1 -0
  342. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  363. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js +1 -0
  379. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -0
  380. package/app/.next-cli-build/server/app/api/smart-routing/active/route_client-reference-manifest.js +1 -0
  381. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +17 -0
  382. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -0
  383. package/app/.next-cli-build/server/app/api/smart-routing/history/route_client-reference-manifest.js +1 -0
  384. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +16 -0
  385. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -0
  386. package/app/.next-cli-build/server/app/api/smart-routing/lab/route_client-reference-manifest.js +1 -0
  387. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +7 -0
  388. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -0
  389. package/app/.next-cli-build/server/app/api/smart-routing/stream/route_client-reference-manifest.js +1 -0
  390. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +4 -2
  393. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  421. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  447. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  483. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  484. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  487. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  493. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/callback.html +1 -1
  496. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  497. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  517. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/index.html +1 -1
  519. package/app/.next-cli-build/server/app/index.rsc +6 -6
  520. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  522. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  524. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  526. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/landing.html +1 -1
  529. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  530. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  531. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/login/page.js +2 -2
  537. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  539. package/app/.next-cli-build/server/app/login.html +1 -1
  540. package/app/.next-cli-build/server/app/login.rsc +7 -7
  541. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  542. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page.js +2 -2
  550. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app-paths-manifest.json +31 -14
  553. package/app/.next-cli-build/server/chunks/1194.js +1 -1
  554. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  555. package/app/.next-cli-build/server/chunks/1350.js +5 -2
  556. package/app/.next-cli-build/server/chunks/1411.js +9 -0
  557. package/app/.next-cli-build/server/chunks/1429.js +1 -1
  558. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  559. package/app/.next-cli-build/server/chunks/1891.js +1 -1
  560. package/app/.next-cli-build/server/chunks/212.js +1 -1
  561. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  562. package/app/.next-cli-build/server/chunks/3520.js +1 -0
  563. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  564. package/app/.next-cli-build/server/chunks/3552.js +1 -0
  565. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  566. package/app/.next-cli-build/server/chunks/{8873.js → 3735.js} +1 -1
  567. package/app/.next-cli-build/server/chunks/3841.js +1 -0
  568. package/app/.next-cli-build/server/chunks/4046.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4109.js +4 -0
  570. package/app/.next-cli-build/server/chunks/412.js +5 -5
  571. package/app/.next-cli-build/server/chunks/4502.js +16 -0
  572. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  573. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  574. package/app/.next-cli-build/server/chunks/4957.js +1 -0
  575. package/app/.next-cli-build/server/chunks/5050.js +2 -0
  576. package/app/.next-cli-build/server/chunks/507.js +1 -1
  577. package/app/.next-cli-build/server/chunks/5253.js +17 -0
  578. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  579. package/app/.next-cli-build/server/chunks/5330.js +37 -28
  580. package/app/.next-cli-build/server/chunks/5473.js +9 -0
  581. package/app/.next-cli-build/server/chunks/5604.js +13 -0
  582. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  583. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  584. package/app/.next-cli-build/server/chunks/5628.js +1 -1
  585. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  586. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  587. package/app/.next-cli-build/server/chunks/6182.js +1 -1
  588. package/app/.next-cli-build/server/chunks/6488.js +1 -0
  589. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  590. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  591. package/app/.next-cli-build/server/chunks/6878.js +1 -0
  592. package/app/.next-cli-build/server/chunks/698.js +1 -1
  593. package/app/.next-cli-build/server/chunks/7016.js +3 -0
  594. package/app/.next-cli-build/server/chunks/7410.js +1 -1
  595. package/app/.next-cli-build/server/chunks/7765.js +13 -0
  596. package/app/.next-cli-build/server/chunks/7815.js +1 -0
  597. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  598. package/app/.next-cli-build/server/chunks/8048.js +1 -0
  599. package/app/.next-cli-build/server/chunks/809.js +1 -0
  600. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  601. package/app/.next-cli-build/server/chunks/8266.js +1 -0
  602. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  603. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  604. package/app/.next-cli-build/server/chunks/8802.js +2 -2
  605. package/app/.next-cli-build/server/chunks/885.js +17 -13
  606. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  607. package/app/.next-cli-build/server/chunks/9365.js +9 -0
  608. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  609. package/app/.next-cli-build/server/chunks/9903.js +2 -2
  610. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  611. package/app/.next-cli-build/server/middleware.js +5 -5
  612. package/app/.next-cli-build/server/pages/404.html +1 -1
  613. package/app/.next-cli-build/server/pages/500.html +1 -1
  614. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  615. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  616. package/app/.next-cli-build/static/BmLJ5bmQbpsF-jvZIwr9t/_buildManifest.js +1 -0
  617. package/app/.next-cli-build/static/chunks/1321-184fe0dd34faf680.js +1 -0
  618. package/app/.next-cli-build/static/chunks/2563-a547c8ef699e1791.js +1 -0
  619. package/app/.next-cli-build/static/chunks/5497-9caed03337b37e47.js +7 -0
  620. package/app/.next-cli-build/static/chunks/705-eaa2de0fd5964be4.js +1 -0
  621. package/app/.next-cli-build/static/chunks/{9622-fcd7c93a94eaa38f.js → 9622-d0f22be4f1ef8011.js} +6 -6
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-c263cd784e69e6f1.js → page-3527fe022102a692.js} +1 -1
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-fe59538aa4add719.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-3c3074cf3f61df46.js → page-1849f671db0f9fe9.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f7cdc992cb310077.js → page-0e903eb34158c8a8.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8406e79b31e512bb.js +3 -0
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-81ef4c324f201832.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-72670cb4cac6b97d.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d71cb9f910cb5d13.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7d472b122fb182f0.js → page-94341b277cf27462.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83272baae17d38f1.js → page-558f5601f8df1d4d.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-f36e5ac11783fd1e.js → page-6effc5c0f2b1d72e.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-4069e1d40a3c70a6.js → page-05b05e6f6136829d.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e794909abbc7a09a.js → page-95375c7b40f99306.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-1d972fd3baee7474.js → page-4549c187375b9192.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-839ed70e115af9c9.js → page-bb459e518dfa9f70.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-cc5141ff81040e89.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-625485e32264e15b.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-09b1b5beae8435cd.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-776433cfd87f123a.js +10 -0
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-bcf9d97ab4dc20d9.js → page-1f67fe5d69805df2.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5d9d7d47216375ea.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-58d8d0fa5523ff95.js → page-c561cab29785310a.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-140fef4b235b4792.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a8b151d5ae9004ea.js → page-acf6cde3210c179a.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/smart-routing/page-5c8e7b3b71579268.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-6cda956597418bd9.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d57c129c03c9cb36.js → page-c3ae0ab7f0d0634d.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-61d162d7a7f88a11.js → page-cb12854a23416b01.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-55b0738c2d201462.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-66efb163e888cd6b.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/_global-error/page-bf747ebfcd7e601c.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-bf747ebfcd7e601c.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf747ebfcd7e601c.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf747ebfcd7e601c.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf747ebfcd7e601c.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf747ebfcd7e601c.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf747ebfcd7e601c.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf747ebfcd7e601c.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf747ebfcd7e601c.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/breaker/route-bf747ebfcd7e601c.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cache/route-bf747ebfcd7e601c.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf747ebfcd7e601c.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf747ebfcd7e601c.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf747ebfcd7e601c.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf747ebfcd7e601c.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf747ebfcd7e601c.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf747ebfcd7e601c.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf747ebfcd7e601c.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf747ebfcd7e601c.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf747ebfcd7e601c.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf747ebfcd7e601c.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf747ebfcd7e601c.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf747ebfcd7e601c.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf747ebfcd7e601c.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf747ebfcd7e601c.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf747ebfcd7e601c.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf747ebfcd7e601c.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf747ebfcd7e601c.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf747ebfcd7e601c.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-bf747ebfcd7e601c.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/combos/route-bf747ebfcd7e601c.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-bf747ebfcd7e601c.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-bf747ebfcd7e601c.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-bf747ebfcd7e601c.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf747ebfcd7e601c.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf747ebfcd7e601c.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf747ebfcd7e601c.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-bf747ebfcd7e601c.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-bf747ebfcd7e601c.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/health/route-bf747ebfcd7e601c.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-bf747ebfcd7e601c.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/init/route-bf747ebfcd7e601c.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf747ebfcd7e601c.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/route-bf747ebfcd7e601c.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/locale/route-bf747ebfcd7e601c.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf747ebfcd7e601c.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf747ebfcd7e601c.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf747ebfcd7e601c.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf747ebfcd7e601c.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf747ebfcd7e601c.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf747ebfcd7e601c.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf747ebfcd7e601c.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf747ebfcd7e601c.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf747ebfcd7e601c.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf747ebfcd7e601c.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf747ebfcd7e601c.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf747ebfcd7e601c.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/route-bf747ebfcd7e601c.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf747ebfcd7e601c.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-bf747ebfcd7e601c.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf747ebfcd7e601c.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf747ebfcd7e601c.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf747ebfcd7e601c.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf747ebfcd7e601c.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf747ebfcd7e601c.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-bf747ebfcd7e601c.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf747ebfcd7e601c.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf747ebfcd7e601c.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-bf747ebfcd7e601c.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-bf747ebfcd7e601c.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-bf747ebfcd7e601c.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf747ebfcd7e601c.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf747ebfcd7e601c.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf747ebfcd7e601c.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf747ebfcd7e601c.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf747ebfcd7e601c.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf747ebfcd7e601c.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-bf747ebfcd7e601c.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-bf747ebfcd7e601c.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-bf747ebfcd7e601c.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf747ebfcd7e601c.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf747ebfcd7e601c.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf747ebfcd7e601c.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf747ebfcd7e601c.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf747ebfcd7e601c.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf747ebfcd7e601c.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-bf747ebfcd7e601c.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-bf747ebfcd7e601c.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-bf747ebfcd7e601c.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-bf747ebfcd7e601c.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-bf747ebfcd7e601c.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf747ebfcd7e601c.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-bf747ebfcd7e601c.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-bf747ebfcd7e601c.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-bf747ebfcd7e601c.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf747ebfcd7e601c.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf747ebfcd7e601c.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-bf747ebfcd7e601c.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-bf747ebfcd7e601c.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-bf747ebfcd7e601c.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-bf747ebfcd7e601c.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-bf747ebfcd7e601c.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-bf747ebfcd7e601c.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf747ebfcd7e601c.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-bf747ebfcd7e601c.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-bf747ebfcd7e601c.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf747ebfcd7e601c.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/route-bf747ebfcd7e601c.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf747ebfcd7e601c.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf747ebfcd7e601c.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf747ebfcd7e601c.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf747ebfcd7e601c.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf747ebfcd7e601c.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf747ebfcd7e601c.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf747ebfcd7e601c.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf747ebfcd7e601c.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf747ebfcd7e601c.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf747ebfcd7e601c.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf747ebfcd7e601c.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf747ebfcd7e601c.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf747ebfcd7e601c.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/settings/route-bf747ebfcd7e601c.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf747ebfcd7e601c.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-bf747ebfcd7e601c.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-bf747ebfcd7e601c.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-bf747ebfcd7e601c.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-bf747ebfcd7e601c.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-bf747ebfcd7e601c.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-bf747ebfcd7e601c.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/tags/route-bf747ebfcd7e601c.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf747ebfcd7e601c.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf747ebfcd7e601c.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf747ebfcd7e601c.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf747ebfcd7e601c.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf747ebfcd7e601c.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf747ebfcd7e601c.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf747ebfcd7e601c.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf747ebfcd7e601c.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf747ebfcd7e601c.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf747ebfcd7e601c.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf747ebfcd7e601c.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf747ebfcd7e601c.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf747ebfcd7e601c.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf747ebfcd7e601c.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf747ebfcd7e601c.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf747ebfcd7e601c.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf747ebfcd7e601c.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-bf747ebfcd7e601c.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf747ebfcd7e601c.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-bf747ebfcd7e601c.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf747ebfcd7e601c.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf747ebfcd7e601c.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf747ebfcd7e601c.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-bf747ebfcd7e601c.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf747ebfcd7e601c.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf747ebfcd7e601c.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf747ebfcd7e601c.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf747ebfcd7e601c.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf747ebfcd7e601c.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf747ebfcd7e601c.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf747ebfcd7e601c.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf747ebfcd7e601c.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf747ebfcd7e601c.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf747ebfcd7e601c.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf747ebfcd7e601c.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-bf747ebfcd7e601c.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf747ebfcd7e601c.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf747ebfcd7e601c.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf747ebfcd7e601c.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf747ebfcd7e601c.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/route-bf747ebfcd7e601c.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf747ebfcd7e601c.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf747ebfcd7e601c.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf747ebfcd7e601c.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf747ebfcd7e601c.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/version/route-bf747ebfcd7e601c.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf747ebfcd7e601c.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf747ebfcd7e601c.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-baf12d16760e9b90.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/{layout-10bff7b57a2a3c2c.js → layout-155acd4a482252b8.js} +1 -1
  834. package/app/.next-cli-build/static/chunks/app/login/{page-32ab5d7c75651107.js → page-089f2be5081e9c05.js} +1 -1
  835. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf747ebfcd7e601c.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/page-bf747ebfcd7e601c.js +1 -0
  837. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf747ebfcd7e601c.js +1 -0
  838. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf747ebfcd7e601c.js +1 -0
  839. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf747ebfcd7e601c.js +1 -0
  840. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf747ebfcd7e601c.js +1 -0
  841. package/app/.next-cli-build/static/css/8a8ea9ee79a01730.css +1 -0
  842. package/app/node_modules/playwright-core/browsers.json +75 -0
  843. package/app/node_modules/playwright-core/index.js +17 -0
  844. package/app/node_modules/playwright-core/index.mjs +28 -0
  845. package/app/node_modules/playwright-core/lib/bootstrap.js +88 -0
  846. package/app/node_modules/playwright-core/lib/coreBundle.js +74830 -0
  847. package/app/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  848. package/app/node_modules/playwright-core/package.json +34 -0
  849. package/app/package.json +2 -5
  850. package/app/public/providers/ai21.png +0 -0
  851. package/app/public/providers/aihorde.png +0 -0
  852. package/app/public/providers/aimlapi.png +0 -0
  853. package/app/public/providers/ainative.png +0 -0
  854. package/app/public/providers/aion.png +0 -0
  855. package/app/public/providers/alibaba-cn.svg +1 -11
  856. package/app/public/providers/alibaba.svg +1 -11
  857. package/app/public/providers/alitp-intl.svg +1 -0
  858. package/app/public/providers/anyapi.png +0 -0
  859. package/app/public/providers/arcee-ai.png +0 -0
  860. package/app/public/providers/auriko.svg +61 -0
  861. package/app/public/providers/azure-ai.svg +23 -0
  862. package/app/public/providers/bai.png +0 -0
  863. package/app/public/providers/baseten.png +0 -0
  864. package/app/public/providers/bazaarlink.svg +8 -0
  865. package/app/public/providers/blackbox-web.png +0 -0
  866. package/app/public/providers/bluesminds.png +0 -0
  867. package/app/public/providers/bytez.png +0 -0
  868. package/app/public/providers/charm-hyper.png +0 -0
  869. package/app/public/providers/chat-oripe.svg +4 -0
  870. package/app/public/providers/chatanywhere.svg +1 -0
  871. package/app/public/providers/cheaperinference.png +0 -0
  872. package/app/public/providers/chenzk.png +0 -0
  873. package/app/public/providers/clarifai.svg +1 -0
  874. package/app/public/providers/cloudcode-one.svg +13 -0
  875. package/app/public/providers/conol-web.png +0 -0
  876. package/app/public/providers/crof.png +0 -0
  877. package/app/public/providers/dahl.png +0 -0
  878. package/app/public/providers/datarobot.png +0 -0
  879. package/app/public/providers/dgrid.png +0 -0
  880. package/app/public/providers/digitalocean.svg +1 -0
  881. package/app/public/providers/dit.svg +10 -0
  882. package/app/public/providers/docker-model-runner.svg +1 -0
  883. package/app/public/providers/duckduckgo-web.svg +1 -7
  884. package/app/public/providers/dxnt.svg +10 -0
  885. package/app/public/providers/electronhub.svg +4 -0
  886. package/app/public/providers/empower.svg +4 -0
  887. package/app/public/providers/factory.svg +4 -0
  888. package/app/public/providers/fastrouter.svg +4 -0
  889. package/app/public/providers/felo-web.svg +50 -0
  890. package/app/public/providers/fireworks.svg +3 -0
  891. package/app/public/providers/fishaudio.svg +1 -0
  892. package/app/public/providers/free-ai.svg +4 -0
  893. package/app/public/providers/freeaiapikey.svg +4 -0
  894. package/app/public/providers/freebuff.svg +6 -0
  895. package/app/public/providers/freeinference.svg +4 -0
  896. package/app/public/providers/freemodel-dev.svg +4 -0
  897. package/app/public/providers/freetheai.svg +4 -0
  898. package/app/public/providers/friendliai.svg +4 -0
  899. package/app/public/providers/g4f-gemini.png +0 -0
  900. package/app/public/providers/g4f-groq.png +0 -0
  901. package/app/public/providers/g4f-nvidia.png +0 -0
  902. package/app/public/providers/g4f-ollama.png +0 -0
  903. package/app/public/providers/g4f-pollinations.svg +9 -0
  904. package/app/public/providers/gemini-business.svg +1 -0
  905. package/app/public/providers/getgoapi.svg +4 -0
  906. package/app/public/providers/gitlab.png +0 -0
  907. package/app/public/providers/gitlab.svg +1 -0
  908. package/app/public/providers/gitlawb-gmi.svg +4 -0
  909. package/app/public/providers/gitlawb.svg +4 -0
  910. package/app/public/providers/gladia.svg +1 -0
  911. package/app/public/providers/hackclub.png +0 -0
  912. package/app/public/providers/hailuo-web.svg +1 -0
  913. package/app/public/providers/helixmind.svg +4 -0
  914. package/app/public/providers/heroku.svg +16 -0
  915. package/app/public/providers/huggingchat.svg +1 -9
  916. package/app/public/providers/hyperagent.svg +1 -0
  917. package/app/public/providers/inception.svg +4 -0
  918. package/app/public/providers/inference-net.svg +4 -0
  919. package/app/public/providers/inner-ai.svg +1 -0
  920. package/app/public/providers/kenari.svg +4 -0
  921. package/app/public/providers/kilo-gateway.svg +4 -0
  922. package/app/public/providers/kimi-desktop.svg +1 -9
  923. package/app/public/providers/kimi-web.svg +1 -8
  924. package/app/public/providers/lambda-ai.svg +4 -0
  925. package/app/public/providers/laozhang.svg +4 -0
  926. package/app/public/providers/lemonade.svg +1 -0
  927. package/app/public/providers/liquid.svg +4 -0
  928. package/app/public/providers/literouter.svg +4 -0
  929. package/app/public/providers/llama-cpp.svg +1 -0
  930. package/app/public/providers/llamafile.svg +1 -0
  931. package/app/public/providers/llamagate.svg +4 -0
  932. package/app/public/providers/llm-kiwi.svg +4 -0
  933. package/app/public/providers/llm7.png +0 -0
  934. package/app/public/providers/llmgateway.svg +4 -0
  935. package/app/public/providers/lm-studio.svg +1 -0
  936. package/app/public/providers/maritalk.svg +4 -0
  937. package/app/public/providers/meganova-ai.svg +4 -0
  938. package/app/public/providers/meta-ai.svg +68 -0
  939. package/app/public/providers/meta-llama.svg +1 -0
  940. package/app/public/providers/mimocode.png +0 -0
  941. package/app/public/providers/mixlayer.svg +4 -0
  942. package/app/public/providers/mnn-ai.svg +4 -0
  943. package/app/public/providers/modal.svg +1 -0
  944. package/app/public/providers/modelscope.svg +1 -0
  945. package/app/public/providers/morph.svg +4 -0
  946. package/app/public/providers/naga-ac.svg +4 -0
  947. package/app/public/providers/naga-ai.svg +4 -0
  948. package/app/public/providers/nanogpt.svg +4 -0
  949. package/app/public/providers/nara.svg +4 -0
  950. package/app/public/providers/navy.svg +4 -0
  951. package/app/public/providers/notion-web.svg +1 -0
  952. package/app/public/providers/nous-research.svg +4 -0
  953. package/app/public/providers/nscale.svg +4 -0
  954. package/app/public/providers/nube.svg +4 -0
  955. package/app/public/providers/oci.svg +20 -0
  956. package/app/public/providers/ofoxai.svg +4 -0
  957. package/app/public/providers/ollama-cloud.svg +1 -0
  958. package/app/public/providers/oobabooga.svg +1 -0
  959. package/app/public/providers/openadapter.svg +4 -0
  960. package/app/public/providers/opencode-zen.svg +4 -0
  961. package/app/public/providers/openference-api.svg +4 -0
  962. package/app/public/providers/orcarouter.png +0 -0
  963. package/app/public/providers/ovhcloud.svg +1 -0
  964. package/app/public/providers/perplexity-agent.svg +1 -13
  965. package/app/public/providers/piapi.svg +4 -0
  966. package/app/public/providers/pioneer.svg +4 -0
  967. package/app/public/providers/poe-web.svg +1 -8
  968. package/app/public/providers/poixe-ai.svg +4 -0
  969. package/app/public/providers/poolside.svg +4 -0
  970. package/app/public/providers/predibase.svg +4 -0
  971. package/app/public/providers/publicai.svg +4 -0
  972. package/app/public/providers/qiniu.svg +4 -0
  973. package/app/public/providers/qwen-cloud.svg +1 -1
  974. package/app/public/providers/qwen-web.svg +1 -6
  975. package/app/public/providers/qwencloud.svg +1 -6
  976. package/app/public/providers/regolo.svg +4 -0
  977. package/app/public/providers/reka.svg +4 -0
  978. package/app/public/providers/requesty.svg +4 -0
  979. package/app/public/providers/rev-ai.svg +1 -0
  980. package/app/public/providers/routeway.svg +4 -0
  981. package/app/public/providers/sambanova.svg +4 -0
  982. package/app/public/providers/sap.svg +1 -0
  983. package/app/public/providers/scaleway.svg +1 -0
  984. package/app/public/providers/snowflake.svg +1 -0
  985. package/app/public/providers/soniox.svg +1 -0
  986. package/app/public/providers/speechmatics.svg +1 -0
  987. package/app/public/providers/speka.svg +4 -0
  988. package/app/public/providers/sumopod.svg +4 -0
  989. package/app/public/providers/synthetic.svg +4 -0
  990. package/app/public/providers/tencent-aistudio-web.png +0 -0
  991. package/app/public/providers/thebai.svg +4 -0
  992. package/app/public/providers/theoldllm.png +0 -0
  993. package/app/public/providers/tokenreply.svg +4 -0
  994. package/app/public/providers/triton.svg +1 -0
  995. package/app/public/providers/uncloseai.png +0 -0
  996. package/app/public/providers/unorouter.svg +4 -0
  997. package/app/public/providers/upstage.svg +4 -0
  998. package/app/public/providers/vllm.svg +1 -0
  999. package/app/public/providers/void-ai.svg +4 -0
  1000. package/app/public/providers/wafer.svg +4 -0
  1001. package/app/public/providers/wandb.svg +1 -0
  1002. package/app/public/providers/watsonx.svg +51 -0
  1003. package/app/public/providers/writer.svg +4 -0
  1004. package/app/public/providers/x5lab.svg +4 -0
  1005. package/app/public/providers/xinference.svg +1 -0
  1006. package/app/public/providers/yolo-auto.svg +4 -0
  1007. package/app/public/providers/zai-web.svg +1 -0
  1008. package/app/public/providers/zcode.png +0 -0
  1009. package/app/public/providers/zerolimitai.svg +4 -0
  1010. package/app/public/providers/zylo-api.svg +4 -0
  1011. package/app/src/lib/db/migrate.js +6 -3
  1012. package/app/src/mitm/server.js +2 -2
  1013. package/package.json +3 -1
  1014. package/src/cli/menus/providers.js +6 -0
  1015. package/app/.next-cli-build/server/chunks/2231.js +0 -1
  1016. package/app/.next-cli-build/server/chunks/422.js +0 -9
  1017. package/app/.next-cli-build/server/chunks/5102.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  1020. package/app/.next-cli-build/server/chunks/6560.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/7187.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/7218.js +0 -1
  1023. package/app/.next-cli-build/server/chunks/7872.js +0 -1
  1024. package/app/.next-cli-build/server/chunks/874.js +0 -9
  1025. package/app/.next-cli-build/server/chunks/8955.js +0 -16
  1026. package/app/.next-cli-build/server/chunks/9422.js +0 -13
  1027. package/app/.next-cli-build/server/chunks/9703.js +0 -14
  1028. package/app/.next-cli-build/static/7zgJjF0BTyl0D0ZYIuDWj/_buildManifest.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/1321-3b1aef2827d68b60.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/5497-51105899e4e24c89.js +0 -7
  1031. package/app/.next-cli-build/static/chunks/705-6dadbd8815279945.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/8105-76bf5c11dd3bc8ce.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-ecd3a85a40e51c66.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +0 -3
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-133cf1aa2ce53c87.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-e7ba910803086460.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6b500acebeff856b.js +0 -10
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-483f01fd35d212f5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-bb9f307074c5c23a.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +0 -1
  1218. package/app/.next-cli-build/static/css/b7a8bd59db43d15e.css +0 -1
  1219. package/app/public/providers/blackbox-web.svg +0 -6
  1220. package/app/public/providers/chatglm-cn.svg +0 -7
  1221. /package/app/.next-cli-build/static/{7zgJjF0BTyl0D0ZYIuDWj → BmLJ5bmQbpsF-jvZIwr9t}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{2531:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var a=t(95155),l=t(12115),r=t(35497);let i=[{key:"providerDown",label:"Provider Down",desc:"Circuit breaker opens (provider repeatedly failing)",icon:"error"},{key:"rateLimited",label:"Rate Limited",desc:"Account hits 429/403 from upstream",icon:"block"},{key:"healthDegraded",label:"Health Degraded",desc:"Success rate drops below 70%",icon:"monitor_heart"},{key:"budgetExceeded",label:"Budget Exceeded",desc:"Usage quota reached",icon:"data_usage"}];function n(){let[e,s]=(0,l.useState)(null),[t,n]=(0,l.useState)(!0),[c,o]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),[x,m]=(0,l.useState)(null),u=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/settings",{cache:"no-store"});if(e.ok){let t=await e.json();s(t)}}catch{}n(!1)},[]);(0,l.useEffect)(()=>{u()},[u]),(0,l.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let b=(0,l.useRef)(null),p=(0,l.useCallback)(async(e,t,a)=>{s(s=>{let l=a?{...s,[e]:{...s?.[e]||{},[a]:t}}:{...s,[e]:t};return b.current&&clearTimeout(b.current),b.current=setTimeout(async()=>{try{let s=a?{[e]:{...l[e]||{},[a]:t}}:{[e]:t};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok&&(m(a||e),setTimeout(()=>m(null),1500))}catch{}},500),l})},[]),g=async()=>{o(!0),h(null);try{let e=await fetch("/api/alerts/test",{method:"POST"}),s=await e.json();h(s.success?"sent":"failed")}catch{h("failed")}o(!1),setTimeout(()=>h(null),5e3)};if(t)return(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-6 w-48 animate-pulse rounded bg-sidebar"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-32 animate-pulse rounded bg-sidebar"})})]});let j=e?.webhookEnabled===!0,f=!!(e?.webhookDiscordUrl||e?.webhookTelegramToken||e?.webhookGenericUrl);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,a.jsx)(r.zY,{title:"Webhook Alerts",description:"Get notified via Discord, Telegram, or generic webhook when providers fail",icon:"notifications_active",actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:c?"progress_activity":"send",onClick:g,disabled:c||!j||!f,children:c?"Sending...":"Send Test"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.lM,{checked:j,onChange:e=>p("webhookEnabled",e),label:"Enable Webhook Alerts"}),j&&(0,a.jsx)(r.Ex,{variant:"success",size:"sm",dot:!0,children:"Active"})]}),j&&!f&&(0,a.jsx)(r.Ex,{variant:"warning",size:"sm",icon:"warning",children:"No channel configured"})]})}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Delivery Channels"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Configure where alerts are sent. Fill one or more."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#5865F2]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#5865F2] text-lg",children:"chat"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Discord Webhook URL",type:"text",value:e?.webhookDiscordUrl||"",onChange:e=>p("webhookDiscordUrl",e.target.value),placeholder:"https://discord.com/api/webhooks/...",hint:"webhookDiscordUrl"===x?"✓ Saved":void 0})})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#0088cc]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#0088cc] text-lg",children:"send"})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-3",children:[(0,a.jsx)(r.pd,{label:"Telegram Bot Token",type:"password",value:e?.webhookTelegramToken||"",onChange:e=>p("webhookTelegramToken",e.target.value),placeholder:"123456:ABC-DEF...",hint:"webhookTelegramToken"===x?"✓ Saved":void 0}),(0,a.jsx)(r.pd,{label:"Telegram Chat ID",type:"text",value:e?.webhookTelegramChatId||"",onChange:e=>p("webhookTelegramChatId",e.target.value),placeholder:"Example -1001234567890",hint:"webhookTelegramChatId"===x?"✓ Saved":void 0})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"webhook"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Generic Webhook URL",type:"text",value:e?.webhookGenericUrl||"",onChange:e=>p("webhookGenericUrl",e.target.value),placeholder:"https://your-server.com/webhook",hint:"webhookGenericUrl"===x?"✓ Saved":void 0})})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Alert Events"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Choose which events trigger an alert."})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i.map(s=>{let t=e?.webhookAlertEvents?.[s.key]===!0;return(0,a.jsxs)("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2.5 transition-colors ${t?"border-primary/30 bg-primary/[0.03]":"border-border-subtle"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${t?"text-primary":"text-text-muted"}`,children:s.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:s.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.desc})]})]}),(0,a.jsx)(r.lM,{size:"sm",checked:t,onChange:e=>p("webhookAlertEvents",e,s.key)})]},s.key)})})]}),"sent"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-success/20 bg-success/[0.05] px-4 py-2.5 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Test alert sent! Check your configured channels."]}),"failed"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-danger/20 bg-danger/[0.05] px-4 py-2.5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),"Failed to send test alert. Check your channel URLs."]})]})]})}},20154:(e,s,t)=>{Promise.resolve().then(t.bind(t,2531))}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=20154)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3721],{2531:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var a=t(95155),l=t(12115),r=t(35497);let i=[{key:"providerDown",label:"Provider Down",desc:"Circuit breaker opens (provider repeatedly failing)",icon:"error"},{key:"rateLimited",label:"Rate Limited",desc:"Account hits 429/403 from upstream",icon:"block"},{key:"healthDegraded",label:"Health Degraded",desc:"Success rate drops below 70%",icon:"monitor_heart"},{key:"budgetExceeded",label:"Budget Exceeded",desc:"Usage quota reached",icon:"data_usage"}];function n(){let[e,s]=(0,l.useState)(null),[t,n]=(0,l.useState)(!0),[c,o]=(0,l.useState)(!1),[d,h]=(0,l.useState)(null),[x,m]=(0,l.useState)(null),u=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/settings",{cache:"no-store"});if(e.ok){let t=await e.json();s(t)}}catch{}n(!1)},[]);(0,l.useEffect)(()=>{u()},[u]),(0,l.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]);let b=(0,l.useRef)(null),p=(0,l.useCallback)(async(e,t,a)=>{s(s=>{let l=a?{...s,[e]:{...s?.[e]||{},[a]:t}}:{...s,[e]:t};return b.current&&clearTimeout(b.current),b.current=setTimeout(async()=>{try{let s=a?{[e]:{...l[e]||{},[a]:t}}:{[e]:t};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok&&(m(a||e),setTimeout(()=>m(null),1500))}catch{}},500),l})},[]),g=async()=>{o(!0),h(null);try{let e=await fetch("/api/alerts/test",{method:"POST"}),s=await e.json();h(s.success?"sent":"failed")}catch{h("failed")}o(!1),setTimeout(()=>h(null),5e3)};if(t)return(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-6 w-48 animate-pulse rounded bg-sidebar"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsx)("div",{className:"h-32 animate-pulse rounded bg-sidebar"})})]});let j=e?.webhookEnabled===!0,f=!!(e?.webhookDiscordUrl||e?.webhookTelegramToken||e?.webhookGenericUrl);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,a.jsx)(r.zY,{title:"Webhook Alerts",description:"Get notified via Discord, Telegram, or generic webhook when providers fail",icon:"notifications_active",actions:(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:c?"progress_activity":"send",onClick:g,disabled:c||!j||!f,children:c?"Sending...":"Send Test"})}),(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(r.lM,{checked:j,onChange:e=>p("webhookEnabled",e),label:"Enable Webhook Alerts"}),j&&(0,a.jsx)(r.Ex,{variant:"success",size:"sm",dot:!0,children:"Active"})]}),j&&!f&&(0,a.jsx)(r.Ex,{variant:"warning",size:"sm",icon:"warning",children:"No channel configured"})]})}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Delivery Channels"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Configure where alerts are sent. Fill one or more."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#5865F2]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#5865F2] text-lg",children:"chat"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Discord Webhook URL",type:"text",value:e?.webhookDiscordUrl||"",onChange:e=>p("webhookDiscordUrl",e.target.value),placeholder:"https://discord.com/api/webhooks/...",hint:"webhookDiscordUrl"===x?"✓ Saved":void 0})})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-[#0088cc]/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[#0088cc] text-lg",children:"send"})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-3",children:[(0,a.jsx)(r.pd,{label:"Telegram Bot Token",type:"password",value:e?.webhookTelegramToken||"",onChange:e=>p("webhookTelegramToken",e.target.value),placeholder:"123456:ABC-DEF...",hint:"webhookTelegramToken"===x?"✓ Saved":void 0}),(0,a.jsx)(r.pd,{label:"Telegram Chat ID",type:"text",value:e?.webhookTelegramChatId||"",onChange:e=>p("webhookTelegramChatId",e.target.value),placeholder:"Example -1001234567890",hint:"webhookTelegramChatId"===x?"✓ Saved":void 0})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-lg",children:"webhook"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(r.pd,{label:"Generic Webhook URL",type:"text",value:e?.webhookGenericUrl||"",onChange:e=>p("webhookGenericUrl",e.target.value),placeholder:"https://your-server.com/webhook",hint:"webhookGenericUrl"===x?"✓ Saved":void 0})})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Alert Events"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Choose which events trigger an alert."})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:i.map(s=>{let t=e?.webhookAlertEvents?.[s.key]===!0;return(0,a.jsxs)("div",{className:`flex items-center justify-between rounded-lg border px-3 py-2.5 transition-colors ${t?"border-primary/30 bg-primary/[0.03]":"border-border-subtle"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${t?"text-primary":"text-text-muted"}`,children:s.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:s.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:s.desc})]})]}),(0,a.jsx)(r.lM,{size:"sm",checked:t,onChange:e=>p("webhookAlertEvents",e,s.key)})]},s.key)})})]}),"sent"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-success/20 bg-success/[0.05] px-4 py-2.5 text-sm text-success",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Test alert sent! Check your configured channels."]}),"failed"===d&&(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-danger/20 bg-danger/[0.05] px-4 py-2.5 text-sm text-danger",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),"Failed to send test alert. Check your channel URLs."]})]})]})}},20154:(e,s,t)=>{Promise.resolve().then(t.bind(t,2531))}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=20154)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{86508:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var a=r(95155),s=r(12115),l=r(35497),i=r(28777),n=r(88105);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function x(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(x).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function p(e=""){let t=x(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function f(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function h(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,s.useState)([]),[r,g]=(0,s.useState)(!0),[b,v]=(0,s.useState)(""),[y,N]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[w,j]=(0,s.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(""),[D,T]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[O,$]=(0,s.useState)([]),[C,_]=(0,s.useState)(!1),[M,E]=(0,s.useState)(""),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(!1),[P,J]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),K=(0,s.useRef)(null),L=(0,s.useRef)(null),W=(0,s.useRef)(!1),H=(0,s.useRef)(null),Y=(0,s.useRef)(null),[G,Q]=(0,s.useState)(null),V=(0,s.useRef)(null),X=e=>{Q(e),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>Q(null),3e3)};(0,s.useEffect)(()=>{q(!0)},[]),(0,s.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),a=await r.json().catch(()=>({})),s=Array.isArray(a.connections)?a.connections.filter(e=>e?.isActive!==!1):[];if(0===s.length){e||(t([]),v("No providers connected yet."));return}let l=new Map;for(let e of s){let t=e.provider||e.id,r=h(e),a=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;l.has(t)||l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let o=(0,i.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:h(e),source:"static"}:null).filter(Boolean);s.models.push(...o)}for(let e of(await Promise.all(s.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let a=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:h(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:a}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=l.get(t);r&&r.models.push(...e.models)}let o=Array.from(l.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(x(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Z=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),ee=(0,s.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),et=(0,s.useMemo)(()=>{if(A&&Z.has(A))return Z.get(A);if(w){let e=y.find(e=>e.id===w);if(e?.modelId&&Z.has(e.modelId))return Z.get(e.modelId)}return ee?.models?.[0]||null},[A,Z,ee,y,w]),er=(0,s.useMemo)(()=>y.find(e=>e.id===w)||null,[y,w]),ea=er?.messages||[],es=(0,s.useMemo)(()=>[...y].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),el=!C&&!!et&&(D.trim().length>0||O.length>0);(0,s.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(y)),globalThis.localStorage.setItem(d,w),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D),G&&Q(null)}catch{try{globalThis.localStorage.setItem(o,JSON.stringify(y.map(e=>({...e,messages:(e.messages||[]).map(e=>Array.isArray(e.attachments)&&e.attachments.length>0?{...e,attachments:e.attachments.map(e=>({id:e.id,name:e.name,stripped:!0}))}:e)})))),globalThis.localStorage.setItem(d,w),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D),X("stripped")}catch{X("failed")}}},[z,y,w,S,D,G,X]),(0,s.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],a=A&&Z.has(A)?Z.get(A):t.models[0];if(y.length>0){let e=y.find(e=>e.id===w)||y[0],r=e?.modelId&&Z.has(e.modelId)?Z.get(e.modelId):a;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||a.id);return}let s={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([s]),j(s.id),I(t.providerId),k(a.id)},[z,r,e,Z,y,w,S,A]);let ei=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},en=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,eo=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await f(e)})));$(e=>[...e,...a]),e.target.value=""},ed=async()=>{let e=et||ee?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===O.length)return;let r=w,a=y.find(e=>e.id===r);if(!a){if(!(a=en(e)))return;r=a.id,N(e=>[a,...e]),j(r)}let s={id:u(),role:"user",content:t,attachments:O.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},l=u(),i={id:l,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,i];N(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?p(t):a.title}:a)),T(""),$([]),_(!0),E(l),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==l).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=x(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(e):e.content}));try{var d;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(x(e.error||e.message||`Request failed (${s.status})`))}let i=s.body?.getReader();if(!i){let e=await s.json().catch(()=>({})),t=x(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");ei(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await i.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(x).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),ei(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}ei(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=p(t),ei(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=x(e?.message||e);ei(r,e=>({...e,messages:e.messages.map(e=>e.id===l?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{_(!1),E(""),R(""),L.current=null}},ec=et?`${et.name}`:"Select model",em=et?et.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-bg text-text-main overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:H,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-left transition hover:bg-surface-3",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:ec}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-text-muted",children:em})]})}),P?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-border-subtle bg-surface shadow-2xl shadow-black/40",children:[(0,a.jsxs)("div",{className:"border-b border-border-subtle px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-text-main",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-border-subtle bg-surface-3 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.providerName}),(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=Z.get(e);if(!t)return;let r=y.find(e=>e.id===w);if(r&&r.messages.length>0){let e=en(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=en(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-text-subtle",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[G&&(0,a.jsx)("span",{role:"status","aria-live":"polite",className:`text-xs ${"failed"===G?"text-danger":"text-warning"}`,children:"stripped"===G?"Storage full — images removed to fit":"Chats not saved — storage full"}),(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-border-subtle bg-surface-2 px-4 py-3 text-sm text-text-main transition hover:bg-surface-3",children:"History"}),(0,a.jsx)(l.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!w)return;let e=y.filter(e=>e.id!==w),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!w||0===y.length,children:"Clear"})]})]}),B?(0,a.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-border-subtle bg-surface p-2 shadow-2xl shadow-black/40 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-text-subtle",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===es.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-border-subtle bg-surface-2 p-4 text-sm text-text-muted",children:"No conversations yet."}):es.map(e=>{let t=e.id===w,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-primary/40 bg-primary/15":"border-border-subtle bg-surface-2 hover:bg-surface-3"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-text-muted",children:x(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-subtle shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,b?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-danger/20 bg-danger/10 px-4 py-3 text-danger",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:b})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===ea.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-border-subtle bg-surface-2 text-text-main",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-text-main",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-text-muted",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:ea.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===M&&"streaming"===e.status,l=x(e.content)||(r?U:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-surface-2 px-5 py-3.5 text-text-main":"text-text-main"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":et?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-border-subtle bg-surface-3",children:(0,a.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[l,r&&s&&!U?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[O.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:O.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-main max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void $(e=>e.filter(e=>e.id!==t))},className:"text-text-muted hover:text-text-main","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-surface-2 px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-border-subtle",children:[(0,a.jsx)("textarea",{value:D,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),el&&ed())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-text-main outline-none placeholder:text-text-subtle custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!et||r,className:"p-2 text-text-muted hover:text-text-main transition rounded-full hover:bg-surface-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:eo}),(0,a.jsx)("span",{className:"text-xs font-medium text-text-subtle truncate max-w-[120px]",children:et?et.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[C?(0,a.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-text-main bg-surface-3 hover:bg-surface-3 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{onClick:ed,disabled:!el,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${el?"bg-primary text-white hover:opacity-90":"bg-surface-3 text-text-subtle cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-text-subtle",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=86508)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7083:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),c=a(3534),n=a(28777),d=a(64137);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"kimchi":return(0,s.jsx)(d.GX,{...o});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[27,5772,8105,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=7083)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7083:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),c=a(3534),n=a(28777),d=a(64137);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[m,h]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),m?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"kimchi":return(0,s.jsx)(d.GX,{...o});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[27,5772,2563,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=7083)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{47748:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(64137),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasExtremeRouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[c,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(r.zY,{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:g.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[27,5772,8105,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=47748)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{47748:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))},53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(64137),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasExtremeRouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[c,o]=(0,a.useState)({});if((0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,t.jsx)(r.zY,{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:d.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3",children:g.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[27,5772,2563,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=47748)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{22627:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>K});var s=a(95155),l=a(12115),r=a(73321),i=a(35497),n=a(11059);let o=/^[a-zA-Z0-9_.\-]+$/,d=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"},{value:"cascade",label:"Cascade",desc:"Escalate cheap→capable on low confidence",icon:"trending_up"},{value:"smart-routing",label:"Smart Routing",desc:"Auto-route by tool calls & research intent",icon:"alt_route"}],c={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"},cascade:{icon:"trending_up",color:"#06B6D4",badge:"cyan"},"smart-routing":{icon:"alt_route",color:"#EC4899",badge:"warning"}};function m(e){return c[e]||c.fallback}function x(e){let t=d.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"},{value:"cascade",label:"Cascade"},{value:"smart-routing",label:"Smart Routing"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function b({combos:e,comboStrategies:t,activeProviders:a,onViewCombos:l,onCreate:r}){let n=e.length,o=function(e){let t=new Set;for(let a of e)for(let e of a.models||[])t.add(e);return t.size}(e),d=function(e,t){let a={fallback:0,"round-robin":0,fusion:0,swarm:0,cascade:0,"smart-routing":0},s=new Set(["fallback","round-robin","fusion","swarm","cascade","smart-routing"]);for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback",r=s.has(e)?e:"fallback";a[r]=(a[r]||0)+1}return a}(e,t),c=Object.values(d).filter(e=>e>0).length,u=n>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/n*10)/10:0,p=Math.max(...Object.values(d),1);return(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:n,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:o,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:c,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,s.jsx)(i.Zp,{padding:"sm",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(d).map(([e,t])=>{let a=m(e),l=n>0?Math.round(t/n*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:a.color},children:a.icon}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,s.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:a.color}})}),(0,s.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",l,"%)"]})]},e)})})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,s.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:l,children:"View All"})]}),0===e.length?(0,s.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,s.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let l=t[e.name]?.fallbackStrategy||"fallback",r=m(l),n=(e.models||[]).filter(e=>{let t=e.split("/")[0];return a.some(e=>e.provider===t&&!1!==e.isActive)}).length,o=(e.models||[]).length,d=o>0?Math.round(n/o*100):0;return(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,s.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,s.jsx)(i.Ex,{variant:r.badge,size:"sm",children:x(l)}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[o," models"]})]})]}),(0,s.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,s.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,s.jsx)("div",{className:`h-1.5 rounded-full ${d>=80?"bg-success":d>=50?"bg-warning":"bg-danger"}`,style:{width:`${d}%`}})}),(0,s.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[n,"/",o]})]})]},e.id)})})]})]})}var h=a(88105);let g=new Set(["claude-adaptive","claude-budget","claude","extended","gemini-level","gemini-budget","qwen","hunyuan","minimax","zai"]),f=e=>!!e?.reasoning&&(!e?.thinkingFormat||g.has(e.thinkingFormat)),y=[{value:"auto",label:"Auto (provider default)"},{value:"off",label:"Off"},{value:"effort",label:"Effort (OpenAI-style)"},{value:"extended",label:"Extended (Claude-style)"}],v=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"max",label:"Max"}],j=[{key:"manager",label:"Manager",icon:"psychology"},{key:"staff",label:"Staff",icon:"badge"},{key:"audit",label:"Audit",icon:"fact_check"},{key:"worker",label:"Worker",icon:"group"}],N=[{key:"panel",label:"Panel",icon:"dashboard"},{key:"judge",label:"Judge",icon:"gavel"}],k=e=>"unlimited"===e||e===1/0||"Infinity"===e;function w(e){let t=(0,h.rs)(e),a=h.Q2[t]?.capabilities;return!a||!1!==a.toolUse&&!1!==a.fileAccess}function C(e){if(!e||"string"!=typeof e)return null;let t=e.indexOf("/");return t>=0?e.slice(0,t):e}function S(e,t){if(e){let t=C(e);return{blocked:!!t&&!w(t),provider:t}}let a=C(t&&t.length>0?t[0]:null);return{blocked:!!a&&!w(a),provider:a}}function M(e){return e.filter(e=>w(e.provider))}function $({combo:e,modelCaps:t={},activeProviders:a=[],copied:r,onCopy:n,onEdit:o,onDelete:c,strategy:u={},onSetStrategy:p}){let[b,h]=(0,l.useState)(!1),[g,w]=(0,l.useState)(!1),[C,F]=(0,l.useState)(null),E=Array.isArray(e?.models)?e.models:[],P=t[e.name]||null,A=u.fallbackStrategy||"fallback",R=u.judgeModel||"",O="fusion"===A,T="swarm"===A,z=u.managerModel||"",_=u.staffModel||"",D=u.auditModel||"",U=m(A),W=(e=>{let t=e?.budgets?.maxEstimatedCostUsd;if(k(t))return 1/0;let a=Number(t);return Number.isFinite(a)&&a>0?a:5})(u),B=k(u?.budgets?.maxEstimatedCostUsd),L=u?.budgets?.enabled===!0,q=L&&u?.budgets?.maxEstimatedCostUsd!=null&&!B&&Number(u.budgets.maxEstimatedCostUsd)>0,J=e=>{let t=Number(e);Number.isFinite(t)&&!(t<=0)&&p({budgets:{...u.budgets||{},enabled:!0,maxEstimatedCostUsd:t}})},I=u.thinking||{},H=I.type||"auto",V="auto"!==H&&"off"!==H,[Z,G]=(0,l.useState)([]),Q=e=>p({thinking:{...I,...e}}),K=(e,t)=>{let a={...I.roles||{}};null===t?delete a[e]:a[e]={...a[e]||{},...t},Q({roles:a})},{hasEffort:Y,hasExtended:X,hasMaxEffort:ee,unresolvableModels:et,unsupportedForCurrent:ea}=function(e,t=""){let a=e.some(e=>!!e.caps?.reasoning),s=e.some(e=>f(e.caps)),l=e.some(e=>!!e.caps?.thinkingMaxEffort);return{hasEffort:a,hasExtended:s,hasMaxEffort:l,unresolvableModels:e.filter(e=>!e.caps?.reasoning&&e.caps?.reasoning!==void 0),unsupportedForCurrent:"effort"===t?[]:"extended"===t?e.filter(e=>e.caps?.reasoning===!0&&!f(e.caps)):[]}}(E.map(e=>({model:e,caps:t[e]||{}})),H);return(0,s.jsxs)(i.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>h(!b),children:[(0,s.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${U.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:U.color},children:U.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,s.jsx)(i.Ex,{variant:U.badge,size:"sm",children:x(A)}),P&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",title:"Capabilities derived from member models",children:[(0,s.jsx)(i.nh,{caps:P,size:12,colorOverride:"text-text-muted"}),(0,s.jsx)("span",{className:"text-[9px] uppercase tracking-wide text-text-muted",children:"derived"})]}),V&&(0,s.jsxs)(i.Ex,{variant:"cyan",size:"sm",className:"flex items-center gap-0.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"psychology"}),"effort"===H?I.effort||"on":H]}),L&&(0,s.jsxs)(i.Ex,{variant:"warning",size:"sm",className:"flex items-center gap-0.5",title:`Max cost budget: $${W.toFixed(2)} per request`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"savings"}),"$",W.toFixed(2)]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[E.length," models"]})]}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===E.length?(0,s.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):E.slice(0,3).map((e,a)=>(0,s.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,s.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,s.jsx)(i.nh,{caps:t[e],size:11})]},a)),E.length>3&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",E.length-3," more"]})]})]}),(0,s.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${b?"rotate-180":""}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,s.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,s.jsx)(i.l6,{options:d,value:A,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,s.jsxs)("button",{onClick:t=>{t.stopPropagation(),n(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,s.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),b&&(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5 flex items-center gap-1.5",children:["Models (",E.length,")",P&&(0,s.jsx)(i.nh,{caps:P,size:11,colorOverride:"text-text-muted"})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:E.map((e,a)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:a+1}),(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,s.jsx)(i.nh,{caps:t[e],size:11})]},a))})]}),O&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(()=>{let{blocked:e,provider:t}=S(R,E);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{onClick:()=>w(!0),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-1 font-mono text-xs hover:bg-primary/5 ${e?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,s.jsx)("span",{className:"truncate",children:R||`Auto — ${E[0]||"first model"}`})]}),R&&(0,s.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),e&&(0,s.jsx)("p",{className:"text-[10px] text-red-500",children:R?"⚠ Web cookie providers cannot serve as Judge (no tool use / file access)":`⚠ Auto-fallback to "${t}" (first combo model) — web cookie cannot serve as Judge`})]})})()]}),T&&(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:z,placeholder:`Auto — ${E[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:_,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:D,placeholder:"Same as Staff"}].map(e=>{let{blocked:t,provider:a}=S(e.value,E);return(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,s.jsxs)("button",{onClick:()=>F(e.key),className:`inline-flex max-w-full items-center gap-1 rounded border border-dashed px-2 py-0.5 font-mono text-[11px] hover:bg-primary/5 ${t?"border-red-400 text-red-500 hover:border-red-500":"border-primary/40 text-primary hover:border-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,s.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,s.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),t&&(0,s.jsx)("p",{className:"text-[10px] text-red-500 pl-[76px]",children:e.value?`⚠ Web cookie providers cannot serve as ${e.label} (no tool use / file access)`:`⚠ Auto-fallback to "${a}" (first combo model) — web cookie cannot serve as ${e.label}`})]},e.key)}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"font-medium",children:"Workers"}),(0,s.jsxs)("span",{children:["= combo models (",E.length,")"]}),(0,s.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,s.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,s.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:u.autoScale?.enabled===!0,onChange:e=>p({autoScale:{...u.autoScale||{},enabled:e.target.checked}}),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Auto-scale"})]}),u.autoScale?.enabled&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Min:"}),(0,s.jsx)("input",{type:"number",min:1,max:u.autoScale?.maxWorkers||8,value:u.autoScale?.minWorkers??1,onChange:e=>p({autoScale:{...u.autoScale||{},minWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Max:"}),(0,s.jsx)("input",{type:"number",min:1,max:8,value:u.autoScale?.maxWorkers??E.length,onChange:e=>p({autoScale:{...u.autoScale||{},maxWorkers:Number(e.target.value)||1}}),className:"w-10 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono text-center focus:outline-none focus:border-primary"})]})]})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Thinking"}),(0,s.jsx)("button",{onClick:()=>G(Z.length>0?[]:(O?N:T?j:[]).map(e=>e.key)),className:"text-[10px] text-primary hover:underline",children:Z.length>0?"Hide roles":`Role overrides${V?" ("+Object.keys(I.roles||{}).length+")":""}`})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Mode:"}),(0,s.jsx)("select",{value:H,onChange:e=>Q({type:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:y.map(e=>{let t="auto"===e.value||"off"===e.value||"effort"===e.value&&Y||"extended"===e.value&&X;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),ea.length>0&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:[H," not supported by ",ea.map(e=>e.model.split("/").pop()).join(", ")]})]}),et.length>0&&"auto"!==H&&"off"!==H&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),(0,s.jsxs)("span",{className:"text-[10px]",children:["Thinking capability unknown for ",et.map(e=>e.model.split("/").pop()).join(", ")]})]}),"effort"===H&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Effort:"}),(0,s.jsx)("select",{value:I.effort||"high",onChange:e=>Q({effort:e.target.value}),className:"rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary",children:v.map(e=>{let t="max"!==e.value||ee;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})})]}),"extended"===H&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Budget:"}),(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:I.budgetTokens||4096,onChange:e=>Q({budgetTokens:Number(e.target.value)||4096}),className:"w-20 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono focus:outline-none focus:border-primary"})]})]}),Z.length>0&&V&&(0,s.jsxs)("div",{className:"mt-2 flex flex-col gap-1.5 pl-1",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Per-role overrides (leave as parent to inherit global)"}),(O?N:T?j:[]).map(e=>{let t,a=(t=e.key,I?.roles?.[t]);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px] text-text-muted",children:e.icon}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-text-muted w-12",children:e.label}),(0,s.jsxs)("select",{value:a?.type||"inherit",onChange:t=>K(e.key,"inherit"===t.target.value?null:{type:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"inherit",children:"Inherit"}),(0,s.jsx)("option",{value:"off",children:"Off"}),(0,s.jsxs)("option",{value:"effort",disabled:!Y,className:Y?"":"text-text-muted",children:["Effort",Y?"":" (not supported)"]}),(0,s.jsxs)("option",{value:"extended",disabled:!X,className:X?"":"text-text-muted",children:["Extended",X?"":" (not supported)"]})]}),a?.type==="effort"&&(0,s.jsx)("select",{value:a.effort||"high",onChange:t=>K(e.key,{type:"effort",effort:t.target.value}),className:"rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary",children:v.map(e=>{let t="max"!==e.value||ee;return(0,s.jsxs)("option",{value:e.value,disabled:!t,className:t?"":"text-text-muted",children:[e.label,t?"":" (not supported)"]},e.value)})}),a?.type==="extended"&&(0,s.jsx)("input",{type:"number",min:1024,max:128e3,step:1024,value:a.budgetTokens||4096,onChange:t=>K(e.key,{type:"extended",budgetTokens:Number(t.target.value)||4096}),className:"w-16 rounded border border-border bg-background px-1 py-0.5 text-[10px] font-mono focus:outline-none focus:border-primary"}),a&&(0,s.jsx)("button",{onClick:()=>K(e.key,null),className:"p-0.5 rounded text-text-muted hover:text-red-500",title:"Reset to inherit",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.key)})]})]}),(0,s.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,s.jsxs)("span",{className:"font-medium",children:[x(A),":"]})," ",d.find(e=>e.value===A)?.desc]}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-warning/20 bg-warning/[0.04] px-3 py-2",children:[(0,s.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:L,onChange:e=>{var t;return t=e.target.checked,void p({budgets:{...u.budgets||{},enabled:t}})},className:"rounded border accent-primary","aria-label":"Enable cost budget limit"}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-warning",children:"savings"}),(0,s.jsx)("span",{className:"text-[11px] font-semibold text-text-main",children:"Budget Limit"})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:L?"enabled":"off (no limit)"}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[12px] font-medium text-text-muted",children:"$"}),(0,s.jsx)("input",{type:"number",min:.01,step:.5,value:B?"":W,onChange:e=>J(e.target.value),disabled:!L||B,"aria-label":"Max cost budget in USD per request",className:"w-20 rounded border border-border bg-background px-1.5 py-0.5 text-[11px] font-mono text-right focus:outline-none focus:border-primary disabled:opacity-60"}),(0,s.jsx)("button",{type:"button",onClick:B?()=>J(5):()=>{p({budgets:{...u.budgets||{},enabled:!0,maxEstimatedCostUsd:"unlimited"}})},disabled:!L,className:`rounded border px-2 py-0.5 text-[11px] font-medium ${B?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:text-text-main"} disabled:opacity-40 disabled:cursor-not-allowed`,children:B?"Unlimited":"∞"})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"per request"}),(0,s.jsx)("span",{className:`text-[10px] ${q||B?"text-primary":"text-text-muted"}`,children:B?"Unlimited":q?`Custom $${Number(W).toFixed(2)}`:"Default $5.00"})]})]}),(0,s.jsx)(i.rq,{isOpen:g,onClose:()=>w(!1),onSelect:e=>{p({judgeModel:e?.value||""}),w(!1)},activeProviders:M(a),title:"Select Judge Model",addedModelValues:R?[R]:[],closeOnSelect:!0}),C&&(0,s.jsx)(i.rq,{isOpen:!0,onClose:()=>F(null),onSelect:e=>{p({[`${C}Model`]:e?.value||""}),F(null)},activeProviders:M(a),title:`Select ${"manager"===C?"Manager":"staff"===C?"Staff":"Audit"} Model`,addedModelValues:"manager"===C?z?[z]:[]:"staff"===C?_?[_]:[]:D?[D]:[],closeOnSelect:!0})]})}function F({combos:e,modelCaps:t,activeProviders:a,comboStrategies:r,copied:n,copy:o,onEdit:d,onDelete:c,onSetStrategy:m,onCreate:x}){let[b,h]=(0,l.useState)(""),[g,f]=(0,l.useState)("all"),[y,v]=(0,l.useState)("name"),j=(0,l.useMemo)(()=>{var t;let a;return t=function(e,t,a,s){let l=e;if("all"!==a&&(l=l.filter(e=>(s[e.name]?.fallbackStrategy||"fallback")===a)),t.trim()){let e=t.trim().toLowerCase();l=l.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return l}(e,b,g,r),a=[...t],"models-desc"===y?a.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===y?a.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):a.sort((e,t)=>e.name.localeCompare(t.name)),a},[e,b,g,y,r]);return 0===e.length?(0,s.jsx)(i.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(i.pd,{placeholder:"Search combos or models...",value:b,onChange:e=>h(e.target.value),className:"sm:max-w-xs"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,s.jsx)("button",{onClick:()=>f(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${g===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,s.jsx)("select",{value:y,onChange:e=>v(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:j.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${j.length} of ${e.length} combos`}),0===j.length?(0,s.jsx)(i.Zp,{children:(0,s.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',b,'" ',"all"!==g&&`with ${g} strategy`]})}):(0,s.jsx)("div",{className:"flex flex-col gap-3",children:j.map(e=>(0,s.jsx)($,{combo:e,modelCaps:t,activeProviders:a,copied:n,onCopy:o,onEdit:()=>d(e),onDelete:()=>c(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let E=[{id:"always-on",name:"Always-On (5-Layer Fallback)",description:"Zero-downtime coding with 5 layers of fallback. Mix of subscription, cheap, and free tiers — if any model fails, the next picks up automatically.",icon:"shield",category:"reliability",strategy:"fallback",models:["claude-opus-4-7","gpt-5.4","glm-5.1","MiniMax-M2.7","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax","claude-sonnet-4.5":"kr"}},{id:"max-reasoning-swarm",name:"Max Reasoning Swarm",description:"Deep multi-agent analysis for complex coding tasks. Manager decomposes the problem, workers solve subtasks in parallel, audit reviews the result. Manager thinks at max effort.",icon:"psychology",category:"reasoning",strategy:"swarm",models:["claude-opus-4-7","gpt-5.4","glm-5.1","claude-sonnet-4.5"],preferredProviders:{"claude-opus-4-7":"cc","gpt-5.4":"cx","glm-5.1":"glm","claude-sonnet-4.5":"kr"},strategyConfig:{fallbackStrategy:"swarm",managerModel:"claude-opus-4-7",auditModel:"claude-sonnet-4.5",thinking:{type:"effort",effort:"high",roles:{manager:{type:"effort",effort:"max"},worker:{type:"effort",effort:"medium"},audit:{type:"effort",effort:"high"}}},autoScale:{enabled:!0,minWorkers:2,maxWorkers:4}}},{id:"flash-fusion",name:"Flash Fusion",description:"Two fast models answer in parallel, a judge picks the best result. Low latency with a quality check — great for everyday coding questions.",icon:"bolt",category:"balanced",strategy:"fusion",models:["gpt-5.4","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"medium"}}},{id:"penny-pincher",name:"Penny-Pincher",description:"Ultra-low-cost daily driver built from cheap and free tiers. Thinking disabled to keep tokens minimal. Use for simple tasks where cost matters most.",icon:"savings",category:"budget",strategy:"fallback",models:["MiniMax-M2.7","glm-5.1","gpt-5.4"],preferredProviders:{"MiniMax-M2.7":"minimax","glm-5.1":"glm","gpt-5.4":"gh"},strategyConfig:{fallbackStrategy:"fallback",thinking:{type:"off"}}},{id:"ai-researcher",name:"AI Researcher",description:"Smart Routing research combo. Web (cookie) providers answer research tasks first; tool-capable API models handle anything that needs function calling. Auto-falls back if a web provider is blocked.",icon:"travel_explore",category:"research",strategy:"smart-routing",models:["deepseek-v4-flash","gpt-5-6-terra","gemini-3.6-flash","claude-sonnet-4.5","gpt-5.4","glm-5.2"],preferredProviders:{"deepseek-v4-flash":"felo","gpt-5-6-terra":"felo","gemini-3.6-flash":"felo","claude-sonnet-4.5":"kr","gpt-5.4":"cx","glm-5.2":"cl"},strategyConfig:{fallbackStrategy:"smart-routing",smartRouting:{cookiePoolEnabled:!0,intentDetection:{confidenceThreshold:.6,llmClassifierFallback:{enabled:!0,model:"kr/claude-haiku-4.5"}}}}},{id:"deep-research-web",name:"Deep Research Web",description:"Research-heavy smart routing. Maximizes the web (cookie) pool for deep research, with tool-capable models as fallback for verification and citations.",icon:"manage_search",category:"research",strategy:"smart-routing",models:["gpt-5-6-luna","claude-5-0-sonnet","kimi-k2-thinking","grok-4.6","claude-haiku-4.5","glm-5.2"],preferredProviders:{"gpt-5-6-luna":"felo","claude-5-0-sonnet":"felo","kimi-k2-thinking":"felo","grok-4.6":"felo","claude-haiku-4.5":"kr","glm-5.2":"cl"},strategyConfig:{fallbackStrategy:"smart-routing",smartRouting:{cookiePoolEnabled:!0,intentDetection:{confidenceThreshold:.6,llmClassifierFallback:{enabled:!0,model:"kr/claude-haiku-4.5"}}}}},{id:"bug-hunter",name:"Bug Hunter",description:"Three models independently diagnose the same bug, a strong judge picks the most likely root cause. High-precision debugging with thinking on.",icon:"bug_report",category:"debugging",strategy:"fusion",models:["gpt-5.4","glm-5.1","MiniMax-M2.7"],preferredProviders:{"gpt-5.4":"cx","glm-5.1":"glm","MiniMax-M2.7":"minimax"},strategyConfig:{fallbackStrategy:"fusion",thinking:{type:"effort",effort:"high"}}}],P=["managerModel","staffModel","auditModel","judgeModel"];function A({combos:e,connections:t,modelIndex:a={},onApply:r}){let[n,o]=(0,l.useState)(null),d=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),c=new Set((e||[]).map(e=>e.name)),u=e=>(function(e,{modelIndex:t={},connectedProviders:a=new Set}={}){return(e.models||[]).map(s=>{let l=s.indexOf("/"),r=l>0,i=r?s.slice(l+1):s,n=(r?s.slice(0,l):"")||(e.preferredProviders||{})[i]||"",o=n?(0,h.rs)(n):"",d=(t[i]||[]).map(e=>(0,h.rs)(e)).filter(e=>a.has(e));if(o&&d.includes(o)){let e=(0,h.wG)(o);return{ref:s,modelName:i,provider:o,providerAlias:e,full:`${e}/${i}`,available:!0}}if(d.length>0){let e=(0,h.wG)(d[0]);return{ref:s,modelName:i,provider:d[0],providerAlias:e,full:`${e}/${i}`,available:!0,resolvedFrom:n}}return{ref:s,modelName:i,provider:o||n,full:r?s:i,available:!1}})})(e,{modelIndex:a,connectedProviders:d}),p=async e=>{o(e.id);try{let t=u(e),a=t.filter(e=>e.available).map(e=>e.full);if(0===a.length)return void alert("No connected provider has any of this template's models.");let s=function(e,t){let a=e.strategyConfig?{...e.strategyConfig}:{fallbackStrategy:e.strategy},s=Object.fromEntries(t.filter(e=>e.available).map(e=>[e.modelName,e.full]));for(let e of P){let t=a[e];if(!t)continue;let l=t.indexOf("/"),r=l>0?t.slice(l+1):t;s[r]&&(a[e]=s[r])}return a}(e,t),l=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,models:a,kind:e.kind||"llm",strategyConfig:s})});if(!l.ok){let e=await l.json();alert(e.error||"Failed to create combo from template");return}let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e.name]:s}})});if(!i.ok){let e=await i.json().catch(()=>({}));alert(e.error||"Failed to apply template strategy");return}r&&r()}catch(e){alert("Failed to apply template: "+(e?.message||String(e)))}finally{o(null)}};return 0===E.length?(0,s.jsx)(i.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:E.map(e=>{let t=u(e),a=t.filter(e=>e.available).length,l=t.length,r=c.has(e.name),o=m(e.strategy),d=a===l;return(0,s.jsxs)(i.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${o.color}15`},children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:o.color},children:e.icon||o.icon})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,s.jsx)(i.Ex,{variant:o.badge,size:"sm",children:x(e.strategy)})]})]}),r&&(0,s.jsx)(i.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[t.slice(0,4).map((e,t)=>(0,s.jsxs)("code",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 font-mono text-[10px] ${e.available?"bg-black/5 text-text-muted dark:bg-white/5":"bg-red-500/10 text-red-500"}`,title:e.available?`Resolved to ${e.provider}`:`No connected provider has ${e.modelName}`,children:[(0,s.jsx)("span",{className:e.available?"text-success":"text-red-500",children:e.available?"✓":"✗"}),(0,s.jsx)("span",{className:"truncate max-w-[110px]",children:e.modelName}),e.available&&(0,s.jsx)("span",{className:"rounded bg-black/10 px-0.5 text-[9px] dark:bg-white/10",children:e.provider})]},t)),t.length>4&&(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",t.length-4," more"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let t=e.resolvedFrom?(0,h.rs)(e.resolvedFrom):"",a=e.available?`${e.provider}${e.resolvedFrom&&t!==e.provider?` (via ${e.resolvedFrom})`:""}`:`${e.provider||"?"} (missing)`,l=e.available;return(0,s.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${l?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:l?"check_circle":"radio_button_unchecked"}),a]},e.ref)})}),(0,s.jsx)("div",{className:"mt-auto pt-1",children:(0,s.jsx)(i.$n,{size:"sm",fullWidth:!0,variant:r?"secondary":"primary",icon:n===e.id?"progress_activity":"add",disabled:r||n===e.id||!d,onClick:()=>p(e),children:n===e.id?"Creating...":r?"Already Created":d?"Apply Template":`Missing ${l-a} model${l-a!=1?"s":""}`})})]},e.id)})})]})}var R=a(44923),O=a(87256),T=a(5020),z=a(39768);function _({id:e,index:t,model:a,isFirst:r,isLast:n,modelCaps:o,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:b,transform:h,isDragging:g}=(0,O.gl)({id:e}),f={transform:z.Ks.Transform.toString(h),opacity:g?.5:1,zIndex:g?999:void 0},[y,v]=(0,l.useState)(!1),[j,N]=(0,l.useState)(a),k=()=>{let e=j.trim();e&&e!==a?d(e):N(a),v(!1)};return(0,s.jsxs)("div",{ref:b,style:f,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${g?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,s.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,s.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,s.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,s.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),y?(0,s.jsx)("input",{autoFocus:!0,value:j,onChange:e=>N(e.target.value),onBlur:k,onKeyDown:e=>{"Enter"===e.key&&k(),"Escape"===e.key&&(N(a),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>v(!0),title:"Click to edit",children:[(0,s.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:a}),o?.[a]&&(0,s.jsx)(i.nh,{caps:o[a],size:11})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,s.jsx)("button",{onClick:c,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:m,disabled:n,className:`rounded p-1 transition-colors ${n?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}var D=a(92899),U=a(29366);let W=[500,1e3,2e3,5e3,1e4,25e3,5e4,1e5],B=e=>"number"==typeof e&&Number.isFinite(e)?`$${e.toFixed(3).replace(/\.?0+$/,"")}`:"—";function L({models:e=[],strategyConfig:t={},onStrategyChange:a}){let[r,i]=(0,l.useState)(1e3),[n,o]=(0,l.useState)(null),[d,c]=(0,l.useState)(!1),[m,u]=(0,l.useState)(""),p=(0,l.useRef)(0);t?.fallbackStrategy,(0,l.useEffect)(()=>{if(!Array.isArray(e)||0===e.length){o(null),u("");return}let a=++p.current;c(!0),u(""),(async()=>{try{let s=await fetch("/api/combos/simulate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:e,strategyConfig:t,inputTokens:r,includeLatency:!0})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(e?.error||"Simulation failed")}let l=await s.json();a===p.current&&o(l.simulation)}catch(e){a===p.current&&(u(e?.message||"Simulation failed"),o(null))}finally{a===p.current&&c(!1)}})()},[e,t,r]);let b=(e,t,a,l="")=>(0,s.jsxs)("div",{className:`rounded-lg border border-border-subtle bg-surface-2/50 px-2.5 py-2 ${l}`,children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-0.5 text-sm font-semibold text-text-main",children:t}),a?(0,s.jsx)("div",{className:"text-[10px] text-text-muted",children:a}):null]});return(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 p-3",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"query_stats"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Combo Simulator"}),d&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"simulating…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"assumed input"}),(0,s.jsx)("select",{value:r,onChange:e=>i(Number(e.target.value)),className:"rounded border border-border-subtle bg-surface-1 px-1.5 py-0.5 text-[10px] text-text-main",children:W.map(e=>(0,s.jsxs)("option",{value:e,children:[e>=1e3?`${e/1e3}k`:e," tok"]},e))})]})]}),n?(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-1.5 sm:grid-cols-4",children:[b("Strategy",x(n.strategy),`${n.members} member${1!==n.members?"s":""}`),b("Logical calls",n.calls.min===n.calls.max?`${n.calls.max}`:`${n.calls.min}–${n.calls.max}`,`per request \xb7 max ${n.calls.max}`),b("Provider fanout",String(n.maxProviderFanout),"parallel calls at peak"),b("Est. cost",n.calls.min===n.calls.max?B(n.estimatedCost.worst):`${B(n.estimatedCost.optimistic)}–${B(n.estimatedCost.worst)}`,`${B(n.perCallCost)} / call`)]}),n.budgetRisk?.rejected?(0,s.jsxs)("div",{className:"flex items-start gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-2.5 py-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-red-400",children:"error"}),(0,s.jsxs)("p",{className:"text-[11px] text-red-300",children:["Will be rejected at runtime: worst-case cost ",B(n.budgetRisk.estimatedCostUsd)," exceeds the budget limit ",B(n.budgetRisk.limit)," (combo_cost_budget_exceeded)."]})]}):n.budgetsEnabled?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-emerald-500/30 bg-emerald-500/10 px-2.5 py-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-emerald-400",children:"check_circle"}),(0,s.jsxs)("p",{className:"text-[11px] text-emerald-300",children:["Within the configured budget limit (",B(n.budgetRisk.limit),")."]})]}):(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Budgets are off — unlimited cost/calls allowed."}),n.roleViolations.length>0&&(0,s.jsxs)("div",{className:"flex items-start gap-1.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-2.5 py-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-amber-400",children:"warning"}),(0,s.jsx)("div",{className:"text-[11px] text-amber-300",children:n.roleViolations.map(e=>(0,s.jsx)("p",{children:e.reason},`${e.role}-${e.model}`))})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle bg-surface-1/60 px-2.5 py-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Capabilities"}),(0,s.jsx)(U.default,{caps:{thinking:n.capabilities?.thinking,vision:n.capabilities?.vision?.input,tools:n.capabilities?.tools,pdf:n.capabilities?.pdf,audio:n.capabilities?.audio?.input},size:13}),n.capabilities?.contextWindow?(0,s.jsxs)("span",{className:"ml-auto text-[10px] text-text-muted",children:["ctx ",(n.capabilities.contextWindow/1e3).toFixed(0),"k \xb7 max out"," ",n.capabilities.maxOutput?`${Math.round(n.capabilities.maxOutput/1e3)}k`:"—"]}):null]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:n.memberRows.map(e=>{let t=(0,D.vT)(e.latency?.p95,e.latency?.sampleCount);return(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border-subtle bg-surface-1/40 px-2 py-1.5",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-text-main",children:e.fullModel}),e.roles.length>0&&(0,s.jsx)("span",{className:"rounded bg-primary/15 px-1 py-0.5 text-[9px] font-medium uppercase tracking-wide text-primary",children:e.roles.join("+")}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[B(e.costPerCall),"/call"]}),(0,s.jsx)("span",{className:`w-24 text-right text-[10px] ${t.insufficient?"text-amber-400":"text-text-muted"}`,title:t.insufficient?`${e.latency?.sampleCount??0} latency samples — need ≥ 10`:"",children:t.value})]},e.fullModel)})}),(0,s.jsx)("p",{className:"text-[9px] leading-relaxed text-text-muted",children:"Worst-case calls match the runtime call-cap budget; cost uses the same per-leaf formula as the runtime budget guard (output capped at 4k tokens/call, input assumed above). Latency = p95 over the last 30d of usage for that model."})]}):(0,s.jsx)("p",{className:"py-2 text-center text-[11px] text-text-muted",children:m||"Add at least one model to preview the simulation."})]})}function q({isOpen:e,combo:t,onClose:a,onSave:r,activeProviders:n,modelCaps:c={},kindFilter:x=null,comboStrategies:u={}}){let p=e=>e&&u?.[e.name]?.fallbackStrategy||e?.strategyConfig?.fallbackStrategy||"fallback",[b,h]=(0,l.useState)(t?.name||""),[g,f]=(0,l.useState)(t?.models||[]),[y,v]=(0,l.useState)(p(t)),[j,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(""),[M,$]=(0,l.useState)({}),[F,E]=(0,l.useState)(!0),[P,A]=(0,l.useState)(!0),[z,D]=(0,l.useState)(60),[U,W]=(0,l.useState)(""),[B,J]=(0,l.useState)(!1),[I,H]=(0,l.useState)(""),[V,Z]=(0,l.useState)(e);(0,l.useEffect)(()=>{if(e&&!V){h(t?.name||""),f(Array.isArray(t?.models)?[...t.models]:[]),v(p(t)),S(""),N(!1);let e=t&&u?.[t.name]?.smartRouting||t?.strategyConfig?.smartRouting||{};E(!1!==e.cookiePoolEnabled),A(e.intentDetection?.urlPatternBoost!==!1),D(Math.round((e.intentDetection?.confidenceThreshold??.6)*100)),W((e.intentDetection?.keywords||[]).join(", ")),J(e.intentDetection?.llmClassifierFallback?.enabled===!0),H(e.intentDetection?.llmClassifierFallback?.model||"")}Z(e)},[e,V,t]);let G=(0,R.FR)((0,R.MS)(R.AN,{activationConstraint:{distance:5}}),(0,R.MS)(R.uN,{coordinateGetter:O.JR})),Q=g.map((e,t)=>({uid:`item-${t}`,model:e}));(0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let e=await fetch("/api/models/alias");if(!t&&e.ok){let t=await e.json();$(t.aliases||{})}}catch{}})(),()=>{t=!0}},[e]);let K=e=>e.trim()?o.test(e)?(S(""),!0):(S("Only letters, numbers, -, _ and . allowed"),!1):(S("Name is required"),!1),Y=async()=>{if(!K(b))return;w(!0);let e={...t?.strategyConfig||{},fallbackStrategy:y};"smart-routing"===y&&(e.smartRouting={cookiePoolEnabled:F,intentDetection:{confidenceThreshold:z/100,urlPatternBoost:P,...U.trim()?{keywords:U.split(",").map(e=>e.trim()).filter(Boolean)}:{},llmClassifierFallback:{enabled:B,...I.trim()?{model:I.trim()}:{}}}}),await r({name:b.trim(),models:g,strategyConfig:e}),w(!1)},X=!!t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.aF,{isOpen:e,onClose:a,title:X?"Edit Combo":"Create Combo",size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:b,onChange:e=>{let t=e.target.value;h(t),t?K(t):S("")},placeholder:"my-combo",error:C}),(0,s.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),b.trim()&&(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:b.trim()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),g.length>0&&(0,s.jsxs)(i.Ex,{variant:"info",size:"sm",children:[g.length," model",1!==g.length?"s":""]})]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===g.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,s.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>N(!0),children:"Add First Model"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(R.Mp,{sensors:G,collisionDetection:R.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=Q.findIndex(e=>e.uid===t.id),s=Q.findIndex(e=>e.uid===a.id);-1!==e&&-1!==s&&f(t=>(0,O.be)(t,e,s))}},modifiers:[T.FN,T.gj],children:(0,s.jsx)(O.gB,{items:Q.map(e=>e.uid),strategy:O._G,children:(0,s.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:Q.map(({uid:e,model:t},a)=>(0,s.jsx)(_,{id:e,index:a,model:t,modelCaps:c,isFirst:0===a,isLast:a===Q.length-1,onEdit:e=>{let t=[...g];t[a]=e,f(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...g];[t[e-1],t[e]]=[t[e],t[e-1]],f(t)})(a),onMoveDown:()=>(e=>{if(e===g.length-1)return;let t=[...g];[t[e],t[e+1]]=[t[e+1],t[e]],f(t)})(a),onRemove:()=>{f(e=>e.filter((e,t)=>t!==a))}},e))})})}),(0,s.jsxs)("button",{onClick:()=>N(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Strategy"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"How the combo dispatches requests"})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-1.5 sm:grid-cols-3 lg:grid-cols-6",children:d.map(e=>{let t=y===e.value,a=m(e.value);return(0,s.jsxs)("button",{type:"button",onClick:()=>v(e.value),title:e.desc,className:`flex flex-col items-center gap-1 rounded-lg border px-2 py-1.5 text-[11px] transition-colors ${t?"border-primary/50 bg-primary/10 text-primary":"border-border-subtle bg-surface-2/50 text-text-muted hover:border-border hover:text-text-main"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:t?void 0:a.color},children:e.icon}),(0,s.jsx)("span",{className:"font-medium",children:e.label})]},e.value)})})]}),"smart-routing"===y&&(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 rounded-lg border border-primary/20 bg-primary/[0.04] px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:"#EC4899"},children:"alt_route"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Smart Routing"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"Routes each request by tool-calling need & research intent"})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:F,onChange:e=>E(e.target.checked),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:"Route research intents to web (cookie) providers first"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Research keywords (comma-separated — leave empty for defaults)"}),(0,s.jsx)("textarea",{value:U,onChange:e=>W(e.target.value),rows:2,placeholder:"research, compare, bandingkan, cari sumber, jurnal, ...",className:"resize-none rounded border border-border bg-background px-2 py-1.5 font-mono text-[11px] focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:P,onChange:e=>A(e.target.checked),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:"Treat prompts containing a URL as research"})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:B,onChange:e=>J(e.target.checked),className:"rounded border-border accent-primary"}),(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:"LLM classifier fallback for ambiguous prompts"})]}),B&&(0,s.jsx)("input",{value:I,onChange:e=>H(e.target.value),placeholder:"kr/claude-haiku-4.5",className:"rounded border border-border bg-background px-2 py-1 font-mono text-[11px] focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:"Heuristic confidence threshold"}),(0,s.jsxs)("span",{className:"font-mono text-[10px] text-primary",children:[z,"%"]})]}),(0,s.jsx)("input",{type:"range",min:0,max:100,value:z,onChange:e=>D(Number(e.target.value)),className:"w-full accent-primary"})]})]}),g.length>0&&(0,s.jsx)(L,{models:g,strategyConfig:{fallbackStrategy:y}}),g.length>=2&&(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:d.map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,s.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,s.jsx)(i.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(i.$n,{onClick:Y,fullWidth:!0,size:"sm",icon:X?"save":"add",disabled:!b.trim()||!!C||k,children:k?"Saving...":X?"Save Changes":"Create Combo"})]})]})}),(0,s.jsx)(i.rq,{isOpen:j,onClose:()=>N(!1),onSelect:e=>{f(t=>t.includes(e.value)?t:[...t,e.value])},onDeselect:e=>{f(t=>t.filter(t=>t!==e.value))},activeProviders:n,modelAliases:M,title:"Add Model to Combo",kindFilter:x,addedModelValues:g,closeOnSelect:!1})]})}var J=a(72908);let I=[500,1e3,2e3,5e3,1e4,25e3,5e4,1e5],H=d.map(e=>e.value),V={latency:"Latency",cost:"Cost",reliability:"Reliability"};function Z({activeProviders:e=[]}){let t,[a,r]=(0,l.useState)([]),[i,n]=(0,l.useState)(""),[o,c]=(0,l.useState)(1e3),[u,p]=(0,l.useState)({latency:40,cost:40,reliability:20}),[b,h]=(0,l.useState)([...H]),[g,f]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),[j,N]=(0,l.useState)(""),[k,w]=(0,l.useState)([]),[C,S]=(0,l.useState)(!1),[M,$]=(0,l.useState)({}),F=(0,l.useRef)(0);(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/models");if(!e&&t.ok){let e=await t.json();w([...new Set((e.models||[]).map(e=>e.fullModel).filter(Boolean))].sort())}}catch{}})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{let e=!1;return fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(t=>{!e&&t&&$(t.aliases||{})}).catch(()=>{}),()=>{e=!0}},[]);let E=e=>{r(e),n(e.join(", "))};(0,l.useEffect)(()=>{if(0===a.length){f(null),N("");return}if(b.length<1)return;let e=++F.current;v(!0),N("");let t=setTimeout(async()=>{try{let t,s,l=await fetch("/api/combos/lab",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:a,inputTokens:o,weights:(s=(t={latency:u.latency,cost:u.cost,reliability:u.reliability}).latency+t.cost+t.reliability)<=0?{latency:.4,cost:.4,reliability:.2}:{latency:t.latency/s,cost:t.cost/s,reliability:t.reliability/s},strategies:b})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error||"Analysis failed")}let r=await l.json();e===F.current&&f(r)}catch(t){e===F.current&&(N(t?.message||"Analysis failed"),f(null))}finally{e===F.current&&v(!1)}},350);return()=>clearTimeout(t)},[a.join("|"),o,u.latency,u.cost,u.reliability,b.join("|")]);let P=g?.comparison||[],A=Math.max(...P.map(e=>e.score||0),1e-9),R=g?.dataCoverage;return(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 p-3",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"science"}),(0,s.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Combo Lab — what-if analysis"}),y&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"analyzing…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"assumed input"}),(0,s.jsx)("select",{value:o,onChange:e=>c(Number(e.target.value)),className:"rounded border border-border-subtle bg-surface-1 px-1.5 py-0.5 text-[10px] text-text-main",children:I.map(e=>(0,s.jsxs)("option",{value:e,children:[e>=1e3?`${e/1e3}k`:e," tok"]},e))})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsxs)("div",{className:"flex items-stretch gap-1.5",children:[(0,s.jsx)("input",{list:"combo-lab-models",value:i,onChange:e=>{var t;n(t=e.target.value),r([...new Set(t.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean))])},placeholder:"provider/model, provider/model — e.g. cc/claude-opus-4-7, gh/gpt-5.3-codex",className:"min-w-0 flex-1 rounded-lg border border-border-subtle bg-surface-1 px-2.5 py-1.5 font-mono text-[11px] text-text-main placeholder:text-text-muted/60 focus:border-primary/50 focus:outline-none"}),(0,s.jsxs)("button",{type:"button",onClick:()=>S(!0),className:"flex shrink-0 items-center gap-1 rounded-lg border border-dashed border-border px-2.5 py-1.5 text-[11px] font-medium text-primary transition-colors hover:border-primary/50 hover:bg-primary/5",title:"Pick models from the provider catalog (same picker as Add Model in combos)",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),(0,s.jsx)("datalist",{id:"combo-lab-models",children:k.map(e=>(0,s.jsx)("option",{value:e},e))}),a.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>(0,s.jsxs)("span",{className:"flex items-center gap-1 rounded bg-surface-1 px-1.5 py-0.5 font-mono text-[10px] text-text-main",children:[e,(0,s.jsx)("button",{onClick:()=>{E(a.filter(t=>t!==e))},className:"text-text-muted hover:text-red-400",title:"Remove",children:"\xd7"})]},e))})]}),(0,s.jsxs)("div",{className:"mt-2.5 flex flex-col gap-2.5 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Axis weights"}),["latency","cost","reliability"].map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,s.jsx)("span",{className:"w-16",children:V[e]}),(0,s.jsx)("input",{type:"range",min:0,max:100,step:5,value:u[e],onChange:t=>p(a=>({...a,[e]:Number(t.target.value)})),className:"h-1 w-32 accent-primary"}),(0,s.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-main",children:[u[e],"%"]})]},e))]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Compare strategies"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:d.map(e=>{let t=b.includes(e.value),a=m(e.value);return(0,s.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.value,void h(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},title:e.desc,className:`flex items-center gap-1 rounded-md border px-1.5 py-1 text-[10px] transition-colors ${t?"border-primary/40 bg-primary/10 text-text-main":"border-border-subtle bg-surface-1 text-text-muted/60 hover:text-text-muted"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",style:{color:t?void 0:a.color},children:e.icon}),e.label]},e.value)})})]})]})]}),0===a.length?(0,s.jsx)("p",{className:"rounded-lg border border-border-subtle bg-surface-2/50 p-4 text-center text-[11px] text-text-muted",children:"Enter at least one model (provider/model) to compare strategies against historical latency, cost and reliability."}):j?(0,s.jsx)("p",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-[11px] text-red-300",children:j}):g?(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[g.recommendation&&(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-emerald-500/30 bg-emerald-500/10 px-3 py-2.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-emerald-400",children:"recommend"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-main",children:["Recommended: ",x(g.recommendation.strategy)]}),(t=m(g.recommendation.strategy),(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:t.color},children:t.icon}))]}),(0,s.jsx)("p",{className:"text-[11px] text-emerald-200/80",children:g.recommendation.reason}),g.recommendation.runnerUp&&(0,s.jsxs)("p",{className:"text-[10px] text-text-muted",children:["Runner-up: ",x(g.recommendation.runnerUp.strategy)," (score ",(100*g.recommendation.runnerUp.score).toFixed(0),")"]})]})]}),g.atRiskProviders?.length>0&&(0,s.jsxs)("div",{className:"flex items-start gap-1.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-2.5 py-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-amber-400",children:"warning"}),(0,s.jsxs)("p",{className:"text-[11px] text-amber-300",children:["Provider",g.atRiskProviders.length>1?"s":""," currently locked or breaker-open:"," ",g.atRiskProviders.join(", ")," — expect failures on those members right now."]})]}),R&&(0,s.jsxs)("p",{className:"text-[10px] text-text-muted",children:["Data coverage: latency ",R.latency.known,"/",R.latency.total," \xb7 reliability ",R.reliability.known,"/",R.reliability.total," \xb7 pricing"," ",R.cost.known,"/",R.cost.total," member",1!==R.cost.total?"s":""," (30d usage history).",R.reliability.known<R.reliability.total&&" Members without history are assumed 90% reliable."]}),(0,s.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle bg-surface-2/50",children:(0,s.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b border-border-subtle text-[9px] uppercase tracking-wide text-text-muted",children:[(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"#"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Strategy"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Score"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Calls (typ)"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Latency p95"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Cost / req"}),(0,s.jsx)("th",{className:"px-2.5 py-1.5 font-medium",children:"Reliability"})]})}),(0,s.jsx)("tbody",{children:P.map((e,t)=>{let a,l,r,i=m(e.strategy);(0,D.vT)(e.wallClockP95Ms,null);let n=g.recommendation&&e.strategy===g.recommendation.strategy;return(0,s.jsxs)("tr",{className:`border-b border-border-subtle/50 last:border-0 ${n?"bg-emerald-500/5":""}`,children:[(0,s.jsx)("td",{className:"px-2.5 py-1.5 text-[11px] text-text-muted",children:t+1}),(0,s.jsx)("td",{className:"px-2.5 py-1.5",children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:i.color},children:i.icon}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-text-main",children:x(e.strategy)}),n&&(0,s.jsx)("span",{className:"rounded bg-emerald-500/20 px-1 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-emerald-400",children:"Best"}),e.invalid&&(0,s.jsx)("span",{className:"rounded bg-red-500/20 px-1 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-red-400",title:e.invalidReasons.join(" \xb7 "),children:"Invalid"})]})}),(0,s.jsx)("td",{className:"px-2.5 py-1.5",children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("div",{className:"h-1.5 w-16 overflow-hidden rounded bg-surface-1",children:(0,s.jsx)("div",{className:"h-full rounded bg-primary",style:{width:`${Math.round(e.score/A*100)}%`}})}),(0,s.jsx)("span",{className:"text-[10px] font-mono text-text-main",children:null!=e.score?e.score.toFixed(2):"—"})]})}),(0,s.jsxs)("td",{className:"px-2.5 py-1.5 text-[11px] text-text-muted",children:["number"==typeof(a=e.expectedCalls)&&Number.isFinite(a)?Number.isInteger(a)?String(a):a.toFixed(1):"—",e.calls&&e.calls.min!==e.calls.max&&(0,s.jsxs)("span",{className:"text-[9px] text-text-muted/70",children:[" (",e.calls.min,"–",e.calls.max,")"]})]}),(0,s.jsx)("td",{className:"px-2.5 py-1.5 text-[11px] text-text-main",title:null!=e.wallClockP95Ms?`${e.wallClockP95Ms}ms`:"",children:null!=e.wallClockP95Ms?(0,D.Se)(e.wallClockP95Ms):"—"}),(0,s.jsx)("td",{className:"px-2.5 py-1.5 text-[11px] text-text-main",children:"number"==typeof(l=e.expectedCostUsd)&&Number.isFinite(l)?`$${l.toFixed(4).replace(/\.?0+$/,"")}`:"—"}),(0,s.jsx)("td",{className:"px-2.5 py-1.5 text-[11px] text-text-main",children:"number"==typeof(r=e.reliability)&&Number.isFinite(r)?`${(100*r).toFixed(1)}%`:"—"})]},e.strategy)})})]})}),(0,s.jsxs)("p",{className:"text-[9px] leading-relaxed text-text-muted",children:["Expected = typical request (midpoint of the runtime call range). Cost uses the same per-leaf formula as the runtime budget guard (output capped 4k tokens/call, input assumed ",o,"). Latency = expected wall-clock p95 including parallel fanout (fusion panel, swarm workers). Reliability = success rate from 30d usage history per model. Axis scores are normalized relative to the best strategy; weights renormalize over axes with data."]})]}):(0,s.jsx)("p",{className:"rounded-lg border border-border-subtle bg-surface-2/50 p-4 text-center text-[11px] text-text-muted",children:"Analyzing…"}),(0,s.jsx)(J.default,{isOpen:C,onClose:()=>S(!1),onSelect:e=>{let t=e?.value;!t||a.includes(t)||E([...a,t])},onDeselect:e=>{let t=e?.value;t&&E(a.filter(e=>e!==t))},activeProviders:e,modelAliases:M,addedModelValues:a,closeOnSelect:!1,title:"Add Model to Combo Lab"})]})}let G=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"},{value:"lab",label:"Lab"}];function Q(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[a,o]=(0,l.useState)([]),[d,c]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!1),[u,p]=(0,l.useState)(null),[h,g]=(0,l.useState)([]),[f,y]=(0,l.useState)({}),[v,j]=(0,l.useState)({}),[N,k]=(0,l.useState)({}),[w,C]=(0,l.useState)(null),{copied:S,copy:M}=(0,n.C)(),$=(0,l.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),l=await e.json(),r=await t.json(),i=a.ok?await a.json():{};if(e.ok&&o((l.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&g(r.connections||[]),s.ok){let e=await s.json(),t={},a={};for(let s of e.models||[]){s.caps&&(t[s.fullModel]=s.caps);let e=(s.fullModel||"").split("/").slice(1).join("/");e&&s.provider&&(a[e]||(a[e]=[]),a[e].includes(s.provider)||a[e].push(s.provider))}j(t),k(a)}y(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{c(!1)}},[]);(0,l.useEffect)(()=>{$()},[$]);let E=t=>e.push(`/dashboard/combos?tab=${t}`),P=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await $(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},R=async(e,t)=>{try{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok){let e=t.strategyConfig?.fallbackStrategy,a=u?.name,s=t.name?.trim();e&&(s&&s!==a&&f[a]&&await O(a,{fallbackStrategy:"fallback"}),s&&await O(s,{fallbackStrategy:e})),await $(),p(null)}else{let e=await a.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},O=async(e,t)=>{try{let s=f[e]||{},l={...s,...t},r=l.fallbackStrategy,i=new Set(["fallbackStrategy","thinking","autoScale","budgets",...{fusion:["judgeModel","fusionTuning"],swarm:["managerModel","staffModel","auditModel","workerCount","swarmTuning","enableTelemetry"],cascade:["cascade"],"smart-routing":["smartRouting"],fallback:[],"round-robin":[]}[r]||[]]),n={};for(let[e,t]of Object.entries(l))i.has(e)&&(n[e]=t);let o=Object.keys(s).some(e=>"fallbackStrategy"!==e&&null!=s[e]&&""!==s[e]),d=Object.keys(n).some(e=>"fallbackStrategy"!==e),c="fallback"===n.fallbackStrategy&&o&&!d;if(!c&&("swarm"===n.fallbackStrategy||"fusion"===n.fallbackStrategy)){let t=a.find(t=>t.name===e),s=t?.models||[];try{let e=await fetch("/api/combos/validate-roles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:n.fallbackStrategy,managerModel:n.managerModel,staffModel:n.staffModel,auditModel:n.auditModel,judgeModel:n.judgeModel,panel:s})});if(e.ok){let t=await e.json();if(!t.valid&&Array.isArray(t.violations)&&t.violations.length>0){let e=t.violations.map(e=>`${e.role}: ${e.reason}`).join("\n");alert(`Cannot save strategy — invalid role models:
2
+
3
+ ${e}`);return}}}catch{}}await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e]:c?null:n}})}),y(t=>{let a={...t};return c?delete a[e]:a[e]=n,a})}catch(e){console.log("Error updating combo strategy:",e)}};return d?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.Qv,{}),(0,s.jsx)(i.Qv,{})]}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,s.jsx)(i.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,s.jsx)(i.Iz,{options:G,value:t,onChange:E}),"overview"===t&&(0,s.jsx)(b,{combos:a,comboStrategies:f,activeProviders:h,onViewCombos:()=>E("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,s.jsx)(F,{combos:a,modelCaps:v,activeProviders:h,comboStrategies:f,copied:S,copy:M,onEdit:p,onDelete:e=>{C({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{C(null);try{let t=await fetch(`/api/combos/${e}`,{method:"DELETE"});if(t.ok)o(t=>t.filter(t=>t.id!==e));else{let e=await t.json().catch(()=>({}));alert(e.error||`Failed to delete combo (${t.status})`)}}catch(e){console.log("Error deleting combo:",e),alert("Failed to delete combo — network error")}}})},onSetStrategy:O,onCreate:()=>x(!0)}),"templates"===t&&(0,s.jsx)(A,{combos:a,connections:h,modelIndex:N,onApply:$}),"lab"===t&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-[11px] text-text-muted",children:"What-if engine — compare routing strategies side-by-side using your historical latency, cost and reliability data, then apply the recommended strategy to any combo."}),(0,s.jsx)(Z,{activeProviders:h})]}),(0,s.jsx)(q,{isOpen:m,onClose:()=>x(!1),onSave:P,activeProviders:h,modelCaps:v},"create"),(0,s.jsx)(q,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>R(u.id,e),activeProviders:h,modelCaps:v,comboStrategies:f},u?.id||"new"),(0,s.jsx)(i.uo,{isOpen:!!w,onClose:()=>C(null),onConfirm:w?.onConfirm,title:w?.title||"Confirm",message:w?.message,variant:"danger"})]})}function K(){return(0,s.jsx)(l.Suspense,{fallback:(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,s.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,s.jsx)(Q,{})})}},57410:(e,t,a)=>{Promise.resolve().then(a.bind(a,22627))},92899:(e,t,a)=>{"use strict";a.d(t,{Se:()=>r,Uk:()=>l,uv:()=>s,vT:()=>i});let s=10;function l(e){return null==e||e>=s}function r(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function i(e,t){return null==e?{value:"—",insufficient:!1}:l(t)?{value:r(e),insufficient:!1}:{value:"insufficient data",insufficient:!0}}}},e=>{e.O(0,[27,7055,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=57410)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{237:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))},44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>w});var r=l(95155),s=l(12115),n=l(35497),a=l(90620),o=l(31474);let i=["error","warn","info","debug","log"],c={error:{label:"ERROR",text:"text-red-400",chip:"bg-red-500/15 text-red-400 border-red-500/30"},warn:{label:"WARN",text:"text-yellow-300",chip:"bg-yellow-500/15 text-yellow-300 border-yellow-500/30"},info:{label:"INFO",text:"text-sky-400",chip:"bg-sky-500/15 text-sky-400 border-sky-500/30"},debug:{label:"DEBUG",text:"text-purple-400",chip:"bg-purple-500/15 text-purple-400 border-purple-500/30"},log:{label:"LOG",text:"text-emerald-400",chip:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"}},d=["text-cyan-300","text-amber-300","text-fuchsia-300","text-lime-300","text-orange-300","text-teal-300"],x=/\x1b\[[0-9;]*[A-Za-z]/g,u=new Set(["LOG","INFO","WARN","ERROR","DEBUG","TRACE","FATAL"]),p=/^\[(\d{1,2}:\d{2}:\d{2})\]\s*/;function m(e){let t=e.indexOf("[");if(-1===t||t>6)return null;let l=e.slice(0,t);if(/[A-Za-z0-9]/.test(l))return null;let r=e.indexOf("]",t);if(-1===r)return null;let s=e.slice(t+1,r);return!s||s.length>32?null:{token:s,rest:e.slice(r+1).replace(/^\s+/,""),prefix:l}}function h(e){let t=String(e).replace(x,""),l=t,r=null,s=l.match(p);s&&(r=s[1],l=l.slice(s[0].length));let n="log",a=null,o=m(l);if(o){let e=o.token.toUpperCase();if(u.has(e)){n="FATAL"===e?"error":"TRACE"===e?"debug":e.toLowerCase();let t=m(l=(o.prefix||"")+o.rest);t&&!/^\d/.test(t.token)&&(a=t.token,l=(t.prefix||"")+t.rest)}else/^\d/.test(o.token)||(a=o.token,l=(o.prefix||"")+o.rest)}return"log"===n&&(l.includes("❌")||/^Error[:\s]/.test(l)||/\bError\b:\s/.test(l))&&(n="error"),{ts:r,level:n,tag:a,text:l.trimEnd(),raw:t}}function b({level:e,count:t,active:l,onToggle:s}){let n=c[e];return(0,r.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,o.cn)("flex items-center gap-1.5 rounded-md border px-2 py-1 text-[10px] font-semibold tracking-wide transition-colors",l?n.chip:"border-white/10 bg-white/[0.03] text-zinc-500 hover:text-zinc-300"),title:l?`Hide ${n.label}`:`Show ${n.label}`,children:[n.label,(0,r.jsx)("span",{className:(0,o.cn)("rounded-sm px-1",l?"bg-white/10":"bg-white/5"),children:t})]})}function g({text:e,query:t}){if(!t)return e;let l=e.toLowerCase(),s=t.toLowerCase(),n=[],a=0,o=l.indexOf(s);for(;-1!==o;)o>a&&n.push(e.slice(a,o)),n.push((0,r.jsx)("mark",{className:"rounded-sm bg-yellow-400/30 px-0.5 text-yellow-100",children:e.slice(o,o+s.length)},o)),a=o+s.length,o=l.indexOf(s,a);return a<e.length&&n.push(e.slice(a)),n}function f({entry:e,showTs:t,wrap:l,query:s}){let n=c[e.level];return(0,r.jsxs)("div",{className:(0,o.cn)("flex gap-2 px-1",l?"whitespace-pre-wrap break-words":"whitespace-pre"),children:[t&&(0,r.jsx)("span",{className:"w-[64px] shrink-0 select-none text-zinc-600",children:e.ts??""}),(0,r.jsx)("span",{className:(0,o.cn)("w-[52px] shrink-0 select-none text-[10px] font-bold leading-4",n.text),children:n.label}),e.tag&&(0,r.jsxs)("span",{className:(0,o.cn)("w-[86px] shrink-0 truncate select-none text-[10px] leading-4",function(e){let t=0;for(let l=0;l<e.length;l++)t=31*t+e.charCodeAt(l)>>>0;return d[t%d.length]}(e.tag)),children:["[",e.tag,"]"]}),(0,r.jsx)("span",{className:(0,o.cn)("min-w-0 flex-1 text-zinc-200",!l&&"overflow-visible"),children:(0,r.jsx)(g,{text:e.text,query:s})})]})}function w(){let[e,t]=(0,s.useState)([]),[l,c]=(0,s.useState)(!1),[d,x]=(0,s.useState)(!1),[u,p]=(0,s.useState)(""),[m,g]=(0,s.useState)(()=>new Set),[w,y]=(0,s.useState)("all"),[j,v]=(0,s.useState)(!0),[N,k]=(0,s.useState)(!0),[C,z]=(0,s.useState)(!0),S=(0,s.useRef)(null),E=(0,s.useRef)([]),R=(0,s.useRef)(null),L=(0,s.useCallback)(e=>{E.current=e,t(e)},[]),O=(0,s.useCallback)(e=>{let t=[...E.current,...e];L(t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t)},[L]),T=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}},A=(0,s.useRef)(!1),U=(0,s.useCallback)(()=>{A.current=!A.current,x(A.current),A.current||t(E.current)},[]);(0,s.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return R.current=e,e.onopen=()=>c(!0),e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if("init"===t.type)L(t.logs.slice(-a.UY.maxLines));else if("line"===t.type){if(A.current)return;O([t.line])}else if("lines"===t.type){if(A.current)return;O(t.lines)}else"clear"===t.type&&L([])},e.onerror=()=>c(!1),()=>e.close()},[L,O]);let _=(0,s.useMemo)(()=>e.map(h),[e]),F=(0,s.useMemo)(()=>{let e={error:0,warn:0,info:0,debug:0,log:0};for(let t of _)e[t.level]+=1;return e},[_]),$=(0,s.useMemo)(()=>{let e=new Set;for(let t of _)t.tag&&e.add(t.tag);return[...e].sort((e,t)=>e.localeCompare(t))},[_]),D=(0,s.useMemo)(()=>{let e=u.trim().toLowerCase();return _.filter(t=>(!(m.size>0)||!!m.has(t.level))&&("all"===w||t.tag===w)&&(!e||!!t.raw.toLowerCase().includes(e)))},[_,m,w,u]);(0,s.useEffect)(()=>{(C||S.current)&&C&&S.current&&(S.current.scrollTop=S.current.scrollHeight)},[D,C]);let H=(0,s.useCallback)(()=>{let e=S.current;e&&z(e.scrollHeight-e.scrollTop-e.clientHeight<40)},[]),G=(0,s.useCallback)(()=>{let e=S.current;e&&(e.scrollTop=e.scrollHeight,z(!0))},[]),M=(0,s.useCallback)(e=>{g(t=>{let l=new Set(t);return l.has(e)?l.delete(e):l.add(e),l})},[]),Y=(0,s.useCallback)(()=>{navigator.clipboard.writeText(D.map(e=>e.raw).join("\n")).catch(()=>{})},[D]),B=(0,s.useCallback)(()=>{let e=new Blob([D.map(e=>e.raw).join("\n")],{type:"text/plain"}),t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=`console-${new Date().toISOString().slice(0,19).replace(/[:T]/g,"")}.log`,t.click(),URL.revokeObjectURL(t.href)},[D]),I=m.size>0||"all"!==w||""!==u.trim();return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Console",description:"Live server logs",icon:"monitor",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("span",{className:(0,o.cn)("flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",l?"bg-success/12 text-success":"bg-danger/12 text-danger"),children:[(0,r.jsx)("span",{className:(0,o.cn)("size-1.5 rounded-full",l?"bg-success":"bg-danger")}),l?"Live":"Disconnected"]}),(0,r.jsx)(n.$n,{size:"sm",variant:"outline",icon:d?"play_arrow":"pause",onClick:U,title:d?"Resume live updates":"Pause live updates",children:d?"Resume":"Pause"}),(0,r.jsx)(n.$n,{size:"sm",variant:"outline",icon:"delete",onClick:T,children:"Clear"})]})}),(0,r.jsxs)(n.Zp,{padding:"none",className:"overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-border-subtle bg-surface-2 px-3 py-2",children:[(0,r.jsxs)("div",{className:"relative min-w-[180px] flex-1 sm:max-w-xs",children:[(0,r.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-[16px] text-text-muted",children:"search"}),(0,r.jsx)("input",{type:"text",value:u,onChange:e=>p(e.target.value),placeholder:"Filter logs…",className:"h-8 w-full rounded-md border border-border bg-surface pl-8 pr-2 text-xs text-text-main placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,r.jsxs)("select",{value:w,onChange:e=>y(e.target.value),className:"h-8 cursor-pointer rounded-md border border-border bg-surface px-2 text-xs text-text-main focus:outline-none focus:ring-2 focus:ring-primary/30",title:"Filter by component tag",children:[(0,r.jsx)("option",{value:"all",children:"All components"}),$.map(e=>(0,r.jsxs)("option",{value:e,children:["[",e,"]"]},e))]}),(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:i.map(e=>(0,r.jsx)(b,{level:e,count:F[e],active:0===m.size||m.has(e),onToggle:M},e))}),(0,r.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>v(e=>!e),className:(0,o.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[10px] font-medium transition-colors",j?"border-primary/40 bg-primary/10 text-primary":"border-white/10 bg-white/[0.03] text-zinc-500 hover:text-zinc-300"),title:"Toggle timestamps",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"schedule"}),"Time"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>k(e=>!e),className:(0,o.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[10px] font-medium transition-colors",N?"border-primary/40 bg-primary/10 text-primary":"border-white/10 bg-white/[0.03] text-zinc-500 hover:text-zinc-300"),title:"Toggle line wrapping",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wrap_text"}),"Wrap"]}),(0,r.jsxs)("button",{type:"button",onClick:Y,className:"flex items-center gap-1 rounded-md border border-white/10 bg-white/[0.03] px-2 py-1 text-[10px] font-medium text-zinc-400 transition-colors hover:text-zinc-200",title:"Copy visible logs",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"content_copy"}),"Copy"]}),(0,r.jsxs)("button",{type:"button",onClick:B,className:"flex items-center gap-1 rounded-md border border-white/10 bg-white/[0.03] px-2 py-1 text-[10px] font-medium text-zinc-400 transition-colors hover:text-zinc-200",title:"Download visible logs as .log",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Save"]})]})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("div",{ref:S,onScroll:H,className:"h-[calc(100vh-320px)] min-h-[320px] overflow-y-auto bg-black px-3 py-2.5 font-mono text-xs leading-5",children:[0===D.length?(0,r.jsx)("div",{className:"flex h-full items-center justify-center text-zinc-600",children:0===e.length?"No console logs yet.":"No lines match the current filters."}):(0,r.jsx)("div",{className:"space-y-px",children:D.map((e,t)=>(0,r.jsx)(f,{entry:e,showTs:j,wrap:N,query:u.trim()},`${t}-${e.raw.slice(0,24)}`))}),!C&&(0,r.jsxs)("button",{type:"button",onClick:G,className:"absolute bottom-3 right-6 flex items-center gap-1.5 rounded-full border border-white/15 bg-zinc-900/95 px-3 py-1.5 text-[11px] font-medium text-zinc-200 shadow-lg transition-colors hover:bg-zinc-800",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"}),"Jump to latest"]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle bg-surface-2 px-3 py-1 text-[10px] text-text-muted",children:[(0,r.jsxs)("span",{children:["Showing ",D.length," of ",e.length," lines",I&&" (filtered)",d&&" \xb7 paused"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:(0,o.cn)("size-1.5 rounded-full",l?"bg-success":"bg-danger")}),l?"SSE connected":"reconnecting…"]})]})]})]})]})}}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=237)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[27,2563,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8192],{4695:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var n=s(95155),r=s(12115),a=s(56061),i=s(99312),l=s(31474),o=s(88105);let c={closed:{label:"Closed",variant:"success"},halfOpen:{label:"Probing",variant:"warning"},open:{label:"Open",variant:"error"}};function d(){let[e,t]=(0,r.useState)([]),[s,d]=(0,r.useState)(!1),u=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/health/overview");if(!e.ok)return;let s=await e.json();t(Array.isArray(s.providers)?s.providers:[]),d(!0)}catch{d(!1)}},[]);return(0,r.useEffect)(()=>{u();let e=setInterval(u,3e3);return()=>clearInterval(e)},[u]),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live \xb7 refreshes every 3s":"Reconnecting…"]}),e.length>0&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-text-muted",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-success"})," Healthy"]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-warning"})," Degraded"]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-danger"})," Unhealthy"]})]})]}),0===e.length?(0,n.jsx)(i.default,{icon:"grid_view",title:"No provider health data",description:"Send a request to any provider (or connect an account) and the heatmap will appear here with success rate, latency percentiles, breaker state, and connection cooldowns."}):(0,n.jsx)("div",{className:"overflow-x-auto rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)]",children:(0,n.jsxs)("table",{className:"w-full min-w-[760px] border-collapse text-xs",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"border-b border-border-subtle text-left text-[11px] uppercase tracking-wider text-text-subtle",children:[(0,n.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Provider"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"Success rate"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"p50"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"p95"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"p99"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"Errors"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"Breaker"}),(0,n.jsx)("th",{className:"px-3 py-2.5 text-center font-medium",children:"Connections"})]})}),(0,n.jsx)("tbody",{children:e.map(e=>{var t;let s,r=e.health||{},i=r.successRate??null,d=null!=i?Math.round(100*i):null,u=function(e){if(null==e)return{bg:"transparent",fg:"text-text-subtle"};let t=Math.max(0,Math.min(120,Math.round(120*e)));return{bg:`hsl(${t} 80% 45% / 0.20)`,fg:"text-text-main"}}(i),m=e.breaker?c[e.breaker.state]||c.closed:null,x=e.connections.length>0?`${e.connections.length}${e.lockedConnections>0?` \xb7 ${e.lockedConnections} locked`:""}`:"—",p=e.connections.length>0?e.connections.map(e=>`${e.label}${e.cooldownActive?" (cooldown)":e.testStatus?` (${e.testStatus})`:""}${e.lastError?` — ${e.lastError}`:""}`).join("\n"):"";return(0,n.jsxs)("tr",{className:"border-b border-border-subtle/60 last:border-b-0 hover:bg-surface-2/40",children:[(0,n.jsxs)("td",{className:"px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"font-mono font-semibold text-text-main",children:(t=e.id,s=o.Q2[t],s?.name?s.name:String(t||"").replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase()))}),e.cooldownActive&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",title:"At least one connection is in cooldown",children:"lock_clock"})]}),(0,n.jsx)("div",{className:"text-[10px] text-text-subtle",children:e.id})]}),(0,n.jsx)("td",{className:"px-3 py-2 text-center",children:(0,n.jsx)("span",{className:(0,l.cn)("inline-block min-w-[52px] rounded-md px-2 py-1 font-mono font-semibold",u.fg),style:{background:u.bg},children:null!=d?`${d}%`:"—"})}),["p50LatencyMs","p95LatencyMs","p99LatencyMs"].map(e=>{let t=r[e],s=function(e,t=15e3){if(null==e)return{bg:"transparent",fg:"text-text-subtle"};let s=Math.max(0,Math.min(120,Math.round((1-Math.min(e/t,1))*120)));return{bg:`hsl(${s} 80% 45% / 0.16)`,fg:"text-text-main"}}(t);return(0,n.jsx)("td",{className:"px-3 py-2 text-center",children:(0,n.jsx)("span",{className:(0,l.cn)("inline-block min-w-[52px] rounded-md px-2 py-1 font-mono",s.fg),style:{background:s.bg},children:null==t?"—":t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`})},e)}),(0,n.jsx)("td",{className:"px-3 py-2 text-center",children:(0,n.jsx)("span",{className:(0,l.cn)("inline-block min-w-[40px] rounded-md px-2 py-1 font-mono font-semibold",r.failures>0?"bg-danger/15 text-danger":"text-text-subtle"),children:r.failures||0})}),(0,n.jsxs)("td",{className:"px-3 py-2 text-center",children:[m?(0,n.jsx)(a.default,{variant:m.variant,dot:!0,size:"sm",children:m.label}):(0,n.jsx)("span",{className:"text-text-subtle",children:"—"}),e.breaker?.state==="open"&&null!=e.breaker.cooldownRemainingMs&&(0,n.jsxs)("div",{className:"mt-0.5 text-[10px] text-text-muted",children:["cooldown ",function(e){if(null==e)return"";let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;let s=Math.floor(t/60);return`${s}m ${t%60}s`}(e.breaker.cooldownRemainingMs)]})]}),(0,n.jsx)("td",{className:"px-3 py-2 text-center",children:(0,n.jsx)("span",{className:(0,l.cn)("inline-block min-w-[52px] rounded-md px-2 py-1 font-mono",e.lockedConnections>0?"bg-danger/15 text-danger":"active"===e.worstStatus?"bg-success/15 text-success":"text-text-subtle"),title:p||void 0,children:x})})]},e.id)})})]})})]})}},21316:(e,t,s)=>{Promise.resolve().then(s.bind(s,40208)),Promise.resolve().then(s.bind(s,37466)),Promise.resolve().then(s.bind(s,54960)),Promise.resolve().then(s.bind(s,4695))},31474:(e,t,s)=>{"use strict";function n(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>n})},37466:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var n=s(95155),r=s(12115),a=s(56061),i=s(99312),l=s(31474),o=s(88105);function c(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function d(){let[e,t]=(0,r.useState)([]),[s,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=new EventSource("/api/health/stream");return e.onopen=()=>d(!0),e.onerror=()=>d(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);"snapshot"===s.type&&Array.isArray(s.providers)?t(s.providers):s.provider&&t(e=>{let t=e.findIndex(e=>e.provider===s.provider);if(t>=0){let n=[...e];return n[t]=s,n}return[...e,s]})}catch{}},()=>e.close()},[]),(0,n.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),e.length>0&&(0,n.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-success"})," Healthy"]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-warning"})," Degraded"]}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-danger"})," Unhealthy"]})]})]}),0===e.length?(0,n.jsx)(i.default,{icon:"monitor_heart",title:"No health data yet",description:"Provider health metrics will appear here once requests flow through the gateway. Send a request to any provider to start collecting samples."}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>{var t;let s,r=function(e,t){if(0===t)return{label:"Unknown",variant:"default",color:"text-text-subtle",bar:"bg-text-subtle"};let s=e??0;return s>=.95?{label:"Healthy",variant:"success",color:"text-success",bar:"bg-success"}:s>=.8?{label:"Degraded",variant:"warning",color:"text-warning",bar:"bg-warning"}:{label:"Unhealthy",variant:"error",color:"text-danger",bar:"bg-danger"}}(e.successRate,e.total),i=null!=e.successRate?Math.round(100*e.successRate):null;return(0,n.jsxs)("div",{className:"rounded-panel border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)]",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h3",{className:"truncate font-mono text-sm font-semibold text-text-main",children:(t=e.provider,s=o.Q2[t],s?.name?s.name:t.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase()))}),(0,n.jsx)(a.default,{variant:r.variant,dot:!0,size:"sm",children:r.label})]}),null!=i&&(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs text-text-muted",children:[(0,n.jsx)("span",{children:"Success rate"}),(0,n.jsxs)("span",{className:(0,l.cn)("font-mono font-semibold",r.color),children:[i,"%"]})]}),(0,n.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-surface-2",children:(0,n.jsx)("div",{className:(0,l.cn)("h-full rounded-full transition-all",r.bar),style:{width:`${i}%`}})})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[(0,n.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,n.jsx)("div",{className:"text-text-subtle",children:"Requests"}),(0,n.jsx)("div",{className:"font-mono font-semibold text-text-main",children:e.total})]}),(0,n.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,n.jsx)("div",{className:"text-text-subtle",children:"Failures"}),(0,n.jsx)("div",{className:(0,l.cn)("font-mono font-semibold",e.failures>0?"text-danger":"text-text-main"),children:e.failures})]}),(0,n.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,n.jsx)("div",{className:"text-text-subtle",children:"Avg latency"}),(0,n.jsx)("div",{className:"font-mono font-semibold text-text-main",children:c(e.avgLatencyMs)})]}),(0,n.jsxs)("div",{className:"rounded-md bg-surface-2 p-2",children:[(0,n.jsx)("div",{className:"text-text-subtle",children:"p95 latency"}),(0,n.jsx)("div",{className:"font-mono font-semibold text-text-main",children:c(e.p95LatencyMs)})]})]}),e.lastError&&(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-1.5 text-xs text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"error"}),"Last error: ",(0,n.jsx)("span",{className:"font-mono",children:e.lastError})," \xb7 ",function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.lastErrorAt)]})]},e.provider)})})]})}},40208:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var n=s(95155),r=s(12115),a=s(92542),i=s(56061),l=s(99312);let o={closed:{label:"Closed",variant:"success"},halfOpen:{label:"Half-open (probing)",variant:"warning"},open:{label:"Open",variant:"error"}};function c(){let[e,t]=(0,r.useState)([]),s=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/breaker");if(!e.ok)return;let s=await e.json();t(s.breakers||[])}catch{}},[]);(0,r.useEffect)(()=>{s();let e=setInterval(s,3e3);return()=>clearInterval(e)},[s]);let c=async e=>{try{await fetch("/api/breaker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:e})})}catch{}s()},d=async()=>{for(let t of e)try{await fetch("/api/breaker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,key:t.provider})})}catch{}s()};return(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Circuit Breakers"}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(a.default,{size:"sm",variant:"ghost",icon:"refresh",onClick:s,children:"Refresh"}),e.length>0&&(0,n.jsx)(a.default,{size:"sm",variant:"danger",icon:"bolt",onClick:d,children:"Reset all"})]})]}),0===e.length?(0,n.jsx)(l.default,{icon:"bolt",title:"No opened circuit breakers",description:"Breakers trip when a provider repeatedly fails and recover automatically after cooldown. Opened breakers will appear here so you can inspect or force-close them."}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>{var t;let s=o[e.state]||o.closed;return(0,n.jsxs)("div",{className:"rounded-panel border border-border-subtle bg-panel p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("div",{className:"truncate font-mono text-xs font-semibold text-text-main",children:String((t=e.provider)||"").split(":")[0]||t}),(0,n.jsx)("div",{className:"truncate text-[11px] text-text-subtle",children:e.provider})]}),(0,n.jsx)(i.default,{variant:s.variant,dot:!0,size:"sm",children:s.label})]}),(0,n.jsxs)("div",{className:"mt-2 flex items-center justify-between text-xs text-text-muted",children:[(0,n.jsxs)("span",{children:["Failures: ",(0,n.jsx)("span",{className:"font-mono",children:e.failures})]}),"open"===e.state&&(0,n.jsxs)("span",{children:["Cooldown: ",(0,n.jsx)("span",{className:"font-mono",children:function(e){if(null==e)return"—";let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;let s=Math.floor(t/60);return`${s}m ${t%60}s`}(e.cooldownRemainingMs)})]})]}),(0,n.jsx)(a.default,{size:"sm",variant:"secondary",icon:"replay",className:"mt-3 w-full",onClick:()=>c(e.provider),children:"Close breaker"})]},e.provider)})})]})}},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var n=s(95155),r=s(31474);function a({title:e,description:t,icon:s,iconNode:i,actions:l,breadcrumbs:o,className:c}){return(0,n.jsxs)("div",{className:(0,r.cn)("mb-6",c),children:[o?.length>0&&(0,n.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:o.map((e,t)=>(0,n.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,n.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,n.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i?(0,n.jsx)("div",{className:"mt-0.5 shrink-0",children:i}):s&&(0,n.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,n.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),l&&(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var n=s(95155),r=s(31474);let a={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},i={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},l={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function o({children:e,variant:t="default",size:s="md",dot:c=!1,icon:d,className:u}){return(0,n.jsxs)("span",{className:(0,r.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",a[t],l[s],u),children:[c&&(0,n.jsx)("span",{className:(0,r.cn)("size-1.5 rounded-full",i[t])}),d&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:d}),e]})}},88105:(e,t,s)=>{"use strict";s.d(t,{Q2:()=>w,DI:()=>b,fg:()=>x,MA:()=>k,IS:()=>c,nJ:()=>d,rj:()=>h,zN:()=>m,JH:()=>f,s9:()=>u,wb:()=>T,br:()=>p,wG:()=>C,zt:()=>S,o5:()=>M,gb:()=>v,gC:()=>j,Ox:()=>y,U_:()=>N,mq:()=>g,rs:()=>_});var n=s(82563);let r="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(n.A.filter(e=>e.display).map(e=>{let t;return[e.id,"RISK_NOTICE"===(t=e.display).deprecationNotice?{...t,deprecationNotice:r}:t]}));let a=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],i={toolUse:!0,fileAccess:!0,streaming:!0,multiTurn:!0},l={webCookie:{toolUse:!1,fileAccess:!1,streaming:!0,multiTurn:!0}},o=e=>Object.fromEntries(n.A.filter(t=>t.category===e).map(e=>[e.id,function(e){let t={};for(let s of(e.media&&Object.assign(t,e.media),a))void 0!==e[s]&&(t[s]=e[s]);let s={...e.display||{}};return"RISK_NOTICE"===s.deprecationNotice&&(s.deprecationNotice=r),{...s,id:e.id,alias:e.alias||e.id,...e.uiAlias?{uiAlias:e.uiAlias}:{},...e.hidden?{hidden:!0}:{},...t,...void 0!==e.priority?{priority:e.priority}:{},...e.hasFree?{hasFree:!0}:{},...e.thinkingConfig?{thinkingConfig:e.thinkingConfig}:{},...e.regions?{regions:e.regions,defaultRegion:e.defaultRegion}:{},...e.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...e.noAuth?{noAuth:!0}:{},...e.passthroughModels?{passthroughModels:!0}:{},...e.hasOAuth?{hasOAuth:!0}:{},...e.authModes?{authModes:e.authModes}:"freeTier"===e.category||"apikey"===e.category?{authModes:["apikey"]}:{},...e.authType?{authType:e.authType}:{},...e.authHint?{authHint:e.authHint}:{},...e.comingSoon?{comingSoon:!0}:{},capabilities:function(e){if(e.capabilities&&"object"==typeof e.capabilities)return{...i,...e.capabilities};let t=l[e.category];return t?{...t}:{...i}}(e)}}(e)])),c=o("free"),d=o("freeTier"),u={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},m=o("oauth"),x=o("apikey"),p=o("webCookie"),h=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"Speech To Text",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],f="openai-compatible-",b="anthropic-compatible-";function g(e){return"string"==typeof e&&e.startsWith(f)}function v(e){return"string"==typeof e&&e.startsWith(b)}function j(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}function y(e){return"string"==typeof e&&e.startsWith("custom-stt-")}function N(e){return"string"==typeof e&&e.startsWith("custom-tts-")}let w={...c,...d,...m,...x,...p},k={oauth:{id:"oauth"},apikey:{id:"apikey"},cookie:{id:"cookie"}};function S(e){for(let t of Object.values(w))if(t.alias===e||t.id===e)return t;return null}function _(e){let t=S(e);return t?.id||e}function C(e){let t=w[e];return t?.alias||e}function M(e){return Object.values(w).filter(t=>!(!(t.serviceKinds??["llm"]).includes(e)||t.hidden||t.hiddenKinds?.includes(e))).sort((e,t)=>(e.priority??e.mediaPriority??999)-(t.priority??t.mediaPriority??999))}Object.values(w).reduce((e,t)=>(e[t.alias]=t.id,e),{}),Object.values(w).reduce((e,t)=>(e[t.id]=t.alias,e),{});let T=n.A.filter(e=>e.features?.usage).map(e=>e.id);n.A.filter(e=>e.features?.usageApikey).map(e=>e.id)},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var n=s(95155),r=s(31474);let a={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},i={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function l({children:e,variant:t="primary",size:s="md",icon:o,iconRight:c,disabled:d=!1,loading:u=!1,fullWidth:m=!1,className:x,...p}){return(0,n.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",a[t],i[s],m&&"w-full",x),disabled:d||u,...p,children:[u?(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):o?(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o}):null,e,c&&!u&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:c})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var n=s(95155),r=s(31474),a=s(92542);function i({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:l,actionText:o,onAction:c,className:d}){return(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",d),children:[(0,n.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,n.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,n.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),l||o&&c&&(0,n.jsx)(a.default,{variant:"outline",size:"sm",onClick:c,children:o})]})}}},e=>{e.O(0,[2563,8441,3794,7358],()=>e(e.s=21316)),_N_E=e.O()}]);
@@ -56,4 +56,4 @@
56
56
  -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
57
57
  -F "prompt=${v}"`:""}`,Z=async()=>{if(!x||!Y)return;D(!0),q(""),K(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",Y),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",N),p.includes("temperature")&&C&&t.append("temperature",C),p.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});U(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void q(r?.error?.message||r?.error||r||`HTTP ${a.status}`);K(r)}catch(e){q(e.message||"Network error")}finally{D(!1)}},Q="string"==typeof M?M:M?JSON.stringify(M,null,2):`{
58
58
  "text": "Hello world..."
59
- }`;return(0,a.jsxs)(l.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[d.length>0?(0,a.jsx)(w,{label:"Model",children:(0,a.jsx)("select",{value:c,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:d.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(w,{label:"Model",children:(0,a.jsx)("input",{value:c,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(w,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>T(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(w,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(w,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(w,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(w,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(w,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,a.jsx)(w,{label:"Response Format",children:(0,a.jsxs)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Z,disabled:B||!x||!Y,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:B?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),B?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function O(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),c=i.rj.find(t=>t.id===e),m=(0,i.gC)(t)&&"embedding"===e||(0,i.Ox)(t)&&"stt"===e||(0,i.U_)(t)&&"tts"===e,u=async()=>{if(confirm(`Delete this Custom ${"stt"===e?"STT":"tts"===e?"TTS":"Embedding"} node?`))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,o.useState)(null),[h,g]=(0,o.useState)(m),[f,y]=(0,o.useState)(!1);if((0,o.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),g(!1))}).catch(()=>{e||g(!1)}),()=>{e=!0}},[t,m]),!c)return(0,r.notFound)();let v=i.Q2[t],w=(0,i.gC)(t)?"Embedding":(0,i.Ox)(t)?"STT":(0,i.U_)(t)?"TTS":"",k=m?p?{id:t,name:p.name||`Custom ${w}`,color:p.color||"#6366F1",textIcon:p.textIcon||"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let S=m?[e]:k.serviceKinds??["llm"];return m||S.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:k.name,description:c.label,iconNode:(0,a.jsx)("div",{className:"flex size-12 items-center justify-center rounded-brand ring-1 ring-border-subtle",style:{backgroundColor:`${k.color}15`},children:(0,a.jsx)(n.A,{src:(0,d.k)(k.id),alt:k.name,size:36,className:"object-contain rounded max-w-[36px] max-h-[36px]",fallbackText:k.textIcon||k.id.slice(0,2).toUpperCase(),fallbackColor:k.color})}),breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:c.label,href:`/dashboard/media-providers/${e}`},{label:k.name}],actions:(0,a.jsxs)(a.Fragment,{children:[!m&&k.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})}),(0,a.jsxs)("div",{className:"-mt-2 flex flex-wrap items-center gap-1.5",children:[m&&(0,a.jsxs)(l.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),S.map(t=>(0,a.jsx)(l.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]}),!m&&k.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:k.kindNotice[e]})]}),!m&&k.notice?.text&&!k.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:k.notice.text}),k.notice.apiKeyUrl&&(0,a.jsx)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&k.noAuth?(0,a.jsx)(l.gw,{providerId:t}):(0,a.jsx)(b,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(k.searchConfig||k.fetchConfig||k.ttsConfig||k.sttConfig||k.embeddingConfig||k.searchViaChat)&&(0,a.jsx)(l.Wx,{config:"webFetch"===e?k.fetchConfig:"tts"===e?k.ttsConfig:"stt"===e?k.sttConfig:"embedding"===e?k.embeddingConfig:k.searchConfig||{mode:"chat-completions",defaultModel:k.searchViaChat?.defaultModel,pricingUrl:k.searchViaChat?.pricingUrl,freeTier:k.searchViaChat?.freeTier},provider:k,title:`${c.label} Config`}),"embedding"===e&&(0,a.jsx)(C,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(T,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(R,{providerId:t}),!m&&N[e]&&(0,a.jsx)(E,{providerId:t,kind:e}),m&&(0,a.jsx)(l.x0,{isOpen:f,node:p,nodeType:(0,i.Ox)(t)?"custom-stt":(0,i.U_)(t)?"custom-tts":"custom-embedding",onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=11055)),_N_E=e.O()}]);
59
+ }`;return(0,a.jsxs)(l.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[d.length>0?(0,a.jsx)(w,{label:"Model",children:(0,a.jsx)("select",{value:c,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:d.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(w,{label:"Model",children:(0,a.jsx)("input",{value:c,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)(w,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,a.jsxs)("button",{onClick:()=>T(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(w,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(w,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(w,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),p.includes("prompt")&&(0,a.jsx)(w,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("temperature")&&(0,a.jsx)(w,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),p.includes("response_format")&&(0,a.jsx)(w,{label:"Response Format",children:(0,a.jsxs)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>z(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Z,disabled:B||!x||!Y,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:B?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),B?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",M&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),M&&(0,a.jsxs)("button",{onClick:()=>H(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function O(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),c=i.rj.find(t=>t.id===e),m=(0,i.gC)(t)&&"embedding"===e||(0,i.Ox)(t)&&"stt"===e||(0,i.U_)(t)&&"tts"===e,u=async()=>{if(confirm(`Delete this Custom ${"stt"===e?"STT":"tts"===e?"TTS":"Embedding"} node?`))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,o.useState)(null),[h,g]=(0,o.useState)(m),[f,y]=(0,o.useState)(!1);if((0,o.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),g(!1))}).catch(()=>{e||g(!1)}),()=>{e=!0}},[t,m]),!c)return(0,r.notFound)();let v=i.Q2[t],w=(0,i.gC)(t)?"Embedding":(0,i.Ox)(t)?"STT":(0,i.U_)(t)?"TTS":"",k=m?p?{id:t,name:p.name||`Custom ${w}`,color:p.color||"#6366F1",textIcon:p.textIcon||"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let S=m?[e]:k.serviceKinds??["llm"];return m||S.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:k.name,description:c.label,iconNode:(0,a.jsx)("div",{className:"flex size-12 items-center justify-center rounded-brand ring-1 ring-border-subtle",style:{backgroundColor:`${k.color}15`},children:(0,a.jsx)(n.A,{src:(0,d.k)(k.id),alt:k.name,size:36,className:"object-contain rounded max-w-[36px] max-h-[36px]",fallbackText:k.textIcon||k.id.slice(0,2).toUpperCase(),fallbackColor:k.color})}),breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:c.label,href:`/dashboard/media-providers/${e}`},{label:k.name}],actions:(0,a.jsxs)(a.Fragment,{children:[!m&&k.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})}),(0,a.jsxs)("div",{className:"-mt-2 flex flex-wrap items-center gap-1.5",children:[m&&(0,a.jsxs)(l.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),S.map(t=>(0,a.jsx)(l.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]}),!m&&k.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:k.kindNotice[e]})]}),!m&&k.notice?.text&&!k.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:k.notice.text}),k.notice.apiKeyUrl&&(0,a.jsx)("a",{href:k.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&k.noAuth?(0,a.jsx)(l.gw,{providerId:t}):(0,a.jsx)(b,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(k.searchConfig||k.fetchConfig||k.ttsConfig||k.sttConfig||k.embeddingConfig||k.searchViaChat)&&(0,a.jsx)(l.Wx,{config:"webFetch"===e?k.fetchConfig:"tts"===e?k.ttsConfig:"stt"===e?k.sttConfig:"embedding"===e?k.embeddingConfig:k.searchConfig||{mode:"chat-completions",defaultModel:k.searchViaChat?.defaultModel,pricingUrl:k.searchViaChat?.pricingUrl,freeTier:k.searchViaChat?.freeTier},provider:k,title:`${c.label} Config`}),"embedding"===e&&(0,a.jsx)(C,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(T,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(R,{providerId:t}),!m&&N[e]&&(0,a.jsx)(E,{providerId:t,kind:e}),m&&(0,a.jsx)(l.x0,{isOpen:f,node:p,nodeType:(0,i.Ox)(t)?"custom-stt":(0,i.U_)(t)?"custom-tts":"custom-embedding",onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=11055)),_N_E=e.O()}]);