@rsalmn/extremerouter 0.8.6 → 0.8.8

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 (1134) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +15 -11
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/routes-manifest.json +26 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  94. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  105. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  108. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  109. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  110. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  115. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  116. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  136. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  142. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  160. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +3 -3
  168. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  180. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  186. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  194. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  206. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -0
  222. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  223. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  224. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  241. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js +1 -0
  273. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js.nft.json +1 -0
  274. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route_client-reference-manifest.js +1 -0
  275. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  276. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +2 -2
  290. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +2 -2
  298. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  344. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  346. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  350. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  352. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +2 -2
  368. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +2 -2
  370. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +2 -2
  372. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
  376. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  382. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  430. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route.js +1 -0
  446. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route.js.nft.json +1 -0
  447. package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route_client-reference-manifest.js +1 -0
  448. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/video/generations/route.js +1 -0
  467. package/app/.next-cli-build/server/app/api/v1/video/generations/route.js.nft.json +1 -0
  468. package/app/.next-cli-build/server/app/api/v1/video/generations/route_client-reference-manifest.js +1 -0
  469. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  482. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/callback.html +1 -1
  485. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  486. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  487. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  489. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  490. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  504. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  505. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  506. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/index.html +1 -1
  508. package/app/.next-cli-build/server/app/index.rsc +6 -6
  509. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  513. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  515. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  516. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  517. package/app/.next-cli-build/server/app/landing.html +1 -1
  518. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  519. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  520. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  522. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/login/page.js +2 -2
  526. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/login.html +1 -1
  529. package/app/.next-cli-build/server/app/login.rsc +7 -7
  530. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  531. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  537. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/page.js +2 -2
  539. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app-paths-manifest.json +15 -11
  542. package/app/.next-cli-build/server/chunks/1194.js +1 -1
  543. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  544. package/app/.next-cli-build/server/chunks/1350.js +3 -3
  545. package/app/.next-cli-build/server/chunks/1411.js +9 -0
  546. package/app/.next-cli-build/server/chunks/1429.js +1 -1
  547. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  548. package/app/.next-cli-build/server/chunks/212.js +1 -1
  549. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  550. package/app/.next-cli-build/server/chunks/2436.js +1 -0
  551. package/app/.next-cli-build/server/chunks/3520.js +1 -1
  552. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  553. package/app/.next-cli-build/server/chunks/3552.js +1 -0
  554. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  555. package/app/.next-cli-build/server/chunks/4046.js +1 -1
  556. package/app/.next-cli-build/server/chunks/4109.js +1 -1
  557. package/app/.next-cli-build/server/chunks/412.js +1 -1
  558. package/app/.next-cli-build/server/chunks/4161.js +1 -0
  559. package/app/.next-cli-build/server/chunks/4502.js +6 -6
  560. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  562. package/app/.next-cli-build/server/chunks/4828.js +1 -0
  563. package/app/.next-cli-build/server/chunks/4957.js +1 -0
  564. package/app/.next-cli-build/server/chunks/4987.js +1 -0
  565. package/app/.next-cli-build/server/chunks/5050.js +2 -0
  566. package/app/.next-cli-build/server/chunks/507.js +1 -1
  567. package/app/.next-cli-build/server/chunks/5253.js +1 -1
  568. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  569. package/app/.next-cli-build/server/chunks/5330.js +17 -17
  570. package/app/.next-cli-build/server/chunks/5473.js +9 -0
  571. package/app/.next-cli-build/server/chunks/5604.js +13 -0
  572. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  573. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  574. package/app/.next-cli-build/server/chunks/5628.js +1 -1
  575. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  576. package/app/.next-cli-build/server/chunks/6007.js +10 -0
  577. package/app/.next-cli-build/server/chunks/6157.js +1 -0
  578. package/app/.next-cli-build/server/chunks/6182.js +1 -1
  579. package/app/.next-cli-build/server/chunks/6488.js +1 -0
  580. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  581. package/app/.next-cli-build/server/chunks/698.js +1 -1
  582. package/app/.next-cli-build/server/chunks/7247.js +1 -0
  583. package/app/.next-cli-build/server/chunks/7566.js +2 -2
  584. package/app/.next-cli-build/server/chunks/7765.js +2 -2
  585. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  586. package/app/.next-cli-build/server/chunks/809.js +1 -1
  587. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  588. package/app/.next-cli-build/server/chunks/8240.js +1 -0
  589. package/app/.next-cli-build/server/chunks/8266.js +1 -1
  590. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  591. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  592. package/app/.next-cli-build/server/chunks/8802.js +2 -2
  593. package/app/.next-cli-build/server/chunks/885.js +15 -15
  594. package/app/.next-cli-build/server/chunks/8851.js +3 -0
  595. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  596. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  597. package/app/.next-cli-build/server/chunks/9715.js +1 -0
  598. package/app/.next-cli-build/server/chunks/9903.js +1 -1
  599. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  600. package/app/.next-cli-build/server/middleware.js +6 -6
  601. package/app/.next-cli-build/server/pages/404.html +1 -1
  602. package/app/.next-cli-build/server/pages/500.html +1 -1
  603. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  604. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  605. package/app/.next-cli-build/static/chunks/1321-738b3efba6f43f03.js +1 -0
  606. package/app/.next-cli-build/static/chunks/5497-97801e653d366579.js +7 -0
  607. package/app/.next-cli-build/static/chunks/705-1b66113f1f9bdd89.js +1 -0
  608. package/app/.next-cli-build/static/chunks/9086-5e0c8ccb81f25cbb.js +1 -0
  609. package/app/.next-cli-build/static/chunks/{9622-fcd7c93a94eaa38f.js → 9622-1dc5485471326b33.js} +6 -6
  610. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-812b19e92ea94f14.js → page-5da9d88aea0f0c4d.js} +1 -1
  611. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-9a0e996c5bc5a169.js → page-af18b8bd5a604e31.js} +1 -1
  612. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-0e1d5c3cf52823c3.js → page-c933ec2b61961be3.js} +1 -1
  613. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-3122fd2735ba291c.js → page-3b6ddb5ae1f382fc.js} +1 -1
  614. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-6e960c6e7b31b9df.js +3 -0
  615. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-dd4edb101f50cc0f.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-f1add2aaae4a459c.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-1c94a0710d61767e.js → page-2ac0245eea32c9aa.js} +1 -1
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-9e98db59d6b1d05f.js → page-e0b2567bb9fe606d.js} +7 -7
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-026721fa921475e0.js → page-9da68f29ab52796d.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-ec37860600228def.js → page-2c80d26d992e4bb2.js} +1 -1
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7cdd74503baa001a.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-825c8673e6351d02.js → page-ebc169fccd95e5d8.js} +1 -1
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-65072e4024bb73b6.js → page-50b3f8c8ed3358f2.js} +1 -1
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-b92bc7ebaa0813b2.js → page-c4728000c2a09214.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-86eaf12ef68c60ba.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-c43d594bf432dbb3.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-8147c101767a32a1.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-9eea89b85926cfd8.js → page-f20fce2b984f4ef3.js} +3 -3
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-aaaaeede554f51a5.js → page-99b2fb0411fa61e4.js} +1 -1
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-3231355c17df9913.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-70bfba02b4fc414f.js → page-c619835a47dd125d.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-46f5c7b65b5bb9ad.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-17bcf4e0db497e3a.js → page-fb7fe2c2ce8ee710.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-6e8f34517990d858.js → page-971ad40322c4940b.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-d9e35b679b85696a.js → page-33f472a9351a93f8.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-52a5ff6e854d82e7.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-20cc41f2e1307f06.js → layout-6605206f3a2e2db9.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/app/_global-error/page-fe046df355b8d174.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-fe046df355b8d174.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-fe046df355b8d174.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fe046df355b8d174.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fe046df355b8d174.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fe046df355b8d174.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fe046df355b8d174.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-fe046df355b8d174.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-fe046df355b8d174.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/breaker/route-fe046df355b8d174.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/cache/route-fe046df355b8d174.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fe046df355b8d174.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fe046df355b8d174.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fe046df355b8d174.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fe046df355b8d174.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fe046df355b8d174.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fe046df355b8d174.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fe046df355b8d174.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fe046df355b8d174.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fe046df355b8d174.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fe046df355b8d174.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fe046df355b8d174.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fe046df355b8d174.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fe046df355b8d174.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fe046df355b8d174.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fe046df355b8d174.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fe046df355b8d174.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fe046df355b8d174.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fe046df355b8d174.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-fe046df355b8d174.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/combos/route-fe046df355b8d174.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-fe046df355b8d174.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-fe046df355b8d174.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-fe046df355b8d174.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fe046df355b8d174.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fe046df355b8d174.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fe046df355b8d174.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-fe046df355b8d174.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-fe046df355b8d174.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/health/route-fe046df355b8d174.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-fe046df355b8d174.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/init/route-fe046df355b8d174.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fe046df355b8d174.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/keys/route-fe046df355b8d174.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/locale/route-fe046df355b8d174.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fe046df355b8d174.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fe046df355b8d174.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fe046df355b8d174.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fe046df355b8d174.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fe046df355b8d174.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fe046df355b8d174.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fe046df355b8d174.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-fe046df355b8d174.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-fe046df355b8d174.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-fe046df355b8d174.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-fe046df355b8d174.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fe046df355b8d174.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/models/route-fe046df355b8d174.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/models/test/route-fe046df355b8d174.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-fe046df355b8d174.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fe046df355b8d174.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-fe046df355b8d174.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fe046df355b8d174.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fe046df355b8d174.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fe046df355b8d174.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-fe046df355b8d174.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fe046df355b8d174.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fe046df355b8d174.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-fe046df355b8d174.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-fe046df355b8d174.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-fe046df355b8d174.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fe046df355b8d174.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fe046df355b8d174.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fe046df355b8d174.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fe046df355b8d174.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fe046df355b8d174.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fe046df355b8d174.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-fe046df355b8d174.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-fe046df355b8d174.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-fe046df355b8d174.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-fe046df355b8d174.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-fe046df355b8d174.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/pricing/route-fe046df355b8d174.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fe046df355b8d174.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-fe046df355b8d174.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fe046df355b8d174.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-fe046df355b8d174.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-fe046df355b8d174.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-fe046df355b8d174.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-fe046df355b8d174.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-fe046df355b8d174.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fe046df355b8d174.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-fe046df355b8d174.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-fe046df355b8d174.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-fe046df355b8d174.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fe046df355b8d174.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fe046df355b8d174.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fe046df355b8d174.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-fe046df355b8d174.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-fe046df355b8d174.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-fe046df355b8d174.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-fe046df355b8d174.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-fe046df355b8d174.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-fe046df355b8d174.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-fe046df355b8d174.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-fe046df355b8d174.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-fe046df355b8d174.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fe046df355b8d174.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/providers/route-fe046df355b8d174.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fe046df355b8d174.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fe046df355b8d174.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fe046df355b8d174.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fe046df355b8d174.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fe046df355b8d174.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fe046df355b8d174.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fe046df355b8d174.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fe046df355b8d174.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fe046df355b8d174.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fe046df355b8d174.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fe046df355b8d174.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-fe046df355b8d174.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fe046df355b8d174.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fe046df355b8d174.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/settings/route-fe046df355b8d174.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-fe046df355b8d174.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-fe046df355b8d174.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-fe046df355b8d174.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-fe046df355b8d174.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-fe046df355b8d174.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-fe046df355b8d174.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-fe046df355b8d174.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/tags/route-fe046df355b8d174.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fe046df355b8d174.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fe046df355b8d174.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-fe046df355b8d174.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-fe046df355b8d174.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-fe046df355b8d174.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fe046df355b8d174.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fe046df355b8d174.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fe046df355b8d174.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fe046df355b8d174.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fe046df355b8d174.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fe046df355b8d174.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fe046df355b8d174.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fe046df355b8d174.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fe046df355b8d174.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fe046df355b8d174.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fe046df355b8d174.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-fe046df355b8d174.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-fe046df355b8d174.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-fe046df355b8d174.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-fe046df355b8d174.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fe046df355b8d174.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fe046df355b8d174.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fe046df355b8d174.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-fe046df355b8d174.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fe046df355b8d174.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fe046df355b8d174.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fe046df355b8d174.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fe046df355b8d174.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fe046df355b8d174.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fe046df355b8d174.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fe046df355b8d174.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fe046df355b8d174.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fe046df355b8d174.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/v1/media/results/[id]/route-fe046df355b8d174.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fe046df355b8d174.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fe046df355b8d174.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fe046df355b8d174.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fe046df355b8d174.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-fe046df355b8d174.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fe046df355b8d174.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fe046df355b8d174.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/route-fe046df355b8d174.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-fe046df355b8d174.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/video/generations/route-fe046df355b8d174.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fe046df355b8d174.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fe046df355b8d174.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fe046df355b8d174.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/version/route-fe046df355b8d174.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fe046df355b8d174.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/version/update/route-fe046df355b8d174.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-bc142d42a8a549b4.js → page-cb505396f61fd853.js} +1 -1
  821. package/app/.next-cli-build/static/chunks/app/{layout-0e3fdd66d189006c.js → layout-43c49c1c04131398.js} +1 -1
  822. package/app/.next-cli-build/static/chunks/app/login/{page-4b39978fc147efa3.js → page-783218bde9da4df5.js} +1 -1
  823. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fe046df355b8d174.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/page-fe046df355b8d174.js +1 -0
  825. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fe046df355b8d174.js +1 -0
  826. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fe046df355b8d174.js +1 -0
  827. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fe046df355b8d174.js +1 -0
  828. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fe046df355b8d174.js +1 -0
  829. package/app/.next-cli-build/static/css/4311ce5e9ab1213e.css +1 -0
  830. package/app/.next-cli-build/static/zahf-uMWnrDSCrrfcee0d/_buildManifest.js +1 -0
  831. package/app/package.json +1 -1
  832. package/app/public/favicon.svg +70 -8
  833. package/app/public/icons/icon-192.svg +73 -3
  834. package/app/public/icons/icon-512.svg +72 -3
  835. package/app/public/providers/ai21.png +0 -0
  836. package/app/public/providers/aimlapi.png +0 -0
  837. package/app/public/providers/ainative.png +0 -0
  838. package/app/public/providers/aion.png +0 -0
  839. package/app/public/providers/alibaba-cn.svg +1 -11
  840. package/app/public/providers/alibaba.svg +1 -11
  841. package/app/public/providers/alitp-intl.svg +1 -0
  842. package/app/public/providers/anyapi.png +0 -0
  843. package/app/public/providers/arcee-ai.png +0 -0
  844. package/app/public/providers/auriko.svg +61 -4
  845. package/app/public/providers/azure-ai.svg +23 -4
  846. package/app/public/providers/bai.png +0 -0
  847. package/app/public/providers/baseten.png +0 -0
  848. package/app/public/providers/blackbox-web.png +0 -0
  849. package/app/public/providers/bluesminds.png +0 -0
  850. package/app/public/providers/bytez.png +0 -0
  851. package/app/public/providers/charm-hyper.png +0 -0
  852. package/app/public/providers/chatanywhere.svg +1 -4
  853. package/app/public/providers/cheaperinference.png +0 -0
  854. package/app/public/providers/chenzk.png +0 -0
  855. package/app/public/providers/clarifai.svg +1 -4
  856. package/app/public/providers/cloudcode-one.svg +12 -3
  857. package/app/public/providers/conol-web.png +0 -0
  858. package/app/public/providers/crof.png +0 -0
  859. package/app/public/providers/datarobot.png +0 -0
  860. package/app/public/providers/digitalocean.svg +1 -4
  861. package/app/public/providers/dit.svg +9 -3
  862. package/app/public/providers/docker-model-runner.svg +1 -1
  863. package/app/public/providers/duckduckgo-web.svg +1 -7
  864. package/app/public/providers/dxnt.svg +9 -3
  865. package/app/public/providers/gemini-business.svg +1 -1
  866. package/app/public/providers/gitlab.svg +1 -0
  867. package/app/public/providers/hailuo-web.svg +1 -1
  868. package/app/public/providers/heroku.svg +15 -3
  869. package/app/public/providers/huggingchat.svg +1 -9
  870. package/app/public/providers/kimi-desktop.svg +1 -9
  871. package/app/public/providers/kimi-web.svg +1 -8
  872. package/app/public/providers/lm-studio.svg +1 -1
  873. package/app/public/providers/meta-llama.svg +1 -4
  874. package/app/public/providers/modal.svg +1 -4
  875. package/app/public/providers/modelscope.svg +1 -4
  876. package/app/public/providers/notion-web.svg +1 -1
  877. package/app/public/providers/oci.svg +19 -3
  878. package/app/public/providers/ollama-cloud.svg +1 -4
  879. package/app/public/providers/orcarouter.png +0 -0
  880. package/app/public/providers/ovhcloud.svg +1 -4
  881. package/app/public/providers/perplexity-agent.svg +1 -13
  882. package/app/public/providers/poe-web.svg +1 -8
  883. package/app/public/providers/qwen-cloud.svg +1 -1
  884. package/app/public/providers/qwen-web.svg +1 -6
  885. package/app/public/providers/qwencloud.svg +1 -6
  886. package/app/public/providers/sap.svg +1 -4
  887. package/app/public/providers/scaleway.svg +1 -4
  888. package/app/public/providers/snowflake.svg +1 -4
  889. package/app/public/providers/triton.svg +1 -1
  890. package/app/public/providers/vllm.svg +1 -1
  891. package/app/public/providers/wandb.svg +1 -4
  892. package/app/public/providers/watsonx.svg +50 -3
  893. package/app/public/providers/xkiro.svg +11 -0
  894. package/app/public/providers/zai-web.svg +1 -7
  895. package/app/public/providers/zcode.png +0 -0
  896. package/app/public/vercel.svg +73 -1
  897. package/app/src/lib/db/migrate.js +6 -3
  898. package/app/src/mitm/server.js +27 -27
  899. package/package.json +1 -1
  900. package/src/cli/menus/providers.js +6 -0
  901. package/src/cli/tray/icon.ico +0 -0
  902. package/src/cli/tray/icon.png +0 -0
  903. package/app/.next-cli-build/server/chunks/1891.js +0 -10
  904. package/app/.next-cli-build/server/chunks/3735.js +0 -1
  905. package/app/.next-cli-build/server/chunks/3841.js +0 -1
  906. package/app/.next-cli-build/server/chunks/3988.js +0 -1
  907. package/app/.next-cli-build/server/chunks/422.js +0 -9
  908. package/app/.next-cli-build/server/chunks/5699.js +0 -1
  909. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  910. package/app/.next-cli-build/server/chunks/6878.js +0 -1
  911. package/app/.next-cli-build/server/chunks/7016.js +0 -3
  912. package/app/.next-cli-build/server/chunks/7410.js +0 -1
  913. package/app/.next-cli-build/server/chunks/8048.js +0 -1
  914. package/app/.next-cli-build/server/chunks/874.js +0 -9
  915. package/app/.next-cli-build/server/chunks/9703.js +0 -14
  916. package/app/.next-cli-build/static/FP2YsqoRbzETOIHRfld7X/_buildManifest.js +0 -1
  917. package/app/.next-cli-build/static/chunks/1321-a387932dc3179f86.js +0 -1
  918. package/app/.next-cli-build/static/chunks/5497-c6d8b48c8828240a.js +0 -7
  919. package/app/.next-cli-build/static/chunks/705-42ad329bbe0c47df.js +0 -1
  920. package/app/.next-cli-build/static/chunks/9497-d27e455b90c7936e.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a84afe4d66f3439a.js +0 -3
  922. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-9850fafcf9dd605b.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-9879594c5128cd91.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-99c8024bece93467.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-d3be818ebce4ade2.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-5ef2d54550eda9da.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d208597b457fee58.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-1f465a9d64823fe6.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e249d28461673557.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-7ea08e0acef52ce3.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/_global-error/page-d93feb6893aee449.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-d93feb6893aee449.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-d93feb6893aee449.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-d93feb6893aee449.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-d93feb6893aee449.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-d93feb6893aee449.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-d93feb6893aee449.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-d93feb6893aee449.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-d93feb6893aee449.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/breaker/route-d93feb6893aee449.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/cache/route-d93feb6893aee449.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-d93feb6893aee449.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d93feb6893aee449.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-d93feb6893aee449.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-d93feb6893aee449.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-d93feb6893aee449.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-d93feb6893aee449.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-d93feb6893aee449.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d93feb6893aee449.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-d93feb6893aee449.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-d93feb6893aee449.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-d93feb6893aee449.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-d93feb6893aee449.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-d93feb6893aee449.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-d93feb6893aee449.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-d93feb6893aee449.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-d93feb6893aee449.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-d93feb6893aee449.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-d93feb6893aee449.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-d93feb6893aee449.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/combos/route-d93feb6893aee449.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-d93feb6893aee449.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-d93feb6893aee449.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-d93feb6893aee449.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-d93feb6893aee449.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-d93feb6893aee449.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-d93feb6893aee449.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-d93feb6893aee449.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-d93feb6893aee449.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/health/route-d93feb6893aee449.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-d93feb6893aee449.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/init/route-d93feb6893aee449.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-d93feb6893aee449.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/keys/route-d93feb6893aee449.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/locale/route-d93feb6893aee449.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-d93feb6893aee449.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-d93feb6893aee449.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d93feb6893aee449.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d93feb6893aee449.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-d93feb6893aee449.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-d93feb6893aee449.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-d93feb6893aee449.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-d93feb6893aee449.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-d93feb6893aee449.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-d93feb6893aee449.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-d93feb6893aee449.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/models/route-d93feb6893aee449.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/models/test/route-d93feb6893aee449.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-d93feb6893aee449.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-d93feb6893aee449.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-d93feb6893aee449.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-d93feb6893aee449.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-d93feb6893aee449.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-d93feb6893aee449.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-d93feb6893aee449.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-d93feb6893aee449.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-d93feb6893aee449.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-d93feb6893aee449.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-d93feb6893aee449.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-d93feb6893aee449.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-d93feb6893aee449.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-d93feb6893aee449.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-d93feb6893aee449.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-d93feb6893aee449.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-d93feb6893aee449.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-d93feb6893aee449.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-d93feb6893aee449.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-d93feb6893aee449.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-d93feb6893aee449.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-d93feb6893aee449.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/pricing/route-d93feb6893aee449.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-d93feb6893aee449.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-d93feb6893aee449.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-d93feb6893aee449.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-d93feb6893aee449.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-d93feb6893aee449.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-d93feb6893aee449.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-d93feb6893aee449.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-d93feb6893aee449.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-d93feb6893aee449.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-d93feb6893aee449.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-d93feb6893aee449.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-d93feb6893aee449.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-d93feb6893aee449.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-d93feb6893aee449.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-d93feb6893aee449.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-d93feb6893aee449.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-d93feb6893aee449.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-d93feb6893aee449.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-d93feb6893aee449.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-d93feb6893aee449.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-d93feb6893aee449.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-d93feb6893aee449.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-d93feb6893aee449.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-d93feb6893aee449.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-d93feb6893aee449.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/providers/route-d93feb6893aee449.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-d93feb6893aee449.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-d93feb6893aee449.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-d93feb6893aee449.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-d93feb6893aee449.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-d93feb6893aee449.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-d93feb6893aee449.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-d93feb6893aee449.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-d93feb6893aee449.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-d93feb6893aee449.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-d93feb6893aee449.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-d93feb6893aee449.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-d93feb6893aee449.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-d93feb6893aee449.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-d93feb6893aee449.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/settings/route-d93feb6893aee449.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-d93feb6893aee449.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-d93feb6893aee449.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-d93feb6893aee449.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-d93feb6893aee449.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-d93feb6893aee449.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-d93feb6893aee449.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-d93feb6893aee449.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/tags/route-d93feb6893aee449.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-d93feb6893aee449.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-d93feb6893aee449.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-d93feb6893aee449.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-d93feb6893aee449.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-d93feb6893aee449.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-d93feb6893aee449.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-d93feb6893aee449.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-d93feb6893aee449.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-d93feb6893aee449.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-d93feb6893aee449.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-d93feb6893aee449.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-d93feb6893aee449.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-d93feb6893aee449.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-d93feb6893aee449.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-d93feb6893aee449.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-d93feb6893aee449.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-d93feb6893aee449.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-d93feb6893aee449.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-d93feb6893aee449.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-d93feb6893aee449.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-d93feb6893aee449.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-d93feb6893aee449.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-d93feb6893aee449.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-d93feb6893aee449.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-d93feb6893aee449.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-d93feb6893aee449.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-d93feb6893aee449.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-d93feb6893aee449.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-d93feb6893aee449.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-d93feb6893aee449.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-d93feb6893aee449.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-d93feb6893aee449.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-d93feb6893aee449.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-d93feb6893aee449.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-d93feb6893aee449.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-d93feb6893aee449.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-d93feb6893aee449.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-d93feb6893aee449.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-d93feb6893aee449.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-d93feb6893aee449.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/v1/route-d93feb6893aee449.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-d93feb6893aee449.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-d93feb6893aee449.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-d93feb6893aee449.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-d93feb6893aee449.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/version/route-d93feb6893aee449.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-d93feb6893aee449.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/version/update/route-d93feb6893aee449.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-d93feb6893aee449.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/page-d93feb6893aee449.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-d93feb6893aee449.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-d93feb6893aee449.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-d93feb6893aee449.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-d93feb6893aee449.js +0 -1
  1115. package/app/.next-cli-build/static/css/d30ee18d498368cc.css +0 -1
  1116. package/app/public/providers/ai21.svg +0 -4
  1117. package/app/public/providers/aimlapi.svg +0 -4
  1118. package/app/public/providers/ainative.svg +0 -4
  1119. package/app/public/providers/aion.svg +0 -4
  1120. package/app/public/providers/anyapi.svg +0 -4
  1121. package/app/public/providers/arcee-ai.svg +0 -4
  1122. package/app/public/providers/bai.svg +0 -4
  1123. package/app/public/providers/baseten.svg +0 -4
  1124. package/app/public/providers/blackbox-web.svg +0 -6
  1125. package/app/public/providers/bluesminds.svg +0 -4
  1126. package/app/public/providers/bytez.svg +0 -4
  1127. package/app/public/providers/charm-hyper.svg +0 -4
  1128. package/app/public/providers/cheaperinference.svg +0 -4
  1129. package/app/public/providers/chenzk.svg +0 -4
  1130. package/app/public/providers/conol-web.svg +0 -1
  1131. package/app/public/providers/crof.svg +0 -4
  1132. package/app/public/providers/datarobot.svg +0 -4
  1133. package/app/public/providers/orcarouter.svg +0 -4
  1134. /package/app/.next-cli-build/static/{FP2YsqoRbzETOIHRfld7X → zahf-uMWnrDSCrrfcee0d}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
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=h.Q2[e]?.capabilities;return!t||!1!==t.toolUse&&!1!==t.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,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=57410)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{237:(e,s,t)=>{Promise.resolve().then(t.bind(t,44493))},44493:(e,s,t)=>{"use strict";t.d(s,{default:()=>o});var l=t(95155),n=t(12115),r=t(35497),a=t(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,s]=(0,n.useState)([]),[t,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),d=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let t=JSON.parse(e.data);"init"===t.type?s(t.logs.slice(-a.UY.maxLines)):"line"===t.type?s(e=>{let s=[...e,t.line];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"lines"===t.type?s(e=>{let s=[...e,...t.lines];return s.length>a.UY.maxLines?s.slice(-a.UY.maxLines):s}):"clear"===t.type&&s([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(r.zY,{title:"Console",description:"Live server logs",icon:"monitor",actions:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium ${t?"bg-success/12 text-success":"bg-danger/12 text-danger"}`,children:[(0,l.jsx)("span",{className:`size-1.5 rounded-full ${t?"bg-success":"bg-danger"}`}),t?"Live":"Disconnected"]}),(0,l.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:d,children:"Clear"})]})}),(0,l.jsx)(r.Zp,{padding:"none",children:(0,l.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,l.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,l.jsx)("div",{className:"space-y-0.5",children:e.map((e,s)=>{let t,n;return(0,l.jsx)("div",{children:(n=c[(t=e.match(/\[(\w+)\]/g))?t[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,l.jsx)("span",{className:n,children:e}))},s)})})})})]})}}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=237)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[27,9497,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var n=s(95155),i=s(98500),r=s.n(i),o=s(12115),l=s(35497),d=s(57250),c=s(88105),a=s(8247);let m=[{kind:"image",title:"Text to Image",icon:"brush",nodeType:null,addLabel:""},{kind:"stt",title:"Speech To Text",icon:"mic",nodeType:"custom-stt",addLabel:"STT"},{kind:"tts",title:"Text To Speech",icon:"record_voice_over",nodeType:"custom-tts",addLabel:"TTS"}],x={"custom-stt":{color:"#DC2626",textIcon:"ST"},"custom-tts":{color:"#10B981",textIcon:"TT"}};function u(e){let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"}function h({provider:e,kind:t,connections:s,isCustom:i}){let o=!!c.Q2[e.id]?.noAuth,m=(s||[]).filter(t=>t.provider===e.id),x=m.filter(e=>{let t=u(e);return"active"===t||"success"===t}).length,p=m.filter(e=>{let t=u(e);return"error"===t||"expired"===t||"unavailable"===t}).length,f=m.length;return(0,n.jsx)(r(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,n.jsx)(l.Zp,{padding:"xs",className:"h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer",children:(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,n.jsx)(d.A,{src:(0,a.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,n.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),o?(0,n.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):0===f?(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,n.jsxs)(n.Fragment,{children:[x>0&&(0,n.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[x," Connected"]}),p>0&&(0,n.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===x&&0===p&&(0,n.jsxs)(l.Ex,{variant:"default",size:"sm",children:[f," Added"]})]})]})]})]})})})}function p({title:e,icon:t,kind:s,connections:i,providers:r,custom:o,addLabel:d,onAddCustom:c}){let a=[...r,...o];return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary",children:t}),(0,n.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:["(",r.length," providers \xb7 ",o.length," custom)"]})]}),c&&(0,n.jsxs)(l.$n,{size:"sm",icon:"add",onClick:c,children:["Add Custom ",d]})]}),0===a.length?(0,n.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,n.jsx)(h,{provider:e,kind:s,connections:i,isCustom:e.isCustom},e.id))})]})}function f(){let[e,t]=(0,o.useState)([]),[s,i]=(0,o.useState)([]),[r,d]=(0,o.useState)(null);return(0,o.useEffect)(()=>{fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>t(e.connections||[])).catch(()=>{}),fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>i((e.nodes||[]).filter(e=>["custom-stt","custom-tts"].includes(e.type)))).catch(()=>{})},[]),(0,n.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,n.jsx)(l.zY,{title:"Media Providers",description:"Text to Image, speech-to-text, and text-to-speech providers",icon:"perm_media"}),m.map(t=>{let i=(0,c.o5)(t.kind).map(e=>({...e})),r=s.filter(e=>e.type===t.nodeType).map(e=>({id:e.id,name:e.name||`Custom ${t.addLabel}`,isCustom:!0,...x[t.nodeType]||{color:"#6366F1",textIcon:"CE"}}));return(0,n.jsxs)("div",{children:[(0,n.jsx)(p,{title:t.title,icon:t.icon,kind:t.kind,providers:i,custom:r,connections:e,addLabel:t.addLabel,onAddCustom:t.nodeType?()=>d(t.nodeType):null}),t!==m[m.length-1]&&(0,n.jsx)("div",{className:"my-6 border-t border-border"})]},t.kind)}),(0,n.jsx)(l.x0,{isOpen:!!r,nodeType:r||"custom-stt",onClose:()=>d(null),onCreated:e=>{i(t=>[...t,e]),d(null)}})]})}},61412:(e,t,s)=>{Promise.resolve().then(s.bind(s,57767))}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=61412)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[27,9497,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{45518:(e,t,s)=>{Promise.resolve().then(s.bind(s,81149))},81149:(e,t,s)=>{"use strict";s.d(t,{default:()=>D});var r=s(95155),a=s(12115),n=s(35497),l=s(14051),i=s.n(l),o=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:i={},activeProviders:u=[]}){let[x,p]=(0,a.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),f=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),h=(()=>{if(!g)return"Select a model...";if(i?.[g])return i[g];if(f){let e=(0,d.u0)(f,g);if(e&&e!==g)return e}return g})();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:h,children:[f&&(0,r.jsx)(o.A,{src:(0,c.k)(f),alt:f,size:l?16:18,fallbackText:(f||"?").slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:h}),(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,r.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:i})]})}m.propTypes={value:i().string,onChange:i().func.isRequired,models:i().arrayOf(i().shape({id:i().string,provider:i().string})),compact:i().bool,modelAliases:i().object,activeProviders:i().array};var u=s(25171);function x(e,t){return t?(e||"")+t:e}let p={content:"",reasoning:"",streaming:!0,error:null};function g(e,t,s){let r=e[t]||{content:"",reasoning:"",streaming:!0,error:null};return{...e,[t]:{...r,...s}}}function f(e,t,s){return e.map(e=>e.id!==t?e:{...e,...s})}let h=["minimal","low","medium","high"],b=[...h,"max"];function y(e){return JSON.stringify(e)}function j({params:e,onChange:t,selectedModel:s=""}){let n,[l,i]=(0,a.useState)(!0),{getCaps:o}=(0,u.y)(),c=(s,r)=>t({...e,[s]:r}),d=o?.(s),m=!!d?.reasoning,x=(d?.reasoning?Array.isArray(d.thinkingLevels)&&d.thinkingLevels.length>0?[...d.thinkingLevels]:d.thinkingMaxEffort?[...b]:[...h]:null)||[],p="number"==typeof(n=d?.maxOutput)&&Number.isFinite(n)&&n>0?n:128e3,g=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("button",{onClick:()=>i(!l),className:"mb-3 flex w-full items-center justify-between",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters",g&&(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${l?"rotate-90":""}`,children:"chevron_right"})]}),l&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,r.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>c("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),m&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",""),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${!e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"auto"}),x.map(t=>{let s=e.reasoningEffort===t;return(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t)}),d?.thinkingCanDisable!==!1&&(0,r.jsx)("button",{onClick:()=>c("reasoningEffort","none"),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${"none"===e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"none"})]}),(0,r.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Auto = provider default."})]}),(0,r.jsx)(v,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>c("temperature",e)}),(0,r.jsx)(v,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>c("topP",e)}),(0,r.jsx)(v,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>c("frequencyPenalty",e)}),(0,r.jsx)(v,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>c("presencePenalty",e)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,r.jsx)("input",{type:"number",min:"1",max:p,value:e.maxTokens??4096,onChange:e=>{let t=parseInt(e.target.value);c("maxTokens",Number.isFinite(t)&&t>0?Math.min(t,p):4096)},className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,r.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>c("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,r.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>c("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function v({label:e,value:t,min:s,max:a,step:n,onChange:l}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:s,max:a,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}j.propTypes={params:i().shape({systemPrompt:i().string,reasoningEffort:i().string,temperature:i().number,maxTokens:i().number,topP:i().number,frequencyPenalty:i().number,presencePenalty:i().number,topK:i().number,seed:i().number}).isRequired,onChange:i().func.isRequired,selectedModel:i().string},v.propTypes={label:i().string.isRequired,value:i().number.isRequired,min:i().number.isRequired,max:i().number.isRequired,step:i().number.isRequired,onChange:i().func.isRequired};var N=s(62630);function w(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function k(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function C({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,r.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-text-muted",children:["Total: ",k(e.compareLatencyMs)]})]});let a=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),r=s>0?t.slice(0,s):null,a=s>0?t.slice(s+1):t,n=(0,N.PS)(r,a);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,N.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,N.BD)(s);return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.inputTokens)})]}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.outputTokens)})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:k(e.latencyMs)})]}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-warning",children:a})]})]}),e.model&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function S({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:i}){let[o,c]=(0,a.useState)(""),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,a.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,o]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat","aria-label":"New chat"})]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,r.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,r.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,r.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,r.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,r.jsx)("button",{onClick:()=>i(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete","aria-label":`Delete ${e.title}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}C.propTypes={stats:i().object,mode:i().string},S.propTypes={sessions:i().array,currentSession:i().string,onNew:i().func.isRequired,onLoad:i().func.isRequired,onDelete:i().func.isRequired};var A=s(9233),T=s(91992);let P=void 0!==window.document,_=!1,R={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function $({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,a.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=A.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?P?(!_&&P&&(_=!0,T.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),T.A.sanitize(t,R)):t:""}catch{return""}},[e,n]);return n&&l?(0,r.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function O({messages:e,onSend:t,streaming:s}){let l=(0,a.useRef)(null),i=(0,a.useRef)(!0);return((0,a.useEffect)(()=>{l.current&&i.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,r.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,r.jsx)("div",{ref:l,onScroll:()=>{let e=l.current;e&&(i.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)},className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,r.jsx)(E,{msg:e},e.id))})}function E({msg:e}){let t="user"===e.role,s=e.error;return(0,r.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,r.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,r.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,r.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,r.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,r.jsxs)("div",{className:"break-words",children:[(0,r.jsx)($,{content:e.content,role:e.role,error:s}),e.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function I(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),r=new TextDecoder,a="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let i=(a+=r.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(a=i.pop()||"",i)){let s=e.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(r));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}function z(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function q(e){var t=localStorage;try{return t.setItem("extremerouter.playground.sessions",y(e)),"saved"}catch{try{return t.setItem("extremerouter.playground.sessions",y(e.map(e=>({...e,messages:(e.messages||[]).map(e=>"user"!==e.role?e:{...e,displayAttachments:Array.isArray(e.displayAttachments)?e.displayAttachments.map(e=>({id:e.id,name:e.name,stripped:!0})):void 0,content:Array.isArray(e.content)?e.content.map(e=>e&&"image_url"===e.type?{type:"image_url",image_url:{url:""}}:e):e.content})})))),"stripped"}catch{return"failed"}}}function D(){let[e,t]=(0,a.useState)(!0),[s,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)({}),[u,h]=(0,a.useState)([]),[b,y]=(0,a.useState)(null),[v,N]=(0,a.useState)([]),[w,k]=(0,a.useState)({}),[A,T]=(0,a.useState)("single"),[P,_]=(0,a.useState)([""]),[R,E]=(0,a.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[D,F]=(0,a.useState)({}),L=(0,a.useRef)(null),K=(0,a.useRef)({}),[B,H]=(0,a.useState)(null),U=(0,a.useRef)(!1),[J,W]=(0,a.useState)(null),Y=(0,a.useRef)(null),Z=(0,a.useCallback)(e=>{W(e),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>W(null),3e3)},[]),[G,Q]=(0,a.useState)(!1),[V,X]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),{streamChat:es,abortAll:er,streaming:ea}=function({onDelta:e,onComplete:t,onError:s}){let r=(0,a.useRef)({}),[n,l]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=r.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let i=(0,a.useCallback)(async(a,{body:n,apiKey:i})=>{let o=new AbortController;r.current[a]=o,l(e=>e+1);try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(r.Authorization=`Bearer ${i}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({...n,stream:!0}),signal:o.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(a,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await I(l,{onChunk:t=>e(a,t)});t(a,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(a,e?.message||"Network error",0)}finally{delete r.current[a],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:i,abort:(0,a.useCallback)(e=>{r.current[e]?.abort?.()},[]),abortAll:(0,a.useCallback)(()=>{Object.values(r.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,a.useCallback)((e,t)=>{let s=K.current[e];s&&("single"===s.mode?N(e=>f(e,s.assistantId,{content:x(e.find(e=>e.id===s.assistantId)?.content,t.content),reasoning:x(e.find(e=>e.id===s.assistantId)?.reasoning,t.reasoning)})):k(s=>{let r;return r=s[e]||{...p},{...s,[e]:{...r,content:x(r.content,t.content),reasoning:x(r.reasoning,t.reasoning)}}}))},[]),onComplete:(0,a.useCallback)((e,{usage:t})=>{let s=K.current[e];s&&("single"===s.mode?(N(e=>f(e,s.assistantId,{streaming:!1})),F({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):k(s=>g(s,e,{streaming:!1,usage:t})),delete K.current[e])},[]),onError:(0,a.useCallback)((e,t)=>{let s,r=K.current[e];if(!r)return;let a=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===r.mode?N(e=>f(e,r.assistantId,{content:`❌ Error: ${a}`,streaming:!1,error:!0})):k(t=>g(t,e,{content:`❌ ${a}`,streaming:!1,error:!0})),delete K.current[e]},[])}),en=(0,a.useCallback)(async()=>{X(null);try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),r=await e.json();o((r.connections||[]).filter(e=>!1!==e.isActive));let a=await t.json();d(a.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&_(e=>e[0]?e:[n[0].id])}catch(e){X(e?.message||"Failed to load models")}},[]);(0,a.useEffect)(()=>{(async()=>{h(function(){try{let e=localStorage.getItem("extremerouter.playground.sessions");return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(L.current=s.key)}catch{}try{let e=await fetch("/api/settings"),t=await e.json(),s=!0===t.requireApiKey;Q(s&&!L.current)}catch{Q(!1)}await en(),t(!1)})()},[en]),(0,a.useEffect)(()=>{"single"===A&&(U.current=!1)},[A]);let el=(0,a.useCallback)(()=>{v.length>0&&b&&ec(b,v),H(null),N([]),y(null),F({}),k({})},[v,b]),ei=(0,a.useCallback)(e=>{v.length>0&&b&&ec(b,v),N(e.messages||[]),y(e.id),Array.isArray(e.models)&&e.models.length>0?_([...e.models]):e.model&&_([e.model]),e.mode&&T(e.mode),e.params&&E(e.params),F({}),k(e.compareResults?{...e.compareResults}:{})},[v,b]),eo=(0,a.useCallback)(e=>{let t=u.filter(t=>t.id!==e);h(t),q(t),b===e&&(y(null),N([]))},[u,b]),ec=(0,a.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t.slice(-60),updatedAt:Date.now()}:s).slice(0,100);h(s),q(s)},[u]),ed=(0,a.useCallback)(()=>{let e=v.length>0,t="compare"===A&&Object.keys(w).length>0;if(!e&&!t)return;let s=b||z(),r=function({id:e,messages:t,params:s,selectedModels:r,mode:a,compareResults:n}){return{id:e,title:t.length>0?function(e,t="New Chat"){let s=e.find(e=>"user"===e.role);if(!s)return t;let r=s.content;Array.isArray(r)&&(r=r.map(e=>e&&"text"===e.type?e.text:"").filter(Boolean).join(" ")),"string"!=typeof r&&(r="");let a=r.trim().replace(/\s+/g," ");return a?a.slice(0,40):t}(t):"compare"===a?"Compare":"New Chat",messages:t.slice(-60),model:r[0]||"",models:r,mode:a,compareResults:"compare"===a&&n&&Object.keys(n).length>0?JSON.parse(JSON.stringify(n)):void 0,params:{...s},createdAt:Date.now(),updatedAt:Date.now()}}({id:s,messages:v,params:R,selectedModels:P,mode:A,compareResults:w}),a=(u.find(e=>e.id===s)?u.map(e=>e.id===s?{...e,...r}:e):[r,...u]).slice(0,100);h(a);let n=q(a);y(s),Z(n)},[v,b,u,P,R,A,w,Z]),em=(0,a.useCallback)((e,t=[])=>{let s=t.length>0,r={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:z(),displayText:e,displayAttachments:s?t:void 0},a=[...v];R.systemPrompt&&a.unshift({role:"system",content:R.systemPrompt});let n=[...a.slice(-50),r],l={temperature:R.temperature,max_tokens:R.maxTokens,top_p:R.topP};return R.frequencyPenalty&&(l.frequency_penalty=R.frequencyPenalty),R.presencePenalty&&(l.presence_penalty=R.presencePenalty),R.topK&&(l.top_k=R.topK),null!=R.seed&&(l.seed=R.seed),R.reasoningEffort&&(l.reasoning_effort=R.reasoningEffort),{userMsg:r,baseMessages:n,requestParams:l}},[v,R]),eu=(0,a.useCallback)(async(e,t=[])=>{let{userMsg:s,baseMessages:r,requestParams:a}=em(e,t),n=L.current,l=Date.now();if("single"===A){let e=P[0];if(!e)return;let t=z();N([...r.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),K.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await es("single",{body:{model:e,messages:r,...a},apiKey:n})}else{let e=P.map((e,t)=>({modelId:e,key:`${t}::${e}`})).filter(e=>e.modelId);if(0===e.length)return;let t={};for(let s of e)t[s.key]={...p};k(t),e.forEach(e=>{K.current[e.key]={mode:"compare",modelId:e.modelId,startTime:l}}),await Promise.allSettled(e.map(e=>es(e.key,{body:{model:e.modelId,messages:r,...a},apiKey:n}))),F({compareLatencyMs:Date.now()-l,models:e.length})}},[A,P,em,es]),ex=(0,a.useCallback)(async(e,t=[])=>{if((e.trim()||0!==t.length)&&!ea){if("compare"===A&&!U.current&&P.filter(Boolean).length>1)return void H({text:e,attachments:t});await eu(e,t)}},[A,ea,P,eu]),ep=(0,a.useCallback)(()=>{U.current=!0,B&&(eu(B.text,B.attachments),H(null))},[B,eu]),eg=(0,a.useCallback)(()=>{er(),K.current={},N(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),k(e=>{let t={};for(let[s,r]of Object.entries(e))t[s]={...r,streaming:!1};return t})},[er]);return e?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:A,onChange:T,size:"sm"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:ea?"stop":"save",onClick:ea?eg:ed,disabled:!ea&&0===v.length,children:ea?"Stop":"Save"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"history",className:"lg:hidden","aria-label":"Open history",onClick:()=>et("history")}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"tune",className:"lg:hidden","aria-label":"Open parameters",onClick:()=>et("params")}),J&&(0,r.jsxs)("span",{className:"text-xs text-text-muted",role:"status","aria-live":"polite",children:["saved"===J&&"Saved","stripped"===J&&"Saved — images removed to fit storage","failed"===J&&"Save failed"]})]})}),(G||V)&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[G&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-warning/30 bg-warning/5 px-3 py-2 text-xs text-warning",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"API key required."})," The gateway requires an API key for requests, but no active key was found — sends will fail with a 401."]}),(0,r.jsx)("a",{href:"/dashboard/endpoint",className:"shrink-0 font-semibold underline hover:text-warning/80",children:"Create an API key →"})]}),V&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-danger/30 bg-danger/5 px-3 py-2 text-xs text-danger",children:[(0,r.jsxs)("span",{className:"truncate",children:["Failed to load models: ",V]}),(0,r.jsx)(n.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:en,children:"Retry"})]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,r.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:ei,onDelete:eo})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===A?(0,r.jsx)(m,{models:s,value:P[0],onChange:e=>_([e]),activeProviders:i,modelAliases:c}):(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[P.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...P];s[t]=e,_(s)},compact:!0,activeProviders:i,modelAliases:c}),P.length>2&&(0,r.jsx)("button",{onClick:()=>_(P.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),P.length<4&&(0,r.jsxs)("button",{onClick:()=>_([...P,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===A?(0,r.jsx)(O,{messages:v,onSend:ex,streaming:ea,stats:D}):(0,r.jsx)("div",{className:"flex min-w-0 gap-3",children:P.map((e,t)=>{if(!e)return null;let s=`${t}::${e}`,a=w[s];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,r.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,r.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,r.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[a?.reasoning&&(0,r.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:a.reasoning})]}),a?.content?(0,r.jsxs)("div",{className:`text-sm ${a.error?"text-danger":"text-text-main"}`,children:[a.error?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:a.content}):(0,r.jsx)($,{content:a.content,role:"assistant"}),a.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,r.jsx)("p",{className:"text-sm text-text-muted",children:ea?"Waiting...":"Send a message to compare"})]})]},s)})}),(0,r.jsx)(M,{onSend:ex,streaming:ea,onStop:eg}),Object.keys(D).length>0&&(0,r.jsx)(C,{stats:D,mode:A})]}),(0,r.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]}),(0,r.jsx)(n.uo,{isOpen:!!B,onClose:()=>H(null),onConfirm:ep,title:"Send to multiple models at once?",message:B?`Compare mode sends this exact prompt to ${P.filter(Boolean).length} models simultaneously. One request becomes ${P.filter(Boolean).length} upstream calls (~${P.filter(Boolean).length}\xd7 the tokens of a single request), billed by each provider.`:"",confirmText:"Compare all",cancelText:"Cancel",variant:"secondary"}),(0,r.jsx)(n.aF,{isOpen:"history"===ee,onClose:()=>et(null),title:"History",size:"lg",children:(0,r.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:e=>{ei(e),et(null)},onDelete:eo})})}),(0,r.jsx)(n.aF,{isOpen:"params"===ee,onClose:()=>et(null),title:"Parameters",size:"lg",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]})}function M({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,a.useState)(""),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),m=(0,a.useRef)(null),u=(0,a.useRef)(null),x=e=>{d(e),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>d(null),4e3)},p=e=>{if(!e||!e.type.startsWith("image/"))return void x("Only image files can be attached");if(e.size>5242880)return void x("Image too large — max 5MB");let t=new FileReader;t.onload=()=>{o(s=>[...s,{id:z(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},g=()=>{(n.trim()||0!==i.length)&&!t&&(e(n,i),l(""),o([]),u.current&&(u.current.style.height="auto"))},f=(n.trim()||i.length>0)&&!t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[i.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,r.jsx)("button",{onClick:()=>o(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),c&&(0,r.jsx)("p",{className:"px-1 text-[10px] text-warning",role:"status","aria-live":"polite",children:c}),(0,r.jsxs)("div",{className:"flex items-end gap-2",children:[(0,r.jsx)("textarea",{ref:u,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,p(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),g())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,r.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop","aria-label":"Stop",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,r.jsx)("button",{onClick:g,disabled:!f,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send","aria-label":"Send",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}A.xI.setOptions({gfm:!0,breaks:!0,async:!1}),$.propTypes={content:i().string,role:i().string,error:i().bool},O.propTypes={messages:i().arrayOf(i().shape({id:i().string,role:i().string,content:i().string,reasoning:i().string,model:i().string,streaming:i().bool,error:i().bool,attachments:i().array})),onSend:i().func,streaming:i().bool}}},e=>{e.O(0,[27,1992,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=45518)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{3658:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","glass","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"glass"===s?"blur_on":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=3658)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{29009:(e,t,a)=>{Promise.resolve().then(a.bind(a,42418))},42418:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>O});var r=a(95155),s=a(12115),l=a(35497),i=a(90620),o=a(88105),n=a(65921),c=a(38003),d=a(67098),p=a(98500),m=a.n(p),u=a(57250),x=a(31474),h=a(8247);function f({providerId:e,provider:t,stats:a,onToggle:s,onTest:i,isNoAuth:n=!1,comingSoon:c=!1,isNew:d=!1,testing:p=!1}){let y=e.startsWith(o.JH),g=e.startsWith(o.DI),{connected:b,error:v,errorCode:j,allDisabled:N}=a,k=(0,h.k)(e,t.apiType),C=a.total>0,w=C&&s&&!c;return(0,r.jsxs)("div",{className:(0,x.cn)("group relative flex flex-col overflow-hidden rounded-panel border border-border-subtle bg-panel shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",c&&"opacity-70"),children:[(0,r.jsxs)(m(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-col gap-2 px-3 pb-2 pt-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${t.color?.length>7?t.color.slice(0,7):t.color}15`},children:(0,r.jsx)(u.A,{src:k,alt:t.name,size:32,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id?.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("h3",{className:"flex items-center gap-1.5 text-sm font-semibold leading-tight text-text-main",children:[(0,r.jsx)("span",{className:"truncate",children:t.name}),d&&(0,r.jsx)("span",{className:"inline-flex shrink-0 items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[10px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"})]}),C?(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:b>0?`${b} active`:`${a.total} connection${a.total>1?"s":""}`}):n?(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:"No key needed"}):(0,r.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:"Not connected"})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[N?(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):n&&0===b&&0===v?(0,r.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):b>0?(0,r.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[b," Connected"]}):null,v>0&&(0,r.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:j?`${v} Error (${j})`:`${v} Error`}),c&&(0,r.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Soon"]})}),y&&(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),g&&(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 border-t border-border-subtle px-3 py-2",children:[C&&i&&(0,r.jsx)(l.m_,{text:p?"Testing...":"Test provider",children:(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),i(e)},disabled:p,className:"flex h-7 w-7 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:opacity-50","aria-label":"Test provider",children:(0,r.jsx)("span",{className:(0,x.cn)("material-symbols-outlined text-[16px]",p&&"animate-spin"),children:p?"progress_activity":"bolt"})})}),(0,r.jsx)(l.m_,{text:"Configure",children:(0,r.jsx)(m(),{href:`/dashboard/providers/${e}`,onClick:e=>e.stopPropagation(),className:"flex h-7 w-7 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-primary","aria-label":"Configure provider",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"settings"})})}),(0,r.jsx)("div",{className:"flex-1"}),w&&(0,r.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!!N)},className:"opacity-80 sm:opacity-50 sm:group-hover:opacity-100",children:(0,r.jsx)(l.lM,{size:"sm",checked:!N,onChange:()=>{}})})]})]})}let y=[{key:"total",label:"Total",icon:"dns",color:"#3B82F6"},{key:"connected",label:"Connected",icon:"link",color:"#10B981"},{key:"errors",label:"Errors",icon:"error",color:"#E11D48"},{key:"ready",label:"Ready",icon:"bolt",color:"#F59E0B"}];function g({counts:e,activeFilter:t,onFilter:a}){return(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:y.map(s=>{let i=e[s.key]||0,o=t===s.key,n="errors"===s.key&&i>0;return(0,r.jsx)(l.Zp,{padding:"sm",className:`flex items-center gap-3 transition-all ${n?"cursor-pointer hover:border-primary/35 hover:bg-panel-elev":""} ${o?"border-primary/35 bg-primary/5":""}`,children:n?(0,r.jsx)("button",{type:"button",onClick:()=>a(o?"all":s.key),className:"flex w-full items-center gap-3 text-left","aria-label":`Filter by ${s.label.toLowerCase()}`,children:(0,r.jsx)(b,{kpi:s,value:i})}):(0,r.jsx)(b,{kpi:s,value:i})},s.key)})})}function b({kpi:e,value:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",style:{color:e.color},children:e.icon})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"font-mono text-2xl font-bold leading-none text-text-main",children:t}),(0,r.jsx)("div",{className:"mt-1 text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})}let v=[{value:"all",label:"All"},{value:"connected",label:"Connected"},{value:"errors",label:"Errors"},{value:"oauth",label:"OAuth"},{value:"apikey",label:"API Key"},{value:"free",label:"Free"},{value:"cookie",label:"Cookie"},{value:"custom",label:"Custom"}],j=[{value:"priority",label:"Priority"},{value:"name",label:"Name"},{value:"connections",label:"Connections"}];function N({filter:e,onFilter:t,sortBy:a,onSort:s,counts:l={},total:i,isSearching:o}){return(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:v.map(a=>{let s=l[a.value],n=void 0!==s&&s!==i&&"all"!==a.value;if(!o&&0===s&&"all"!==a.value)return null;let c=e===a.value;return(0,r.jsxs)("button",{type:"button",onClick:()=>t(a.value),className:(0,x.cn)("flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium transition-colors",c?"border-primary/30 bg-primary/5 text-primary":"border-border bg-black/[0.02] text-text-primary hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10"),"aria-pressed":c,children:[a.label,n&&(0,r.jsx)("span",{className:(0,x.cn)("rounded-full px-1.5 py-0.5 text-[10px] font-bold tabular-nums",c?"bg-primary/15 text-primary":"bg-black/5 text-text-muted dark:bg-white/10"),children:s})]},a.value)})}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted",children:"sort"}),(0,r.jsx)("select",{value:a,onChange:e=>s(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort providers",children:j.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})}var k=a(14051),C=a.n(k);let w={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function A({results:e}){if(e.error&&!e.results)return(0,r.jsxs)("div",{className:"py-6 text-center",children:[(0,r.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,r.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:a}=e,s=e.results||[],l=w[a]||a;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,r.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,r.jsxs)("span",{className:"text-text-muted",children:[l," Test"]}),(0,r.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,r.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,r.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),s.map((e,t)=>(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,r.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,r.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,r.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,r.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,r.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===s.length&&(0,r.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}A.propTypes={results:C().shape({mode:C().string,results:C().array,summary:C().shape({total:C().number,passed:C().number,failed:C().number}),error:C().string}).isRequired};let T={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},S=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function I({variant:e,isOpen:t,onClose:a,onCreated:i}){let o=T[e],n=()=>({name:"",prefix:"",...o.hasApiType?{apiType:"chat"}:{},baseUrl:o.defaultBaseUrl}),[c,d]=(0,s.useState)(n),[p,m]=(0,s.useState)(!1),[u,x]=(0,s.useState)(""),[h,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)(null);(0,s.useEffect)(()=>{o.hasApiType?d(e=>({...e,baseUrl:o.defaultBaseUrl})):t&&(v(null),x(""),f(""))},[o.hasApiType?c.apiType:t]);let j=async()=>{if(c.name.trim()&&c.prefix.trim()&&c.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.name,prefix:c.prefix,...o.hasApiType?{apiType:c.apiType}:{},baseUrl:c.baseUrl,type:o.type})}),t=await e.json();e.ok&&(i(t.node),d(n()),x(""),v(null))}catch(e){console.log(`Error creating ${o.errorLabel} node:`,e)}finally{m(!1)}}},N=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:c.baseUrl,apiKey:u,type:o.type,modelId:h.trim()||void 0})}),t=await e.json();v(t)}catch{v({valid:!1,error:"Network error"})}finally{g(!1)}};return(0,r.jsx)(l.aF,{isOpen:t,title:o.title,onClose:a,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(l.pd,{label:"Name",value:c.name,onChange:e=>d({...c,name:e.target.value}),placeholder:o.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,r.jsx)(l.pd,{label:"Prefix",value:c.prefix,onChange:e=>d({...c,prefix:e.target.value}),placeholder:o.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),o.hasApiType&&(0,r.jsx)(l.l6,{label:"API Type",options:S,value:c.apiType,onChange:e=>d({...c,apiType:e.target.value})}),(0,r.jsx)(l.pd,{label:"Base URL",value:c.baseUrl,onChange:e=>d({...c,baseUrl:e.target.value}),placeholder:o.defaultBaseUrl,hint:o.baseUrlHint}),(0,r.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>x(e.target.value)}),(0,r.jsx)(l.pd,{label:"Model ID (optional)",value:h,onChange:e=>f(e.target.value),placeholder:o.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,r.jsx)(l.$n,{onClick:N,disabled:!u||y||!c.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:y?"Checking...":"Check"}),(()=>{if(!b)return null;let{valid:e,error:t,method:a}=b;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,r.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!c.name.trim()||!c.prefix.trim()||!c.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,r.jsx)(l.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function O(){let e,[t,a]=(0,s.useState)([]),[p,m]=(0,s.useState)([]),[u,x]=(0,s.useState)(!0),{isNew:h,markSeen:y}=(0,d.P)("providers"),[b,v]=(0,s.useState)("all"),[j,k]=(0,s.useState)("priority"),[C,w]=(0,s.useState)(!1),[T,S]=(0,s.useState)(!1),[O,P]=(0,s.useState)(null),[$,U]=(0,s.useState)(null),E=(0,s.useRef)(!1),R=(0,n.i)(),_=(0,c.C)(e=>e.query),z=(0,c.C)(e=>e.register),D=(0,c.C)(e=>e.unregister),L=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&a(t.connections||[])}catch{}},[]);(0,s.useEffect)(()=>(z("Search providers..."),()=>D()),[z,D]),(0,s.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),r=await e.json(),s=await t.json();e.ok&&a(r.connections||[]),t.ok&&m(s.nodes||[])}catch{}x(!1)})()},[]);let F=!!_.trim(),M=(e=_.trim().toLowerCase(),(t,a="",r="")=>!e||t.toLowerCase().includes(e)||a.toLowerCase().includes(e)||r.toLowerCase().includes(e)),q=(e,a)=>{let r=Array.isArray(a)?a:[a],s=t.filter(t=>t.provider===e&&r.includes(t.authType)),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=s.filter(e=>{let t=l(e);return"active"===t||"success"===t}).length,o=s.filter(e=>{let t=l(e);return"error"===t||"failed"===t}),n=o.length,c=o[0],d=c?Object.entries(c).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":c.errorCode||null:null,p=c?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),a=Math.floor((new Date().getTime()-t.getTime())/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;let r=Math.floor(a/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return s<7?`${s}d ago`:t.toLocaleDateString()}(c.lastErrorAt):null,m=s.length>0&&s.every(e=>!1===e.isActive);return{connected:i,error:n,total:s.length,errorCode:d,errorTime:p,allDisabled:m}},B=(0,s.useCallback)((e,t,r)=>{let s=Array.isArray(t)?t:[t],l=t=>t.provider===e&&s.includes(t.authType);a(e=>(Promise.allSettled(e.filter(l).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})}))),e.map(e=>l(e)?{...e,isActive:r}:e)))},[]),W=(0,s.useCallback)(async(e,t=null)=>{if(!E.current){E.current=!0,P("provider"===e?t:e),U(null);try{let a=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),r=await a.json();if(U(r),r.summary){let{passed:e,failed:t,total:a}=r.summary;0===t?R.success(`All ${a} tests passed`):R.warning(`${e}/${a} passed, ${t} failed`)}L()}catch{U({error:"Test request failed"}),R.error("Provider test failed")}finally{P(null),E.current=!1}}},[R,L]),J=(0,s.useMemo)(()=>{let e=[];for(let t of p){let a=t.id,r=t.name||("anthropic-compatible"===t.type?"Anthropic Compatible":"OpenAI Compatible");M(r,a)&&e.push({id:a,name:r,color:"anthropic-compatible"===t.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===t.type?"AC":"OC",apiType:t.apiType,category:"custom",priority:999,authTypes:"apikey",stats:q(a,"apikey"),isNew:h(a),isNoAuth:!1,comingSoon:!1})}for(let[t,a]of Object.entries(i.zN)){if(a.hidden||!M(a.name,a.id,a.alias))continue;let r=a?.hasOAuth===!1?"apikey":"oauth";e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"oauth",priority:a.priority??100,authTypes:r,stats:q(t,r),isNew:h(t),isNoAuth:!1,comingSoon:!!a.comingSoon})}for(let[t,a]of Object.entries(o.IS)){if(a.hidden||!M(a.name,a.id,a.alias))continue;let r="kiro"===t?["oauth","apikey","api_key"]:"oauth";e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"free",priority:a.priority??200,authTypes:r,stats:q(t,r),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon})}for(let[t,a]of Object.entries(o.nJ))!a.hidden&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"free",priority:a.priority??210,authTypes:"apikey",stats:q(t,"apikey"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});for(let[t,a]of Object.entries(i.fg))!a.hidden&&(a.serviceKinds??["llm"]).includes("llm")&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"apikey",priority:a.priority??300,authTypes:"apikey",stats:q(t,"apikey"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});for(let[t,a]of Object.entries(o.br))!a.hidden&&M(a.name,a.id,a.alias)&&e.push({id:t,name:a.name,color:a.color,textIcon:a.textIcon,category:"cookie",priority:a.priority??400,authTypes:"cookie",stats:q(t,"cookie"),isNew:h(t),isNoAuth:!!a.noAuth,comingSoon:!!a.comingSoon});return e},[p,t,_,h]),K=(0,s.useMemo)(()=>{let e=0,t=0,a=0;for(let r of J)r.stats.connected>0&&e++,r.stats.error>0&&t++,r.isNoAuth&&0===r.stats.connected&&0===r.stats.error&&a++,!r.isNoAuth&&0===r.stats.connected&&0===r.stats.error&&0===r.stats.total&&a++;return{total:J.length,connected:e,errors:t,ready:a}},[J]),H=(0,s.useMemo)(()=>{let e={all:J.length,connected:0,errors:0,oauth:0,apikey:0,free:0,cookie:0,custom:0};for(let t of J)t.stats.connected>0&&e.connected++,t.stats.error>0&&e.errors++,e[t.category]++;return e},[J]),Q=(0,s.useMemo)(()=>{let e=J;"all"!==b&&(e="connected"===b?e.filter(e=>e.stats.connected>0):"errors"===b?e.filter(e=>e.stats.error>0):e.filter(e=>e.category===b));let t=[...e];return"name"===j?t.sort((e,t)=>(e.name||"").localeCompare(t.name||"")):"connections"===j?t.sort((e,t)=>{let a=e.stats.connected>0?0:1,r=t.stats.connected>0?0:1;return a!==r?a-r:(t.stats.total||0)-(e.stats.total||0)||(e.name||"").localeCompare(t.name||"")}):t.sort((e,t)=>{let a=e.stats.total>0?0:1,r=t.stats.total>0?0:1;return a!==r?a-r:e.priority!==t.priority?e.priority-t.priority:(e.name||"").localeCompare(t.name||"")}),t},[J,b,j]);if(u)return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(l.Qv,{}),(0,r.jsx)(l.Qv,{})]});let V=F&&0===Q.length,Y=!F&&0===J.length;return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,r.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>S(!0),children:"Anthropic"}),(0,r.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>w(!0),children:"OpenAI"})]})}),(0,r.jsx)(g,{counts:K,activeFilter:b,onFilter:v}),K.connected>0&&(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(l.$n,{size:"sm",variant:"outline",icon:"all"===O?"progress_activity":"bolt",onClick:()=>W("all"),disabled:!!O,className:"all"===O?"animate-pulse":"",children:"all"===O?"Testing All...":"Test All Providers"})}),!Y&&(0,r.jsx)(N,{filter:b,onFilter:v,sortBy:j,onSort:k,counts:H,total:J.length,isSearching:F}),V&&(0,r.jsx)(l.pp,{icon:"search_off",title:`No providers match "${_}"`,description:"Try a different search term or clear the filters."}),Y&&(0,r.jsx)(l.pp,{icon:"cloud_off",title:"No providers yet",description:"Add your first provider to start routing requests."}),Q.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:Q.map(e=>(0,r.jsx)(f,{providerId:e.id,provider:e,stats:e.stats,isNoAuth:e.isNoAuth,comingSoon:e.comingSoon,isNew:e.isNew,testing:O===e.id,onToggle:t=>B(e.id,e.authTypes,t),onTest:e=>W("provider",e)},e.id))}),$&&(0,r.jsx)(l.aF,{isOpen:!!$,onClose:()=>U(null),title:"Provider Test Results",size:"md",children:(0,r.jsx)(A,{results:$})}),(0,r.jsx)(I,{variant:"openai",isOpen:C,onClose:()=>w(!1),onCreated:e=>{m(t=>[...t,e]),w(!1)}}),(0,r.jsx)(I,{variant:"anthropic",isOpen:T,onClose:()=>S(!1),onCreated:e=>{m(t=>[...t,e]),S(!1)}})]})}I.propTypes={variant:C().oneOf(["openai","anthropic"]).isRequired,isOpen:C().bool.isRequired,onClose:C().func.isRequired,onCreated:C().func.isRequired}}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=29009)),_N_E=e.O()}]);