switchboard-router 0.6.30 → 0.8.0

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 (1257) hide show
  1. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  2. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_ssgManifest.js +1 -0
  3. package/app/.next/static/chunks/1321-8d4ef805452d3649.js +1 -0
  4. package/app/.next/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  5. package/app/.next/static/chunks/1a258343-33aee1e7d9aa500f.js +1 -0
  6. package/app/.next/static/chunks/3531-e8d13ec64699f527.js +68 -0
  7. package/app/.next/static/chunks/3794-d7cddff008311ab3.js +52 -0
  8. package/app/.next/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  9. package/app/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
  10. package/app/.next/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  11. package/app/.next/static/chunks/594-5a5c7b405aa92038.js +64 -0
  12. package/app/.next/static/chunks/6430-4c528cfc35666c11.js +1 -0
  13. package/app/.next/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
  14. package/app/.next/static/chunks/782-3a03a779968fa7a2.js +3 -0
  15. package/app/.next/static/chunks/8202.1ffc6ce531e066ce.js +1 -0
  16. package/app/.next/static/chunks/8500-74c368e06d70378e.js +1 -0
  17. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  18. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  19. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d7205b7328b3fed1.js +1 -0
  20. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d0b6efe01e687aec.js +1 -0
  21. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  22. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/routing/page-25629f96675ad55d.js +1 -0
  23. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  24. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  25. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  26. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-52c12af07f9a6de0.js +1 -0
  27. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  28. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  29. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-cfbd3661ac75b8c5.js +1 -0
  30. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-8779ff2bc755ba78.js +1 -0
  31. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  32. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-d32871b974f7e72f.js +1 -0
  33. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  34. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  35. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-555f079cdf31bbf6.js +1 -0
  36. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  37. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  38. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-56bf48ee2068208e.js +1 -0
  39. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-46986a955b8c89b2.js +1 -0
  40. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  41. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  42. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  43. package/app/.next/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  44. package/app/.next/static/chunks/app/(dashboard)/layout-62b4e2cdf745f8d0.js +1 -0
  45. package/app/.next/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  46. package/app/.next/static/chunks/app/_not-found/page-ee581ced4614e639.js +1 -0
  47. package/app/.next/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  48. package/app/.next/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  49. package/app/.next/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  50. package/app/.next/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  51. package/app/.next/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  52. package/app/.next/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  53. package/app/.next/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  54. package/app/.next/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  55. package/app/.next/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  56. package/app/.next/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  57. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  58. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  59. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  60. package/app/.next/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  61. package/app/.next/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  62. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  63. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  64. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  65. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  66. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  67. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  68. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  69. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  70. package/app/.next/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  71. package/app/.next/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  72. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  73. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  74. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  75. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  76. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  77. package/app/.next/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  78. package/app/.next/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  79. package/app/.next/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  80. package/app/.next/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  81. package/app/.next/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  82. package/app/.next/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  83. package/app/.next/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  84. package/app/.next/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  85. package/app/.next/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  86. package/app/.next/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  87. package/app/.next/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  88. package/app/.next/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  89. package/app/.next/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  90. package/app/.next/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  91. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  92. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  93. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  94. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  95. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  96. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  97. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  98. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  99. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  100. package/app/.next/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  101. package/app/.next/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  102. package/app/.next/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  103. package/app/.next/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  104. package/app/.next/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  105. package/app/.next/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  106. package/app/.next/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  107. package/app/.next/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  108. package/app/.next/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  109. package/app/.next/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  110. package/app/.next/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  111. package/app/.next/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  112. package/app/.next/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  113. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  114. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  115. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  116. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  117. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  118. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  119. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  120. package/app/.next/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  121. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  122. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  123. package/app/.next/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  124. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  125. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  126. package/app/.next/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  127. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  128. package/app/.next/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  129. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  130. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  131. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  132. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  133. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  134. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  135. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  136. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  137. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  138. package/app/.next/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  139. package/app/.next/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  140. package/app/.next/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  141. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  142. package/app/.next/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  143. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  144. package/app/.next/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  145. package/app/.next/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  146. package/app/.next/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  147. package/app/.next/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  148. package/app/.next/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  149. package/app/.next/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  150. package/app/.next/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  151. package/app/.next/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  152. package/app/.next/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  153. package/app/.next/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  154. package/app/.next/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  155. package/app/.next/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  156. package/app/.next/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  157. package/app/.next/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  158. package/app/.next/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  159. package/app/.next/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  160. package/app/.next/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  161. package/app/.next/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  162. package/app/.next/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  163. package/app/.next/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  164. package/app/.next/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  165. package/app/.next/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  166. package/app/.next/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  167. package/app/.next/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  168. package/app/.next/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  169. package/app/.next/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  170. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  171. package/app/.next/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  172. package/app/.next/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  173. package/app/.next/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  174. package/app/.next/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  175. package/app/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  176. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  177. package/app/.next/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  178. package/app/.next/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  179. package/app/.next/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  180. package/app/.next/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  181. package/app/.next/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  182. package/app/.next/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  183. package/app/.next/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  184. package/app/.next/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  185. package/app/.next/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  186. package/app/.next/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  187. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  188. package/app/.next/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  189. package/app/.next/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  190. package/app/.next/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  191. package/app/.next/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  192. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  193. package/app/.next/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  194. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  195. package/app/.next/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  196. package/app/.next/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  197. package/app/.next/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  198. package/app/.next/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  199. package/app/.next/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  200. package/app/.next/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  201. package/app/.next/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  202. package/app/.next/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  203. package/app/.next/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  204. package/app/.next/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  205. package/app/.next/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  206. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  207. package/app/.next/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  208. package/app/.next/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  209. package/app/.next/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  210. package/app/.next/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  211. package/app/.next/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  212. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  213. package/app/.next/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  214. package/app/.next/static/chunks/app/layout-214ea0ad8a3d8323.js +1 -0
  215. package/app/.next/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  216. package/app/.next/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  217. package/app/.next/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  218. package/app/.next/static/chunks/framework-461b899b66554474.js +1 -0
  219. package/app/.next/static/chunks/main-app-83fef838b21a8d19.js +1 -0
  220. package/app/.next/static/chunks/main-d2d664d299c2e1bc.js +5 -0
  221. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  222. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  223. package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-f9c47afa2e4175d7.js +1 -0
  224. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  225. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  226. package/app/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  227. package/app/.next/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  228. package/app/.next/static/css/23b999cda6943547.css +1 -0
  229. package/app/.next/static/css/a26e7bdf55d5cb27.css +1 -0
  230. package/app/.next/static/css/e07f2bf4fa519943.css +31 -0
  231. package/app/.next/static/media/011e180705008d6f-s.woff2 +0 -0
  232. package/app/.next/static/media/20535187d867b7b9-s.woff2 +0 -0
  233. package/app/.next/static/media/26d4368bf94c0ec4-s.p.woff2 +0 -0
  234. package/app/.next/static/media/2801417b65625cf5-s.woff2 +0 -0
  235. package/app/.next/static/media/28793f5c5e3d822d-s.woff2 +0 -0
  236. package/app/.next/static/media/5356a6a4f2c8c8d8-s.woff2 +0 -0
  237. package/app/.next/static/media/58f386aa6b1a2a92-s.woff2 +0 -0
  238. package/app/.next/static/media/73cb51aac9c97f90-s.woff2 +0 -0
  239. package/app/.next/static/media/7b19b489dc6743ba-s.woff2 +0 -0
  240. package/app/.next/static/media/7ba5fb2a8c88521c-s.woff2 +0 -0
  241. package/app/.next/static/media/92eeb95d069020cc-s.woff2 +0 -0
  242. package/app/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  243. package/app/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  244. package/app/.next/static/media/b3bf17a9041d9433-s.woff2 +0 -0
  245. package/app/.next/static/media/c9c3823090ec8b55-s.woff2 +0 -0
  246. package/app/.next/static/media/catalog.e7ada387.json +1710 -0
  247. package/app/.next/static/media/d26bbd13d6b70f89-s.woff2 +0 -0
  248. package/app/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  249. package/app/.next/static/media/d3ebbfd689654d3a-s.p.woff2 +0 -0
  250. package/app/.next/static/media/db96af6b531dc71f-s.p.woff2 +0 -0
  251. package/app/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  252. package/app/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  253. package/app/.next/static/media/material-symbols-outlined.f656244e.woff2 +0 -0
  254. package/app/.next-cli-build/BUILD_ID +1 -1
  255. package/app/.next-cli-build/app-path-routes-manifest.json +26 -10
  256. package/app/.next-cli-build/build-manifest.json +2 -2
  257. package/app/.next-cli-build/prerender-manifest.json +3 -3
  258. package/app/.next-cli-build/required-server-files.json +5 -1
  259. package/app/.next-cli-build/routes-manifest.json +98 -0
  260. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
  261. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  263. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  264. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  266. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  267. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  269. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  270. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  272. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  273. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  275. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +1 -1
  276. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  278. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  279. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  281. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  282. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  284. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +11 -11
  285. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  287. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  288. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  290. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  291. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  293. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +1 -1
  294. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  296. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  297. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  299. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  300. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  302. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  303. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  305. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  306. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  308. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  309. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  311. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  312. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  314. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  315. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  317. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -0
  318. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -0
  319. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -0
  320. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  321. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  323. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +1 -1
  324. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  326. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  327. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  329. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  330. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  332. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  333. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  335. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  336. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  338. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  339. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  341. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  342. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  343. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  347. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  350. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  351. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  353. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  373. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  375. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  377. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  387. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  391. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  393. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  395. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
  403. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  405. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  407. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  409. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  411. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  413. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -0
  423. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -0
  424. package/app/.next-cli-build/server/app/api/headroom/extras/route_client-reference-manifest.js +1 -0
  425. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -0
  428. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -0
  429. package/app/.next-cli-build/server/app/api/headroom/restart/route_client-reference-manifest.js +1 -0
  430. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  445. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js +2 -0
  467. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js.nft.json +1 -0
  468. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route_client-reference-manifest.js +1 -0
  469. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  496. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  502. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  503. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  504. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  508. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  509. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  510. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  514. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  516. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  517. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  520. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  521. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  522. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  523. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  526. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  528. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  529. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js +1 -1
  532. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js +1 -1
  534. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js.nft.json +1 -1
  535. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js +1 -1
  536. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js +1 -1
  538. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  540. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  541. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  544. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  546. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  547. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  550. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  552. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  556. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  557. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  558. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  559. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +3 -0
  560. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -0
  561. package/app/.next-cli-build/server/app/api/pxpipe/health/route_client-reference-manifest.js +1 -0
  562. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +3 -0
  563. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -0
  564. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -0
  565. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +3 -0
  566. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -0
  567. package/app/.next-cli-build/server/app/api/pxpipe/logs/route_client-reference-manifest.js +1 -0
  568. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +3 -0
  569. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -0
  570. package/app/.next-cli-build/server/app/api/pxpipe/restart/route_client-reference-manifest.js +1 -0
  571. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +3 -0
  572. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -0
  573. package/app/.next-cli-build/server/app/api/pxpipe/start/route_client-reference-manifest.js +1 -0
  574. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +3 -0
  575. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -0
  576. package/app/.next-cli-build/server/app/api/pxpipe/stats/route_client-reference-manifest.js +1 -0
  577. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +3 -0
  578. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -0
  579. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -0
  580. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +3 -0
  581. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -0
  582. package/app/.next-cli-build/server/app/api/pxpipe/stop/route_client-reference-manifest.js +1 -0
  583. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  586. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  588. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  589. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  592. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  593. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  594. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  595. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  598. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  599. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  600. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  601. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  604. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  605. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  606. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  607. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -1
  608. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  610. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  611. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  612. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  613. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  614. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  615. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  616. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  618. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  619. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  620. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  621. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  622. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  623. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  624. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  625. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  626. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  627. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  628. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  629. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  630. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  631. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  632. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  633. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  634. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  635. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  636. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  637. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  638. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  640. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  641. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  642. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  643. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  644. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  645. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  646. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  648. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  650. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  652. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  653. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  654. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  655. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  656. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  657. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  658. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  659. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  660. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  662. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  663. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  664. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  665. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  666. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  667. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  668. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  669. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  670. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  671. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  672. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  673. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -0
  674. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -0
  675. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route_client-reference-manifest.js +1 -0
  676. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -0
  677. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -0
  678. package/app/.next-cli-build/server/app/api/v1/videos/edits/route_client-reference-manifest.js +1 -0
  679. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -0
  680. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -0
  681. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route_client-reference-manifest.js +1 -0
  682. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -0
  683. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -0
  684. package/app/.next-cli-build/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -0
  685. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  686. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  687. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  688. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  689. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  690. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  691. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  692. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  693. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  694. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  695. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  696. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  697. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  698. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  699. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  700. package/app/.next-cli-build/server/app/callback.html +1 -1
  701. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  702. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  703. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  704. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  705. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  706. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  710. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  711. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  712. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  713. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  714. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  715. package/app/.next-cli-build/server/app/index.html +1 -1
  716. package/app/.next-cli-build/server/app/index.rsc +4 -4
  717. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  718. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  719. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  721. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  722. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  723. package/app/.next-cli-build/server/app/landing.html +1 -1
  724. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  725. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  728. package/app/.next-cli-build/server/app/login/page.js +1 -1
  729. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  730. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  731. package/app/.next-cli-build/server/app/login.html +1 -1
  732. package/app/.next-cli-build/server/app/login.rsc +4 -4
  733. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  734. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  735. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  737. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  738. package/app/.next-cli-build/server/app/page.js +1 -1
  739. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  740. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  741. package/app/.next-cli-build/server/app-paths-manifest.json +26 -10
  742. package/app/.next-cli-build/server/chunks/1294.js +1 -1
  743. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  744. package/app/.next-cli-build/server/chunks/159.js +1 -1
  745. package/app/.next-cli-build/server/chunks/1656.js +2 -0
  746. package/app/.next-cli-build/server/chunks/1937.js +2 -2
  747. package/app/.next-cli-build/server/chunks/194.js +1 -1
  748. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  749. package/app/.next-cli-build/server/chunks/2376.js +1 -1
  750. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  751. package/app/.next-cli-build/server/chunks/3026.js +1 -0
  752. package/app/.next-cli-build/server/chunks/3072.js +1 -1
  753. package/app/.next-cli-build/server/chunks/3075.js +1 -1
  754. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  755. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  756. package/app/.next-cli-build/server/chunks/369.js +11 -9
  757. package/app/.next-cli-build/server/chunks/3787.js +1 -1
  758. package/app/.next-cli-build/server/chunks/3904.js +1 -1
  759. package/app/.next-cli-build/server/chunks/3986.js +39 -23
  760. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  761. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  762. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  763. package/app/.next-cli-build/server/chunks/507.js +2 -2
  764. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  765. package/app/.next-cli-build/server/chunks/5350.js +1 -1
  766. package/app/.next-cli-build/server/chunks/5616.js +1 -0
  767. package/app/.next-cli-build/server/chunks/5717.js +47 -0
  768. package/app/.next-cli-build/server/chunks/5781.js +15 -0
  769. package/app/.next-cli-build/server/chunks/5888.js +246 -0
  770. package/app/.next-cli-build/server/chunks/5913.js +1 -0
  771. package/app/.next-cli-build/server/chunks/6052.js +2 -0
  772. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  773. package/app/.next-cli-build/server/chunks/6274.js +1 -0
  774. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  775. package/app/.next-cli-build/server/chunks/6347.js +1 -0
  776. package/app/.next-cli-build/server/chunks/6395.js +15 -15
  777. package/app/.next-cli-build/server/chunks/6406.js +1 -1
  778. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  779. package/app/.next-cli-build/server/chunks/6947.js +1 -0
  780. package/app/.next-cli-build/server/chunks/698.js +2 -2
  781. package/app/.next-cli-build/server/chunks/6985.js +1 -1
  782. package/app/.next-cli-build/server/chunks/7141.js +1 -1
  783. package/app/.next-cli-build/server/chunks/7454.js +1 -1
  784. package/app/.next-cli-build/server/chunks/7557.js +4 -4
  785. package/app/.next-cli-build/server/chunks/7757.js +1 -0
  786. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  787. package/app/.next-cli-build/server/chunks/7828.js +2 -2
  788. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  789. package/app/.next-cli-build/server/chunks/8062.js +1 -1
  790. package/app/.next-cli-build/server/chunks/8117.js +1 -1
  791. package/app/.next-cli-build/server/chunks/8400.js +9 -9
  792. package/app/.next-cli-build/server/chunks/8469.js +1 -1
  793. package/app/.next-cli-build/server/chunks/849.js +1 -0
  794. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  795. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  796. package/app/.next-cli-build/server/chunks/869.js +1 -1
  797. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  798. package/app/.next-cli-build/server/chunks/8789.js +1 -1
  799. package/app/.next-cli-build/server/chunks/8834.js +7 -0
  800. package/app/.next-cli-build/server/chunks/8942.js +246 -0
  801. package/app/.next-cli-build/server/chunks/8998.js +67 -43
  802. package/app/.next-cli-build/server/chunks/{5615.js → 9091.js} +2 -2
  803. package/app/.next-cli-build/server/chunks/9261.js +6 -6
  804. package/app/.next-cli-build/server/chunks/9264.js +10 -0
  805. package/app/.next-cli-build/server/chunks/940.js +246 -0
  806. package/app/.next-cli-build/server/chunks/9421.js +4 -0
  807. package/app/.next-cli-build/server/chunks/9508.js +4 -4
  808. package/app/.next-cli-build/server/chunks/9617.js +1 -0
  809. package/app/.next-cli-build/server/chunks/static/media/versions.401d57e8.json +20 -0
  810. package/app/.next-cli-build/server/functions-config-manifest.json +6 -0
  811. package/app/.next-cli-build/server/instrumentation.js +1 -1
  812. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  813. package/app/.next-cli-build/server/middleware.js +24 -12
  814. package/app/.next-cli-build/server/pages/404.html +1 -1
  815. package/app/.next-cli-build/server/pages/500.html +1 -1
  816. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  817. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  818. package/app/.next-cli-build/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  819. package/app/.next-cli-build/static/chunks/1321-8d4ef805452d3649.js +1 -0
  820. package/app/.next-cli-build/static/chunks/3531-e8d13ec64699f527.js +68 -0
  821. package/app/.next-cli-build/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  822. package/app/.next-cli-build/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  823. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-6633578a55a1a436.js → page-d7205b7328b3fed1.js} +1 -1
  826. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-3cbe5d8636bd2161.js → page-d0b6efe01e687aec.js} +1 -1
  827. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/{page-1fc70bcd434deb73.js → page-25629f96675ad55d.js} +1 -1
  829. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  831. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  832. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-95bf830096d019fd.js → page-52c12af07f9a6de0.js} +1 -1
  833. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  834. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-961013b570bbeac6.js → page-cfbd3661ac75b8c5.js} +1 -1
  836. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-59e54ef2021ad5bb.js → page-8779ff2bc755ba78.js} +1 -1
  837. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-b5b9038ea28e63b6.js → page-d32871b974f7e72f.js} +1 -1
  839. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  840. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d3e35265648406f2.js → page-555f079cdf31bbf6.js} +1 -1
  842. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/{page-bb4af1ac9b13a514.js → page-56bf48ee2068208e.js} +1 -1
  845. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-4382c14f28ddfc7f.js → page-46986a955b8c89b2.js} +1 -1
  846. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-d1fa5b81e1c386ab.js → layout-62b4e2cdf745f8d0.js} +1 -1
  851. package/app/.next-cli-build/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  1023. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  1024. package/app/.next-cli-build/static/css/23b999cda6943547.css +1 -0
  1025. package/app/custom-server.js +63 -2
  1026. package/app/node_modules/impit/CHANGELOG.md +545 -0
  1027. package/app/node_modules/impit/README.md +62 -0
  1028. package/app/node_modules/impit/dts-header.d.ts +36 -0
  1029. package/app/node_modules/impit/errors.js +117 -0
  1030. package/app/node_modules/impit/index.d.ts +431 -0
  1031. package/app/node_modules/impit/index.js +583 -0
  1032. package/app/node_modules/impit/index.wrapper.js +504 -0
  1033. package/app/node_modules/impit/package.json +66 -0
  1034. package/app/node_modules/impit/pnpm-workspace.yaml +15 -0
  1035. package/app/node_modules/impit/tsconfig.docs.json +6 -0
  1036. package/app/node_modules/impit-linux-x64-gnu/README.md +3 -0
  1037. package/app/node_modules/impit-linux-x64-gnu/impit-node.linux-x64-gnu.node +0 -0
  1038. package/app/node_modules/impit-linux-x64-gnu/package.json +24 -0
  1039. package/app/open-sse/identity/snapshots/versions.json +20 -0
  1040. package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
  1041. package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
  1042. package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
  1043. package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
  1044. package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
  1045. package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
  1046. package/app/package.json +9 -3
  1047. package/app/server.js +1 -1
  1048. package/app/src/lib/db/adapters/betterSqliteAdapter.js +12 -6
  1049. package/app/src/lib/db/adapters/bunSqliteAdapter.js +11 -6
  1050. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +11 -6
  1051. package/app/src/lib/db/adapters/sqljsAdapter.js +12 -5
  1052. package/app/src/lib/db/migrate.js +167 -22
  1053. package/app/src/lib/oauth/services/qoder.js +8 -1
  1054. package/app/src/lib/oauth/services/xai.js +11 -3
  1055. package/cli.js +14 -0
  1056. package/package.json +10 -2
  1057. package/src/cli/cliOptions.js +3 -0
  1058. package/src/cli/commands/xaiVideo.js +300 -0
  1059. package/src/cli/menus/apiKeys.js +7 -49
  1060. package/src/cli/menus/cliTools.js +4 -5
  1061. package/src/cli/terminalUI.js +2 -2
  1062. package/src/cli/utils/input.js +40 -0
  1063. package/app/.next-cli-build/server/chunks/1064.js +0 -104
  1064. package/app/.next-cli-build/server/chunks/1421.js +0 -1
  1065. package/app/.next-cli-build/server/chunks/2925.js +0 -1
  1066. package/app/.next-cli-build/server/chunks/3535.js +0 -1
  1067. package/app/.next-cli-build/server/chunks/4776.js +0 -33
  1068. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1069. package/app/.next-cli-build/server/chunks/6448.js +0 -109
  1070. package/app/.next-cli-build/server/chunks/65.js +0 -1
  1071. package/app/.next-cli-build/server/chunks/7335.js +0 -1
  1072. package/app/.next-cli-build/server/chunks/7374.js +0 -2
  1073. package/app/.next-cli-build/server/chunks/8718.js +0 -1
  1074. package/app/.next-cli-build/server/chunks/9046.js +0 -1
  1075. package/app/.next-cli-build/server/chunks/9062.js +0 -104
  1076. package/app/.next-cli-build/server/chunks/9489.js +0 -8
  1077. package/app/.next-cli-build/server/chunks/9696.js +0 -7
  1078. package/app/.next-cli-build/static/chunks/1321-5250bb46aa281ab5.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/3531-5066ce0b15cf43af.js +0 -68
  1080. package/app/.next-cli-build/static/chunks/5497-53b1dd3f23fb96bc.js +0 -7
  1081. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-62bea7b75b3f2692.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-1eb380280857cf20.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4bf0abe7c7119ac0.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-fdc5377da12ec933.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b48bd39cb03c4985.js +0 -3
  1087. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9e60537a4b8f5a0c.js +0 -59
  1088. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-45ebe6bb46c9f65e.js +0 -4
  1089. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7ac82c8930583633.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1ec149c6b914249d.js +0 -10
  1092. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-fe7ccc9c117d7d38.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5ac3900baf3fe9ca.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-1b2b6b736fe98698.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-92fe95bd4e6b3d0a.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-4c47b9660f3066e2.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/_global-error/page-596c1bc92adc4d71.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-596c1bc92adc4d71.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-596c1bc92adc4d71.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-596c1bc92adc4d71.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-596c1bc92adc4d71.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-596c1bc92adc4d71.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-596c1bc92adc4d71.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-596c1bc92adc4d71.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-596c1bc92adc4d71.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-596c1bc92adc4d71.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-596c1bc92adc4d71.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-596c1bc92adc4d71.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-596c1bc92adc4d71.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-596c1bc92adc4d71.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-596c1bc92adc4d71.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-596c1bc92adc4d71.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-596c1bc92adc4d71.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-596c1bc92adc4d71.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-596c1bc92adc4d71.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-596c1bc92adc4d71.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-596c1bc92adc4d71.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-596c1bc92adc4d71.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-596c1bc92adc4d71.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-596c1bc92adc4d71.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-596c1bc92adc4d71.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-596c1bc92adc4d71.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-596c1bc92adc4d71.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-596c1bc92adc4d71.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-596c1bc92adc4d71.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-596c1bc92adc4d71.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-596c1bc92adc4d71.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-596c1bc92adc4d71.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-596c1bc92adc4d71.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/combos/route-596c1bc92adc4d71.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-596c1bc92adc4d71.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-596c1bc92adc4d71.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-596c1bc92adc4d71.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-596c1bc92adc4d71.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/health/route-596c1bc92adc4d71.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-596c1bc92adc4d71.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/keys/route-596c1bc92adc4d71.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/locale/route-596c1bc92adc4d71.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-596c1bc92adc4d71.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-596c1bc92adc4d71.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-596c1bc92adc4d71.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-596c1bc92adc4d71.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-596c1bc92adc4d71.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-596c1bc92adc4d71.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-596c1bc92adc4d71.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-596c1bc92adc4d71.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-596c1bc92adc4d71.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-596c1bc92adc4d71.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-596c1bc92adc4d71.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-596c1bc92adc4d71.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-596c1bc92adc4d71.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-596c1bc92adc4d71.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-596c1bc92adc4d71.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-596c1bc92adc4d71.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-596c1bc92adc4d71.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-596c1bc92adc4d71.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/models/route-596c1bc92adc4d71.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/models/test/route-596c1bc92adc4d71.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-596c1bc92adc4d71.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-596c1bc92adc4d71.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-596c1bc92adc4d71.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-596c1bc92adc4d71.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-596c1bc92adc4d71.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-596c1bc92adc4d71.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-596c1bc92adc4d71.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-596c1bc92adc4d71.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-596c1bc92adc4d71.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-596c1bc92adc4d71.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-596c1bc92adc4d71.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-596c1bc92adc4d71.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-596c1bc92adc4d71.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/pricing/route-596c1bc92adc4d71.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-596c1bc92adc4d71.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-596c1bc92adc4d71.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-596c1bc92adc4d71.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-596c1bc92adc4d71.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-596c1bc92adc4d71.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-596c1bc92adc4d71.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-596c1bc92adc4d71.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-596c1bc92adc4d71.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-596c1bc92adc4d71.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-596c1bc92adc4d71.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-596c1bc92adc4d71.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-596c1bc92adc4d71.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-596c1bc92adc4d71.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-596c1bc92adc4d71.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-596c1bc92adc4d71.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-596c1bc92adc4d71.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-596c1bc92adc4d71.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/providers/route-596c1bc92adc4d71.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-596c1bc92adc4d71.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-596c1bc92adc4d71.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-596c1bc92adc4d71.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-596c1bc92adc4d71.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-596c1bc92adc4d71.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-596c1bc92adc4d71.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-596c1bc92adc4d71.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-596c1bc92adc4d71.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-596c1bc92adc4d71.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-596c1bc92adc4d71.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-596c1bc92adc4d71.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/settings/route-596c1bc92adc4d71.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-596c1bc92adc4d71.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-596c1bc92adc4d71.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/tags/route-596c1bc92adc4d71.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-596c1bc92adc4d71.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-596c1bc92adc4d71.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-596c1bc92adc4d71.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-596c1bc92adc4d71.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-596c1bc92adc4d71.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-596c1bc92adc4d71.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-596c1bc92adc4d71.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-596c1bc92adc4d71.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-596c1bc92adc4d71.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-596c1bc92adc4d71.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-596c1bc92adc4d71.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-596c1bc92adc4d71.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-596c1bc92adc4d71.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-596c1bc92adc4d71.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-596c1bc92adc4d71.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-596c1bc92adc4d71.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-596c1bc92adc4d71.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-596c1bc92adc4d71.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-596c1bc92adc4d71.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-596c1bc92adc4d71.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-596c1bc92adc4d71.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-596c1bc92adc4d71.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-596c1bc92adc4d71.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-596c1bc92adc4d71.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-596c1bc92adc4d71.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-596c1bc92adc4d71.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-596c1bc92adc4d71.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-596c1bc92adc4d71.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-596c1bc92adc4d71.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-596c1bc92adc4d71.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-596c1bc92adc4d71.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/v1/route-596c1bc92adc4d71.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-596c1bc92adc4d71.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-596c1bc92adc4d71.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-596c1bc92adc4d71.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-596c1bc92adc4d71.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/version/route-596c1bc92adc4d71.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-596c1bc92adc4d71.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/version/update/route-596c1bc92adc4d71.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-3414584e4d85b11f.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/login/page-596c1bc92adc4d71.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-596c1bc92adc4d71.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/page-596c1bc92adc4d71.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-596c1bc92adc4d71.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-596c1bc92adc4d71.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-596c1bc92adc4d71.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-596c1bc92adc4d71.js +0 -1
  1255. package/app/.next-cli-build/static/css/8f209feb703c674d.css +0 -1
  1256. package/app/.next-cli-build/static/dTnRQJQsV_UGBAsupqJ2u/_buildManifest.js +0 -1
  1257. /package/app/.next-cli-build/static/{dTnRQJQsV_UGBAsupqJ2u → LW9zpYBdABYCFKEJUiC4B}/_ssgManifest.js +0 -0
@@ -1,10 +1,10 @@
1
- (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},24889:(a,b,c)=>{Promise.resolve().then(c.bind(c,93211))},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72089:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},73024:a=>{"use strict";a.exports=require("node:fs")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},85913:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>x,handler:()=>z,routeModule:()=>y});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/home/runner/work/switchboard-router/switchboard-router/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,w=(0,e.H)({tree:v,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),x=w.__next_app__,y=w.routeModule,z=w.handler},87550:a=>{"use strict";a.exports=require("better-sqlite3")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},93211:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>T});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(92592),l=c(91431),m=c(90774),n=c(80212);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],minimax:p,hunyuan:o,step:o},s=[{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function t(a,b){let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=s.find(a=>(0,n.gH)(a.pattern,b)),e=d?.levels||r[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var u=c(50377),v=c(29476),w=c(99258),x=c(18753);function y(a,b={}){let c=b.kind||b.type;if(c&&"string"==typeof c){let a=c.toLowerCase();return"chat"===a||"text"===a||"language"===a?"llm":a}let d=String(a||"").toLowerCase();return/embed/.test(d)?"embedding":/(^|[-_/])(tts|speech)([-_/]|$)/.test(d)?"tts":/(whisper|transcri|speech-to-text|(^|[-_/])stt([-_/]|$))/.test(d)?"stt":/(imagine-video|video-gen|(^|[-_/])video([-_/]|$))/.test(d)&&!/revision/.test(d)?"video":/(imagine-image|dall-e|stable-diffusion|sdxl|flux|midjourney|image-gen)/.test(d)||/(^|[-_/])image([-_/]|$)/.test(d)&&!/(vision|vl|multimodal)/.test(d)?"image":"llm"}function z(a,b){let c=String(a||"").trim();if(!c)return"";if(c=c.replace(/^models\//,""),b){let a=`${b}/`;c.startsWith(a)&&(c=c.slice(a.length))}return(c=c.replace(/^(openai|anthropic|google|x-ai|xai|meta-llama|mistralai)\//i,"")).trim()}var A=c(49885),B=c.n(A);function C({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p,latencyMs:q,probeState:r}){let s=p?`${b}(${p})`:b,t="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:t?{color:t}:void 0,children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:s}),r&&("testing"===r?(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 animate-spin text-[14px] text-text-muted",title:"Testing...",children:"progress_activity"}):(0,d.jsx)("span",{title:"ok"===r?"Reachable":"dead"===r?"Unavailable (dead)":"Retry later",className:`shrink-0 inline-block h-2 w-2 rounded-full ${"ok"===r?"bg-green-500":"dead"===r?"bg-red-500":"bg-amber-500"}`}))]}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),Number.isFinite(q)&&(0,d.jsxs)("span",{className:"shrink-0 text-[9px] text-text-muted/70 tabular-nums",children:[Math.round(q),"ms"]}),(0,d.jsx)(j.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(s,`model-${a.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}C.propTypes={model:B().shape({id:B().string.isRequired}).isRequired,fullModel:B().string.isRequired,alias:B().string,copied:B().string,onCopy:B().func.isRequired,testStatus:B().oneOf(["ok","error"]),isCustom:B().bool,isFree:B().bool,onDeleteAlias:B().func,onTest:B().func,isTesting:B().bool,onDisable:B().func,caps:B().object,thinkingSuffix:B().string,latencyMs:B().number,probeState:B().string};var D=c(6297);function E({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function F({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,onRefreshModels:m,connections:n,isAnthropic:o,disabledModelIds:p=[],onEnableModel:q}){let[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[C,G]=(0,e.useState)({}),H=async b=>{if(!A){B(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();G(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{G(a=>({...a,[b]:"error"}))}finally{B(null)}}},I=(0,x.Iz)(p,a),J=[...I],K=(0,x.R3)({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),L=K.filter(b=>!(0,x.uJ)(I,b.id,a)),M=async()=>{if(!r.trim()||t)return;let b=r.trim();if(L.some(a=>a.id===b))return void(0,D.s)("Model already exists for this provider.");u(!0);try{if((0,x.uJ)(I,b,a)){let a=await q?.(b);if(!1===a)throw Error("Failed to enable removed model")}await k(b),s("")}catch(a){(0,D.s)("Error adding model:",a)}finally{u(!1)}},N=async()=>{if(v)return;let b=n.find(a=>!1!==a.isActive);if(b){w(!0),z("");try{let c=await fetch(`/api/providers/${b.id}/models`),d=await c.json().catch(()=>({}));if(!c.ok)return void(0,D.s)(d.error||"Failed to import models");let e=d.models||[];if(0===e.length)return void(0,D.s)("No models returned from /models.");let f=new Set(K.map(a=>a.id)),g=[],h=new Set;for(let b of e){let c=String(b.id||b.name||b.model||"").trim();!c||f.has(c)||h.has(c)||(0,x.uJ)(I,c,a)||(h.add(c),g.push({providerAlias:a,id:c,type:"llm",name:b.display_name||b.displayName||b.name||c}))}if(0===g.length)return void z("All models already in list");let i=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),j=await i.json().catch(()=>({}));if(!i.ok){let a=0;for(let b of g)await k(b.id),a+=1;z(a?`Imported ${a} model(s)`:"No new models were added");return}z(`Imported ${j.added??g.length} model(s)`),"function"==typeof m&&await m()}catch(a){(0,D.s)("Error importing models:",a),(0,D.s)(a?.message||"Import failed")}finally{w(!1)}}},O=n.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",o?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:r,onChange:a=>s(a.target.value),onKeyDown:a=>"Enter"===a.key&&M(),placeholder:o?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:M,disabled:!r.trim()||t,children:t?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"cloud_download",onClick:N,disabled:!O||v,children:v?"Importing...":"Import models"})]}),!O&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y}),L.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:L.map(({id:c,alias:e,source:f})=>(0,d.jsx)(E,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:n.length>0?()=>H(c):void 0,testStatus:C[c],isTesting:A===c},`${f}-${a}/${c}`))}),J.length>0&&(0,d.jsxs)("details",{className:"rounded-lg border border-border bg-surface/30 p-3",children:[(0,d.jsxs)("summary",{className:"cursor-pointer text-sm font-medium text-text-main",children:["Removed models (",J.length,")"]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Enable a model to make it available for import and selection again."}),(0,d.jsx)("div",{className:"mt-3 flex max-h-56 flex-col gap-1.5 overflow-y-auto",children:J.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded border border-border bg-background px-2 py-1.5",children:[(0,d.jsx)("code",{className:"min-w-0 flex-1 truncate text-xs",title:a,children:a}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",onClick:()=>q?.(a),children:"Enable"})]},a))})]})]})}B().string.isRequired,B().string.isRequired,B().string,B().func.isRequired,B().func.isRequired,B().func,B().oneOf(["ok","error"]),B().bool,B().string.isRequired,B().object.isRequired,B().arrayOf(B().object),B().string,B().func.isRequired,B().func.isRequired,B().func.isRequired,B().func.isRequired,F.propTypes={providerStorageAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,modelAliases:B().object.isRequired,customModels:B().arrayOf(B().object),copied:B().string,onCopy:B().func.isRequired,onDeleteAlias:B().func.isRequired,onAddCustomModel:B().func.isRequired,onDeleteCustomModel:B().func.isRequired,onRefreshModels:B().func,connections:B().arrayOf(B().shape({id:B().string,isActive:B().bool})).isRequired,isAnthropic:B().bool,disabledModelIds:B().arrayOf(B().string),onEnableModel:B().func};var G=c(74875);function H({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function I({connection:a,isOAuth:b,isFirst:c,isLast:f,onMoveUp:g,onMoveDown:h,onToggleActive:i,onEdit:k,onDelete:l,onAllowlistHost:m=null,oneByOneStatus:n=null,autoPing:o=null}){let p=/SSRF blocked|Blocked URL: (private IP|internal host)/i.test(a.lastError||""),q=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,r=q?`Proxy: ${a.providerSpecificData?.connectionProxyUrl}`:"",s=o?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",t="";if(a.providerSpecificData?.connectionProxyUrl){let b=a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);t=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{t=b}}let u=a.providerSpecificData?.connectionNoProxy||"",v=q?"success":"default",w=a.authType||(b?"oauth":"apikey"),x="oauth"===w,y="cookie"===w,z=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(x?"OAuth Account":y?"Cookie Account":"API Key"),A=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[B,C]=(0,e.useState)(!1),D=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,E="unavailable"!==a.testStatus||B?a.testStatus:"active",F=()=>n?"queued"===n.state?"queued":"testing"===n.state?"testing":"success"===n.state?"success":"failed"===n.state?n.error?`failed: ${n.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:c,className:`p-0.5 rounded ${c?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:h,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:y?"cookie":x?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:z}),A&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:A}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:(0,G.g)(a.isActive,E),size:"sm",dot:!0,children:!1===a.isActive?"disabled":E||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:x?"OAuth":y?"Cookie":"API Key"}),q&&(0,d.jsx)(j.Ex,{variant:v,size:"sm",children:"Proxy"}),B&&!1!==a.isActive&&(0,d.jsx)(H,{until:D}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),p&&!1!==a.isActive&&m&&(0,d.jsxs)("button",{onClick:m,title:"Trust this host past the SSRF guard and retry",className:"inline-flex items-center gap-1 rounded border border-amber-500/40 px-1.5 py-0.5 text-xs text-amber-600 hover:bg-amber-500/10 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"verified_user"}),"Add to allow list"]}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),F()&&(0,d.jsx)(j.Ex,{variant:n?"success"===n.state?"success":"failed"===n.state?"error":"testing"===n.state?"primary":"default":"default",size:"sm",children:F()})]}),q&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:r,children:r}),t&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:t}),u&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:u,children:["no_proxy: ",u]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[o&&(0,d.jsx)(j.m_,{text:s,children:(0,d.jsxs)("button",{onClick:()=>o.onToggle(!o.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${o.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:k,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:l,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:i,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}H.propTypes={until:B().string.isRequired},I.propTypes={connection:B().shape({id:B().string,name:B().string,email:B().string,displayName:B().string,modelLockUntil:B().string,testStatus:B().string,isActive:B().bool,lastError:B().string,priority:B().number,globalPriority:B().number,providerSpecificData:B().object}).isRequired,isOAuth:B().bool.isRequired,isFirst:B().bool.isRequired,isLast:B().bool.isRequired,onMoveUp:B().func.isRequired,onMoveDown:B().func.isRequired,onToggleActive:B().func.isRequired,onEdit:B().func.isRequired,onDelete:B().func.isRequired,onAllowlistHost:B().func,oneByOneStatus:B().shape({state:B().string,error:B().string}),autoPing:B().shape({on:B().bool,onToggle:B().func,provider:B().string})};let J=`name1|sk-key1
1
+ (()=>{var a={};a.id=2134,a.ids=[2134],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},22588:(a,b,c)=>{"use strict";async function d(a,b,c=fetch){let e=await c("/api/settings",{cache:"no-store"});if(!e.ok)throw Error(`Failed to load settings (${e.status})`);let f=(await e.json()).providerStrategies||{},g=b(f[a]||{}),h={...f};g&&Object.keys(g).length>0?h[a]=g:delete h[a];let i=await c("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:h})});if(!i.ok)throw Error(`Failed to save settings (${i.status})`);return g}c.d(b,{T:()=>d})},24889:(a,b,c)=>{Promise.resolve().then(c.bind(c,43702))},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43702:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>T});var d=c(48249),e=c(67484),f=c(19099),g=c(2116),h=c.n(g),i=c(81220),j=c(50412),k=c(92592),l=c(91431),m=c(90774),n=c(80212);let o=["none","low","medium","high"],p=["none","thinking"],q=["none","low","medium","high","max"],r={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":q,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":o,zai:p,qwen:o,kimi:q,deepseek:["none","high","max"],minimax:p,hunyuan:o,step:o},s=[{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function t(a,b){let c=(0,m.nl)(a,b);if(!c.reasoning)return null;let d=s.find(a=>(0,n.gH)(a.pattern,b)),e=d?.levels||r[c.thinkingFormat]||o;return!1===c.thinkingCanDisable&&(e=e.filter(a=>"none"!==a)),e}var u=c(50377),v=c(29476),w=c(99258),x=c(18753),y=c(23419),z=c(49885),A=c.n(z);function B({model:a,fullModel:b,alias:c,copied:e,onCopy:f,testStatus:g,isCustom:h,isFree:i,onDeleteAlias:k,onTest:l,isTesting:m,onDisable:n,caps:o,thinkingSuffix:p,latencyMs:q,probeState:r}){let s=p?`${b}(${p})`:b,t="ok"===g?"#22c55e":"error"===g?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===g?"border-green-500/40":"error"===g?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:t?{color:t}:void 0,role:g?"img":void 0,"aria-label":"ok"===g?"Test passed":"error"===g?"Test failed":void 0,"aria-hidden":g?void 0:"true",children:"ok"===g?"check_circle":"error"===g?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:s}),r&&("testing"===r?(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 animate-spin text-[14px] text-text-muted",title:"Testing...",children:"progress_activity"}):(0,d.jsx)("span",{title:"ok"===r?"Reachable":"dead"===r?"Unavailable (dead)":"Retry later",className:`shrink-0 inline-block h-2 w-2 rounded-full ${"ok"===r?"bg-green-500":"dead"===r?"bg-red-500":"bg-amber-500"}`}))]}),(0,d.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[a.name&&(0,d.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:a.name}),Number.isFinite(q)&&(0,d.jsxs)("span",{className:"shrink-0 text-[9px] text-text-muted/70 tabular-nums",children:[Math.round(q),"ms"]}),(0,d.jsx)(j.nh,{caps:o,colorOverride:"text-text-muted/70",size:12})]})]}),l&&(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:l,disabled:m,"aria-label":m?`Testing ${s}`:`Test ${s}`,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity","aria-hidden":"true",children:m?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,d.jsx)("button",{onClick:()=>f(s,`model-${a.id}`),"aria-label":e===`model-${a.id}`?`Copied ${s}`:`Copy ${s}`,className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:e===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity","aria-hidden":"true",children:e===`model-${a.id}`?"Copied!":"Copy"})]}),h?(0,d.jsx)("button",{onClick:k,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100","aria-label":`Remove custom model ${s}`,title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"close"})}):n?(0,d.jsx)("button",{onClick:n,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100","aria-label":`Disable ${s}`,title:"Disable this model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"close"})}):null]})})}B.propTypes={model:A().shape({id:A().string.isRequired}).isRequired,fullModel:A().string.isRequired,alias:A().string,copied:A().string,onCopy:A().func.isRequired,testStatus:A().oneOf(["ok","error"]),isCustom:A().bool,isFree:A().bool,onDeleteAlias:A().func,onTest:A().func,isTesting:A().bool,onDisable:A().func,caps:A().object,thinkingSuffix:A().string,latencyMs:A().number,probeState:A().string};var C=c(6297);function D({modelId:a,fullModel:b,copied:c,onCopy:e,onDeleteAlias:f,onTest:g,testStatus:h,isTesting:i}){let j="ok"===h?"#22c55e":"error"===h?"#ef4444":void 0;return(0,d.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===h?"border-green-500/40":"error"===h?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:j?{color:j}:void 0,children:"ok"===h?"check_circle":"error"===h?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:a}),(0,d.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a}`?"Copied!":"Copy"})]}),g&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:g,disabled:i,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:i?{animation:"spin 1s linear infinite"}:void 0,children:i?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i?"Testing...":"Test"})]})]})]}),(0,d.jsx)("button",{onClick:f,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function E({providerStorageAlias:a,providerDisplayAlias:b,modelAliases:c,customModels:f,copied:g,onCopy:h,onDeleteAlias:i,onAddCustomModel:k,onDeleteCustomModel:l,onRefreshModels:m,connections:n,isAnthropic:o,disabledModelIds:p=[],onEnableModel:q}){let[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[F,G]=(0,e.useState)({}),H=async b=>{if(!A){B(b);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${a}/${b}`})}),d=await c.json();G(a=>({...a,[b]:d.ok?"ok":"error"}))}catch{G(a=>({...a,[b]:"error"}))}finally{B(null)}}},I=(0,x.Iz)(p,a),J=[...I],K=(0,x.R3)({customModels:f,modelAliases:c,providerAlias:a,type:"llm"}),L=K.filter(b=>!(0,x.uJ)(I,b.id,a)),M=async()=>{if(!r.trim()||t)return;let b=r.trim();if(L.some(a=>a.id===b))return void(0,C.s)("Model already exists for this provider.");u(!0);try{if((0,x.uJ)(I,b,a)){let a=await q?.(b);if(!1===a)throw Error("Failed to enable removed model")}await k(b),s("")}catch(a){(0,C.s)("Error adding model:",a)}finally{u(!1)}},N=async()=>{if(v)return;let b=n.find(a=>!1!==a.isActive);if(b){w(!0),z("");try{let c=await fetch(`/api/providers/${b.id}/models`),d=await c.json().catch(()=>({}));if(!c.ok)return void(0,C.s)(d.error||"Failed to import models");let e=d.models||[];if(0===e.length)return void(0,C.s)("No models returned from /models.");let f=new Set(K.map(a=>a.id)),g=[],h=new Set;for(let b of e){let c=String(b.id||b.name||b.model||"").trim();!c||f.has(c)||h.has(c)||(0,x.uJ)(I,c,a)||(h.add(c),g.push({providerAlias:a,id:c,type:"llm",name:b.display_name||b.displayName||b.name||c}))}if(0===g.length)return void z("All models already in list");let i=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:g})}),j=await i.json().catch(()=>({}));if(!i.ok){let a=0;for(let b of g)await k(b.id),a+=1;z(a?`Imported ${a} model(s)`:"No new models were added");return}z(`Imported ${j.added??g.length} model(s)`),"function"==typeof m&&await m()}catch(a){(0,C.s)("Error importing models:",a),(0,C.s)(a?.message||"Import failed")}finally{w(!1)}}},O=n.some(a=>!1!==a.isActive);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",o?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,d.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,d.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{id:"new-compatible-model-input",type:"text",value:r,onChange:a=>s(a.target.value),onKeyDown:a=>"Enter"===a.key&&M(),placeholder:o?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:M,disabled:!r.trim()||t,children:t?"Adding...":"Add"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"cloud_download",onClick:N,disabled:!O||v,children:v?"Importing...":"Import models"})]}),!O&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y}),L.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-3",children:L.map(({id:c,alias:e,source:f})=>(0,d.jsx)(D,{modelId:c,fullModel:`${b}/${c}`,copied:g,onCopy:h,onDeleteAlias:()=>"custom"===f?l(c):i(e),onTest:n.length>0?()=>H(c):void 0,testStatus:F[c],isTesting:A===c},`${f}-${a}/${c}`))}),J.length>0&&(0,d.jsxs)("details",{className:"rounded-lg border border-border bg-surface/30 p-3",children:[(0,d.jsxs)("summary",{className:"cursor-pointer text-sm font-medium text-text-main",children:["Removed models (",J.length,")"]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Enable a model to make it available for import and selection again."}),(0,d.jsx)("div",{className:"mt-3 flex max-h-56 flex-col gap-1.5 overflow-y-auto",children:J.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded border border-border bg-background px-2 py-1.5",children:[(0,d.jsx)("code",{className:"min-w-0 flex-1 truncate text-xs",title:a,children:a}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",onClick:()=>q?.(a),children:"Enable"})]},a))})]})]})}A().string.isRequired,A().string.isRequired,A().string,A().func.isRequired,A().func.isRequired,A().func,A().oneOf(["ok","error"]),A().bool,A().string.isRequired,A().object.isRequired,A().arrayOf(A().object),A().string,A().func.isRequired,A().func.isRequired,A().func.isRequired,A().func.isRequired,E.propTypes={providerStorageAlias:A().string.isRequired,providerDisplayAlias:A().string.isRequired,modelAliases:A().object.isRequired,customModels:A().arrayOf(A().object),copied:A().string,onCopy:A().func.isRequired,onDeleteAlias:A().func.isRequired,onAddCustomModel:A().func.isRequired,onDeleteCustomModel:A().func.isRequired,onRefreshModels:A().func,connections:A().arrayOf(A().shape({id:A().string,isActive:A().bool})).isRequired,isAnthropic:A().bool,disabledModelIds:A().arrayOf(A().string),onEnableModel:A().func};var F=c(74875);function G({until:a}){let[b,c]=(0,e.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function H({connection:a,isOAuth:b,isFirst:c,isLast:f,onMoveUp:g,onMoveDown:h,onToggleActive:i,onEdit:k,onDelete:l,onAllowlistHost:m=null,oneByOneStatus:n=null,autoPing:o=null}){let p=/SSRF blocked|Blocked URL: (private IP|internal host)/i.test(a.lastError||""),q=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,r=q?`Proxy: ${a.providerSpecificData?.connectionProxyUrl}`:"",s=o?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",t="";if(a.providerSpecificData?.connectionProxyUrl){let b=a.providerSpecificData?.connectionProxyUrl;try{let a=new URL(b);t=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{t=b}}let u=a.providerSpecificData?.connectionNoProxy||"",v=q?"success":"default",w=a.authType||(b?"oauth":"apikey"),x="oauth"===w,y="cookie"===w,z=a.name?.trim()||a.email?.trim()||a.displayName?.trim()||(x?"OAuth Account":y?"Cookie Account":"API Key"),A=a.name?.trim()&&a.email?.trim()&&a.name.trim()!==a.email.trim()?a.email.trim():a.name?.trim()&&a.displayName?.trim()&&a.name.trim()!==a.displayName.trim()?a.displayName.trim():null,[B,C]=(0,e.useState)(!1),D=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(a=>!!a).sort()[0]||null,E="unavailable"!==a.testStatus||B?a.testStatus:"active",I=()=>n?"queued"===n.state?"queued":"testing"===n.state?"testing":"success"===n.state?"success":"failed"===n.state?n.error?`failed: ${n.error}`:"failed":null:null;return(0,d.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,d.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:c,"aria-label":`Move ${z} up`,title:`Move ${z} up`,className:`p-0.5 rounded ${c?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:h,disabled:f,"aria-label":`Move ${z} down`,title:`Move ${z} down`,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm","aria-hidden":"true",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted","aria-hidden":"true",children:y?"cookie":x?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:z}),A&&(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:A}),(0,d.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,d.jsx)(j.Ex,{variant:(0,F.g)(a.isActive,E),size:"sm",dot:!0,children:!1===a.isActive?"disabled":E||"Unknown"}),(0,d.jsx)(j.Ex,{variant:"default",size:"sm",children:x?"OAuth":y?"Cookie":"API Key"}),q&&(0,d.jsx)(j.Ex,{variant:v,size:"sm",children:"Proxy"}),B&&!1!==a.isActive&&(0,d.jsx)(G,{until:D}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:a.lastError,children:a.lastError}),p&&!1!==a.isActive&&m&&(0,d.jsxs)("button",{onClick:m,title:"Trust this host past the SSRF guard and retry",className:"inline-flex items-center gap-1 rounded border border-amber-500/40 px-1.5 py-0.5 text-xs text-amber-600 hover:bg-amber-500/10 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"verified_user"}),"Add to allow list"]}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]}),a.globalPriority&&(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",a.globalPriority]}),I()&&(0,d.jsx)(j.Ex,{variant:n?"success"===n.state?"success":"failed"===n.state?"error":"testing"===n.state?"primary":"default":"default",size:"sm",children:I()})]}),q&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:r,children:r}),t&&(0,d.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:t}),u&&(0,d.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:u,children:["no_proxy: ",u]})]})]})]}),(0,d.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,d.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[o&&(0,d.jsx)(j.m_,{text:s,children:(0,d.jsxs)("button",{onClick:()=>o.onToggle(!o.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${o.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,d.jsxs)("button",{onClick:k,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:l,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(j.lM,{size:"sm",checked:a.isActive??!0,onChange:i,title:a.isActive??!0?"Disable connection":"Enable connection"})]})]})}G.propTypes={until:A().string.isRequired},H.propTypes={connection:A().shape({id:A().string,name:A().string,email:A().string,displayName:A().string,modelLockUntil:A().string,testStatus:A().string,isActive:A().bool,lastError:A().string,priority:A().number,globalPriority:A().number,providerSpecificData:A().object}).isRequired,isOAuth:A().bool.isRequired,isFirst:A().bool.isRequired,isLast:A().bool.isRequired,onMoveUp:A().func.isRequired,onMoveDown:A().func.isRequired,onToggleActive:A().func.isRequired,onEdit:A().func.isRequired,onDelete:A().func.isRequired,onAllowlistHost:A().func,oneByOneStatus:A().shape({state:A().string,error:A().string}),autoPing:A().shape({on:A().bool,onToggle:A().func,provider:A().string})};let I=`name1|sk-key1
2
2
  name2|sk-key2
3
- sk-key-only-auto-named`;function K({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,error:m,onSave:n,onBulkDone:o,onClose:p}){let q="ollama-local"===b,r="cookie"===h,s="xai"===b&&!r,t=r?"Cookie Value":"API Key",u="azure"===b,v="cloudflare-ai"===b,w=k.Q2?.[b]?.regions||null,x=k.Q2?.[b]?.defaultRegion||w?.[0]?.id||"",[y,z]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,ollamaHostUrl:""}),[A,B]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[C,D]=(0,e.useState)({accountId:""}),[E,F]=(0,e.useState)(x),[G,H]=(0,e.useState)(!1),[I,L]=(0,e.useState)(null),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("single"),[Q,R]=(0,e.useState)(""),[S,T]=(0,e.useState)(null),U=y.name.trim().length>0,V=y.apiKey.trim().length>0,W=()=>q&&y.ollamaHostUrl.trim()?{baseUrl:y.ollamaHostUrl.trim()}:u?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:v?{accountId:C.accountId}:w&&E?{region:E}:void 0,X=async()=>{let a=y.apiKey.trim();if(a){H(!0);try{let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a,providerSpecificData:W()})}),d=await c.json();L(d.valid?"success":"failed")}catch{L("failed")}finally{H(!1)}}},Y=async()=>{if(!b)return;let a=y.name.trim(),c=y.apiKey.trim();if((q||c)&&(q||a)&&(!f||y.defaultModel.trim())){N(!0);try{let d=!1;try{H(!0),L(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:c,providerSpecificData:W()})});d=!!(await a.json()).valid,L(d?"success":"failed")}catch{L("failed")}finally{H(!1)}await n({name:a||(q?"Ollama Local":""),apiKey:c,defaultModel:f?y.defaultModel.trim():void 0,priority:y.priority,testStatus:d?"active":"unknown",providerSpecificData:W()})}finally{N(!1)}}},Z=async()=>{let a=Q.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;N(!0),T(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim();if(!g){d++;continue}let h=f.length>=2&&f[0].trim()||"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}N(!1),T({success:c,failed:d}),c>0&&o&&o()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${t}`,onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===O?"primary":"ghost",onClick:()=>{P("single"),T(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===O?"primary":"ghost",onClick:()=>{P("bulk"),T(null)},children:"Bulk Add"})]}),"bulk"===O&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:J,value:Q,onChange:a=>R(a.target.value)}),S&&(0,d.jsxs)("div",{className:`text-sm font-medium ${S.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",S.success," added",S.failed>0?`, ✗ ${S.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:M||!Q.trim(),children:M?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===O&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:y.name,onChange:a=>z({...y,name:a.target.value}),placeholder:q?"Ollama Local":"Production Key"}),q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:y.ollamaHostUrl,onChange:a=>z({...y,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),!q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:t,type:r?"text":"password",autoComplete:"off",value:y.apiKey,onChange:a=>z({...y,apiKey:a.target.value}),placeholder:r?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":s?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!y.apiKey||G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),s&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),r&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),w&&(0,d.jsx)(j.l6,{label:"Region",value:E,onChange:a=>F(a.target.value),options:w.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:y.defaultModel,onChange:a=>z({...y,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),q&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),I&&(0,d.jsx)(j.Ex,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"}),m&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:m}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),v&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:C.accountId,onChange:a=>D({...C,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),u&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:a=>B({...A,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:A.deployment,onChange:a=>B({...A,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:A.apiVersion,onChange:a=>B({...A,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:A.organization,onChange:a=>B({...A,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",min:1,value:y.priority,onChange:a=>z({...y,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:M||!q&&(!U||!V)||f&&!y.defaultModel.trim()||u&&(!A.azureEndpoint||!A.deployment||!A.organization)||v&&!C.accountId,children:M?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function L({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=function(a){try{return["http:","https:"].includes(new URL(a).protocol)}catch{return!1}}(h.baseUrl.trim()),v=async()=>{if(h.name.trim()&&u){l(!0);try{let a={name:h.name.trim(),baseUrl:h.baseUrl.trim()};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},w=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible`,hint:"Friendly label for this provider."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Base URL ending in /v1 for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),b.prefix?(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Model IDs use prefix ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded font-mono",children:b.prefix})," ","(auto-assigned; stable so combos keep working)."]}):null,(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",autoComplete:"off",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:w,disabled:!m||q||!u,variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If the provider has no /models endpoint, test with a model ID."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:v,fullWidth:!0,disabled:!h.name.trim()||!u||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function M({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}K.propTypes={isOpen:B().bool.isRequired,provider:B().string,providerName:B().string,isCompatible:B().bool,isAnthropic:B().bool,authType:B().string,authHint:B().string,website:B().string,error:B().string,onSave:B().func.isRequired,onBulkDone:B().func,onClose:B().func.isRequired},L.propTypes={isOpen:B().bool.isRequired,node:B().shape({id:B().string,name:B().string,prefix:B().string,apiType:B().string,baseUrl:B().string}),onSave:B().func.isRequired,onClose:B().func.isRequired,isAnthropic:B().bool},M.propTypes={isOpen:B().bool.isRequired,providerAlias:B().string.isRequired,providerDisplayAlias:B().string.isRequired,onSave:B().func.isRequired,onClose:B().func.isRequired};let N=`[
3
+ sk-key-only-auto-named`;function J({isOpen:a,provider:b,providerName:c,isCompatible:f,isAnthropic:g,authType:h,authHint:i,website:l,error:m,onSave:n,onBulkDone:o,onClose:p}){let q="ollama-local"===b,r="cookie"===h,s="xai"===b&&!r,t=r?"Cookie Value":"API Key",u="azure"===b,v="cloudflare-ai"===b,w=k.Q2?.[b]?.regions||null,x=k.Q2?.[b]?.defaultRegion||w?.[0]?.id||"",[y,z]=(0,e.useState)({name:"",apiKey:"",defaultModel:"",priority:1,ollamaHostUrl:""}),[A,B]=(0,e.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[C,D]=(0,e.useState)({accountId:""}),[E,F]=(0,e.useState)(x),[G,H]=(0,e.useState)(!1),[K,L]=(0,e.useState)(null),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("single"),[Q,R]=(0,e.useState)(""),[S,T]=(0,e.useState)(null),U=y.name.trim().length>0,V=y.apiKey.trim().length>0,W=()=>q&&y.ollamaHostUrl.trim()?{baseUrl:y.ollamaHostUrl.trim()}:u?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:v?{accountId:C.accountId}:w&&E?{region:E}:void 0,X=async()=>{let a=y.apiKey.trim();if(a){H(!0);try{let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:a,providerSpecificData:W()})}),d=await c.json();L(d.valid?"success":"failed")}catch{L("failed")}finally{H(!1)}}},Y=async()=>{if(!b)return;let a=y.name.trim(),c=y.apiKey.trim();if((q||c)&&(q||a)&&(!f||y.defaultModel.trim())){N(!0);try{let d=!1;try{H(!0),L(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:c,providerSpecificData:W()})});d=!!(await a.json()).valid,L(d?"success":"failed")}catch{L("failed")}finally{H(!1)}await n({name:a||(q?"Ollama Local":""),apiKey:c,defaultModel:f?y.defaultModel.trim():void 0,priority:y.priority,testStatus:d?"active":"unknown",providerSpecificData:W()})}finally{N(!1)}}},Z=async()=>{let a=Q.split("\n").map(a=>a.trim()).filter(Boolean);if(!a.length)return;N(!0),T(null);let c=0,d=0;for(let e=0;e<a.length;e++){let f=a[e].split("|"),g=f.length>=2?f.slice(1).join("|").trim():f[0].trim();if(!g){d++;continue}let h=f.length>=2&&f[0].trim()||"Key",i=`${h} ${e+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:g,name:i,priority:1,testStatus:"unknown"})})).ok?c++:d++}catch{d++}}N(!1),T({success:c,failed:d}),c>0&&o&&o()};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Add ${c||b} ${t}`,onClose:p,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{size:"sm",variant:"single"===O?"primary":"ghost",onClick:()=>{P("single"),T(null)},children:"Single"}),(0,d.jsx)(j.$n,{size:"sm",variant:"bulk"===O?"primary":"ghost",onClick:()=>{P("bulk"),T(null)},children:"Bulk Add"})]}),"bulk"===O&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,d.jsx)("code",{children:"name|apiKey"})," or just ",(0,d.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:I,value:Q,onChange:a=>R(a.target.value)}),S&&(0,d.jsxs)("div",{className:`text-sm font-medium ${S.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",S.success," added",S.failed>0?`, ✗ ${S.failed} failed`:""]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Z,fullWidth:!0,disabled:M||!Q.trim(),children:M?"Adding...":"Add All Keys"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===O&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.pd,{label:"Name",value:y.name,onChange:a=>z({...y,name:a.target.value}),placeholder:q?"Ollama Local":"Production Key"}),q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"Ollama Host URL",value:y.ollamaHostUrl,onChange:a=>z({...y,ollamaHostUrl:a.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),!q&&(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:t,type:r?"text":"password",autoComplete:"off",value:y.apiKey,onChange:a=>z({...y,apiKey:a.target.value}),placeholder:r?"grok-web"===b?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":s?"xai-...":"",className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:X,disabled:!y.apiKey||G||M,variant:"secondary",children:G?"Checking...":"Check"})})]}),s&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),r&&i&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[i,l&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",l.replace(/^https?:\/\//,"")]})]})]}),w&&(0,d.jsx)(j.l6,{label:"Region",value:E,onChange:a=>F(a.target.value),options:w.map(a=>({value:a.id,label:a.label}))}),f&&(0,d.jsx)(j.pd,{label:"Default Model",value:y.defaultModel,onChange:a=>z({...y,defaultModel:a.target.value}),placeholder:g?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),q&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,d.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,d.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),K&&(0,d.jsx)(j.Ex,{variant:"success"===K?"success":"error",children:"success"===K?"Valid":"Invalid"}),m&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:m}),f&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),v&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,d.jsx)(j.pd,{label:"Account ID",value:C.accountId,onChange:a=>D({...C,accountId:a.target.value}),placeholder:"abc123def456..."}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,d.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),u&&(0,d.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,d.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)(j.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:a=>B({...A,azureEndpoint:a.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,d.jsx)(j.pd,{label:"Deployment Name",value:A.deployment,onChange:a=>B({...A,deployment:a.target.value}),placeholder:"gpt-4"}),(0,d.jsx)(j.pd,{label:"API Version",value:A.apiVersion,onChange:a=>B({...A,apiVersion:a.target.value}),placeholder:"2024-10-01-preview"}),(0,d.jsx)(j.pd,{label:"Organization",value:A.organization,onChange:a=>B({...A,organization:a.target.value}),placeholder:"Organization ID"})]})]}),(0,d.jsx)(j.pd,{label:"Priority",type:"number",min:1,value:y.priority,onChange:a=>z({...y,priority:Number.parseInt(a.target.value)||1})}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:Y,fullWidth:!0,disabled:M||!q&&(!U||!V)||f&&!y.defaultModel.trim()||u&&(!A.azureEndpoint||!A.deployment||!A.organization)||v&&!C.accountId,children:M?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:p,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function K({isOpen:a,node:b,onSave:c,onClose:f,isAnthropic:g}){let[h,i]=(0,e.useState)({name:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(""),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),u=function(a){try{return["http:","https:"].includes(new URL(a).protocol)}catch{return!1}}(h.baseUrl.trim()),v=async()=>{if(h.name.trim()&&u){l(!0);try{let a={name:h.name.trim(),baseUrl:h.baseUrl.trim()};g||(a.apiType=h.apiType),await c(a)}finally{l(!1)}}},w=async()=>{r(!0);try{let a=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:h.baseUrl,apiKey:m,type:g?"anthropic-compatible":"openai-compatible",modelId:o.trim()||void 0})}),b=await a.json();t(b.valid?"success":"failed")}catch{t("failed")}finally{r(!1)}};return b?(0,d.jsx)(j.aF,{isOpen:a,title:`Edit ${g?"Anthropic":"OpenAI"} Compatible`,onClose:f,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(j.pd,{label:"Name",value:h.name,onChange:a=>i({...h,name:a.target.value}),placeholder:`${g?"Anthropic":"OpenAI"} Compatible`,hint:"Friendly label for this provider."}),!g&&(0,d.jsx)(j.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:h.apiType,onChange:a=>i({...h,apiType:a.target.value})}),(0,d.jsx)(j.pd,{label:"Base URL",value:h.baseUrl,onChange:a=>i({...h,baseUrl:a.target.value}),placeholder:g?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Base URL ending in /v1 for your ${g?"Anthropic":"OpenAI"}-compatible API.`}),b.prefix?(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Model IDs use prefix ",(0,d.jsx)("code",{className:"bg-sidebar px-1 rounded font-mono",children:b.prefix})," ","(auto-assigned; stable so combos keep working)."]}):null,(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.pd,{label:"API Key (for Check)",type:"password",autoComplete:"off",value:m,onChange:a=>n(a.target.value),className:"flex-1"}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(j.$n,{onClick:w,disabled:!m||q||!u,variant:"secondary",children:q?"Checking...":"Check"})})]}),(0,d.jsx)(j.pd,{label:"Model ID (optional)",value:o,onChange:a=>p(a.target.value),placeholder:"e.g. my-model-id",hint:"If the provider has no /models endpoint, test with a model ID."}),s&&(0,d.jsx)(j.Ex,{variant:"success"===s?"success":"error",children:"success"===s?"Valid":"Invalid"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:v,fullWidth:!0,disabled:!h.name.trim()||!u||k,children:k?"Saving...":"Save"}),(0,d.jsx)(j.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function L({isOpen:a,providerAlias:b,providerDisplayAlias:c,onSave:f,onClose:g}){let[h,i]=(0,e.useState)(""),[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(!1),q=a=>{let c=`${b}/`;return a.startsWith(c)?a.slice(c.length):a},r=async()=>{let a=q(h.trim());if(a){l("testing"),n("");try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${b}/${a}`})}),d=await c.json();l(d.ok?"ok":"error"),n(d.error||"")}catch(a){l("error"),n(a.message)}}},s=async()=>{let a=q(h.trim());if(a&&!o){p(!0);try{await f(a)}finally{p(!1)}}};return(0,d.jsx)(j.aF,{isOpen:a,onClose:g,title:"Add Custom Model",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("input",{type:"text",value:h,onChange:a=>{i(a.target.value),l(null),n("")},onKeyDown:a=>{"Enter"===a.key&&r()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,d.jsx)(j.$n,{variant:"secondary",icon:"science",loading:"testing"===k,onClick:r,disabled:!h.trim()||"testing"===k,children:"testing"===k?"Testing...":"Test"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,d.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:q(h.trim())||"model-id"})]})]}),"ok"===k&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===k&&(0,d.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,d.jsx)("span",{children:m||"Model not reachable"})]}),(0,d.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,d.jsx)(j.$n,{onClick:g,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,d.jsx)(j.$n,{onClick:s,fullWidth:!0,size:"sm",disabled:!h.trim()||o,children:o?"Adding...":"Add Model"})]})]})})}J.propTypes={isOpen:A().bool.isRequired,provider:A().string,providerName:A().string,isCompatible:A().bool,isAnthropic:A().bool,authType:A().string,authHint:A().string,website:A().string,error:A().string,onSave:A().func.isRequired,onBulkDone:A().func,onClose:A().func.isRequired},K.propTypes={isOpen:A().bool.isRequired,node:A().shape({id:A().string,name:A().string,prefix:A().string,apiType:A().string,baseUrl:A().string}),onSave:A().func.isRequired,onClose:A().func.isRequired,isAnthropic:A().bool},L.propTypes={isOpen:A().bool.isRequired,providerAlias:A().string.isRequired,providerDisplayAlias:A().string.isRequired,onSave:A().func.isRequired,onClose:A().func.isRequired};let M=`[
4
4
  {
5
5
  "accessToken": "eyJhbGc...",
6
6
  "refreshToken": "rt_...",
7
7
  "idToken": "eyJhbGc...",
8
8
  "email": "user@example.com"
9
9
  }
10
- ]`;function O({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,w.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,w.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,w.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.aF,{isOpen:a,title:(0,w.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,w.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:N,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,w.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,w.Tl)("failed")}`:""]}),q.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:q.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,w.Tl)("Importing..."):(0,w.Tl)("Import All")}),(0,d.jsx)(j.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,w.Tl)("Close")})]})]})})}O.propTypes={isOpen:B().bool.isRequired,onClose:B().func.isRequired,onSuccess:B().func};var P=c(78097);function Q({connectionId:a,providerAlias:b,models:c,jobSnapshot:f,onComplete:g,onStarted:h,onClose:i}){let[k,l]=(0,e.useState)(4),[m,n]=(0,e.useState)(50),[o,p]=(0,e.useState)(Math.round(20)),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(""),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(""),C=(0,e.useRef)({onComplete:g,onStarted:h}),D=(0,e.useRef)(null),E=(0,e.useRef)(a),F=(0,e.useRef)(null),G=c?.length||0,H=(0,e.useMemo)(()=>`max concurrency 16 \xb7 batch 200 \xb7 timeout ${60}s`,[]);async function I(){if(q||!a||0===G)return;r(!0),x(""),v(null),z("Starting…");let d={concurrency:Math.max(1,Math.min(16,Number(k)||4)),batchSize:Math.max(1,Math.min(200,Number(m)||50)),timeoutMs:Math.max(1e3,Math.min(6e4,1e3*(Number(o)||20)))};F.current=a;try{let e=await fetch(`/api/providers/${a}/model-probes/verify/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:c,providerAlias:b,...d,timeoutMs:d.timeoutMs})}),f=await e.json().catch(()=>({}));if(E.current!==a){F.current=null,r(!1);return}if(!e.ok){F.current=null,x(f.error||"Failed to start"),r(!1);return}C.current.onStarted?.(f),function(a){if(a){if("idle"===a.status){F.current=null,r(!1);return}if(t({done:a.done||0,total:a.total||0,ok:a.ok||0,dead:a.dead||0,retryable:a.retryable||0,skippedDead:a.skippedDead||0,skippedDup:a.skippedDup||0}),"running"===a.status&&(F.current=a.connectionId||E.current,D.current=null,r(!0)),a.currentRange&&z(`Probing ${a.currentRange.from}–${a.currentRange.to} of ${a.total}…`),a.error&&x(a.error),"done"===a.status||"cancelled"===a.status||"error"===a.status){F.current=null,r(!1);let b={ok:a.ok||0,dead:a.dead||0,retryable:a.retryable||0,tested:a.done||0,skippedDead:a.skippedDead||0,skippedDup:a.skippedDup||0,cancelled:"cancelled"===a.status,retryableAuthOnly:!0===a.retryableAuthOnly};v(b),z("cancelled"===a.status?"Cancelled (partial results saved).":"error"===a.status?"Stopped.":"Done.");let c=`${a.startedAt||"unknown"}:${a.status}`;D.current!==c&&(D.current=c,C.current.onComplete?.(b))}}}(f),"running"!==f.status&&r(!1)}catch(a){F.current=null,x(a?.message||"Verify failed"),r(!1)}}async function J(){let b=F.current||a;await fetch(`/api/providers/${b}/model-probes/verify/cancel`,{method:"POST"}).catch(()=>{})}async function K(c){if(!a)return;let d="retryable"===c,e=d?Number(u?.retryable||0):Number(u?.dead||0);if(!d||await (0,P.l)({title:"Remove retry-failed models?",message:`Review ${e} retryable result(s) and remove the eligible models? Timeouts, rate limits, network failures, and provider errors may be temporary. Credential failures are kept. Removed models can be enabled or imported again later.`,confirmText:"Remove eligible"})){B(c),x(""),z(`Removing ${d?"retry-failed":"dead"} models…`);try{let e=await fetch(`/api/providers/${a}/model-probes/remove-unavailable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b,kind:"llm",status:c})}),f=await e.json().catch(()=>({}));if(!e.ok)return void x(f.error||"Remove failed");let g=Number(f.removed||0),h=Number(f.kept||0),i=u?{...u,[d?"retryable":"dead"]:h,...d?{retryableAuthOnly:h>0}:{}}:u;v(i),z(`Removed ${g} ${d?"retry-failed":"dead"} model(s).`+(h>0?` Kept ${h} credential failure(s).`:"")),C.current.onComplete?.({...i||{},removed:g,kept:h,removedStatus:c})}catch(a){x(a?.message||"Remove failed")}finally{B("")}}}async function L(){if(!a)return;let b=await fetch(`/api/providers/${a}/model-probes/cache`,{method:"DELETE"}),c=await b.json().catch(()=>({}));b.ok?(z(`Cleared probe cache (${c.cleared||0} rows). Next verify will re-test everything.`),v(null),t(null),C.current.onComplete?.({cacheCleared:!0,cleared:c.cleared||0})):x(c.error||"Clear cache failed")}let M=s?.total?Math.min(100,Math.round(s.done/s.total*100)):0;return(0,d.jsxs)("div",{className:"mb-4 rounded-lg border border-border bg-sidebar/40 p-3 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Verify models"}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted mt-0.5",children:["Batch-ping availability and latency. Dead = permanently unavailable (missing, blocked, or deprecated) and can be removed; retry = transient (timeout/429/5xx). Known-dead models are skipped until you Clear cache. Caps: ",H,"."]})]}),i&&(0,d.jsx)("button",{type:"button",onClick:i,className:"p-1 text-text-muted hover:text-text-main rounded",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 items-end",children:[(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Concurrency",(0,d.jsx)("input",{type:"number",min:1,max:16,value:k,disabled:q,onChange:a=>l(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Batch size",(0,d.jsx)("input",{type:"number",min:1,max:200,value:m,disabled:q,onChange:a=>n(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Timeout (s)",(0,d.jsx)("input",{type:"number",min:1,max:60,value:o,disabled:q,onChange:a=>p(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[q?(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"stop",onClick:J,children:"Cancel"}):(0,d.jsx)(j.$n,{size:"sm",icon:"science",onClick:I,disabled:!a||0===G,children:"Start"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete_sweep",onClick:L,disabled:q,children:"Clear cache"})]})]}),s&&(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("div",{className:"h-1.5 w-full rounded-full bg-border overflow-hidden",children:(0,d.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${M}%`}})}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted flex flex-wrap gap-x-2",children:[(0,d.jsxs)("span",{title:"Models probed this run",children:[s.done,"/",s.total," tested"]}),(0,d.jsxs)("span",{title:"Reachable",children:["\xb7 ok ",s.ok]}),(0,d.jsxs)("span",{title:"Permanently unavailable this run (missing, blocked, or deprecated)",children:["\xb7 dead ",s.dead]}),(0,d.jsxs)("span",{title:"Transient failure this run (timeout / 429 / 5xx / network); re-testable",children:["\xb7 retry ",s.retryable]}),s.skippedDead?(0,d.jsxs)("span",{title:"Not probed — cache already marks them dead. Clear cache to re-test.",children:["\xb7 skipped known-dead ",s.skippedDead]}):null,s.skippedDup?(0,d.jsxs)("span",{title:"Duplicate ids collapsed",children:["\xb7 dupes ",s.skippedDup]}):null]})]}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y}),w&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:w}),u&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,d.jsxs)("span",{className:"text-xs text-text-main",children:["Summary: ",u.ok," ok \xb7 ",u.dead," dead \xb7 ",u.retryable," retry",u.skippedDead?` \xb7 ${u.skippedDead} skipped known-dead`:"",u.cancelled?" \xb7 cancelled":""]}),u.dead>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"primary",icon:"delete_sweep",onClick:()=>K("dead"),disabled:q||!!A,loading:"dead"===A,children:["Remove ",u.dead," dead"]}),u.retryable>0&&!u.retryableAuthOnly&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete_sweep",onClick:()=>K("retryable"),disabled:q||!!A,loading:"retryable"===A,children:["Remove ",u.retryable," retry failures"]})]})]})}Q.propTypes={connectionId:B().string,providerAlias:B().string,models:B().arrayOf(B().object),jobSnapshot:B().object,onComplete:B().func,onStarted:B().func,onClose:B().func};var R=c(15279);let S={claude:"claudeAutoPing",codex:"codexAutoPing"};function T(){let a,b,c,g=(0,f.useParams)(),m=(0,f.useRouter)(),n=g.id,{getCaps:o}=(0,v.y)(),[p,q]=(0,e.useState)([]),[r,s]=(0,e.useState)([]),[A,B]=(0,e.useState)(!0),[E,G]=(0,e.useState)(null),[H,J]=(0,e.useState)(!1),[N,P]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(null),[ad,ae]=(0,e.useState)({}),[af,ag]=(0,e.useState)([]),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)({}),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(()=>new Set),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)(null),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)("auto"),[ax,ay]=(0,e.useState)({enabled:!1,connections:{}}),[az,aA]=(0,e.useState)([]),[aB,aC]=(0,e.useState)([]),[aD,aE]=(0,e.useState)([]),[aF,aG]=(0,e.useState)([]),[aH,aI]=(0,e.useState)(null),[aJ,aK]=(0,e.useState)(!1),[aL,aM]=(0,e.useState)(!1),[aN,aO]=(0,e.useState)(!1),[aP,aQ]=(0,e.useState)(null),[aR,aS]=(0,e.useState)({}),[aT,aU]=(0,e.useState)(null),aV=(0,e.useRef)(!1),aW=(0,e.useRef)(null),aX=(0,e.useRef)(0),aY=(0,e.useRef)(0),[aZ,a$]=(0,e.useState)(!1),[a_,a0]=(0,e.useState)(""),[a1,a2]=(0,e.useState)(!1),[a3,a4]=(0,e.useState)(null),[a5,a6]=(0,e.useState)({}),[a7,a8]=(0,e.useState)({}),[a9,ba]=(0,e.useState)("all"),{copied:bb,copy:bc}=(0,u.C)(),bd=()=>{J(!0)},be=()=>{bj?bd():(W(""),U(!0))},bf=()=>{W(""),U(!0)},bg=()=>{bj?be():bf()},bh=E?{id:E.id,name:E.name||("anthropic-compatible"===E.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===E.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===E.type?"AC":"OC",apiType:E.apiType,baseUrl:E.baseUrl,type:E.type}:k.zN[n]||k.fg[n]||k.IS[n]||k.nJ[n]||k.br[n],bi=bh?.authModes||[],bj=!!k.zN[n]||!!k.IS[n]||bi.includes("oauth"),bk=!!k.fg[n]||bi.includes("apikey"),bl=!!k.IS[n]?.noAuth,bm=(0,l.KC)(n),bn=(()=>{let a=new Map(bm.map(a=>[a.id,a]));for(let b of aB)b?.id&&a.set(b.id,{...a.get(b.id),...b});return[...a.values()]})(),bo=(0,k.wG)(n),bp=(0,k.mq)(n),bq=(0,k.gb)(n),br=bp||bq,bs=p.some(a=>!1!==a.isActive),bt=function({isCompatible:a,hasActiveConnection:b}){let c=!a,d=!a;return{showToolbar:c||b||d,showImport:c,showVerify:b,showBulkControls:d}}({isCompatible:br,hasActiveConnection:bs}),bu=!br&&bj&&bk,bv="xai"===n?"Grok Build OAuth":"OAuth",bw="xai"===n?"xAI API Key":"API Key",bx=a=>{if(!av||"auto"===av)return null;let b=t(n,a);return b&&b.includes(av)?av:null},by=(()=>{let a=new Set;for(let b of bn){let c=t(n,b.id);c&&c.forEach(b=>{"none"!==b&&a.add(b)})}return a.size?["auto",...a]:null})(),bz=br?n:bo,bA=br?E?.prefix||n:bo,bB=(0,x.Iz)(aF,bz),bC=a=>(0,x.uJ)(bB,a,bz),bD=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bz)}`,{cache:"no-store"}),b=await a.json();a.ok&&aG(b.ids||[])}catch(a){(0,D.s)("Error fetching disabled models:",a)}},[bz]),bE=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bz,ids:[a]})})).ok&&await bD()}catch(a){(0,D.s)("Error disabling model:",a)}},bF=async a=>{try{if(!(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bz)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok)return!1;return await bD(),!0}catch(a){return(0,D.s)("Error enabling model:",a),!1}},bG=async a=>{a.length&&aI({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aI(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bz,ids:a})})).ok&&await bD()}catch(a){(0,D.s)("Error disabling all models:",a)}}})},bH=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bz)}`,{method:"DELETE"})).ok&&await bD()}catch(a){(0,D.s)("Error enabling all models:",a)}},bI=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ae(b.aliases||{})}catch(a){(0,D.s)("Error fetching aliases:",a)}},[]),bJ=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ag(b.models||[])}catch(a){(0,D.s)("Error fetching custom models:",a)}},[]),bK=(0,e.useCallback)(async()=>{try{let[a,b,c]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),d=await a.json(),e=await b.json(),f=c.ok?await c.json():{};if(a.ok){let a=(d.connections||[]).filter(a=>a.provider===n);q(a)}let g=(f.providerStrategies||{})[n]||{};as(g.fallbackStrategy||null),au(null!=g.stickyRoundRobinLimit?String(g.stickyRoundRobinLimit):"1");let h=(f.providerThinking||{})[n]||{};aw(h.mode||"auto");let i=S[n],j=i&&f[i]||{};if(ay({enabled:!0===j.enabled,connections:j.connections||{}}),b.ok){let a=(e.nodes||[]).find(a=>a.id===n)||null;if(!a&&br)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===n)||null))break}G(a)}}catch(a){(0,D.s)("Error fetching connections:",a)}finally{B(!1)}},[n,br]),bL=(0,e.useCallback)(async(a=null)=>{let b=++aY.current,c=a?p.find(b=>b.id===a&&!1!==b.isActive):p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive);if(!c){a8({}),a6({});return}try{let a=await fetch(`/api/providers/${c.id}/model-probes`,{cache:"no-store"});if(!a.ok)return;let d=await a.json().catch(()=>({})),e={},f={};for(let a of d.probes||[])e[a.modelId]="ok"===a.status?"ok":"dead"===a.status?"dead":"retry",null!=a.latencyMs&&(f[a.modelId]=a.latencyMs);if(b!==aY.current)return;a8(e),a6(f)}catch{}},[p,r]),bM=async a=>{try{let b=await fetch(`/api/provider-nodes/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(G(c.node),await bK(),aa(!1))}catch(a){(0,D.s)("Error updating provider node:",a)}},bN=async(a,b)=>{try{let c=await fetch("/api/settings",{cache:"no-store"}),d=(c.ok?await c.json():{}).providerStrategies||{},e={};a&&(e.fallbackStrategy=a),"round-robin"===a&&""!==b&&(e.stickyRoundRobinLimit=Number(b)||3);let f={...d};0===Object.keys(e).length?delete f[n]:f[n]=e,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:f})})}catch(a){(0,D.s)("Error saving provider strategy:",a)}},bO=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[n]={mode:a}:delete c[n],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){(0,D.s)("Error saving thinking config:",a)}},bP=async a=>{let b=S[n];if(b){ay(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){(0,D.s)("Error saving auto-ping config:",a)}}},bQ=(0,e.useCallback)(a=>{let b=++aX.current;aW.current&&(clearTimeout(aW.current),aW.current=null);let c=async()=>{try{let d=await fetch(`/api/providers/${a}/model-probes/verify/status`,{cache:"no-store"}),e=await d.json().catch(()=>null);if(b!==aX.current)return;if(!d.ok||!e?.status)throw Error("Verify status temporarily unavailable");a4(e&&e.status?e:null),e?.status==="running"?aW.current=setTimeout(c,1500):(aW.current=null,await bL(a))}catch{b===aX.current&&(aW.current=setTimeout(c,1500))}};aW.current=setTimeout(c,0)},[bL]),bR=async(a,b,c=bo)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bI();else{let b=await a.json();(0,D.s)(b.error||"Failed to set alias")}}catch(a){(0,D.s)("Error setting alias:",a)}},bS=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bI()}catch(a){(0,D.s)("Error deleting alias:",a)}},bT=async(a,b="llm",c=bz)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bJ();else{let a=await d.json();(0,D.s)(a.error||"Failed to add custom model")}}catch(a){(0,D.s)("Error adding custom model:",a)}},bU=async(a,b="llm",c=bz)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bJ()}catch(a){(0,D.s)("Error deleting custom model:",a)}},bV=async()=>{if(aZ)return;let a=p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive);if(!a)return void(0,D.s)((0,w.Tl)("Add an active connection first"));a$(!0),a0("");try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json().catch(()=>({}));if(!b.ok)return void(0,D.s)(c.error||(0,w.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void(0,D.s)(c.warning||(0,w.Tl)("No models returned"));let e=new Set;try{let b=await fetch(`/api/providers/${a.id}/model-probes`,{cache:"no-store"});for(let a of(await b.json().catch(()=>({}))).probes||[])"dead"===a.status&&e.add(a.modelId)}catch{}let f=0,g=new Set(bn.map(a=>a.id)),h=[],i=[],j=new Set;for(let a of d){let b=function(a,b){if(null==a)return null;if("string"==typeof a){let c=z(a,b);return c?{id:c,name:c,type:y(c)}:null}let c=a.id||a.name||a.model||a.slug;if(!c)return null;let d=z(c,b);if(!d)return null;let e=a.display_name||a.displayName||a.name||a.title||d;return{id:d,name:String(e),type:y(d,a)}}(a,bz);if(!b)continue;let{id:c,name:d,type:k}=b;if(e.has((0,R.v)(c,bz))){f+=1;continue}let l=`${k}|${c}`;if(j.has(l))continue;if(j.add(l),g.has(c)){bC(c)&&i.push(c);continue}if(af.some(a=>a.providerAlias===bz&&a.id===c&&(a.kind||a.type||"llm")===k))continue;let m=`${bz}/${c}`;Object.values(ad).includes(m)||h.push({providerAlias:bz,id:c,type:k,name:d})}let k=0;if(i.length>0)try{for(let a of i)(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bz)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(k+=1);await bD()}catch{}let l=0;if(h.length>0){let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:h})}),b=await a.json().catch(()=>({}));if(!a.ok)return void(0,D.s)(b.error||(0,w.Tl)("Failed to save models"));l=b.added??h.length,await bJ()}let m=h.filter(a=>"llm"!==a.type).length,n=[];if(l>0&&n.push(`${l} new`),k>0&&n.push(`${k} re-enabled`),0===n.length)a0((0,w.Tl)("All models already in list"));else{let a=`Imported ${n.join(" \xb7 ")} (${d.length} from provider)`;m>0&&(a+=" \xb7 non-chat types stored for media pages"),c.warning&&(a+=` \xb7 ${c.warning}`),a0(a)}if(f>0&&a0(a=>`${a} \xb7 ${f} skipped (known dead)`),l>0||k>0)try{let b=[...bn,...h.map(a=>({id:a.id,name:a.name,kind:a.type}))],c=await fetch(`/api/providers/${a.id}/model-probes/verify/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:b,providerAlias:bz})}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Failed to start auto-verify");a4(d&&d.status?d:null),bQ(a.id)}catch(a){a0(b=>`${b} \xb7 auto-verify failed: ${a?.message||a}`)}}catch(a){(0,D.s)("Error importing models:",a),(0,D.s)((0,w.Tl)("Error fetching models")+": "+(a?.message||a))}finally{a$(!1)}},bW=async()=>{if(aL||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));aV.current=!1,aM(!0),aO(!1),aQ(null),aS(a),aU({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(aV.current){aU({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aQ(d.id),aS(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aS(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aS(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aU({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aQ(null),aM(!1),aO(!1),aV.current=!1}},bX=async a=>{let b=p.find(b=>b.id===a),c=b?.name?.trim()||b?.email?.trim()||a;aI({title:"Delete Connection",message:`Delete connection “${c}”?`,onConfirm:async()=>{aI(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&q(b=>b.filter(b=>b.id!==a))}catch(a){(0,D.s)("Error deleting connection:",a)}}})},bY=()=>{bK(),J(!1)},bZ=async a=>{W("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bK(),U(!1);return}W(c?.error||"Failed to save connection")}catch(a){(0,D.s)("Error saving connection:",a),W("Failed to save connection")}},b$=async a=>{try{(await fetch(`/api/providers/${ab.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bK(),$(!1))}catch(a){(0,D.s)("Error updating connection:",a)}},b_=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&q(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){(0,D.s)("Error updating connection status:",a)}},b0=async a=>{let b,c=a?.providerSpecificData?.baseUrl;if(c){try{b=new URL(c).hostname.toLowerCase().replace(/^\[|\]$/g,"")}catch{(0,D.s)("Cannot allow-list: invalid base URL",c);return}try{let a=await fetch("/api/settings",{cache:"no-store"});if(!a.ok)throw Error(`Failed to load settings (${a.status})`);let c=await a.json(),d=[...new Set([...c.ssrfAllowHosts||[],b])],e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ssrfAllowHosts:d})});if(!e.ok)throw Error(`Failed to update allow list (${e.status})`);await bK()}catch(a){(0,D.s)("Error adding host to allow list:",a)}}},b1=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],q(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){(0,D.s)("Error swapping priority:",a),await bK()}},b2=p.length>0&&r.length===p.length,b3=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:p.map((a,b)=>(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:r.includes(a.id),onChange:()=>{var b;return b=a.id,void s(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(I,{connection:a,isOAuth:bj,isFirst:0===b,isLast:b===p.length-1,onMoveUp:()=>b1(b,b-1),onMoveDown:()=>b1(b,b+1),onToggleActive:b=>b_(a.id,b),autoPing:S[n]&&"oauth"===a.authType?{on:!0===ax.connections[a.id],onToggle:b=>{var c;return c=a.id,void bP({...ax,connections:{...ax.connections,[c]:b}})},provider:n}:null,onEdit:()=>{ac(a),$(!0)},onDelete:()=>bX(a.id),onAllowlistHost:()=>b0(a),oneByOneStatus:aR[a.id]||null})})]},a.id))}),b4=async a=>{if(!an.has(a)){ao(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bz}/${a}`})}),c=await b.json();ak(b=>({...b,[a]:c.ok?"ok":"error"})),am(c.ok?"":c.error||"Model not reachable")}catch{ak(b=>({...b,[a]:"error"})),am("Network error")}finally{ao(b=>{let c=new Set(b);return c.delete(a),c})}}};return A?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):bh?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bh.color}15`},children:ah?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bh.color},children:bh.textIcon||bh.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:bp&&bh.apiType?"responses"===bh.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bq?"/providers/anthropic-m.png":`/providers/${bh.id}.png`,alt:bh.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ai(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bh.name}),(bh.notice?.apiKeyUrl||bh.notice?.signupUrl||bh.website)&&(0,d.jsxs)("a",{href:bh.notice?.apiKeyUrl||bh.notice?.signupUrl||bh.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bh.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[p.length," connection",1===p.length?"":"s"]})]})]})]}),bh.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bh.deprecationNotice})]}),bh.notice?.text&&!bh.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bh.notice.text}),bh.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bh.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),br&&E&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bq?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bq?"Messages API":"responses"===E.apiType?"Responses API":"Chat Completions"," \xb7 ",(E.baseUrl||"").replace(/\/$/,""),"/",bq?"messages":"responses"===E.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{W(""),U(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aa(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aI({title:"Delete Compatible Node",message:`Delete this ${bq?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aI(null);try{(await fetch(`/api/provider-nodes/${n}`,{method:"DELETE"})).ok&&m.push("/dashboard/providers")}catch(a){(0,D.s)("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bl?(0,d.jsx)(j.gw,{providerId:n}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[p.length>0&&(0,d.jsxs)(d.Fragment,{children:[r.length>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=r.length;0!==a&&aI({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aI(null);let a=0,b=[...r];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){(0,D.s)("Error deleting connection:",b),a+=1}q(a=>a.filter(a=>!b.includes(a.id))),s([]),a>0&&(0,D.s)(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",r.length,")"]}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:bW,disabled:aL,children:aL?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aL&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aL&&(aV.current=!0,aO(!0))},disabled:aN,children:aN?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===ar,onChange:a=>{let b=a?"round-robin":null,c=a?at||"1":at;a&&!at&&au("1"),as(b),bN(b,c)}}),"round-robin"===ar&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:at,onChange:a=>{var b;au(b=a.target.value),bN("round-robin",b)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===p.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bj?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),bu&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bv," or ",bw,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:bu?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:be,children:bv}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:bf,children:bw})]}):(0,d.jsxs)(d.Fragment,{children:[!br&&"iflow"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),"codex"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,w.Tl)("Bulk Add")}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:bg,children:br?"Add API Key":"iflow"===n?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aT&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aT.total]}),(0,d.jsxs)("span",{children:["Completed: ",aT.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aT.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aT.failed]}),aT.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aL&&aP&&(0,d.jsxs)("span",{children:["Running: ",p.find(a=>a.id===aP)?.name||aP]})]})}),p.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:b2,onChange:()=>{b2?s([]):s(p.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),b3,!br&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,w.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,w.Tl)("Bulk Add")}),bu?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:be,className:"w-full sm:w-auto",children:bv}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:bf,className:"w-full sm:w-auto",children:bw})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:bg,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),by&&(0,d.jsx)("select",{value:av,onChange:a=>{var b;aw(b=a.target.value),bO(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:by.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),bt.showToolbar&&(a=(bt.showBulkControls?[...bn,...aD.filter(a=>!bn.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id):[]).filter(a=>!bC(a)),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[bt.showImport&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:aZ?"progress_activity":"cloud_download",onClick:bV,disabled:aZ||!bs,title:bs?"Import models from the active connection":"Add an active connection to import models",children:aZ?"Importing...":"Import models"}),bt.showVerify&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:a3?.status==="running"?"progress_activity":"science",onClick:()=>a2(a=>!a),children:a3?.status==="running"?`Verifying ${a3.done}/${a3.total}`:a1?"Hide verify":"Verify models"}),bt.showBulkControls&&aF.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bH,children:"Active All"}),bt.showBulkControls&&a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bG(a),children:"Disable All"})]}))]}),!!al&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:al}),a_&&(0,d.jsx)("p",{className:"text-xs text-text-muted mb-3",children:a_}),a1&&(b=p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive),c=[...(0,x.R3)({customModels:af,modelAliases:ad,providerAlias:bz,builtInModels:bn,type:"llm"}).filter(a=>!bC(a.id)).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"})),...bn.filter(a=>{let b=(0,l.CP)(a);return(!b||"llm"===b)&&!bC(a.id)}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"}))],(0,d.jsx)(Q,{connectionId:b?.id,providerAlias:bz,models:c,jobSnapshot:a3,onClose:()=>a2(!1),onStarted:a=>{a4(a&&a.status?a:null);let c=a?.connectionId||b?.id;c&&bQ(c)},onComplete:async a=>{a?.removedStatus&&a4(b=>b?{...b,dead:Number(a.dead??b.dead??0),retryable:Number(a.retryable??b.retryable??0),retryableAuthOnly:!0===a.retryableAuthOnly}:b),a?.removed>0&&await bJ(),a?.removed>0&&await bD(),(a?.removed>0||a?.cacheCleared)&&await bL(b?.id)}})),(()=>{let a,b,c;if(br)return(0,d.jsx)(F,{providerStorageAlias:bz,providerDisplayAlias:bA,modelAliases:ad,customModels:af,copied:bb,onCopy:bc,onSetAlias:bR,onDeleteAlias:bS,onAddCustomModel:a=>bT(a,"llm",bz),onDeleteCustomModel:a=>bU(a,"llm",bz),onRefreshModels:bJ,connections:p,isAnthropic:bq,disabledModelIds:aF,onEnableModel:bF});let e=[...bn,...aD.filter(a=>!bn.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=e.filter(a=>!bC(a.id)),g=e.filter(a=>bC(a.id)),h=(0,x.R3)({customModels:af,modelAliases:ad,providerAlias:bz,builtInModels:bn,type:"llm"}),i=h.filter(a=>!bC(a.id)&&("all"===a9||(a7[(0,R.v)(a.id,bz)]||null)===a9)),j=f.filter(a=>"all"===a9||(a7[(0,R.v)(a.id,bz)]||null)===a9);return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("div",{className:"mb-2 flex gap-1 text-xs",children:["all","ok","dead","retry"].map(a=>(0,d.jsx)("button",{onClick:()=>ba(a),className:`rounded px-2 py-0.5 ${a9===a?"bg-primary text-white":"text-text-muted hover:bg-black/5 dark:hover:bg-white/5"}`,children:"all"===a?"All":"ok"===a?"OK":"dead"===a?"Dead":"Retry"},a))}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>{let b=(0,R.v)(a.id,bz);return(0,d.jsx)(C,{model:{id:a.id,name:a.name},fullModel:`${bA}/${a.id}`,alias:a.alias,copied:bb,onCopy:bc,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?bU(a.id,"llm",bz):bS(a.alias)},testStatus:aj[a.id],onTest:p.length>0||bl?()=>b4(a.id):void 0,isTesting:an.has(a.id),isCustom:!0,isFree:!1,caps:o(`${n}/${a.id}`),thinkingSuffix:bx(a.id),latencyMs:a5[a.id]??a5[b],probeState:a3?.status==="running"&&a3?.perModel?.[b]?a3.perModel[b]:a7[b]||null},`${a.source}-${a.fullModel}`)}),j.map(a=>{let b=`${bz}/${a.id}`,c=`${n}/${a.id}`,e=Object.entries(ad).find(([,a])=>a===b||a===c)?.[0],f=(0,R.v)(a.id,bz);return(0,d.jsx)(C,{model:a,fullModel:`${bA}/${a.id}`,alias:e,copied:bb,onSetAlias:b=>bR(a.id,b,bz),onCopy:bc,onDeleteAlias:()=>bS(e),testStatus:aj[a.id],onTest:p.length>0||bl?()=>b4(a.id):void 0,isTesting:an.has(a.id),isFree:a.isFree,onDisable:()=>bE(a.id),caps:o(`${n}/${a.id}`),thinkingSuffix:bx(a.id),latencyMs:a5[a.id]??a5[f],probeState:a3?.status==="running"&&a3?.perModel?.[f]?a3.perModel[f]:a7[f]||null},a.id)}),(0,d.jsxs)("button",{onClick:()=>aq(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),az.length>0&&(a=new Set([...Object.values(ad),...h.map(a=>a.fullModel)]),b=new Set(bn.map(a=>a.id)),0===(c=az.filter(c=>!a.has(`${bz}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await bT(a.id,"llm",bz)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),g.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",g.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:g.map(a=>(0,d.jsxs)("button",{onClick:()=>bF(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})})()]}),"kiro"===n?(0,d.jsx)(j.Mh,{isOpen:H,providerInfo:bh,onSuccess:bY,onClose:()=>J(!1)}):"cursor"===n?(0,d.jsx)(j.G9,{isOpen:H,onSuccess:bY,onClose:()=>J(!1)}):"gitlab"===n?(0,d.jsx)(j.vj,{isOpen:H,providerInfo:bh,onSuccess:bY,onClose:()=>J(!1)}):(0,d.jsx)(j.LF,{isOpen:H,provider:n,providerInfo:bh,onSuccess:bY,onClose:()=>J(!1)}),"iflow"===n&&(0,d.jsx)(j.vE,{isOpen:N,onSuccess:()=>{bK(),P(!1)},onClose:()=>P(!1)}),(0,d.jsx)(K,{isOpen:T,provider:n,providerName:bh.name,isCompatible:br,isAnthropic:bq,authType:bh?.authType,authHint:bh?.authHint,website:bh?.website,error:V,onSave:bZ,onBulkDone:bK,onClose:()=>{W(""),U(!1)}}),(0,d.jsx)(j.wI,{isOpen:Z,connection:ab,onSave:b$,onClose:()=>$(!1)}),br&&(0,d.jsx)(L,{isOpen:_,node:E,onSave:bM,onClose:()=>aa(!1),isAnthropic:bq}),!br&&(0,d.jsx)(M,{isOpen:ap,providerAlias:bz,providerDisplayAlias:bA,onSave:async a=>{await bT(a,"llm",bz),aq(!1)},onClose:()=>aq(!1)}),"codex"===n&&(0,d.jsx)(O,{isOpen:X,onClose:()=>Y(!1),onSuccess:bK}),(0,d.jsx)(j.uo,{isOpen:aJ,onClose:()=>aK(!1),onConfirm:()=>{(aK(!1),bj)?bd():bf()},title:"Risk Notice",message:bh?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aH,onClose:()=>aI(null),onConfirm:aH?.onConfirm,title:aH?.title||"Confirm",message:aH?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,9995,2712,3787,7141,5350,869,3986,4776,194,2925,9696],()=>b(b.s=85913));module.exports=c})();
10
+ ]`;function N({isOpen:a,onClose:b,onSuccess:c}){let[f,g]=(0,e.useState)(""),[h,i]=(0,e.useState)(!1),[k,l]=(0,e.useState)(""),[m,n]=(0,e.useState)(null),o=()=>{h||(g(""),l(""),n(null),b())},p=async()=>{var a;let b;l(""),n(null);let d=f.trim();if(!d)return;try{b=JSON.parse(d)}catch(a){l(`${(0,w.Tl)("Invalid JSON")}: ${a.message}`);return}let e=Array.isArray(a=b)?a:a&&"object"==typeof a?Array.isArray(a.accounts)?a.accounts:[a]:null;if(!e||0===e.length)return void l((0,w.Tl)("No accounts found in input"));i(!0);try{let a=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),b=await a.json();if(!a.ok)return void l(b?.error||`Request failed: ${a.status}`);n(b),b.success>0&&"function"==typeof c&&c()}catch(a){l(a.message||(0,w.Tl)("Request failed"))}finally{i(!1)}},q=m?.results?.filter(a=>!a.ok)||[];return(0,d.jsx)(j.aF,{isOpen:a,title:(0,w.Tl)("Bulk Add Codex Accounts"),onClose:o,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted",children:(0,w.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,d.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:M,value:f,onChange:a=>g(a.target.value),disabled:h}),k&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:k}),m&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,w.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,w.Tl)("failed")}`:""]}),q.length>0&&(0,d.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:q.map(a=>(0,d.jsxs)("li",{className:"text-red-400",children:["[",a.index,"] ",a.error]},a.index))})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(j.$n,{onClick:p,fullWidth:!0,disabled:h||!f.trim(),children:h?(0,w.Tl)("Importing..."):(0,w.Tl)("Import All")}),(0,d.jsx)(j.$n,{onClick:o,variant:"ghost",fullWidth:!0,disabled:h,children:(0,w.Tl)("Close")})]})]})})}N.propTypes={isOpen:A().bool.isRequired,onClose:A().func.isRequired,onSuccess:A().func};var O=c(78097);function P({connectionId:a,providerAlias:b,models:c,jobSnapshot:f,onComplete:g,onStarted:h,onClose:i}){let[k,l]=(0,e.useState)(4),[m,n]=(0,e.useState)(50),[o,p]=(0,e.useState)(Math.round(20)),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(""),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(""),C=(0,e.useRef)({onComplete:g,onStarted:h}),D=(0,e.useRef)(null),E=(0,e.useRef)(a),F=(0,e.useRef)(null),G=c?.length||0,H=(0,e.useMemo)(()=>`max concurrency 16 \xb7 batch 200 \xb7 timeout ${60}s`,[]);async function I(){if(q||!a||0===G)return;r(!0),x(""),v(null),z("Starting…");let d={concurrency:Math.max(1,Math.min(16,Number(k)||4)),batchSize:Math.max(1,Math.min(200,Number(m)||50)),timeoutMs:Math.max(1e3,Math.min(6e4,1e3*(Number(o)||20)))};F.current=a;try{let e=await fetch(`/api/providers/${a}/model-probes/verify/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:c,providerAlias:b,...d,timeoutMs:d.timeoutMs})}),f=await e.json().catch(()=>({}));if(E.current!==a){F.current=null,r(!1);return}if(!e.ok){F.current=null,x(f.error||"Failed to start"),r(!1);return}C.current.onStarted?.(f),function(a){if(a){if("idle"===a.status){F.current=null,r(!1);return}if(t({done:a.done||0,total:a.total||0,ok:a.ok||0,dead:a.dead||0,retryable:a.retryable||0,skippedDead:a.skippedDead||0,skippedDup:a.skippedDup||0}),"running"===a.status&&(F.current=a.connectionId||E.current,D.current=null,r(!0)),a.currentRange&&z(`Probing ${a.currentRange.from}–${a.currentRange.to} of ${a.total}…`),a.error&&x(a.error),"done"===a.status||"cancelled"===a.status||"error"===a.status){F.current=null,r(!1);let b={ok:a.ok||0,dead:a.dead||0,retryable:a.retryable||0,tested:a.done||0,skippedDead:a.skippedDead||0,skippedDup:a.skippedDup||0,cancelled:"cancelled"===a.status,retryableAuthOnly:!0===a.retryableAuthOnly};v(b),z("cancelled"===a.status?"Cancelled (partial results saved).":"error"===a.status?"Stopped.":"Done.");let c=`${a.startedAt||"unknown"}:${a.status}`;D.current!==c&&(D.current=c,C.current.onComplete?.(b))}}}(f),"running"!==f.status&&r(!1)}catch(a){F.current=null,x(a?.message||"Verify failed"),r(!1)}}async function J(){let b=F.current||a;await fetch(`/api/providers/${b}/model-probes/verify/cancel`,{method:"POST"}).catch(()=>{})}async function K(c){if(!a)return;let d="retryable"===c,e=d?Number(u?.retryable||0):Number(u?.dead||0);if(!d||await (0,O.l)({title:"Remove retry-failed models?",message:`Review ${e} retryable result(s) and remove the eligible models? Timeouts, rate limits, network failures, and provider errors may be temporary. Credential failures are kept. Removed models can be enabled or imported again later.`,confirmText:"Remove eligible"})){B(c),x(""),z(`Removing ${d?"retry-failed":"dead"} models…`);try{let e=await fetch(`/api/providers/${a}/model-probes/remove-unavailable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:b,kind:"llm",status:c})}),f=await e.json().catch(()=>({}));if(!e.ok)return void x(f.error||"Remove failed");let g=Number(f.removed||0),h=Number(f.kept||0),i=u?{...u,[d?"retryable":"dead"]:h,...d?{retryableAuthOnly:h>0}:{}}:u;v(i),z(`Removed ${g} ${d?"retry-failed":"dead"} model(s).`+(h>0?` Kept ${h} credential failure(s).`:"")),C.current.onComplete?.({...i||{},removed:g,kept:h,removedStatus:c})}catch(a){x(a?.message||"Remove failed")}finally{B("")}}}async function L(){if(!a)return;let b=await fetch(`/api/providers/${a}/model-probes/cache`,{method:"DELETE"}),c=await b.json().catch(()=>({}));b.ok?(z(`Cleared probe cache (${c.cleared||0} rows). Next verify will re-test everything.`),v(null),t(null),C.current.onComplete?.({cacheCleared:!0,cleared:c.cleared||0})):x(c.error||"Clear cache failed")}let M=s?.total?Math.min(100,Math.round(s.done/s.total*100)):0;return(0,d.jsxs)("div",{className:"mb-4 rounded-lg border border-border bg-sidebar/40 p-3 space-y-3",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Verify models"}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted mt-0.5",children:["Batch-ping availability and latency. Dead = permanently unavailable (missing, blocked, or deprecated) and can be removed; retry = transient (timeout/429/5xx). Known-dead models are skipped until you Clear cache. Caps: ",H,"."]})]}),i&&(0,d.jsx)("button",{type:"button",onClick:i,className:"p-1 text-text-muted hover:text-text-main rounded",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3 items-end",children:[(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Concurrency",(0,d.jsx)("input",{type:"number",min:1,max:16,value:k,disabled:q,onChange:a=>l(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Batch size",(0,d.jsx)("input",{type:"number",min:1,max:200,value:m,disabled:q,onChange:a=>n(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("label",{className:"text-xs text-text-muted",children:["Timeout (s)",(0,d.jsx)("input",{type:"number",min:1,max:60,value:o,disabled:q,onChange:a=>p(a.target.value),className:"mt-1 block w-20 rounded-md border border-border bg-background px-2 py-1 text-xs"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[q?(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"stop",onClick:J,children:"Cancel"}):(0,d.jsx)(j.$n,{size:"sm",icon:"science",onClick:I,disabled:!a||0===G,children:"Start"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete_sweep",onClick:L,disabled:q,children:"Clear cache"})]})]}),s&&(0,d.jsxs)("div",{className:"space-y-1",children:[(0,d.jsx)("div",{className:"h-1.5 w-full rounded-full bg-border overflow-hidden",children:(0,d.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${M}%`}})}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted flex flex-wrap gap-x-2",children:[(0,d.jsxs)("span",{title:"Models probed this run",children:[s.done,"/",s.total," tested"]}),(0,d.jsxs)("span",{title:"Reachable",children:["\xb7 ok ",s.ok]}),(0,d.jsxs)("span",{title:"Permanently unavailable this run (missing, blocked, or deprecated)",children:["\xb7 dead ",s.dead]}),(0,d.jsxs)("span",{title:"Transient failure this run (timeout / 429 / 5xx / network); re-testable",children:["\xb7 retry ",s.retryable]}),s.skippedDead?(0,d.jsxs)("span",{title:"Not probed — cache already marks them dead. Clear cache to re-test.",children:["\xb7 skipped known-dead ",s.skippedDead]}):null,s.skippedDup?(0,d.jsxs)("span",{title:"Duplicate ids collapsed",children:["\xb7 dupes ",s.skippedDup]}):null]})]}),y&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:y}),w&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:w}),u&&(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,d.jsxs)("span",{className:"text-xs text-text-main",children:["Summary: ",u.ok," ok \xb7 ",u.dead," dead \xb7 ",u.retryable," retry",u.skippedDead?` \xb7 ${u.skippedDead} skipped known-dead`:"",u.cancelled?" \xb7 cancelled":""]}),u.dead>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"primary",icon:"delete_sweep",onClick:()=>K("dead"),disabled:q||!!A,loading:"dead"===A,children:["Remove ",u.dead," dead"]}),u.retryable>0&&!u.retryableAuthOnly&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete_sweep",onClick:()=>K("retryable"),disabled:q||!!A,loading:"retryable"===A,children:["Remove ",u.retryable," retry failures"]})]})]})}P.propTypes={connectionId:A().string,providerAlias:A().string,models:A().arrayOf(A().object),jobSnapshot:A().object,onComplete:A().func,onStarted:A().func,onClose:A().func};var Q=c(37660),R=c(22588);let S={claude:"claudeAutoPing",codex:"codexAutoPing"};function T(){let a,b,c,g=(0,f.useParams)(),m=(0,f.useRouter)(),n=g.id,{getCaps:o}=(0,v.y)(),[p,q]=(0,e.useState)([]),[r,s]=(0,e.useState)([]),[z,A]=(0,e.useState)(!0),[D,F]=(0,e.useState)(null),[G,I]=(0,e.useState)(!1),[M,O]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(null),[ad,ae]=(0,e.useState)({}),[af,ag]=(0,e.useState)([]),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)({}),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(()=>new Set),[ap,aq]=(0,e.useState)(!1),[ar,as]=(0,e.useState)(null),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)(!1),[ax,ay]=(0,e.useState)("30"),[az,aA]=(0,e.useState)("auto"),[aB,aC]=(0,e.useState)({enabled:!1,connections:{}}),[aD,aE]=(0,e.useState)([]),[aF,aG]=(0,e.useState)([]),[aH,aI]=(0,e.useState)([]),[aJ,aK]=(0,e.useState)([]),[aL,aM]=(0,e.useState)(null),[aN,aO]=(0,e.useState)(!1),[aP,aQ]=(0,e.useState)(!1),[aR,aS]=(0,e.useState)(!1),[aT,aU]=(0,e.useState)(null),[aV,aW]=(0,e.useState)({}),[aX,aY]=(0,e.useState)(null),aZ=(0,e.useRef)(!1),a$=(0,e.useRef)(null),a_=(0,e.useRef)(0),a0=(0,e.useRef)(0),[a1,a2]=(0,e.useState)(!1),[a3,a4]=(0,e.useState)(""),[a5,a6]=(0,e.useState)(!1),[a7,a8]=(0,e.useState)(null),[a9,ba]=(0,e.useState)({}),[bb,bc]=(0,e.useState)({}),[bd,be]=(0,e.useState)("all"),{copied:bf,copy:bg}=(0,u.C)(),bh=()=>{I(!0)},bi=()=>{bn?bh():(W(""),U(!0))},bj=()=>{W(""),U(!0)},bk=()=>{bn?bi():bj()},bl=D?{id:D.id,name:D.name||("anthropic-compatible"===D.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===D.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===D.type?"AC":"OC",apiType:D.apiType,baseUrl:D.baseUrl,type:D.type}:k.zN[n]||k.fg[n]||k.IS[n]||k.nJ[n]||k.br[n],bm=bl?.authModes||[],bn=!!k.zN[n]||!!k.IS[n]||bm.includes("oauth"),bo=!!k.fg[n]||bm.includes("apikey"),bp=!!k.IS[n]?.noAuth,bq=(0,l.KC)(n),br=(()=>{let a=new Map(bq.map(a=>[a.id,a]));for(let b of aF)b?.id&&a.set(b.id,{...a.get(b.id),...b});return[...a.values()]})(),bs=(0,k.wG)(n),bt=(0,k.mq)(n),bu=(0,k.gb)(n),bv=bt||bu,bw=p.some(a=>!1!==a.isActive),bx=function({isCompatible:a,hasActiveConnection:b}){let c=!a,d=!a;return{showToolbar:c||b||d,showImport:c,showVerify:b,showBulkControls:d}}({isCompatible:bv,hasActiveConnection:bw}),by=!bv&&bn&&bo,bz="xai"===n?"Grok Build OAuth":"OAuth",bA="xai"===n?"xAI API Key":"API Key",bB=a=>{if(!az||"auto"===az)return null;let b=t(n,a);return b&&b.includes(az)?az:null},bC=(()=>{let a=new Set;for(let b of br){let c=t(n,b.id);c&&c.forEach(b=>{"none"!==b&&a.add(b)})}return a.size?["auto",...a]:null})(),bD=bv?n:bs,bE=bv?D?.prefix||n:bs,bF=(0,x.Iz)(aJ,bD),bG=a=>(0,x.uJ)(bF,a,bD),bH=(0,e.useCallback)(async()=>{try{let a=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bD)}`,{cache:"no-store"}),b=await a.json();a.ok&&aK(b.ids||[])}catch(a){(0,C.s)("Error fetching disabled models:",a)}},[bD]),bI=async a=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bD,ids:[a]})})).ok&&await bH()}catch(a){(0,C.s)("Error disabling model:",a)}},bJ=async a=>{try{if(!(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bD)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok)return!1;return await bH(),!0}catch(a){return(0,C.s)("Error enabling model:",a),!1}},bK=async a=>{a.length&&aM({title:"Disable All Models",message:`Disable all ${a.length} model(s)?`,onConfirm:async()=>{aM(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:bD,ids:a})})).ok&&await bH()}catch(a){(0,C.s)("Error disabling all models:",a)}}})},bL=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bD)}`,{method:"DELETE"})).ok&&await bH()}catch(a){(0,C.s)("Error enabling all models:",a)}},bM=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&ae(b.aliases||{})}catch(a){(0,C.s)("Error fetching aliases:",a)}},[]),bN=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/custom",{cache:"no-store"}),b=await a.json();a.ok&&ag(b.models||[])}catch(a){(0,C.s)("Error fetching custom models:",a)}},[]),bO=(0,e.useCallback)(async()=>{try{let[a,b,c]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),d=await a.json(),e=await b.json(),f=c.ok?await c.json():{};if(a.ok){let a=(d.connections||[]).filter(a=>a.provider===n);q(a)}let g=(f.providerStrategies||{})[n]||{};as(g.fallbackStrategy||null),au(null!=g.stickyRoundRobinLimit?String(g.stickyRoundRobinLimit):"1");let h=g.accountScheduler||{};aw(!0===h.enabled),ay(String(Math.max(1,Math.round((h.sessionAffinityTtlSeconds||1800)/60))));let i=(f.providerThinking||{})[n]||{};aA(i.mode||"auto");let j=S[n],k=j&&f[j]||{};if(aC({enabled:!0===k.enabled,connections:k.connections||{}}),b.ok){let a=(e.nodes||[]).find(a=>a.id===n)||null;if(!a&&bv)for(let b=0;b<3;b+=1){await new Promise(a=>setTimeout(a,150));let b=await fetch("/api/provider-nodes",{cache:"no-store"});if(b.ok&&(a=((await b.json()).nodes||[]).find(a=>a.id===n)||null))break}F(a)}}catch(a){(0,C.s)("Error fetching connections:",a)}finally{A(!1)}},[n,bv]),bP=(0,e.useCallback)(async(a=null)=>{let b=++a0.current,c=a?p.find(b=>b.id===a&&!1!==b.isActive):p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive);if(!c){bc({}),ba({});return}try{let a=await fetch(`/api/providers/${c.id}/model-probes`,{cache:"no-store"});if(!a.ok)return;let d=await a.json().catch(()=>({})),e={},f={};for(let a of d.probes||[])e[a.modelId]="ok"===a.status?"ok":"dead"===a.status?"dead":"retry",null!=a.latencyMs&&(f[a.modelId]=a.latencyMs);if(b!==a0.current)return;bc(e),ba(f)}catch{}},[p,r]),bQ=async a=>{try{let b=await fetch(`/api/provider-nodes/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json();b.ok&&(F(c.node),await bO(),aa(!1))}catch(a){(0,C.s)("Error updating provider node:",a)}},bR=async(a,b)=>{try{return await (0,R.T)(n,c=>{let d={...c};return a?d.fallbackStrategy=a:delete d.fallbackStrategy,"round-robin"===a&&""!==b?d.stickyRoundRobinLimit=Number(b)||3:a||delete d.stickyRoundRobinLimit,d}),!0}catch(a){return(0,C.s)("Error saving provider strategy:",a),!1}},bS=async(a,b)=>{let c=Math.min(1440,Math.max(1,Number.parseInt(b,10)||30));try{return await (0,R.T)(n,b=>({...b,accountScheduler:{...b.accountScheduler||{},enabled:a,sessionAffinityTtlSeconds:60*c}})),!0}catch(a){return(0,C.s)("Error saving balanced scheduler:",a),!1}},bT=async a=>{let b=a?"round-robin":null,c=a?at||"1":at;await bR(b,c)&&(a&&!at&&au("1"),as(b))},bU=async a=>{await bR("round-robin",a)&&au(a)},bV=async a=>{await bS(a,ax)&&aw(a)},bW=async a=>{await bS(av,a)&&ay(a)},bX=async a=>{try{let b=await fetch("/api/settings",{cache:"no-store"}),c={...(b.ok?await b.json():{}).providerThinking||{}};a&&"auto"!==a?c[n]={mode:a}:delete c[n],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:c})})}catch(a){(0,C.s)("Error saving thinking config:",a)}},bY=async a=>{let b=S[n];if(b){aC(a);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[b]:a})})}catch(a){(0,C.s)("Error saving auto-ping config:",a)}}},bZ=(0,e.useCallback)(a=>{let b=++a_.current;a$.current&&(clearTimeout(a$.current),a$.current=null);let c=async()=>{try{let d=await fetch(`/api/providers/${a}/model-probes/verify/status`,{cache:"no-store"}),e=await d.json().catch(()=>null);if(b!==a_.current)return;if(!d.ok||!e?.status)throw Error("Verify status temporarily unavailable");a8(e&&e.status?e:null),e?.status==="running"?a$.current=setTimeout(c,1500):(a$.current=null,await bP(a))}catch{b===a_.current&&(a$.current=setTimeout(c,1500))}};a$.current=setTimeout(c,0)},[bP]),b$=async(a,b,c=bs)=>{let d=`${c}/${a}`;try{let a=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d,alias:b})});if(a.ok)await bM();else{let b=await a.json();(0,C.s)(b.error||"Failed to set alias")}}catch(a){(0,C.s)("Error setting alias:",a)}},b_=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await bM()}catch(a){(0,C.s)("Error deleting alias:",a)}},b0=async(a,b="llm",c=bD)=>{try{let d=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:c,id:a,type:b})});if(d.ok)await bN();else{let a=await d.json();(0,C.s)(a.error||"Failed to add custom model")}}catch(a){(0,C.s)("Error adding custom model:",a)}},b1=async(a,b="llm",c=bD)=>{try{let d=new URLSearchParams({providerAlias:c,id:a,type:b});(await fetch(`/api/models/custom?${d}`,{method:"DELETE"})).ok&&await bN()}catch(a){(0,C.s)("Error deleting custom model:",a)}},b2=async()=>{if(a1)return;let a=p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive);if(!a)return void(0,C.s)((0,w.Tl)("Add an active connection first"));a2(!0),a4("");try{let b=await fetch(`/api/providers/${a.id}/models`),c=await b.json().catch(()=>({}));if(!b.ok)return void(0,C.s)(c.error||(0,w.Tl)("Failed to fetch models"));let d=c.models||[];if(0===d.length)return void(0,C.s)(c.warning||(0,w.Tl)("No models returned"));let e=new Set;try{let b=await fetch(`/api/providers/${a.id}/model-probes`,{cache:"no-store"});for(let a of(await b.json().catch(()=>({}))).probes||[])"dead"===a.status&&e.add(a.modelId)}catch{}let f=0,g=new Set(br.map(a=>a.id)),h=[],i=[],j=new Set;for(let a of d){let b=(0,y.R2)(a,bD);if(!b)continue;let{id:c,name:d,type:k}=b;if(e.has((0,Q.v)(c,bD))){f+=1;continue}let l=`${k}|${c}`;if(j.has(l))continue;if(j.add(l),g.has(c)){bG(c)&&i.push(c);continue}if(af.some(a=>a.providerAlias===bD&&a.id===c&&(0,y.ki)(a.kind||a.type||"llm")===k))continue;let m=`${bD}/${c}`;Object.values(ad).includes(m)||h.push({providerAlias:bD,id:c,type:k,name:d})}let k=0;if(i.length>0)try{for(let a of i)(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(bD)}&id=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(k+=1);await bH()}catch{}let l=0;if(h.length>0){let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:h})}),b=await a.json().catch(()=>({}));if(!a.ok)return void(0,C.s)(b.error||(0,w.Tl)("Failed to save models"));l=b.added??h.length,await bN()}let m=h.filter(a=>"llm"!==a.type).length,n=[];if(l>0&&n.push(`${l} new`),k>0&&n.push(`${k} re-enabled`),0===n.length)a4((0,w.Tl)("All models already in list"));else{let a=`Imported ${n.join(" \xb7 ")} (${d.length} from provider)`;m>0&&(a+=" \xb7 non-chat types stored for media pages"),c.warning&&(a+=` \xb7 ${c.warning}`),a4(a)}if(f>0&&a4(a=>`${a} \xb7 ${f} skipped (known dead)`),l>0||k>0)try{let b=[...br,...h.map(a=>({id:a.id,name:a.name,kind:a.type}))],c=await fetch(`/api/providers/${a.id}/model-probes/verify/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:b,providerAlias:bD})}),d=await c.json().catch(()=>({}));if(!c.ok)throw Error(d.error||"Failed to start auto-verify");a8(d&&d.status?d:null),bZ(a.id)}catch(a){a4(b=>`${b} \xb7 auto-verify failed: ${a?.message||a}`)}}catch(a){(0,C.s)("Error importing models:",a),(0,C.s)((0,w.Tl)("Error fetching models")+": "+(a?.message||a))}finally{a2(!1)}},b3=async()=>{if(aP||0===p.length)return;let a=Object.fromEntries(p.map(a=>[a.id,{state:"queued",error:null}]));aZ.current=!1,aQ(!0),aS(!1),aU(null),aW(a),aY({total:p.length,completed:0,passed:0,failed:0,stopped:!1});let b=0,c=0;try{for(let a=0;a<p.length;a+=1){if(aZ.current){aY({total:p.length,completed:a,passed:b,failed:c,stopped:!0});break}let d=p[a];aU(d.id),aW(a=>({...a,[d.id]:{state:"testing",error:null}}));try{let a=await fetch(`/api/providers/${d.id}/test`,{method:"POST"}),e=await a.json(),f=!!e.valid;f?b+=1:c+=1,aW(a=>({...a,[d.id]:{state:f?"success":"failed",error:f?null:e.error||null}}))}catch(a){c+=1,aW(b=>({...b,[d.id]:{state:"failed",error:a.message||"Test failed"}}))}aY({total:p.length,completed:a+1,passed:b,failed:c,stopped:!1}),a<p.length-1&&await new Promise(a=>setTimeout(a,1e3))}}finally{aU(null),aQ(!1),aS(!1),aZ.current=!1}},b4=async a=>{let b=p.find(b=>b.id===a),c=b?.name?.trim()||b?.email?.trim()||a;aM({title:"Delete Connection",message:`Delete connection “${c}”?`,onConfirm:async()=>{aM(null);try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&q(b=>b.filter(b=>b.id!==a))}catch(a){(0,C.s)("Error deleting connection:",a)}}})},b5=()=>{bO(),I(!1)},b6=async a=>{W("");try{let b=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:n,...a})}),c=null;try{c=await b.json()}catch{c=null}if(b.ok){await bO(),U(!1);return}W(c?.error||"Failed to save connection")}catch(a){(0,C.s)("Error saving connection:",a),W("Failed to save connection")}},b7=async a=>{try{(await fetch(`/api/providers/${ab.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await bO(),$(!1))}catch(a){(0,C.s)("Error updating connection:",a)}},b8=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&q(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){(0,C.s)("Error updating connection status:",a)}},b9=async a=>{let b,c=a?.providerSpecificData?.baseUrl;if(c){try{b=new URL(c).hostname.toLowerCase().replace(/^\[|\]$/g,"")}catch{(0,C.s)("Cannot allow-list: invalid base URL",c);return}try{let a=await fetch("/api/settings",{cache:"no-store"});if(!a.ok)throw Error(`Failed to load settings (${a.status})`);let c=await a.json(),d=[...new Set([...c.ssrfAllowHosts||[],b])],e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ssrfAllowHosts:d})});if(!e.ok)throw Error(`Failed to update allow list (${e.status})`);await bO()}catch(a){(0,C.s)("Error adding host to allow list:",a)}}},ca=async(a,b)=>{let c=[...p];[c[a],c[b]]=[c[b],c[a]],q(c);try{await Promise.all([fetch(`/api/providers/${c[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${c[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch(a){(0,C.s)("Error swapping priority:",a),await bO()}},cb=p.length>0&&r.length===p.length,cc=(0,d.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:p.map((a,b)=>(0,d.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,d.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,d.jsx)("input",{type:"checkbox",checked:r.includes(a.id),onChange:()=>{var b;return b=a.id,void s(a=>a.includes(b)?a.filter(a=>a!==b):[...a,b])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,d.jsx)("div",{className:"flex-1 min-w-0",children:(0,d.jsx)(H,{connection:a,isOAuth:bn,isFirst:0===b,isLast:b===p.length-1,onMoveUp:()=>ca(b,b-1),onMoveDown:()=>ca(b,b+1),onToggleActive:b=>b8(a.id,b),autoPing:S[n]&&"oauth"===a.authType?{on:!0===aB.connections[a.id],onToggle:b=>{var c;return c=a.id,void bY({...aB,connections:{...aB.connections,[c]:b}})},provider:n}:null,onEdit:()=>{ac(a),$(!0)},onDelete:()=>b4(a.id),onAllowlistHost:()=>b9(a),oneByOneStatus:aV[a.id]||null})})]},a.id))}),cd=async a=>{if(!an.has(a)){ao(b=>new Set(b).add(a));try{let b=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${bD}/${a}`})}),c=await b.json();ak(b=>({...b,[a]:c.ok?"ok":"error"})),am(c.ok?"":c.error||"Model not reachable")}catch{ak(b=>({...b,[a]:"error"})),am("Network error")}finally{ao(b=>{let c=new Set(b);return c.delete(a),c})}}};return z?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(j.Qv,{}),(0,d.jsx)(j.Qv,{})]}):bl?(0,d.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)(h(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,d.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${bl.color}15`},children:ah?(0,d.jsx)("span",{className:"text-sm font-bold",style:{color:bl.color},children:bl.textIcon||bl.id.slice(0,2).toUpperCase()}):(0,d.jsx)(i.default,{src:bt&&bl.apiType?"responses"===bl.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":bu?"/providers/anthropic-m.png":`/providers/${bl.id}.png`,alt:bl.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ai(!0)})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,d.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:bl.name}),(bl.notice?.apiKeyUrl||bl.notice?.signupUrl||bl.website)&&(0,d.jsxs)("a",{href:bl.notice?.apiKeyUrl||bl.notice?.signupUrl||bl.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),bl.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[p.length," connection",1===p.length?"":"s"]})]})]})]}),bl.deprecated&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:bl.deprecationNotice})]}),bl.notice?.text&&!bl.deprecated&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,d.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:bl.notice.text}),bl.notice.apiKeyUrl&&(0,d.jsx)("a",{href:bl.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),bv&&D&&(0,d.jsx)(j.Zp,{children:(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:bu?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,d.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[bu?"Messages API":"responses"===D.apiType?"Responses API":"Chat Completions"," \xb7 ",(D.baseUrl||"").replace(/\/$/,""),"/",bu?"messages":"responses"===D.apiType?"responses":"chat/completions"]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:()=>{W(""),U(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>aa(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{aM({title:"Delete Compatible Node",message:`Delete this ${bu?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{aM(null);try{(await fetch(`/api/provider-nodes/${n}`,{method:"DELETE"})).ok&&m.push("/dashboard/providers")}catch(a){(0,C.s)("Error deleting provider node:",a)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),bp?(0,d.jsx)(j.gw,{providerId:n}):(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[p.length>0&&(0,d.jsxs)(d.Fragment,{children:[r.length>0&&(0,d.jsxs)(j.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let a=r.length;0!==a&&aM({title:`Delete ${a} Connection${a>1?"s":""}`,message:`Delete ${a} connection${a>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{aM(null);let a=0,b=[...r];for(let c of b)try{(await fetch(`/api/providers/${c}`,{method:"DELETE"})).ok||(a+=1)}catch(b){(0,C.s)("Error deleting connection:",b),a+=1}q(a=>a.filter(a=>!b.includes(a.id))),s([]),a>0&&(0,C.s)(`Deleted ${b.length-a} connection(s), ${a} failed.`)}})},children:["Delete Selected (",r.length,")"]}),(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:b3,disabled:aP,children:aP?"Testing Connection One-by-One...":"Test Connection One-by-One"}),aP&&(0,d.jsx)(j.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{aP&&(aZ.current=!0,aS(!0))},disabled:aR,children:aR?"Stopping...":"Stop"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Balanced scheduler"}),(0,d.jsx)(j.lM,{checked:av,onChange:bV,"aria-label":"Balanced scheduler"}),av&&(0,d.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:["Affinity",(0,d.jsx)("input",{"aria-label":"Session affinity minutes",type:"number",min:1,max:1440,value:ax,onChange:a=>bW(a.target.value),className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"}),"min"]})]}),(0,d.jsx)("p",{className:"max-w-xl text-xs text-text-muted",children:"Process-local least-inflight scheduling with fresh quota signals. Sessions stay on one account and rebind on failure, cooldown, or a best-effort connection cap. Caps use observed in-flight counts, so simultaneous selections can briefly exceed them. Round Robin stays saved but inactive while this is on."}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",title:av?"Saved and used again when balanced scheduling is off":void 0,children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(j.lM,{checked:"round-robin"===ar,onChange:bT,"aria-label":"Round Robin",disabled:av,title:av?"Saved and used again when balanced scheduling is off":void 0}),"round-robin"===ar&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:at,onChange:a=>bU(a.target.value),placeholder:"1",disabled:av,title:av?"Saved and used again when balanced scheduling is off":void 0,className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"})]})]})]})]})]}),0===p.length?(0,d.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:bn?"lock":"key"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),by&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",bz," or ",bA,"."]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:by?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bi,children:bz}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:bj,children:bA})]}):(0,d.jsxs)(d.Fragment,{children:[!bv&&"iflow"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),children:"Cookie"}),"codex"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,w.Tl)("Bulk Add")}),(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:bk,children:bv?"Add API Key":"iflow"===n?"OAuth":"Add Connection"})]})})]}):(0,d.jsxs)(d.Fragment,{children:[aX&&(0,d.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsxs)("span",{children:["Total: ",aX.total]}),(0,d.jsxs)("span",{children:["Completed: ",aX.completed]}),(0,d.jsxs)("span",{children:["Passed: ",aX.passed]}),(0,d.jsxs)("span",{children:["Failed: ",aX.failed]}),aX.stopped&&(0,d.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),aP&&aT&&(0,d.jsxs)("span",{children:["Running: ",p.find(a=>a.id===aT)?.name||aT]})]})}),p.length>0&&(0,d.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,d.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,d.jsx)("input",{type:"checkbox",checked:cb,onChange:()=>{cb?s([]):s(p.map(a=>a.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),cc,!bv&&(0,d.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>O(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===n&&(0,d.jsx)(j.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,w.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,w.Tl)("Bulk Add")}),by?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:bi,className:"w-full sm:w-auto",children:bz}),(0,d.jsx)(j.$n,{size:"sm",icon:"key",onClick:bj,className:"w-full sm:w-auto",children:bA})]}):(0,d.jsx)(j.$n,{size:"sm",icon:"add",onClick:bk,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,d.jsxs)(j.Zp,{children:[(0,d.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),bC&&(0,d.jsx)("select",{value:az,onChange:a=>{var b;aA(b=a.target.value),bX(b)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:bC.map(a=>(0,d.jsx)("option",{value:a,children:`Thinking: ${a.charAt(0).toUpperCase()+a.slice(1)}`},a))})]}),bx.showToolbar&&(a=(bx.showBulkControls?[...br,...aH.filter(a=>!br.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}).map(a=>a.id):[]).filter(a=>!bG(a)),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[bx.showImport&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:a1?"progress_activity":"cloud_download",onClick:b2,disabled:a1||!bw,title:bw?"Import models from the active connection":"Add an active connection to import models",children:a1?"Importing...":"Import models"}),bx.showVerify&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:a7?.status==="running"?"progress_activity":"science",onClick:()=>a6(a=>!a),children:a7?.status==="running"?`Verifying ${a7.done}/${a7.total}`:a5?"Hide verify":"Verify models"}),bx.showBulkControls&&aJ.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:bL,children:"Active All"}),bx.showBulkControls&&a.length>0&&(0,d.jsx)(j.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>bK(a),children:"Disable All"})]}))]}),!!al&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:al}),a3&&(0,d.jsx)("p",{className:"text-xs text-text-muted mb-3",children:a3}),a5&&(b=p.find(a=>r.includes(a.id)&&!1!==a.isActive)||p.find(a=>!1!==a.isActive),c=[...(0,x.R3)({customModels:af,modelAliases:ad,providerAlias:bD,builtInModels:br,type:"llm"}).filter(a=>!bG(a.id)).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"})),...br.filter(a=>{let b=(0,l.CP)(a);return(!b||"llm"===b)&&!bG(a.id)}).map(a=>({id:a.id,name:a.name||a.id,kind:"llm"}))],(0,d.jsx)(P,{connectionId:b?.id,providerAlias:bD,models:c,jobSnapshot:a7,onClose:()=>a6(!1),onStarted:a=>{a8(a&&a.status?a:null);let c=a?.connectionId||b?.id;c&&bZ(c)},onComplete:async a=>{a?.removedStatus&&a8(b=>b?{...b,dead:Number(a.dead??b.dead??0),retryable:Number(a.retryable??b.retryable??0),retryableAuthOnly:!0===a.retryableAuthOnly}:b),a?.removed>0&&await bN(),a?.removed>0&&await bH(),(a?.removed>0||a?.cacheCleared)&&await bP(b?.id)}})),(()=>{let a,b,c;if(bv)return(0,d.jsx)(E,{providerStorageAlias:bD,providerDisplayAlias:bE,modelAliases:ad,customModels:af,copied:bf,onCopy:bg,onSetAlias:b$,onDeleteAlias:b_,onAddCustomModel:a=>b0(a,"llm",bD),onDeleteCustomModel:a=>b1(a,"llm",bD),onRefreshModels:bN,connections:p,isAnthropic:bu,disabledModelIds:aJ,onEnableModel:bJ});let e=[...br,...aH.filter(a=>!br.some(b=>b.id===a.id))].filter(a=>{let b=(0,l.CP)(a);return!b||"llm"===b}),f=e.filter(a=>!bG(a.id)),g=e.filter(a=>bG(a.id)),h=(0,x.R3)({customModels:af,modelAliases:ad,providerAlias:bD,builtInModels:br,type:"llm"}),i=h.filter(a=>!bG(a.id)&&("all"===bd||(bb[(0,Q.v)(a.id,bD)]||null)===bd)),j=f.filter(a=>"all"===bd||(bb[(0,Q.v)(a.id,bD)]||null)===bd);return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("div",{className:"mb-2 flex gap-1 text-xs",children:["all","ok","dead","retry"].map(a=>(0,d.jsx)("button",{onClick:()=>be(a),className:`rounded px-2 py-0.5 ${bd===a?"bg-primary text-white":"text-text-muted hover:bg-black/5 dark:hover:bg-white/5"}`,children:"all"===a?"All":"ok"===a?"OK":"dead"===a?"Dead":"Retry"},a))}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[i.map(a=>{let b=(0,Q.v)(a.id,bD);return(0,d.jsx)(B,{model:{id:a.id,name:a.name},fullModel:`${bE}/${a.id}`,alias:a.alias,copied:bf,onCopy:bg,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===a.source?b1(a.id,"llm",bD):b_(a.alias)},testStatus:aj[a.id],onTest:p.length>0||bp?()=>cd(a.id):void 0,isTesting:an.has(a.id),isCustom:!0,isFree:!1,caps:o(`${n}/${a.id}`),thinkingSuffix:bB(a.id),latencyMs:a9[a.id]??a9[b],probeState:a7?.status==="running"&&a7?.perModel?.[b]?a7.perModel[b]:bb[b]||null},`${a.source}-${a.fullModel}`)}),j.map(a=>{let b=`${bD}/${a.id}`,c=`${n}/${a.id}`,e=Object.entries(ad).find(([,a])=>a===b||a===c)?.[0],f=(0,Q.v)(a.id,bD);return(0,d.jsx)(B,{model:a,fullModel:`${bE}/${a.id}`,alias:e,copied:bf,onSetAlias:b=>b$(a.id,b,bD),onCopy:bg,onDeleteAlias:()=>b_(e),testStatus:aj[a.id],onTest:p.length>0||bp?()=>cd(a.id):void 0,isTesting:an.has(a.id),isFree:a.isFree,onDisable:()=>bI(a.id),caps:o(`${n}/${a.id}`),thinkingSuffix:bB(a.id),latencyMs:a9[a.id]??a9[f],probeState:a7?.status==="running"&&a7?.perModel?.[f]?a7.perModel[f]:bb[f]||null},a.id)}),(0,d.jsxs)("button",{onClick:()=>aq(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),aD.length>0&&(a=new Set([...Object.values(ad),...h.map(a=>a.fullModel)]),b=new Set(br.map(a=>a.id)),0===(c=aD.filter(c=>!a.has(`${bD}/${c.id}`)&&!b.has(c.id))).length?null:(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(a=>(0,d.jsxs)("button",{onClick:async()=>{await b0(a.id,"llm",bD)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${a.name} \xb7 ${(a.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id.split("/").pop()]},a.id))})]})),g.length>0&&(0,d.jsxs)("div",{className:"w-full mt-2",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",g.length,"):"]}),(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:g.map(a=>(0,d.jsxs)("button",{onClick:()=>bJ(a.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),a.id]},a.id))})]})]})]})})()]}),"kiro"===n?(0,d.jsx)(j.Mh,{isOpen:G,providerInfo:bl,onSuccess:b5,onClose:()=>I(!1)}):"cursor"===n?(0,d.jsx)(j.G9,{isOpen:G,onSuccess:b5,onClose:()=>I(!1)}):"gitlab"===n?(0,d.jsx)(j.vj,{isOpen:G,providerInfo:bl,onSuccess:b5,onClose:()=>I(!1)}):(0,d.jsx)(j.LF,{isOpen:G,provider:n,providerInfo:bl,onSuccess:b5,onClose:()=>I(!1)}),"iflow"===n&&(0,d.jsx)(j.vE,{isOpen:M,onSuccess:()=>{bO(),O(!1)},onClose:()=>O(!1)}),(0,d.jsx)(J,{isOpen:T,provider:n,providerName:bl.name,isCompatible:bv,isAnthropic:bu,authType:bl?.authType,authHint:bl?.authHint,website:bl?.website,error:V,onSave:b6,onBulkDone:bO,onClose:()=>{W(""),U(!1)}}),(0,d.jsx)(j.wI,{isOpen:Z,connection:ab,onSave:b7,onClose:()=>$(!1)}),bv&&(0,d.jsx)(K,{isOpen:_,node:D,onSave:bQ,onClose:()=>aa(!1),isAnthropic:bu}),!bv&&(0,d.jsx)(L,{isOpen:ap,providerAlias:bD,providerDisplayAlias:bE,onSave:async a=>{await b0(a,"llm",bD),aq(!1)},onClose:()=>aq(!1)}),"codex"===n&&(0,d.jsx)(N,{isOpen:X,onClose:()=>Y(!1),onSuccess:bO}),(0,d.jsx)(j.uo,{isOpen:aN,onClose:()=>aO(!1),onConfirm:()=>{(aO(!1),bn)?bh():bj()},title:"Risk Notice",message:bl?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,d.jsx)(j.uo,{isOpen:!!aL,onClose:()=>aM(null),onConfirm:aL?.onConfirm,title:aL?.title||"Confirm",message:aL?.message,variant:"danger"})]}):(0,d.jsxs)("div",{className:"text-center py-20",children:[(0,d.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,d.jsx)(h(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64303:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>y,handler:()=>A,routeModule:()=>z});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,32059))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57097))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),v=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),w={children:["",{children:["(dashboard)",{children:["dashboard",{children:["providers",{children:["[id]",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,93110))),"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js"]}]},{"global-error":[v,"next/dist/client/components/builtin/global-error.js"]},["new"]]},{"global-error":[u,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/layout.js"],error:[o,"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/error.js"],"global-error":[p,"next/dist/client/components/builtin/global-error.js"],"not-found":[q,"next/dist/client/components/builtin/not-found.js"],forbidden:[r,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[s,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/home/runner/work/switchboard-router/switchboard-router/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,70440)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,x=(0,e.H)({tree:w,page:"/(dashboard)/dashboard/providers/[id]/page",pathname:"/dashboard/providers/[id]",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),y=x.__next_app__,z=x.routeModule,A=x.handler},72089:(a,b,c)=>{Promise.resolve().then(c.bind(c,93110))},73024:a=>{"use strict";a.exports=require("node:fs")},74875:(a,b,c)=>{"use strict";function d(a,b){return!1===a?"default":"active"===b||"success"===b?"success":"error"===b||"expired"===b||"unavailable"===b?"error":"default"}c.d(b,{g:()=>d})},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},93110:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/switchboard-router/switchboard-router/src/app/(dashboard)/dashboard/providers/[id]/page.js","default")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,2430,9995,2712,3787,7141,5350,869,3986,5781,5717,194,7757,8834],()=>b(b.s=64303));module.exports=c})();