zevairouter 1.0.36 → 1.0.38

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 (554) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +3 -3
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  6. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  50. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  51. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  53. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  54. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  55. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  56. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  57. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  58. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  59. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  60. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  61. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  62. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  63. package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  64. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  65. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  66. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  67. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  68. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  69. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  70. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  71. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  72. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  73. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  74. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  75. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  76. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  77. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  78. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  79. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  80. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  81. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  82. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  83. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  84. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  85. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  87. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  88. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  89. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  90. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  91. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  92. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  93. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  94. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  95. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  108. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  110. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  114. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  122. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  124. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  126. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  130. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  132. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  134. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js.nft.json +1 -1
  136. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  138. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  140. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  142. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  164. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  166. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  226. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  227. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  228. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  229. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  230. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  231. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  232. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  233. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  234. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  235. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  236. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  237. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  238. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  239. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  240. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  241. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  242. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  243. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  244. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  245. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  246. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  249. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  269. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  270. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  271. package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
  272. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  273. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  274. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  275. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  276. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  277. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  278. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  279. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
  280. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  281. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  282. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  283. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  284. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
  285. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  286. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
  287. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
  288. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  289. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  290. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  291. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  292. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  293. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  294. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  295. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  296. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  297. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  298. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  299. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  300. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  301. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  302. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  303. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  304. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  305. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  306. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  307. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  308. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  309. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  310. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  311. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  312. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  313. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  314. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  315. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  316. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  317. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  318. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  319. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
  320. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  321. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  322. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  323. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  324. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
  325. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  326. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
  327. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
  328. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  329. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  330. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  331. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  332. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  333. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  334. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  335. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  336. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  337. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  338. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  339. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  340. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  341. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  342. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  343. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  344. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  345. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  346. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  347. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  348. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  349. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  350. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  351. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  352. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  353. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  354. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  355. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  356. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  357. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  358. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  359. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  360. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  361. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  362. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  363. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  364. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  365. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  366. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  367. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  368. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  369. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  370. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  371. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  372. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  373. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  374. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  375. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  376. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  377. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  378. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  379. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  380. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  381. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  382. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  383. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  384. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  385. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  386. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  387. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  388. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  389. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  390. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  391. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  392. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  393. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  394. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  395. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  396. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  397. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  398. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  399. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  400. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  401. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  402. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  403. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  404. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  405. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  406. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  407. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  408. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  409. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  410. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  411. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  412. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  413. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  414. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  415. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  416. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  417. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  418. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  419. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  420. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  421. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  422. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  423. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  424. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  425. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  426. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  427. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  428. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  429. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  430. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  431. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  432. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  433. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  434. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  435. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  438. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  439. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  440. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  441. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  443. package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  444. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  445. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  446. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  447. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  448. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  449. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  450. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  452. package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
  453. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  454. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  455. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  456. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  457. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  458. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  459. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  460. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  461. package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
  462. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  463. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  464. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  465. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  466. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  467. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  468. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  469. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  470. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  471. package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
  472. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  473. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  474. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  475. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  476. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  477. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  478. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  479. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  480. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  481. package/cli/app/.next-cli-build/server/app-paths-manifest.json +3 -3
  482. package/cli/app/.next-cli-build/server/chunks/2409.js +1 -1
  483. package/cli/app/.next-cli-build/server/chunks/2777.js +1 -1
  484. package/cli/app/.next-cli-build/server/chunks/3104.js +1 -1
  485. package/cli/app/.next-cli-build/server/chunks/3110.js +1 -1
  486. package/cli/app/.next-cli-build/server/chunks/318.js +8 -15
  487. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  488. package/cli/app/.next-cli-build/server/chunks/4161.js +1 -1
  489. package/cli/app/.next-cli-build/server/chunks/4177.js +1 -1
  490. package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
  491. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  492. package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
  493. package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
  494. package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
  495. package/cli/app/.next-cli-build/server/chunks/7153.js +1 -1
  496. package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
  497. package/cli/app/.next-cli-build/server/chunks/8335.js +10 -0
  498. package/cli/app/.next-cli-build/server/chunks/8590.js +1 -1
  499. package/cli/app/.next-cli-build/server/chunks/8895.js +3 -3
  500. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  501. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  502. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  503. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  504. package/cli/app/.next-cli-build/static/chunks/1321-6e91d87d2a4816b9.js +1 -0
  505. package/cli/app/.next-cli-build/static/chunks/5497-2a485830a005737d.js +7 -0
  506. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-41ea0d0c8e98a115.js +3 -0
  507. package/cli/app/package.json +3 -3
  508. package/cli/app/public/providers/clinepass.png +0 -0
  509. package/cli/app/public/providers/grok-cli.png +0 -0
  510. package/cli/app/public/providers/kimchi.png +0 -0
  511. package/cli/app/public/providers/kimchi.svg +4 -0
  512. package/cli/app/public/providers/perplexity-agent.png +0 -0
  513. package/cli/package.json +1 -1
  514. package/open-sse/config/appConstants.js +2 -0
  515. package/open-sse/config/providerModels.js +81 -1
  516. package/open-sse/config/providers.js +69 -0
  517. package/open-sse/executors/codebuddy-cn.js +31 -0
  518. package/open-sse/executors/default.js +2 -1
  519. package/open-sse/executors/grok-cli.js +397 -0
  520. package/open-sse/executors/index.js +14 -0
  521. package/open-sse/executors/kimchi.js +123 -0
  522. package/open-sse/executors/mimo-free.js +156 -0
  523. package/open-sse/handlers/chatCore.js +12 -21
  524. package/open-sse/services/kimchiModels.js +176 -0
  525. package/open-sse/services/model.js +5 -0
  526. package/open-sse/services/tokenRefresh.js +2 -0
  527. package/open-sse/services/usage.js +250 -24
  528. package/open-sse/utils/stream.js +14 -0
  529. package/open-sse/utils/thinkingSuffix.js +64 -0
  530. package/package.json +3 -3
  531. package/public/providers/clinepass.png +0 -0
  532. package/public/providers/grok-cli.png +0 -0
  533. package/public/providers/kimchi.png +0 -0
  534. package/public/providers/kimchi.svg +4 -0
  535. package/public/providers/perplexity-agent.png +0 -0
  536. package/src/app/(dashboard)/dashboard/providers/[id]/ModelRow.js +7 -3
  537. package/src/app/(dashboard)/dashboard/providers/[id]/page.js +17 -16
  538. package/src/app/api/oauth/[provider]/[action]/route.js +4 -4
  539. package/src/app/api/providers/[id]/models/route.js +20 -0
  540. package/src/app/api/providers/[id]/test/testUtils.js +33 -3
  541. package/src/app/api/v1/models/route.js +10 -1
  542. package/src/lib/network/connectionProxy.js +27 -0
  543. package/src/lib/oauth/constants/oauth.js +33 -0
  544. package/src/lib/oauth/providers.js +243 -0
  545. package/src/shared/components/NoAuthProxyCard.js +56 -8
  546. package/src/shared/components/OAuthModal.js +24 -7
  547. package/src/shared/constants/providers.js +141 -1
  548. package/src/sse/services/auth.js +11 -4
  549. package/cli/app/.next-cli-build/server/chunks/3188.js +0 -10
  550. package/cli/app/.next-cli-build/static/chunks/1321-1915f34ac5033b82.js +0 -1
  551. package/cli/app/.next-cli-build/static/chunks/5497-f496fb3861cb944d.js +0 -7
  552. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-00b727c93ebc0e37.js +0 -3
  553. /package/cli/app/.next-cli-build/static/{w0R4xFPIyjPTTgiJ8h4Lz → r3r8UzNCpFb_r_5RqCNis}/_buildManifest.js +0 -0
  554. /package/cli/app/.next-cli-build/static/{w0R4xFPIyjPTTgiJ8h4Lz → r3r8UzNCpFb_r_5RqCNis}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{37044:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),m=s(28777),u=s(11059),p=s(73006);let x=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}let f=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],g={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}};function b(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function y(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}function v(e,t=""){let s=g[e]||g.unknown;return{key:e,...s,reason:t}}function j(e={}){if(!1===e.isActive)return v("disabled","Connection is disabled");if(function(e={}){return Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&y(t))}(e))return v("cooldown","Model cooldown is active");if(y(e.rateLimitedUntil))return v("rate_limited","Rate limit cooldown is active");let t=b(e.testStatus||e.status),s=b(e.lastErrorType||e.errorType),a=b(e.errorCode||e.statusCode),i=b(e.lastError||e.error),l=`${t} ${s} ${a} ${i}`.trim();return!l||["active","success","ok"].includes(t)?v("active",""):l.includes("ban")||l.includes("suspend")||l.includes("restricted")?v("banned",e.lastError||"Account appears restricted"):l.includes("exhaust")||l.includes("quota exceeded")||l.includes("insufficient_quota")||l.includes("payment required")||"402"===a?v("quota_exhausted",e.lastError||"Quota exhausted"):s.includes("rate_limited")||l.includes("rate limit")||l.includes("too many requests")||"429"===a?v("rate_limited",e.lastError||"Rate limited"):s.includes("auth")||s.includes("token")||l.includes("unauthorized")||l.includes("invalid api key")||l.includes("token invalid")||l.includes("token expired")||l.includes("revoked")||"401"===a||"403"===a?v("auth_error",e.lastError||"Authentication failed"):s.includes("network")||l.includes("network")||l.includes("timeout")||l.includes("fetch failed")||l.includes("econn")||l.includes("dns")||l.includes("proxy")?v("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(t)?v("connection_error",e.lastError||e.testStatus||"Connection failed"):v("unknown",e.lastError||e.testStatus||"")}function k(e,t){if(!t||"all"===t)return!0;let s=f.find(e=>e.id===t);return!s||s.keys.includes(j(e).key)}var w=s(14051),N=s.n(w);function C({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:u,thinkingSuffix:p}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0,h=p?`${t}(${p})`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.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:h}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.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,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(h,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.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:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function S({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.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:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.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:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function $({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:m}){let[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null),[v,j]=(0,i.useState)({}),k=async t=>{if(!b){y(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();j(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{j(e=>({...e,[t]:"error"}))}finally{y(null)}}},w=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),N=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},C=async()=>{if(!u.trim()||x)return;let t=u.trim(),s=N(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),p("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=N(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>p(e.target.value),onKeyDown:e=>"Enter"===e.key&&C(),placeholder:m?"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,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:C,disabled:!u.trim()||x,children:x?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),w.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:w.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(S,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:v[e],isTesting:b===e},s))})]})}function A({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function T({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:u,onDelete:p,oneByOneStatus:x=null}){let[h,f]=(0,i.useState)(!1),[g,b]=(0,i.useState)(!1),y=(0,i.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,w=k?v.get(k):null,N=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,C=!!k||N,S=w?`Pool: ${w.name}`:k?`Pool: ${k} (inactive/missing)`:N?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$="";if(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);$=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{$=t}}let I=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",P="default";w?.isActive===!0?P="success":(k||N)&&(P="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{y.current&&!y.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let O=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),f(!1)}},E=e.authType||(s?"oauth":"apikey"),_="oauth"===E,D="cookie"===E,R=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),z=_?R(e.email)?e.email:R(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[U,q]=(0,i.useState)(!1),M=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{q(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=M?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[M]);let L="unavailable"!==e.testStatus||U?e.testStatus:"active",F=j(e),K=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,a.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===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:D?"cookie":_?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:z}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(()=>{if(!1===e.isActive)return"default";let t=F?.severity==="success"?"success":F?.severity==="error"?"error":"default";return"active"!==F.key?t:"active"===L||"success"===L?"success":"error"===L||"expired"===L||"unavailable"===L?"error":"default"})(),size:"sm",dot:!0,children:F.label||L||"unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:_?"OAuth":D?"Cookie":"API Key"}),C&&(0,a.jsx)(d.Ex,{variant:P,size:"sm",children:"Proxy"}),e.autoDisabledAt&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["token_expired"===e.autoDisabledReason?"Token expired":"banned"===e.autoDisabledReason?"Banned":"quota_exhausted"===e.autoDisabledReason?"Quota exhausted":"Auto-disabled"," — ",new Date(e.autoDisabledAt).toLocaleDateString()]}),U&&!1!==e.isActive&&(0,a.jsx)(A,{until:M}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),K()&&(0,a.jsx)(d.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:K()})]}),C&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:S,children:S}),$&&(0,a.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:$}),I&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:I,children:["no_proxy: ",I]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:y,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${C?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>O("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>O(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:u,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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}C.propTypes={model:N().shape({id:N().string.isRequired}).isRequired,fullModel:N().string.isRequired,alias:N().string,copied:N().string,onCopy:N().func.isRequired,testStatus:N().oneOf(["ok","error"]),isCustom:N().bool,isFree:N().bool,onDeleteAlias:N().func,onTest:N().func,isTesting:N().bool,onDisable:N().func,thinkingSuffix:N().string},N().string.isRequired,N().string.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func,N().oneOf(["ok","error"]),N().bool,N().string.isRequired,N().object.isRequired,N().string,N().func.isRequired,N().func.isRequired,N().func.isRequired,$.propTypes={providerStorageAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,modelAliases:N().object.isRequired,copied:N().string,onCopy:N().func.isRequired,onSetAlias:N().func.isRequired,onDeleteAlias:N().func.isRequired,connections:N().arrayOf(N().shape({id:N().string,isActive:N().bool})).isRequired,isAnthropic:N().bool},A.propTypes={until:N().string.isRequired},T.propTypes={connection:N().shape({id:N().string,name:N().string,email:N().string,displayName:N().string,modelLockUntil:N().string,testStatus:N().string,isActive:N().bool,lastError:N().string,priority:N().number,globalPriority:N().number}).isRequired,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string,proxyUrl:N().string,noProxy:N().string,isActive:N().bool})),isOAuth:N().bool.isRequired,isFirst:N().bool.isRequired,isLast:N().bool.isRequired,onMoveUp:N().func.isRequired,onMoveDown:N().func.isRequired,onToggleActive:N().func.isRequired,onUpdateProxy:N().func,onEdit:N().func.isRequired,onDelete:N().func.isRequired,oneByOneStatus:N().shape({state:N().string,error:N().string})};let I=`name1|sk-key1
2
+ name2|sk-key2
3
+ sk-key-only-auto-named`;function P({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:u,error:p,onSave:x,onBulkDone:h,onClose:f}){let g="__none__",b="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,w="cloudflare-ai"===t,N=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||N?.[0]?.id||"",[S,$]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[A,T]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[O,E]=(0,i.useState)({accountId:""}),[_,D]=(0,i.useState)(C),[R,z]=(0,i.useState)(!1),[U,q]=(0,i.useState)(null),[M,L]=(0,i.useState)(!1),[F,K]=(0,i.useState)("single"),[J,B]=(0,i.useState)(""),[W,Q]=(0,i.useState)(null),G=()=>b&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:w?{accountId:O.accountId}:N&&_?{region:_}:void 0,H=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{z(!1)}},V=async()=>{if(t&&(b||S.apiKey)&&(b||S.name)&&(!l||S.defaultModel.trim())){L(!0);try{let e=!1;try{z(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{z(!1)}await x({name:S.name||(b?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===g?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{L(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;L(!0),Q(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}L(!1),Q({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{K("single"),Q(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{K("bulk"),Q(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:J,onChange:e=>B(e.target.value)}),W&&(0,a.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>$({...S,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>$({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:H,disabled:R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),!b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>$({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:H,disabled:!S.apiKey||R||M,variant:"secondary",children:R?"Checking...":"Check"})})]}),v&&(0,a.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."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),N&&(0,a.jsx)(d.l6,{label:"Region",value:_,onChange:e=>D(e.target.value),options:N.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>$({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,a.jsx)(d.Ex,{variant:"success"===U?"success":"error",children:"success"===U?"Valid":"Invalid"}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:p}),l&&(0,a.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."}),w&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:O.accountId,onChange:e=>E({...O,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>T({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:A.deployment,onChange:e=>T({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:A.apiVersion,onChange:e=>T({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:A.organization,onChange:e=>T({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>$({...S,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>$({...S,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(u||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(u||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:V,fullWidth:!0,disabled:M||!b&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!A.azureEndpoint||!A.deployment||!A.organization)||w&&!O.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function O({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[b,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:u,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:u,onChange:e=>p(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!u||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),b&&(0,a.jsx)(d.Ex,{variant:"success"===b?"success":"error",children:"success"===b?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function E({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(""),[x,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),p(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){m("testing"),p("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),p(a.error||"")}catch(e){m("error"),p(e.message)}}},b=async()=>{let e=f(n.trim());if(e&&!x){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),p("")},onKeyDown:e=>{"Enter"===e.key&&g()},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,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:b,fullWidth:!0,size:"sm",disabled:!n.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}P.propTypes={isOpen:N().bool.isRequired,provider:N().string,providerName:N().string,isCompatible:N().bool,isAnthropic:N().bool,authType:N().string,authHint:N().string,website:N().string,proxyPools:N().arrayOf(N().shape({id:N().string,name:N().string})),error:N().string,onSave:N().func.isRequired,onBulkDone:N().func,onClose:N().func.isRequired},O.propTypes={isOpen:N().bool.isRequired,node:N().shape({id:N().string,name:N().string,prefix:N().string,apiType:N().string,baseUrl:N().string}),onSave:N().func.isRequired,onClose:N().func.isRequired,isAnthropic:N().bool},E.propTypes={isOpen:N().bool.isRequired,providerAlias:N().string.isRequired,providerDisplayAlias:N().string.isRequired,onSave:N().func.isRequired,onClose:N().func.isRequired};let _="kiro-bulk-import-active-job",D="Bulk import progress expired or was cleared.";function R(e){return["completed","cancelled","failed"].includes(e)}async function z(e){if(!e)return null;let t=await fetch(`/api/oauth/kiro/bulk-import/${e}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function U(e="active"){let t=await fetch(`/api/oauth/kiro/bulk-import/latest?scope=${encodeURIComponent(e)}`,{cache:"no-store"}),s=await t.json();return{res:t,data:s}}async function q(e){let t=new AbortController,s=window.setTimeout(()=>t.abort(),8e3);try{let s=await fetch(e,{cache:"no-store",signal:t.signal}),a=null;try{a=await s.json()}catch{a=null}return{response:s,data:a}}finally{window.clearTimeout(s)}}function M(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,g]=(0,i.useState)([]),[b,y]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[w,N]=(0,i.useState)([]),[S,A]=(0,i.useState)(!1),[I,M]=(0,i.useState)(!1),[L,F]=(0,i.useState)(!1),[K,J]=(0,i.useState)(!1),[B,W]=(0,i.useState)(""),[Q,G]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)({}),[ea,ei]=(0,i.useState)(!1),[el,er]=(0,i.useState)({}),[en,eo]=(0,i.useState)(""),[ed,ec]=(0,i.useState)(null),[em,eu]=(0,i.useState)(!1),[ep,ex]=(0,i.useState)([]),[eh,ef]=(0,i.useState)("__none__"),[eg,eb]=(0,i.useState)(!1),[ey,ev]=(0,i.useState)(null),[ej,ek]=(0,i.useState)(""),[ew,eN]=(0,i.useState)("auto"),[eC,eS]=(0,i.useState)([]),[e$,eA]=(0,i.useState)([]),[eT,eI]=(0,i.useState)([]),[eP,eO]=(0,i.useState)(null),[eE,e_]=(0,i.useState)(!1),[eD,eR]=(0,i.useState)(!1),[ez,eU]=(0,i.useState)(!1),[eq,eM]=(0,i.useState)(null),[eL,eF]=(0,i.useState)({}),[eK,eJ]=(0,i.useState)(null),eB=(0,i.useRef)(!1),[eW,eQ]=(0,i.useState)(!1),[eG,eH]=(0,i.useState)(null),[eV,eZ]=(0,i.useState)(""),[eX,eY]=(0,i.useState)(1),[e0,e1]=(0,i.useState)(20),[e2,e5]=(0,i.useState)("all"),[e4,e3]=(0,i.useState)(1),[e6,e7]=(0,i.useState)(20),{copied:e8,copy:e9}=(0,u.C)(),te=(0,i.useRef)(0),tt="ag_risk_confirmed",ts=(0,i.useCallback)(()=>{eH(null),eZ(""),te.current=0,window.localStorage.removeItem(_)},[]),ta=()=>{A(!0)},ti=()=>{"kiro"===r||"codebuddy"===r?s.push(`/dashboard/automation?provider=${r}`):("kiro"===r&&eG?.jobId&&R(eG.status)&&ts(),"antigravity"===r&&"true"!==window.localStorage.getItem(tt))?e_(!0):td?ta():(W(""),J(!0))},tl=()=>{W(""),J(!0)},tr=()=>{td?ti():tl()},tn=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],to=tn?.authModes||[],td=!!c.zN[r]||!!c.IS[r]||to.includes("oauth"),tc=!!c.fg[r]||to.includes("apikey"),tm=!!c.IS[r]?.noAuth,tu=(0,m.KC)(r),tp=(0,c.wG)(r),tx=(0,c.mq)(r),th=(0,c.gb)(r),tf=tx||th,tg=!tf&&td&&tc,tb="kiro"===r||"codebuddy"===r,ty="xai"===r?"Grok Build OAuth":"OAuth",tv="xai"===r?"xAI API Key":"API Key",tj=c.Q2[r]?.thinkingConfig||c.s9.extended,tk=tf?r:tp,tw=tf?v?.prefix||r:tp,tN=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}`,{cache:"no-store"}),t=await e.json();e.ok&&eI(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tk]),tC=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tk,ids:[e]})})).ok&&await tN()}catch(e){console.log("Error disabling model:",e)}},tS=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tN()}catch(e){console.log("Error enabling model:",e)}},t$=async e=>{e.length&&eO({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eO(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tk,ids:e})})).ok&&await tN()}catch(e){console.log("Error disabling all models:",e)}}})},tA=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tk)}`,{method:"DELETE"})).ok&&await tN()}catch(e){console.log("Error enabling all models:",e)}},tT=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&es(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eA(e.models)}).catch(()=>{})},[r]);let tI=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.allSettled([q("/api/providers"),q("/api/provider-nodes"),q("/api/proxy-pools?isActive=true"),q("/api/settings")]),i="fulfilled"===e.status?e.value.response:null,l="fulfilled"===e.status?e.value.data:{},n="fulfilled"===t.status?t.value.response:null,o="fulfilled"===t.status?t.value.data:{},d="fulfilled"===s.status?s.value.response:null,c="fulfilled"===s.status?s.value.data:{},m="fulfilled"===a.status?a.value.response:null,u=m?.ok&&a.value.data||{};if(i?.ok){let e=(l.connections||[]).filter(e=>e.provider===r);g(e)}d?.ok&&N(c.proxyPools||[]);let p=(u.providerStrategies||{})[r]||{};ev(p.fallbackStrategy||null),ek(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let x=(u.providerThinking||{})[r]||{};if(eN(x.mode||"auto"),n?.ok){let e=(o.nodes||[]).find(e=>e.id===r)||null;if(!e&&tf)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let{response:t,data:s}=await q("/api/provider-nodes");if(t.ok&&(e=(s.nodes||[]).find(e=>e.id===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,tf]),tP=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(j(s.node),await tI(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tO=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tE=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[r]={mode:e}:delete s[r],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}};(0,i.useEffect)(()=>{tI(),tT(),tN()},[tI,tT,tN]),(0,i.useEffect)(()=>{eY(1),e3(1),e5("all")},[r]),(0,i.useEffect)(()=>{eY(1)},[e2,e0]),(0,i.useEffect)(()=>{e3(1)},[e6,eT.length,tu.length,e$.length]),(0,i.useEffect)(()=>{if("kiro"!==r)return;let e=window.localStorage.getItem(_),t=!1;return(async()=>{try{if(eZ(""),eG?.jobId)return;let a=await U();if(!t&&a.res.ok&&a.data?.job){eH(a.data.job),te.current=a.data.job.summary?.success||0,window.localStorage.setItem(_,a.data.job.jobId);return}if(e){var s;let a=await z(e);if(!t&&a?.res.ok&&a.data?.job&&(s=a.data.job.status,["queued","running","needs_manual"].includes(s))){eH(a.data.job),te.current=a.data.job.summary?.success||0;return}ts(),eZ(D)}}catch{t||eZ(D)}})(),()=>{t=!0}},[ts,eG?.jobId,r]),(0,i.useEffect)(()=>{if("kiro"!==r||!eG?.jobId||R(eG.status))return;let e=window.setInterval(async()=>{try{let e=await z(eG.jobId);if(e?.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tI()),eZ(""),eH(e.data.job);return}if(e?.res.status===404){let e=await U();if(e.res.ok&&e.data?.job){let t=e.data.job.summary?.success||0;t>te.current&&(te.current=t,await tI()),eZ(""),eH(e.data.job),window.localStorage.setItem(_,e.data.job.jobId);return}ts(),eZ(D)}}catch{}},2e3);return()=>window.clearInterval(e)},[ts,tI,eG?.jobId,eG?.status,r]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eS)},[r]);let t_=async(e,t,s=tp)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tT();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tD=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tT()}catch(e){console.log("Error deleting alias:",e)}},tR=async()=>{if(eW)return;let e=x.find(e=>!1!==e.isActive);if(!e)return void alert((0,p.Tl)("Please add an active Qoder connection first"));eQ(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,p.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,p.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${tk}/${s}`;!Object.values(et).includes(a)&&(et[s]||(await t_(s,s,tk),i+=1))}0===i?alert((0,p.Tl)("All models already exist, no new models added")):alert((0,p.Tl)("Successfully added")+` ${i} `+(0,p.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,p.Tl)("Error fetching models")+": "+e.message)}finally{eQ(!1)}},tz=async()=>{if(eD||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eB.current=!1,eR(!0),eU(!1),eM(null),eF(e),eJ({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eB.current){eJ({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eM(a.id),eF(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eF(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eF(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eJ({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eM(null),eR(!1),eU(!1),eB.current=!1}},tU=async e=>{eO({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eO(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&g(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tq=()=>{tI(),A(!1)},tM=(0,i.useCallback)(e=>{(eH(e),eZ(""),e?.jobId)?(window.localStorage.setItem(_,e.jobId),te.current=Math.max(te.current,e.summary?.success||0)):ts()},[ts]),tL=async e=>{W("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tI(),J(!1);return}W(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),W("Failed to save connection")}},tF=async e=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tI(),G(!1))}catch(e){console.log("Error updating connection:",e)}},tK=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&g(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tJ=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],g(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tI()}},tB=x.filter(e=>k(e,e2)),tW=f.reduce((e,t)=>(e[t.id]="all"===t.id?x.length:x.filter(e=>k(e,t.id)).length,e),{}),tQ=ep.filter(e=>x.some(t=>t.id===e)),tG=x.filter(e=>tQ.includes(e.id)),tH="codebuddy"===r?(tG.length>0?tG:x).map(e=>e.id):[],tV=tB.length>0&&tB.every(e=>tQ.includes(e.id)),tZ=(()=>{if(0===tG.length)return"";let e=new Set(tG.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=w.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tX=()=>{eg||X(!1)},tY=async e=>{eb(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tI(),X(!1)}finally{eb(!1)}},t0=e=>tY(tG.map(t=>({connectionId:t.id,proxyPoolId:e}))),t1=e=>{let t="gsuite"===e?"GSuite (non-Gmail)":"Gmail (@gmail.com)";eO({title:`Delete ${t}`,message:`Delete ALL ${t} accounts for this provider? This cannot be undone.`,onConfirm:async()=>{eO(null);try{(await fetch("/api/providers/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:tn?.id||r,emailFilter:e})})).ok&&(ex([]),await tI())}catch(e){console.error("bulk delete error:",e)}}})},t2=Math.max(1,Math.ceil(tB.length/e0)),t5=Math.min(eX,t2),t4=tB.slice((t5-1)*e0,t5*e0),t3=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:t4.map((e,t)=>{let s,i=x.findIndex(t=>t.id===e.id);return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("label",{className:"flex w-8 shrink-0 items-center justify-center",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,tQ.includes(s)),onChange:()=>{var t;return t=e.id,void ex(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"size-4 rounded border-black/20 dark:border-white/20","aria-label":`Select ${e.name||e.email||e.id}`})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(T,{connection:e,proxyPools:w,isOAuth:td,isFirst:0===i,isLast:i===x.length-1,onMoveUp:()=>tJ(i,i-1),onMoveDown:()=>tJ(i,i+1),onToggleActive:t=>tK(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&g(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ee(e),G(!0)},onDelete:()=>tU(e.id),oneByOneStatus:eL[e.id]||null})})]},e.id)})}),t6=w.filter(e=>!0===e.isActive),t7=(0,a.jsx)(d.aF,{isOpen:Z,onClose:tX,title:`Apply Proxy (${tG.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=w.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tY(tG.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eg||0===t6.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>t0(null),disabled:eg,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),w.map(e=>(0,a.jsxs)("button",{onClick:()=>t0(e.id),disabled:eg||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eg&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tX,variant:"ghost",fullWidth:!0,disabled:eg,children:"Cancel"})]})}),t8=async e=>{if(!ed){ec(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tk}/${e}`})}),s=await t.json();er(t=>({...t,[e]:s.ok?"ok":"error"})),eo(s.ok?"":s.error||"Model not reachable")}catch{er(t=>({...t,[e]:"error"})),eo("Network error")}finally{ec(null)}}};return b?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):tn?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tn.color}15`},children:ea?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tn.color},children:tn.textIcon||tn.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tx&&tn.apiType?"responses"===tn.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":th?"/providers/anthropic-m.png":`/providers/${tn.id}.png`,alt:tn.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ei(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tn.name}),(tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website)&&(0,a.jsxs)("a",{href:tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tn.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),tn.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tn.deprecationNotice})]}),tn.notice?.text&&!tn.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tn.notice.text}),tn.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tn.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 →"})]}),tf&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:th?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[th?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",th?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{W(""),J(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eO({title:"Delete Compatible Node",message:`Delete this ${th?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eO(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tm?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&w.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>{if(0===tG.length)return;let e=[...new Set(tG.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"))];ef(1===e.length?e[0]:"__none__"),X(!0)},disabled:0===tG.length,children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tz,disabled:eD,children:eD?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eD&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eD&&(eB.current=!0,eU(!0))},disabled:ez,children:ez?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Thinking"}),(0,a.jsx)("select",{value:ew,onChange:e=>{var t;eN(t=e.target.value),tE(t)},className:"text-xs px-2 py-1 border border-border rounded-md bg-background focus:outline-none focus:border-primary",title:"Forces reasoning_effort on requests; model chips copy as alias/model(level)",children:(tj?.options||c.mt).map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===ey,onChange:e=>{let t=e?"round-robin":null,s=e?ej||"1":ej;e&&!ej&&ek("1"),ev(t),tO(t,s)}}),"round-robin"===ey&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ej,onChange:e=>{var t;ek(t=e.target.value),tO("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),x.length>0&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-black/5 bg-black/[0.02] p-3 dark:border-white/5 dark:bg-white/[0.02]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,a.jsx)("input",{type:"checkbox",checked:tV,onChange:()=>{tV?ex(e=>e.filter(e=>!tB.some(t=>t.id===e))):ex(e=>Array.from(new Set([...e,...tB.map(e=>e.id)])))},className:"size-4 rounded border-black/20 dark:border-white/20"}),tV?"Unselect visible":"Select visible"]}),(0,a.jsxs)(d.Ex,{variant:"default",children:[tB.length," visible"]}),tG.length>0&&(0,a.jsxs)(d.Ex,{variant:"default",children:[tG.length," selected"]}),tZ&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:tZ}),tG.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>{ex([]),ef("__none__")},children:"Clear"}),tG.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:()=>{0!==tG.length&&eO({title:"Delete Selected Connections",message:`Delete ${tG.length} selected connection(s)? This permanently removes the selected accounts.`,onConfirm:async()=>{for(let e of(eO(null),tG))try{await fetch(`/api/providers/${e.id}`,{method:"DELETE"})}catch(e){console.log("Error deleting selected connection:",e)}ex(e=>e.filter(e=>!tG.some(t=>t.id===e))),await tI()}})},children:["Delete Selected (",tG.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"domain",onClick:()=>t1("gsuite"),children:"Delete GSuite"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"mail",onClick:()=>t1("gmail"),children:"Delete Gmail"})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:f.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>e5(e.id),className:`rounded-full border px-2.5 py-1 text-xs transition-colors ${e2===e.id?"border-primary/50 bg-primary/10 text-primary":"border-border text-text-muted hover:border-primary/30 hover:text-text-main"}`,children:[e.label,(0,a.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:tW[e.id]||0})]},e.id))})]}),0===x.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:td?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tg&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ty," or ",tv,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tg?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,children:tv})]}):(0,a.jsxs)(a.Fragment,{children:[!tf&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:tb?"automation":"add",onClick:tr,children:tb?"Open Automation":tf?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}),"kiro"===r&&eG?.jobId&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eG.status," | Success: ",eG.summary?.success||0," | Running: ",eG.summary?.running||0," | Queued: ",eG.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),R(eG.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eG?.jobId&&eV&&(0,a.jsx)("div",{className:"mt-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eV})]}):(0,a.jsxs)(a.Fragment,{children:[eK&&(0,a.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,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eK.total]}),(0,a.jsxs)("span",{children:["Completed: ",eK.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eK.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eK.failed]}),eK.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eD&&eq&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eq)?.name||eq]})]})}),"kiro"===r&&eG?.jobId&&(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 rounded-lg border border-primary/20 bg-primary/[0.06] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-text-main",children:"Bulk import progress is still available"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Status: ",eG.status," | Success: ",eG.summary?.success||0," | Running: ",eG.summary?.running||0," | Queued: ",eG.summary?.queued||0]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"monitoring",variant:"secondary",onClick:()=>s.push("/dashboard/automation?provider=kiro"),children:"Resume Bulk Progress"}),R(eG.status)&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"close",onClick:ts,children:"Clear"})]})]}),"kiro"===r&&!eG?.jobId&&eV&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:eV}),t3,"kiro"===r&&t2>1&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Page ",t5," of ",t2," • Showing ",(t5-1)*e0+1,"-",Math.min(t5*e0,tB.length)," of ",tB.length," connections"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t5<=1,onClick:()=>eY(e=>Math.max(1,e-1)),children:"Previous"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",disabled:t5>=t2,onClick:()=>eY(e=>Math.min(t2,e+1)),children:"Next"})]})]}),"kiro"!==r&&tB.length>0&&(0,a.jsx)(d.dK,{currentPage:t5,pageSize:e0,totalItems:tB.length,onPageChange:eY,onPageSizeChange:e=>{e1(e),eY(1)},className:"mt-2"}),x.length>0&&0===tB.length&&(0,a.jsx)("div",{className:"py-8 text-center text-sm text-text-muted",children:"No connections match this status filter."}),!tf&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codebuddy"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>{x.length>1&&0===tG.length?alert("Select the CodeBuddy connection(s) that should use this quota cookie first."):F(!0)},title:"Attach CodeBuddy web cookie for quota tracking",className:"w-full sm:w-auto",children:"Quota Cookie"}),tg?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,className:"w-full sm:w-auto",children:ty}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:tv})]}):(0,a.jsx)(d.$n,{size:"sm",icon:tb?"automation":"add",onClick:tr,className:"w-full sm:w-auto",children:tb?"Open Automation":"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tf&&(e=[...tu,...e$.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eT.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eT.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tA,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>t$(e),children:"Disable All"})]}))]}),!!en&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:en}),(()=>{let e,t,s;if(tf)return(0,a.jsx)($,{providerStorageAlias:tk,providerDisplayAlias:tw,modelAliases:et,copied:e8,onCopy:e9,onSetAlias:t_,onDeleteAlias:tD,connections:x,isAnthropic:th});let i=[...tu,...e$.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eT),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),c=Object.entries(et).filter(([e,t])=>{let s=`${tk}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return tn.passthroughModels?!tu.some(e=>e.id===a):!tu.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${tk}/`.length),alias:e,fullModel:t})),m=Math.min(e4,Math.max(1,Math.ceil(n.length/e6))),u=n.slice((m-1)*e6,m*e6);return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,a.jsx)(C,{model:{id:e.id},fullModel:`${tw}/${e.id}`,alias:e.alias,copied:e8,onCopy:e9,onSetAlias:()=>{},onDeleteAlias:()=>tD(e.alias),testStatus:el[e.id],onTest:x.length>0||tm?()=>t8(e.id):void 0,isTesting:ed===e.id,isCustom:!0,isFree:!1,thinkingSuffix:ew&&"auto"!==ew&&"off"!==ew&&"none"!==ew?ew:null},e.id)),u.map(e=>{let t=`${tk}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(et).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(C,{model:e,fullModel:`${tw}/${e.id}`,alias:i,copied:e8,onCopy:e9,onSetAlias:t=>t_(e.id,t,tk),onDeleteAlias:()=>tD(i),testStatus:el[e.id],onTest:x.length>0||tm?()=>t8(e.id):void 0,isTesting:ed===e.id,isFree:e.isFree,onDisable:()=>tC(e.id),thinkingSuffix:ew&&"auto"!==ew&&"off"!==ew&&"none"!==ew?ew:null},e.id)}),n.length>e6&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(d.dK,{currentPage:m,pageSize:e6,totalItems:n.length,onPageChange:e3,onPageSizeChange:e=>{e7(e),e3(1)}})}),(0,a.jsxs)("button",{onClick:()=>eu(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&x.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tR,disabled:eW,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eW?{animation:"spin 1s linear infinite"}:void 0,children:eW?"progress_activity":"download"}),eW?(0,p.Tl)("Fetching..."):(0,p.Tl)("Fetch Qoder Models")]}),eC.length>0&&(e=new Set(Object.values(et)),t=new Set(tu.map(e=>e.id)),0===(s=eC.filter(s=>!e.has(`${tk}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await t_(e.id,t,tk)},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:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>tS(e.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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t7,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:S,providerInfo:tn,onSuccess:tq,onRefresh:tI,initialBulkJobId:eG?.jobId||null,onBulkJobChange:tM,onClose:()=>A(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:S,onSuccess:tq,onClose:()=>A(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:S,providerInfo:tn,onSuccess:tq,onClose:()=>A(!1)}):(0,a.jsx)(d.LF,{isOpen:S,provider:r,providerInfo:tn,onSuccess:tq,onClose:()=>A(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:I,onSuccess:()=>{tI(),M(!1)},onClose:()=>M(!1)}),"codebuddy"===r&&(0,a.jsx)(d.xl,{isOpen:L,connectionIds:tH,onSuccess:()=>{tI(),F(!1)},onClose:()=>F(!1)}),(0,a.jsx)(P,{isOpen:K,provider:r,providerName:tn.name,isCompatible:tf,isAnthropic:th,authType:tn?.authType,authHint:tn?.authHint,website:tn?.website,proxyPools:w,error:B,onSave:tL,onBulkDone:tI,onClose:()=>{W(""),J(!1)}}),(0,a.jsx)(d.wI,{isOpen:Q,connection:Y,proxyPools:w,onSave:tF,onClose:()=>G(!1)}),tf&&(0,a.jsx)(O,{isOpen:H,node:v,onSave:tP,onClose:()=>V(!1),isAnthropic:th}),!tf&&(0,a.jsx)(E,{isOpen:em,providerAlias:tk,providerDisplayAlias:tw,onSave:async e=>{let t=tn?.passthroughModels?e.split("/").pop():e;await t_(e,t,tk),eu(!1)},onClose:()=>eu(!1)}),(0,a.jsx)(d.uo,{isOpen:eE,onClose:()=>e_(!1),onConfirm:()=>{(window.localStorage.setItem(tt,"true"),e_(!1),td)?ta():tl()},title:"Risk Notice",message:tn?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eP,onClose:()=>eO(null),onConfirm:eP?.onConfirm,title:eP?.title||"Confirm",message:eP?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},42911:(e,t,s)=>{Promise.resolve().then(s.bind(s,37044))}},e=>{e.O(0,[2574,3862,4343,1321,5497,8441,3794,7358],()=>e(e.s=42911)),_N_E=e.O()}]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "ZevaiRouter - AI Router with provider automation, multi-account workflows, and quota tracking",
5
5
  "bin": {
6
6
  "zevai": "./cli/cli.js"
@@ -70,8 +70,8 @@
70
70
  "camoufox-js": "^0.11.0",
71
71
  "playwright": "^1.54.2"
72
72
  },
73
- "comment_better_sqlite3": "kept in optionalDependencies so npm install doesn't fail on systems without build tools \u2014 sql.js is used as fallback at runtime",
74
- "comment_camoufox_js": "optional stealth-Firefox engine for bulk-import; runtime auto-installs to user data dir if user picks Camoufox in the modal but the package is missing \u2014 Chromium remains the default and works without this dep",
73
+ "comment_better_sqlite3": "kept in optionalDependencies so npm install doesn't fail on systems without build tools sql.js is used as fallback at runtime",
74
+ "comment_camoufox_js": "optional stealth-Firefox engine for bulk-import; runtime auto-installs to user data dir if user picks Camoufox in the modal but the package is missing Chromium remains the default and works without this dep",
75
75
  "devDependencies": {
76
76
  "@tailwindcss/postcss": "^4.1.18",
77
77
  "esbuild": "^0.28.1",
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="104" height="104" viewBox="0 0 104 104">
2
+ <circle cx="52" cy="52" r="52" fill="#FF521D"/>
3
+ <path d="M68.4459 24.9438C69.8639 24.1762 71.6471 23.7178 73.4821 24.2163C73.8278 24.2966 74.1339 24.3916 74.4362 24.5024L75.9186 25.0464L75.5104 26.5727C75.3469 27.1827 75.202 27.723 75.0387 28.3325L74.6442 29.8042L73.1354 29.5972C73.0242 29.5819 72.9246 29.5753 72.8082 29.5747C72.2474 29.5865 71.7542 29.8645 71.2662 30.6772C70.8883 31.307 70.5939 32.1486 70.3815 33.1079C74.871 36.0331 77.8444 41.0994 77.8444 46.8638C77.8443 49.5292 77.2072 52.0505 76.0758 54.2798C71.5108 64.3996 54.1783 84.8815 23.4655 79.0083C21.8797 78.7048 20.9918 77.4165 20.902 76.1245C20.8141 74.8561 21.479 73.487 22.8981 72.8813C31.0698 69.394 35.5884 65.7091 38.5983 61.2329C41.6553 56.6866 43.2606 51.1907 45.3287 43.7251C46.7942 36.1645 53.4462 30.4547 61.4362 30.4546L61.8834 30.4604C62.4398 30.4755 62.9894 30.519 63.5309 30.5884C63.9515 29.7288 64.4424 28.8863 65.0211 28.0659L65.1745 27.8423C65.9623 26.731 67.1108 25.6667 68.4459 24.9438Z" fill="#18181A"/>
4
+ </svg>
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zevairouter-cli",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "ZevaiRouter CLI - Start and manage ZevaiRouter server",
5
5
  "bin": {
6
6
  "zevai": "./cli.js"
@@ -186,6 +186,8 @@ export const REFRESH_LEAD_MS = {
186
186
  codebuddy: 20 * 60 * 1000, // 20 minutes
187
187
  "kimi-coding": 5 * 60 * 1000, // 5 minutes
188
188
  antigravity: 5 * 60 * 1000, // 5 minutes
189
+ "grok-cli": 5 * 60 * 1000, // 5 minutes
190
+ xai: 5 * 60 * 1000, // 5 minutes
189
191
  };
190
192
 
191
193
  // OAuth endpoints
@@ -191,11 +191,16 @@ export const PROVIDER_MODELS = {
191
191
  { id: "kimi-k2.6", name: "Kimi-K2.6", maxInputTokens: 256000, maxOutputTokens: 32000 },
192
192
  { id: "kimi-k2.5", name: "Kimi-K2.5", maxInputTokens: 164000, maxOutputTokens: 32000 },
193
193
  ],
194
- "cb-cn": [ // CodeBuddy CN - verified available on copilot.tencent.com (2026-06-24)
194
+ "cb-cn": [ // CodeBuddy CN - verified available on copilot.tencent.com / www.codebuddy.cn
195
195
  { id: "default-model-lite", name: "Default-Lite", maxInputTokens: 176000, maxOutputTokens: 24000 },
196
+ { id: "default-model", name: "Default", maxInputTokens: 176000, maxOutputTokens: 24000 },
196
197
  { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", maxInputTokens: 128000, maxOutputTokens: 8192, strip: ["image", "audio"] },
197
198
  { id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", maxInputTokens: 128000, maxOutputTokens: 8192, strip: ["image", "audio"] },
198
199
  { id: "glm-5.0", name: "GLM-5.0", maxInputTokens: 200000, maxOutputTokens: 48000, strip: ["image", "audio"] },
200
+ { id: "glm-5.1", name: "GLM-5.1", maxInputTokens: 200000, maxOutputTokens: 48000, strip: ["image", "audio"] },
201
+ { id: "kimi-k2.5", name: "Kimi-K2.5", maxInputTokens: 164000, maxOutputTokens: 32000 },
202
+ { id: "kimi-k2.6", name: "Kimi-K2.6", maxInputTokens: 256000, maxOutputTokens: 32000 },
203
+ { id: "minimax-m2.5", name: "MiniMax-M2.5", maxInputTokens: 200000, maxOutputTokens: 32000, strip: ["image", "audio"] },
199
204
  ],
200
205
  cu: [ // Cursor IDE
201
206
  { id: "default", name: "Auto (Server Picks)" },
@@ -259,6 +264,51 @@ export const PROVIDER_MODELS = {
259
264
  { id: "google/gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite Preview" },
260
265
  { id: "kwaipilot/kat-coder-pro", name: "KAT Coder Pro" },
261
266
  ],
267
+ // Wave 2: ClinePass catalog
268
+ clinepass: [
269
+ { id: "cline-pass/glm-5.2", name: "GLM-5.2 (ClinePass)" },
270
+ { id: "cline-pass/kimi-k2.7-code", name: "Kimi K2.7 Code (ClinePass)" },
271
+ { id: "cline-pass/kimi-k2.6", name: "Kimi K2.6 (ClinePass)" },
272
+ { id: "cline-pass/deepseek-v4-pro", name: "DeepSeek V4 Pro (ClinePass)" },
273
+ { id: "cline-pass/deepseek-v4-flash", name: "DeepSeek V4 Flash (ClinePass)" },
274
+ { id: "cline-pass/mimo-v2.5", name: "MiMo-V2.5 (ClinePass)" },
275
+ { id: "cline-pass/mimo-v2.5-pro", name: "MiMo-V2.5-Pro (ClinePass)" },
276
+ { id: "cline-pass/minimax-m3", name: "MiniMax M3 (ClinePass)" },
277
+ { id: "cline-pass/qwen3.7-max", name: "Qwen3.7 Max (ClinePass)" },
278
+ { id: "cline-pass/qwen3.7-plus", name: "Qwen3.7 Plus (ClinePass)" },
279
+ ],
280
+ // Wave 2: Kimchi static fallback (live catalog via models API)
281
+ kimchi: [
282
+ { id: "minimax-m3", name: "MiniMax-M3" },
283
+ { id: "kimi-k2.7", name: "Kimi-K2.7" },
284
+ { id: "kimi-k2.6", name: "Kimi-K2.6" },
285
+ { id: "kimi-k2.5", name: "Kimi-K2.5" },
286
+ { id: "nemotron-3-ultra-fp4", name: "Nemotron 3 Ultra FP4" },
287
+ { id: "minimax-m2.7", name: "MiniMax-M2.7" },
288
+ { id: "claude-opus-4-6", name: "Claude Opus 4.6" },
289
+ { id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
290
+ ],
291
+ // Wave 2: Grok CLI (alias gcli)
292
+ gcli: [
293
+ { id: "grok-4.5", name: "Grok 4.5" },
294
+ { id: "grok-4.5-high", name: "Grok 4.5 (High)", upstreamModelId: "grok-4.5" },
295
+ { id: "grok-4.5-medium", name: "Grok 4.5 (Medium)", upstreamModelId: "grok-4.5" },
296
+ { id: "grok-4.5-low", name: "Grok 4.5 (Low)", upstreamModelId: "grok-4.5" },
297
+ ],
298
+ // Wave 2: Perplexity Agent
299
+ pa: [
300
+ { id: "perplexity/sonar", name: "Perplexity Sonar" },
301
+ { id: "openai/gpt-5.5", name: "GPT-5.5" },
302
+ { id: "openai/gpt-5.4", name: "GPT-5.4" },
303
+ { id: "openai/gpt-5.4-mini", name: "GPT-5.4 Mini" },
304
+ { id: "anthropic/claude-sonnet-4-6", name: "Claude Sonnet 4.6" },
305
+ { id: "anthropic/claude-opus-4-8", name: "Claude Opus 4.8" },
306
+ { id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" },
307
+ { id: "xai/grok-4.20-reasoning", name: "Grok 4.20 Reasoning" },
308
+ { id: "perplexity/glm-5.2", name: "GLM 5.2" },
309
+ { id: "perplexity/kimi-k2.7-code", name: "Kimi K2.7 Code" },
310
+ { id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B" },
311
+ ],
262
312
 
263
313
  // API Key Providers (alias = id)
264
314
  openai: [
@@ -534,6 +584,29 @@ export const PROVIDER_MODELS = {
534
584
  { id: "accounts/fireworks/models/qwen3-235b-a22b", name: "Qwen3 235B" },
535
585
  { id: "nomic-ai/nomic-embed-text-v1.5", name: "Nomic Embed Text v1.5", type: "embedding" },
536
586
  ],
587
+ // Wave-1 ports from 9router (keys = provider alias used by getModelsByProviderId)
588
+ mmf: [
589
+ { id: "mimo-auto", name: "MiMo Auto" },
590
+ ],
591
+ venice: [
592
+ { id: "venice-uncensored-1-2", name: "Venice Uncensored 1.2" },
593
+ { id: "zai-org-glm-5", name: "GLM-5" },
594
+ { id: "qwen3-235b-a22b-instruct-2507", name: "Qwen3 235B A22B Instruct" },
595
+ { id: "qwen3-coder-480b-a35b-instruct-turbo", name: "Qwen3 Coder 480B A35B Turbo" },
596
+ { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" },
597
+ { id: "llama-3.3-70b", name: "Llama 3.3 70B" },
598
+ { id: "text-embedding-3-large", name: "Text Embedding 3 Large", type: "embedding" },
599
+ { id: "text-embedding-bge-m3", name: "BGE-M3 Embedding", type: "embedding" },
600
+ ],
601
+ fl: [
602
+ { id: "deepseek-ai/DeepSeek-V4-Pro", name: "DeepSeek V4 Pro" },
603
+ { id: "deepseek-ai/DeepSeek-V4-Flash", name: "DeepSeek V4 Flash" },
604
+ { id: "zai-org/GLM-5.2", name: "GLM 5.2" },
605
+ { id: "zai-org/GLM-5.1", name: "GLM 5.1" },
606
+ { id: "moonshotai/Kimi-K2.7-Code", name: "Kimi K2.7 Code" },
607
+ { id: "moonshotai/Kimi-K2.6", name: "Kimi K2.6" },
608
+ { id: "moonshotai/Kimi-K2.5", name: "Kimi K2.5" },
609
+ ],
537
610
  cerebras: [
538
611
  { id: "gpt-oss-120b", name: "GPT OSS 120B" },
539
612
  { id: "zai-glm-4.7", name: "ZAI GLM 4.7" },
@@ -939,6 +1012,13 @@ const OAUTH_ALIASES = {
939
1012
  "codebuddy-cn": "cb-cn",
940
1013
  vertex: "vertex",
941
1014
  "vertex-partner": "vertex-partner",
1015
+ "mimo-free": "mmf",
1016
+ venice: "venice",
1017
+ featherless: "fl",
1018
+ kimchi: "kimchi",
1019
+ "grok-cli": "gcli",
1020
+ clinepass: "clinepass",
1021
+ "perplexity-agent": "pa",
942
1022
  };
943
1023
 
944
1024
  // Derived from PROVIDERS — no need to maintain manually
@@ -416,6 +416,75 @@ export const PROVIDERS = {
416
416
  baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions",
417
417
  format: "openai"
418
418
  },
419
+ // Free Xiaomi MiMo Code (no user key; executor bootstraps JWT)
420
+ "mimo-free": {
421
+ baseUrl: "https://api.xiaomimimo.com/api/free-ai/openai/chat",
422
+ format: "openai",
423
+ noAuth: true,
424
+ },
425
+ venice: {
426
+ baseUrl: "https://api.venice.ai/api/v1/chat/completions",
427
+ format: "openai",
428
+ },
429
+ featherless: {
430
+ baseUrl: "https://api.featherless.ai/v1/chat/completions",
431
+ format: "openai",
432
+ },
433
+ // Wave 2: Kimchi OAuth browser-token gateway
434
+ kimchi: {
435
+ baseUrl: "https://llm.kimchi.dev/openai/v1/chat/completions",
436
+ format: "openai",
437
+ headers: { "User-Agent": "kimchi/0.1.50" },
438
+ },
439
+ // Wave 2: Grok CLI / Grok Build (cli-chat-proxy Responses API)
440
+ "grok-cli": {
441
+ baseUrl: "https://cli-chat-proxy.grok.com/v1/responses",
442
+ format: "openai-responses",
443
+ forceStream: true,
444
+ modelsUrl: "https://cli-chat-proxy.grok.com/v1/models",
445
+ userUrl: "https://cli-chat-proxy.grok.com/v1/user",
446
+ billingUrl: "https://cli-chat-proxy.grok.com/v1/billing",
447
+ clientVersion: "0.2.93",
448
+ clientIdentifier: "grok-pager",
449
+ tokenAuth: "xai-grok-cli",
450
+ headers: {
451
+ "User-Agent": "grok-pager/0.2.93 grok-shell/0.2.93 (linux; x86_64)",
452
+ "x-xai-token-auth": "xai-grok-cli",
453
+ "x-grok-client-identifier": "grok-pager",
454
+ "x-grok-client-version": "0.2.93",
455
+ "x-authenticateresponse": "authenticate-response",
456
+ },
457
+ compactionAt: 400000,
458
+ usage: {
459
+ url: "https://cli-chat-proxy.grok.com/v1/billing?format=credits",
460
+ userUrl: "https://cli-chat-proxy.grok.com/v1/user?include=subscription",
461
+ },
462
+ clientId: "b1a00492-073a-47ea-816f-4c329264a828",
463
+ tokenUrl: "https://auth.x.ai/oauth2/token",
464
+ refreshUrl: "https://auth.x.ai/oauth2/token",
465
+ retry: {
466
+ 429: { attempts: 2, delayMs: 2000 },
467
+ 502: { attempts: 2, delayMs: 1500 },
468
+ 503: { attempts: 2, delayMs: 1500 },
469
+ },
470
+ },
471
+ // Wave 2: ClinePass (same Cline OAuth, ClinePass model catalog)
472
+ clinepass: {
473
+ baseUrl: "https://api.cline.bot/api/v1/chat/completions",
474
+ format: "openai",
475
+ headers: {
476
+ "HTTP-Referer": "https://cline.bot",
477
+ "X-Title": "Cline",
478
+ },
479
+ tokenUrl: "https://api.cline.bot/api/v1/auth/token",
480
+ refreshUrl: "https://api.cline.bot/api/v1/auth/refresh",
481
+ },
482
+ // Wave 2: Perplexity Agent (Responses API multi-model gateway)
483
+ "perplexity-agent": {
484
+ baseUrl: "https://api.perplexity.ai/v1/responses",
485
+ format: "openai-responses",
486
+ validateUrl: "https://api.perplexity.ai/v1/models",
487
+ },
419
488
  // Region map for Xiaomi MiMo Token Plan (keys are cluster-specific)
420
489
  // Used by resolveXiaomiTokenplanBaseUrl below
421
490
  // === Free-tier providers (synced from OmniRoute) ===
@@ -0,0 +1,31 @@
1
+ import { DefaultExecutor } from "./default.js";
2
+
3
+ /**
4
+ * CodeBuddy CN — OpenAI-compatible gateway at codebuddy.cn / copilot.tencent.com.
5
+ *
6
+ * Forces streaming (upstream rejects non-stream chat with 11101) and only
7
+ * attaches reasoning_summary when the client asked for reasoning_effort
8
+ * (forcing reasoning on plain requests trips content filters).
9
+ *
10
+ * Ported from 9router executors/codebuddy-cn.js.
11
+ */
12
+ export class CodeBuddyCnExecutor extends DefaultExecutor {
13
+ constructor() {
14
+ super("codebuddy-cn");
15
+ }
16
+
17
+ transformRequest(model, body, stream, credentials) {
18
+ const transformed = super.transformRequest(model, body, stream, credentials);
19
+ transformed.stream = true;
20
+
21
+ const eff = transformed.reasoning_effort;
22
+ if (eff === "none" || eff === "off") {
23
+ delete transformed.reasoning_effort;
24
+ } else if (eff) {
25
+ transformed.reasoning_summary = "auto";
26
+ }
27
+ return transformed;
28
+ }
29
+ }
30
+
31
+ export default CodeBuddyCnExecutor;
@@ -328,7 +328,7 @@ export class DefaultExecutor extends BaseExecutor {
328
328
  if (credentials.providerSpecificData?.orgId) {
329
329
  headers["X-Kilocode-OrganizationID"] = credentials.providerSpecificData.orgId;
330
330
  }
331
- } else if (this.provider === "cline") {
331
+ } else if (this.provider === "cline" || this.provider === "clinepass") {
332
332
  Object.assign(headers, buildClineHeaders(credentials.apiKey || credentials.accessToken));
333
333
  } else if (this.config?.format === "claude") {
334
334
  // Generic claude-format provider (e.g. agentrouter): x-api-key + anthropic-version
@@ -382,6 +382,7 @@ export class DefaultExecutor extends BaseExecutor {
382
382
  kiro: () => this.refreshKiro(credentials.refreshToken, proxyOptions),
383
383
  codebuddy: () => this.refreshCodeBuddy(credentials.refreshToken, proxyOptions),
384
384
  cline: () => this.refreshCline(credentials.refreshToken, proxyOptions),
385
+ clinepass: () => this.refreshCline(credentials.refreshToken, proxyOptions),
385
386
  "kimi-coding": () => this.refreshKimiCoding(credentials.refreshToken, proxyOptions),
386
387
  kilocode: () => this.refreshKilocode(credentials.refreshToken, proxyOptions)
387
388
  };