@rabbi696/ezrouter 0.6.9 → 0.6.11

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 (1233) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +4 -3
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/routes-manifest.json +6 -0
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +2 -2
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +2 -2
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +2 -2
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +6 -6
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +2 -2
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  93. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  104. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  106. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  107. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  108. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  109. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  111. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  112. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  114. package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
  115. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  171. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  181. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/convoy/rules/route.js +2 -2
  197. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js +2 -2
  243. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -0
  265. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -0
  266. package/app/.next-cli-build/server/app/api/models/enabled/route_client-reference-manifest.js +1 -0
  267. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  280. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
  304. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +14 -14
  340. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +14 -14
  342. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +3 -3
  346. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  350. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  352. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  354. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  356. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  358. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  360. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  362. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  376. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  377. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
  380. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js +1 -1
  382. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  383. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  384. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  386. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  389. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  394. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  395. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  400. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  408. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +2 -2
  416. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  430. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  460. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  496. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  500. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/callback.html +1 -1
  503. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  504. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  505. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  507. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  509. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  512. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  516. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  517. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  519. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  520. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  522. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  526. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  527. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  529. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  530. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  532. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  537. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  539. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  540. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +6 -6
  542. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +4 -4
  549. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +2 -2
  550. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  552. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  557. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  559. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +6 -6
  562. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +6 -6
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +4 -4
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +2 -2
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +6 -6
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  578. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +6 -6
  579. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +4 -4
  581. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +2 -2
  582. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +6 -6
  584. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +6 -6
  589. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  594. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  598. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  600. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  602. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  605. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  608. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  610. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  612. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  613. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  615. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  620. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  622. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  623. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  625. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  629. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  630. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  631. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  632. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  633. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  635. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  636. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  637. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  639. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  640. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  641. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  642. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  643. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  644. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  646. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  647. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  648. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  649. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  650. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  651. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  652. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  653. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  654. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  656. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  659. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  660. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  661. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  662. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  663. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  664. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  665. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  666. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  667. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  670. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  671. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  672. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  673. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  674. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +6 -6
  676. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  677. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  680. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +6 -6
  681. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  682. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +4 -4
  683. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +2 -2
  684. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  685. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  686. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  688. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  689. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  690. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  692. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  693. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  695. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  696. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  698. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  699. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  700. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  701. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  702. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  703. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  704. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  705. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  706. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  707. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  709. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  710. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  711. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  713. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  714. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  715. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  716. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  717. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  718. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  719. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  722. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  723. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  724. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  728. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  729. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  730. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  731. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  733. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  734. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  735. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  737. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  738. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  739. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  740. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  741. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  742. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  743. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  744. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  745. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  746. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  747. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  748. package/app/.next-cli-build/server/app/index.html +1 -1
  749. package/app/.next-cli-build/server/app/index.rsc +4 -4
  750. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  751. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  752. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  753. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  754. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  755. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  756. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  757. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  758. package/app/.next-cli-build/server/app/landing.html +1 -1
  759. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  760. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  761. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  762. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  763. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  764. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  765. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  766. package/app/.next-cli-build/server/app/login/page.js +2 -2
  767. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  768. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  769. package/app/.next-cli-build/server/app/login.html +1 -1
  770. package/app/.next-cli-build/server/app/login.rsc +5 -5
  771. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  772. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  773. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  774. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  775. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  776. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  777. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  778. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  779. package/app/.next-cli-build/server/app/page.js +2 -2
  780. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  781. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  782. package/app/.next-cli-build/server/app-paths-manifest.json +4 -3
  783. package/app/.next-cli-build/server/chunks/1764.js +12 -12
  784. package/app/.next-cli-build/server/chunks/2021.js +1 -1
  785. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  786. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  787. package/app/.next-cli-build/server/chunks/3252.js +1 -1
  788. package/app/.next-cli-build/server/chunks/3267.js +40 -0
  789. package/app/.next-cli-build/server/chunks/3433.js +4 -4
  790. package/app/.next-cli-build/server/chunks/3583.js +1 -1
  791. package/app/.next-cli-build/server/chunks/369.js +2 -2
  792. package/app/.next-cli-build/server/chunks/3886.js +1 -1
  793. package/app/.next-cli-build/server/chunks/3977.js +1 -1
  794. package/app/.next-cli-build/server/chunks/4208.js +18 -18
  795. package/app/.next-cli-build/server/chunks/4485.js +1 -1
  796. package/app/.next-cli-build/server/chunks/4574.js +1 -1
  797. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  798. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  799. package/app/.next-cli-build/server/chunks/5011.js +1 -1
  800. package/app/.next-cli-build/server/chunks/5130.js +1 -1
  801. package/app/.next-cli-build/server/chunks/5875.js +1 -1
  802. package/app/.next-cli-build/server/chunks/5948.js +1 -1
  803. package/app/.next-cli-build/server/chunks/6502.js +3 -3
  804. package/app/.next-cli-build/server/chunks/7239.js +1 -1
  805. package/app/.next-cli-build/server/chunks/7353.js +1 -1
  806. package/app/.next-cli-build/server/chunks/7362.js +1 -1
  807. package/app/.next-cli-build/server/chunks/7774.js +7 -7
  808. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  809. package/app/.next-cli-build/server/chunks/8243.js +3 -3
  810. package/app/.next-cli-build/server/chunks/8251.js +2 -2
  811. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  812. package/app/.next-cli-build/server/chunks/9062.js +1 -1
  813. package/app/.next-cli-build/server/chunks/9718.js +1 -1
  814. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  815. package/app/.next-cli-build/server/middleware.js +3 -3
  816. package/app/.next-cli-build/server/pages/404.html +1 -1
  817. package/app/.next-cli-build/server/pages/500.html +1 -1
  818. package/app/.next-cli-build/static/5WoZ9O2i6m7EB5bVhSiW3/_buildManifest.js +1 -0
  819. package/app/.next-cli-build/static/chunks/{1321-dbf1d5923ed96850.js → 1321-28c50cf30d629b3c.js} +1 -1
  820. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-69c121887e473261.js → page-490c54665b2cfe56.js} +1 -1
  821. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-254fb1375ad58196.js +27 -0
  822. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-ac9b5a7d5710870d.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/_global-error/page-539411a7543bc680.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-539411a7543bc680.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-539411a7543bc680.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-539411a7543bc680.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-539411a7543bc680.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-539411a7543bc680.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-539411a7543bc680.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-539411a7543bc680.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-539411a7543bc680.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-539411a7543bc680.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-539411a7543bc680.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-539411a7543bc680.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/changelog/route-539411a7543bc680.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-539411a7543bc680.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-539411a7543bc680.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-539411a7543bc680.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-539411a7543bc680.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-539411a7543bc680.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-539411a7543bc680.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-539411a7543bc680.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-539411a7543bc680.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-539411a7543bc680.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-539411a7543bc680.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-539411a7543bc680.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-539411a7543bc680.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-539411a7543bc680.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-539411a7543bc680.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-539411a7543bc680.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-539411a7543bc680.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-539411a7543bc680.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-539411a7543bc680.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-539411a7543bc680.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-539411a7543bc680.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-539411a7543bc680.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-539411a7543bc680.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-539411a7543bc680.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-539411a7543bc680.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-539411a7543bc680.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-539411a7543bc680.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-539411a7543bc680.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/combos/route-539411a7543bc680.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-539411a7543bc680.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-539411a7543bc680.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-539411a7543bc680.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-539411a7543bc680.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-539411a7543bc680.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-539411a7543bc680.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-539411a7543bc680.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-539411a7543bc680.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/health/route-539411a7543bc680.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/init/route-539411a7543bc680.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-539411a7543bc680.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-539411a7543bc680.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/keys/route-539411a7543bc680.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/locale/route-539411a7543bc680.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-539411a7543bc680.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-539411a7543bc680.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-539411a7543bc680.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-539411a7543bc680.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-539411a7543bc680.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-539411a7543bc680.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-539411a7543bc680.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-539411a7543bc680.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-539411a7543bc680.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-539411a7543bc680.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-539411a7543bc680.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-539411a7543bc680.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-539411a7543bc680.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-539411a7543bc680.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-539411a7543bc680.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-539411a7543bc680.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-539411a7543bc680.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-539411a7543bc680.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-539411a7543bc680.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-539411a7543bc680.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-539411a7543bc680.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/models/enabled/route-539411a7543bc680.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/models/route-539411a7543bc680.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/models/test/route-539411a7543bc680.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-539411a7543bc680.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-539411a7543bc680.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-539411a7543bc680.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-539411a7543bc680.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-539411a7543bc680.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-539411a7543bc680.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-539411a7543bc680.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-539411a7543bc680.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-539411a7543bc680.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-539411a7543bc680.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-539411a7543bc680.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-539411a7543bc680.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-539411a7543bc680.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-539411a7543bc680.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-539411a7543bc680.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-539411a7543bc680.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-539411a7543bc680.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/pricing/route-539411a7543bc680.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-539411a7543bc680.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-539411a7543bc680.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-539411a7543bc680.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-539411a7543bc680.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-539411a7543bc680.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-539411a7543bc680.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-539411a7543bc680.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-539411a7543bc680.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-539411a7543bc680.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-539411a7543bc680.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/providers/route-539411a7543bc680.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-539411a7543bc680.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-539411a7543bc680.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-539411a7543bc680.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-539411a7543bc680.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-539411a7543bc680.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-539411a7543bc680.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-539411a7543bc680.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-539411a7543bc680.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-539411a7543bc680.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-539411a7543bc680.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-539411a7543bc680.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-539411a7543bc680.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-539411a7543bc680.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-539411a7543bc680.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-539411a7543bc680.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-539411a7543bc680.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-539411a7543bc680.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-539411a7543bc680.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-539411a7543bc680.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-539411a7543bc680.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-539411a7543bc680.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/settings/route-539411a7543bc680.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-539411a7543bc680.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/tags/route-539411a7543bc680.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-539411a7543bc680.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-539411a7543bc680.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-539411a7543bc680.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-539411a7543bc680.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-539411a7543bc680.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-539411a7543bc680.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-539411a7543bc680.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-539411a7543bc680.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-539411a7543bc680.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-539411a7543bc680.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-539411a7543bc680.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-539411a7543bc680.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-539411a7543bc680.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-539411a7543bc680.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-539411a7543bc680.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-539411a7543bc680.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-539411a7543bc680.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-539411a7543bc680.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-539411a7543bc680.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-539411a7543bc680.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-539411a7543bc680.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-539411a7543bc680.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-539411a7543bc680.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-539411a7543bc680.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-539411a7543bc680.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-539411a7543bc680.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-539411a7543bc680.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-539411a7543bc680.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-539411a7543bc680.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-539411a7543bc680.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-539411a7543bc680.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-539411a7543bc680.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-539411a7543bc680.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-539411a7543bc680.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-539411a7543bc680.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-539411a7543bc680.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-539411a7543bc680.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-539411a7543bc680.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-539411a7543bc680.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-539411a7543bc680.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-539411a7543bc680.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-539411a7543bc680.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-539411a7543bc680.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-539411a7543bc680.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-539411a7543bc680.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-539411a7543bc680.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-539411a7543bc680.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-539411a7543bc680.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-539411a7543bc680.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/route-539411a7543bc680.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-539411a7543bc680.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-539411a7543bc680.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-539411a7543bc680.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-539411a7543bc680.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-539411a7543bc680.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-539411a7543bc680.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-539411a7543bc680.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-539411a7543bc680.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/version/route-539411a7543bc680.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-539411a7543bc680.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/version/update/route-539411a7543bc680.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-539411a7543bc680.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/page-539411a7543bc680.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-539411a7543bc680.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-539411a7543bc680.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-539411a7543bc680.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-539411a7543bc680.js +1 -0
  1022. package/app/.next-cli-build/static/css/b15914d61d9425a2.css +1 -0
  1023. package/app/CHANGELOG.md +23 -0
  1024. package/app/package.json +1 -1
  1025. package/app/public/CHANGELOG.md +22 -0
  1026. package/hooks/packageManager.js +4 -1
  1027. package/hooks/trayRuntime.js +31 -1
  1028. package/package.json +1 -1
  1029. package/src/cli/tray/tray.js +9 -2
  1030. package/app/.next-cli-build/server/chunks/6816.js +0 -40
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-470053d319956aa3.js +0 -27
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-358e8cfbab53f6f1.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/_global-error/page-116cfb93931e646f.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-116cfb93931e646f.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-116cfb93931e646f.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-116cfb93931e646f.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-116cfb93931e646f.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-116cfb93931e646f.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-116cfb93931e646f.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-116cfb93931e646f.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-116cfb93931e646f.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-116cfb93931e646f.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-116cfb93931e646f.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-116cfb93931e646f.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/changelog/route-116cfb93931e646f.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-116cfb93931e646f.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-116cfb93931e646f.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-116cfb93931e646f.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-116cfb93931e646f.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-116cfb93931e646f.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-116cfb93931e646f.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-116cfb93931e646f.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-116cfb93931e646f.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-116cfb93931e646f.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-116cfb93931e646f.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-116cfb93931e646f.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-116cfb93931e646f.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-116cfb93931e646f.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-116cfb93931e646f.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-116cfb93931e646f.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-116cfb93931e646f.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-116cfb93931e646f.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-116cfb93931e646f.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-116cfb93931e646f.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-116cfb93931e646f.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-116cfb93931e646f.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-116cfb93931e646f.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-116cfb93931e646f.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-116cfb93931e646f.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-116cfb93931e646f.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/combos/export/route-116cfb93931e646f.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/combos/import/route-116cfb93931e646f.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/combos/route-116cfb93931e646f.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/combos/test/route-116cfb93931e646f.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-116cfb93931e646f.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-116cfb93931e646f.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-116cfb93931e646f.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-116cfb93931e646f.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-116cfb93931e646f.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-116cfb93931e646f.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-116cfb93931e646f.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/route-116cfb93931e646f.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/init/route-116cfb93931e646f.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-116cfb93931e646f.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-116cfb93931e646f.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/route-116cfb93931e646f.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/locale/route-116cfb93931e646f.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-116cfb93931e646f.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-116cfb93931e646f.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-116cfb93931e646f.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-116cfb93931e646f.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-116cfb93931e646f.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-116cfb93931e646f.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-116cfb93931e646f.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-116cfb93931e646f.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-116cfb93931e646f.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-116cfb93931e646f.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-116cfb93931e646f.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-116cfb93931e646f.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-116cfb93931e646f.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-116cfb93931e646f.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-116cfb93931e646f.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-116cfb93931e646f.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-116cfb93931e646f.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-116cfb93931e646f.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-116cfb93931e646f.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-116cfb93931e646f.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-116cfb93931e646f.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/models/route-116cfb93931e646f.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/models/test/route-116cfb93931e646f.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-116cfb93931e646f.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-116cfb93931e646f.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-116cfb93931e646f.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-116cfb93931e646f.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-116cfb93931e646f.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-116cfb93931e646f.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-116cfb93931e646f.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-116cfb93931e646f.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-116cfb93931e646f.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-116cfb93931e646f.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-116cfb93931e646f.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-116cfb93931e646f.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-116cfb93931e646f.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-116cfb93931e646f.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-116cfb93931e646f.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-116cfb93931e646f.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-116cfb93931e646f.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/pricing/route-116cfb93931e646f.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-116cfb93931e646f.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-116cfb93931e646f.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-116cfb93931e646f.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-116cfb93931e646f.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-116cfb93931e646f.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-116cfb93931e646f.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-116cfb93931e646f.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-116cfb93931e646f.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-116cfb93931e646f.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-116cfb93931e646f.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/route-116cfb93931e646f.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-116cfb93931e646f.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-116cfb93931e646f.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-116cfb93931e646f.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-116cfb93931e646f.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-116cfb93931e646f.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-116cfb93931e646f.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-116cfb93931e646f.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-116cfb93931e646f.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-116cfb93931e646f.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-116cfb93931e646f.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-116cfb93931e646f.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-116cfb93931e646f.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-116cfb93931e646f.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-116cfb93931e646f.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-116cfb93931e646f.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-116cfb93931e646f.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-116cfb93931e646f.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/routing-health/route-116cfb93931e646f.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-116cfb93931e646f.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-116cfb93931e646f.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-116cfb93931e646f.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/settings/route-116cfb93931e646f.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-116cfb93931e646f.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/tags/route-116cfb93931e646f.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-116cfb93931e646f.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-116cfb93931e646f.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-116cfb93931e646f.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-116cfb93931e646f.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-116cfb93931e646f.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-116cfb93931e646f.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-116cfb93931e646f.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-116cfb93931e646f.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-116cfb93931e646f.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-116cfb93931e646f.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-116cfb93931e646f.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-116cfb93931e646f.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-116cfb93931e646f.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-116cfb93931e646f.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-116cfb93931e646f.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-116cfb93931e646f.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-116cfb93931e646f.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-116cfb93931e646f.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-116cfb93931e646f.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-116cfb93931e646f.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-116cfb93931e646f.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-116cfb93931e646f.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-116cfb93931e646f.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-116cfb93931e646f.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-116cfb93931e646f.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-116cfb93931e646f.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-116cfb93931e646f.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-116cfb93931e646f.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-116cfb93931e646f.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-116cfb93931e646f.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-116cfb93931e646f.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-116cfb93931e646f.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-116cfb93931e646f.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-116cfb93931e646f.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-116cfb93931e646f.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-116cfb93931e646f.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-116cfb93931e646f.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-116cfb93931e646f.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-116cfb93931e646f.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-116cfb93931e646f.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-116cfb93931e646f.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-116cfb93931e646f.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-116cfb93931e646f.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-116cfb93931e646f.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-116cfb93931e646f.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-116cfb93931e646f.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-116cfb93931e646f.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-116cfb93931e646f.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-116cfb93931e646f.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/v1/route-116cfb93931e646f.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-116cfb93931e646f.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-116cfb93931e646f.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-116cfb93931e646f.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-116cfb93931e646f.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-116cfb93931e646f.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-116cfb93931e646f.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-116cfb93931e646f.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-116cfb93931e646f.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/version/route-116cfb93931e646f.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-116cfb93931e646f.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/version/update/route-116cfb93931e646f.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-116cfb93931e646f.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/page-116cfb93931e646f.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-116cfb93931e646f.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-116cfb93931e646f.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-116cfb93931e646f.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-116cfb93931e646f.js +0 -1
  1231. package/app/.next-cli-build/static/css/0eff34602d3e892b.css +0 -1
  1232. package/app/.next-cli-build/static/oyS1XiDjniuGAbO4WH-Hr/_buildManifest.js +0 -1
  1233. /package/app/.next-cli-build/static/{oyS1XiDjniuGAbO4WH-Hr → 5WoZ9O2i6m7EB5bVhSiW3}/_ssgManifest.js +0 -0
@@ -1,40 +0,0 @@
1
- "use strict";exports.id=6816,exports.ids=[615,6816],exports.modules={644:(a,b,c)=>{function d(a,b=null){if(null==a)return b;if("string"!=typeof a)return a;try{return JSON.parse(a)}catch{return b}}function e(a){return JSON.stringify(a??null)}c.d(b,{q:()=>d,s:()=>e})},1129:(a,b,c)=>{c.r(b),c.d(b,{createProviderNode:()=>k,deleteProviderNode:()=>m,getProviderNodeById:()=>j,getProviderNodes:()=>i,updateProviderNode:()=>l});var d=c(94755),e=c(36366),f=c(644);function g(a){return a?{...(0,f.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function h(a,b){let c=function(a){let{id:b,type:c,name:d,createdAt:e,updatedAt:g,...h}=a;return{id:b,type:c??null,name:d??null,data:(0,f.s)(h),createdAt:e,updatedAt:g}}(b);a.run(`INSERT INTO providerNodes(id, type, name, data, createdAt, updatedAt)
2
- VALUES(?, ?, ?, ?, ?, ?)
3
- ON CONFLICT(id) DO UPDATE SET
4
- type=excluded.type, name=excluded.name, data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.type,c.name,c.data,c.createdAt,c.updatedAt])}async function i(a={}){let b=await (0,e.c)(),c=[],d=[];a.type&&(c.push("type = ?"),d.push(a.type));let f=`SELECT * FROM providerNodes${c.length?` WHERE ${c.join(" AND ")}`:""}`;return b.all(f,d).map(g)}async function j(a){return g((await (0,e.c)()).get("SELECT * FROM providerNodes WHERE id = ?",[a]))}async function k(a){let b=await (0,e.c)(),c=new Date().toISOString(),f={id:a.id||(0,d.A)(),type:a.type,name:a.name,prefix:a.prefix,apiType:a.apiType,baseUrl:a.baseUrl,clientIdentityProfile:a.clientIdentityProfile,clientIdentityHeaders:a.clientIdentityHeaders,createdAt:c,updatedAt:c};return h(b,f),f}async function l(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM providerNodes WHERE id = ?",[a]);if(!e)return;let f={...g(e),...b,updatedAt:new Date().toISOString()};h(c,f),d=f}),d}async function m(a){let b=await (0,e.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM providerNodes WHERE id = ?",[a]);d&&(c=g(d),b.run("DELETE FROM providerNodes WHERE id = ?",[a]))}),c}},5781:(a,b,c)=>{c.r(b),c.d(b,{cleanupProviderConnections:()=>s,createProviderConnection:()=>n,deleteProviderConnection:()=>p,deleteProviderConnectionsByProvider:()=>q,getProviderConnectionById:()=>l,getProviderConnections:()=>k,reorderProviderConnections:()=>r,updateProviderConnection:()=>o});var d=c(94755),e=c(36366),f=c(644);let g=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","errorCode","consecutiveUseCount","idToken","lastRefreshAt"];function h(a,b){if(b?.testStatus!=="active")return b;let c={...b,testStatus:"active",lastError:Object.hasOwn(b,"lastError")?b.lastError:null,lastErrorAt:Object.hasOwn(b,"lastErrorAt")?b.lastErrorAt:null,errorCode:null,rateLimitedUntil:null,backoffLevel:0};for(let b of Object.keys(a||{}))b.startsWith("modelLock_")&&(c[b]=null);return c}function i(a){return a?{...(0,f.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function j(a,b){let c=function(a){let{id:b,provider:c,authType:d,name:e,email:g,priority:h,isActive:i,createdAt:j,updatedAt:k,...l}=a;return{id:b,provider:c,authType:d,name:e??null,email:g??null,priority:h??null,isActive:+(!1!==i),data:(0,f.s)(l),createdAt:j,updatedAt:k}}(b);a.run(`INSERT INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt)
5
- VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
6
- ON CONFLICT(id) DO UPDATE SET
7
- provider=excluded.provider, authType=excluded.authType, name=excluded.name,
8
- email=excluded.email, priority=excluded.priority, isActive=excluded.isActive,
9
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.provider,c.authType,c.name,c.email,c.priority,c.isActive,c.data,c.createdAt,c.updatedAt])}async function k(a={}){let b=await (0,e.c)(),c=[],d=[];a.provider&&(c.push("provider = ?"),d.push(a.provider)),void 0!==a.isActive&&(c.push("isActive = ?"),d.push(+!!a.isActive));let f=`SELECT * FROM providerConnections${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,d).map(i);return g.sort((a,b)=>(a.priority||999)-(b.priority||999)),g}async function l(a){return i((await (0,e.c)()).get("SELECT * FROM providerConnections WHERE id = ?",[a]))}function m(a,b){let c=a.all("SELECT * FROM providerConnections WHERE provider = ?",[b]).map(i);c.sort((a,b)=>{let c=(a.priority||0)-(b.priority||0);return 0!==c?c:new Date(b.updatedAt||0)-new Date(a.updatedAt||0)}),c.forEach((b,c)=>{a.run("UPDATE providerConnections SET priority = ? WHERE id = ?",[c+1,b.id])})}async function n(a){let b,c=await (0,e.c)(),f=new Date().toISOString();return c.transaction(()=>{var e;let k=c.all("SELECT * FROM providerConnections WHERE provider = ?",[a.provider]).map(i),l=null;if("oauth"===a.authType&&a.email){let b=a.providerSpecificData?.username,c=a.providerSpecificData?.chatgptAccountId;l=k.find(d=>{if("oauth"!==d.authType||d.email!==a.email)return!1;if("codex"===a.provider){let a=d.providerSpecificData?.chatgptAccountId;return!!c&&!!a&&c===a}let e=d.providerSpecificData?.chatgptAccountId;if(c&&e)return c===e;if(c&&!e||!c&&e)return!1;let f=d.providerSpecificData?.username;return b&&f?b===f:!b&&!f})}else"apikey"===a.authType&&a.name&&(l=k.find(b=>"apikey"===b.authType&&b.name===a.name));if(l){let d=h(l,a),e="codex"===a.provider&&"oauth"===a.authType&&a.accessToken?function(a,b,c){let d={...a,...b,updatedAt:c,isActive:!0,testStatus:"active"};for(let a of["lastError","lastErrorAt","errorCode","backoffLevel"])delete d[a];for(let a of Object.keys(d))a.startsWith("modelLock_")&&delete d[a];return d}(l,d,f):{...l,...d,updatedAt:f};j(c,e),b=e;return}let n=a.name||null;n||"oauth"!==a.authType&&"access_token"!==a.authType||(e=a.email||`Account ${k.length+1}`,n="github"===a.provider&&(a.providerSpecificData?.githubLogin||a.providerSpecificData?.githubEmail||a.email||a.providerSpecificData?.githubName)||e);let o=a.priority;o||(o=k.reduce((a,b)=>Math.max(a,b.priority||0),0)+1);let p={id:(0,d.A)(),provider:a.provider,authType:a.authType||"oauth",name:n,priority:o,isActive:void 0===a.isActive||a.isActive,createdAt:f,updatedAt:f};for(let b of g)void 0!==a[b]&&null!==a[b]&&(p[b]=a[b]);a.providerSpecificData&&Object.keys(a.providerSpecificData).length>0&&(p.providerSpecificData=a.providerSpecificData),void 0!==a.email&&(p.email=a.email),j(c,p),m(c,a.provider),b=p}),b}async function o(a,b){let c,d=await (0,e.c)();return d.transaction(()=>{let e=d.get("SELECT * FROM providerConnections WHERE id = ?",[a]);if(!e){c=null;return}let f=i(e),g=h(f,b),k={...f,...g,updatedAt:new Date().toISOString()};j(d,k),void 0!==b.priority&&m(d,f.provider),c=k}),c}async function p(a){let b=await (0,e.c)(),c=!1;return b.transaction(()=>{let d=b.get("SELECT provider FROM providerConnections WHERE id = ?",[a]);d&&(b.run("DELETE FROM providerConnections WHERE id = ?",[a]),m(b,d.provider),c=!0)}),c}async function q(a){let b=await (0,e.c)(),c=b.get("SELECT COUNT(*) AS n FROM providerConnections WHERE provider = ?",[a]);return b.run("DELETE FROM providerConnections WHERE provider = ?",[a]),c?.n||0}async function r(a){let b=await (0,e.c)();b.transaction(()=>m(b,a))}async function s(){let a=await (0,e.c)(),b=["displayName","email","globalPriority","defaultModel","accessToken","refreshToken","expiresAt","tokenType","scope","projectId","apiKey","testStatus","lastTested","lastError","lastErrorAt","rateLimitedUntil","expiresIn","consecutiveUseCount"],c=0;return a.transaction(()=>{for(let d of a.all("SELECT * FROM providerConnections")){let e=i(d),f=!1;for(let a of b)(null===e[a]||void 0===e[a])&&a in e&&(delete e[a],c++,f=!0);e.providerSpecificData&&0===Object.keys(e.providerSpecificData).length&&(delete e.providerSpecificData,c++,f=!0),f&&j(a,e)}}),c}},6816:(a,b,c)=>{c.d(b,{S8:()=>R.S8,E5:()=>as,Ld:()=>q.budgetPeriodMs,bI:()=>g.cleanupProviderConnections,Iq:()=>q.createApiKey,jd:()=>w,Ko:()=>M,Q_:()=>G,iE:()=>g.createProviderConnection,i0:()=>h.createProviderNode,ZO:()=>n,Lh:()=>q.deleteApiKey,CG:()=>y,uL:()=>R.uL,RT:()=>N,pO:()=>I,fv:()=>R.fv,fK:()=>g.deleteProviderConnection,op:()=>g.deleteProviderConnectionsByProvider,Pc:()=>h.deleteProviderNode,Yd:()=>p,tm:()=>V,oF:()=>W,zP:()=>aO,rg:()=>an,yg:()=>q.getApiKeyById,y7:()=>q.getApiKeyByValue,PX:()=>q.getApiKeys,j$:()=>ar,L:()=>u,Dj:()=>v,Uv:()=>t,uv:()=>R.uv,vF:()=>U,Lk:()=>aH,lk:()=>F,Q6:()=>L,t$:()=>K,qr:()=>P,aQ:()=>E,dA:()=>D,c:()=>R.getMitmAlias,OM:()=>R.OM,r4:()=>S.r4,Mc:()=>g.getProviderConnectionById,P:()=>g.getProviderConnections,Qu:()=>h.getProviderNodeById,Fh:()=>h.getProviderNodes,hr:()=>m,ui:()=>l,Zx:()=>at,SL:()=>aG,mt:()=>f.getSettings,wV:()=>aM,BY:()=>aq,K1:()=>aP,mV:()=>q.reserveApiKeyTokens,VT:()=>S.VT,yF:()=>S.yF,QB:()=>aN.QB,ox:()=>aF,sZ:()=>ao,__:()=>Q,L9:()=>R.L9,o5:()=>R.o5,_V:()=>af,uw:()=>al,XW:()=>q.updateApiKey,oG:()=>x,$e:()=>H,KJ:()=>S.KJ,rj:()=>g.updateProviderConnection,ho:()=>h.updateProviderNode,xN:()=>o,Xx:()=>f.Xx,ek:()=>q.validateApiKey,CF:()=>O});var d=c(36366),e=c(644),f=c(42655),g=c(5781),h=c(1129),i=c(94755);function j(a){return a?{...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive||!0===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt}:null}function k(a,b){let c=function(a){let{id:b,isActive:c,testStatus:d,createdAt:f,updatedAt:g,...h}=a;return{id:b,isActive:+(!1!==c),testStatus:d??null,data:(0,e.s)(h),createdAt:f,updatedAt:g}}(b);a.run(`INSERT INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt)
10
- VALUES(?, ?, ?, ?, ?, ?)
11
- ON CONFLICT(id) DO UPDATE SET
12
- isActive=excluded.isActive, testStatus=excluded.testStatus,
13
- data=excluded.data, updatedAt=excluded.updatedAt`,[c.id,c.isActive,c.testStatus,c.data,c.createdAt,c.updatedAt])}async function l(a={}){let b=await (0,d.c)(),c=[],e=[];void 0!==a.isActive&&(c.push("isActive = ?"),e.push(+!!a.isActive)),a.testStatus&&(c.push("testStatus = ?"),e.push(a.testStatus));let f=`SELECT * FROM proxyPools${c.length?` WHERE ${c.join(" AND ")}`:""}`,g=b.all(f,e).map(j);return g.sort((a,b)=>new Date(b.updatedAt||0)-new Date(a.updatedAt||0)),g}async function m(a){return j((await (0,d.c)()).get("SELECT * FROM proxyPools WHERE id = ?",[a]))}async function n(a){let b=await (0,d.c)(),c=new Date().toISOString(),e={id:a.id||(0,i.A)(),name:a.name,proxyUrl:a.proxyUrl,noProxy:a.noProxy||"",type:a.type||"http",isActive:void 0===a.isActive||a.isActive,strictProxy:!0===a.strictProxy,testStatus:a.testStatus||"unknown",lastTestedAt:a.lastTestedAt||null,lastError:a.lastError||null,createdAt:c,updatedAt:c};return k(b,e),e}async function o(a,b){let c=await (0,d.c)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM proxyPools WHERE id = ?",[a]);if(!d)return;let f={...j(d),...b,updatedAt:new Date().toISOString()};k(c,f),e=f}),e}async function p(a){let b=await (0,d.c)(),c=null;return b.transaction(()=>{let d=b.get("SELECT * FROM proxyPools WHERE id = ?",[a]);d&&(c=j(d),b.run("DELETE FROM proxyPools WHERE id = ?",[a]))}),c}var q=c(74452);function r(a){if(!a)return null;let b=a.config?(0,e.q)(a.config,null):null;return{id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),config:b||void 0,members:Array.isArray(b?.members)?b.members:(0,e.q)(a.models,[]).map(a=>({id:a,weight:1})),policy:b?.policy||void 0,accountPolicy:b?.accountPolicy||void 0,fusion:b?.fusion||void 0,createdAt:a.createdAt,updatedAt:a.updatedAt}}function s(a){if(!a||"object"!=typeof a)return null;let b={};return Array.isArray(a.members)&&(b.members=a.members),a.policy&&"object"==typeof a.policy&&(b.policy=a.policy),a.accountPolicy&&"object"==typeof a.accountPolicy&&(b.accountPolicy=a.accountPolicy),a.fusion&&"object"==typeof a.fusion&&(b.fusion=a.fusion),a.capacity&&"object"==typeof a.capacity&&(b.capacity=a.capacity),Object.keys(b).length?b:null}async function t(){return(await (0,d.c)()).all("SELECT * FROM combos ORDER BY createdAt ASC").map(r)}async function u(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE id = ?",[a]))}async function v(a){return r((await (0,d.c)()).get("SELECT * FROM combos WHERE name = ?",[a]))}async function w(a){let b=await (0,d.c)(),c=new Date().toISOString(),f=s(a.config),g=null;Array.isArray(a.members)?g=a.members:Array.isArray(f?.members)&&(g=f.members);let h=Array.isArray(g)?g.map(a=>"string"==typeof a?a:a.id).filter(Boolean):a.models||[];Array.isArray(g)&&(f={...f||{},members:g});let j=f||null,k={id:(0,i.A)(),name:a.name,kind:a.kind||null,models:h,config:j,createdAt:c,updatedAt:c};b.run("INSERT INTO combos(id, name, kind, models, config, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?)",[k.id,k.name,k.kind,(0,e.s)(k.models),j?(0,e.s)(j):null,k.createdAt,k.updatedAt]);let l=k.config||null;return{...k,members:l?.members||k.models.map(a=>({id:a,weight:1})),policy:l?.policy||void 0,accountPolicy:l?.accountPolicy||void 0,fusion:l?.fusion||void 0}}async function x(a,b){let c=await (0,d.c)(),f=null;return c.transaction(()=>{let d=c.get("SELECT * FROM combos WHERE id = ?",[a]);if(!d)return;let g=r(d),h=void 0!==b.config||void 0!==b.members||void 0!==b.policy||void 0!==b.accountPolicy||void 0!==b.fusion,i=g.config||null;if(h)if(void 0!==b.config)i=s(b.config);else{let a={...i||{}};void 0!==b.members&&(a.members=b.members),void 0!==b.policy&&(a.policy=b.policy),void 0!==b.accountPolicy&&(a.accountPolicy=b.accountPolicy),void 0!==b.fusion&&(a.fusion=b.fusion),void 0!==b.capacity&&(a.capacity=b.capacity),i=s(a)}let j=Array.isArray(b.models)?b.models:Array.isArray(b.members)?b.members.map(a=>"string"==typeof a?a:a.id).filter(Boolean):g.models;Array.isArray(b.members)&&b.models;let k={...g,...b,models:j,config:i||void 0,updatedAt:new Date().toISOString()};if(k.config&&!Array.isArray(b.members)&&Array.isArray(b.models)){let a=new Map((g.config?.members||[]).map(a=>[a.id,a]));k.config={...k.config,members:k.models.map(b=>a.get(b)||{id:b,weight:1})}}c.run("UPDATE combos SET name = ?, kind = ?, models = ?, config = ?, updatedAt = ? WHERE id = ?",[k.name,k.kind,(0,e.s)(k.models||[]),k.config?(0,e.s)(k.config):null,k.updatedAt,a]),f={...k,members:k.config?.members||k.models.map(a=>({id:a,weight:1}))}}),f}async function y(a){let b=(await (0,d.c)()).run("DELETE FROM combos WHERE id = ?",[a]);return(b?.changes??0)>0}let z=["args","env","headers","oauthTokens"];function A(a){if(!a)return null;let b={...a};for(let c of z)b[c]=(0,e.q)(a[c],null);return b.oauth=1===a.oauth||!0===a.oauth,b.enabled=1===a.enabled||!0===a.enabled,b}function B(a){let b={...a};for(let a of z)a in b&&(b[a]=null!=b[a]?(0,e.s)(b[a]):null);return"oauth"in b&&(b.oauth=+!!b.oauth),"enabled"in b&&(b.enabled=+(!1!==b.enabled)),b}function C(a){let b=a&&"object"==typeof a&&"message"in a?String(a.message):"";return/UNIQUE constraint failed/i.test(b)}async function D(){return(await (0,d.c)()).all("SELECT * FROM mcpInstances ORDER BY createdAt ASC").map(A).filter(a=>null!==a)}async function E(a){return A((await (0,d.c)()).get("SELECT * FROM mcpInstances WHERE id = ?",[a]))}async function F(a){if(!a.length)return[];let b=await (0,d.c)(),c=a.map(()=>"?").join(",");return b.all(`SELECT * FROM mcpInstances WHERE enabled = 1 AND id IN (${c})`,a).map(A).filter(a=>null!==a)}async function G(a){let b=await (0,d.c)(),c=new Date().toISOString(),e={...a,id:a.id??(0,i.A)(),enabled:!1!==a.enabled,oauth:!0===a.oauth,createdAt:c},f=B(e);try{b.run(`INSERT INTO mcpInstances(id, slug, title, kind, transport, url, command, args, env, headers, oauth, oauthTokens, enabled, createdAt)
14
- VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,[f.id,f.slug,f.title??null,f.kind,f.transport,f.url??null,f.command??null,f.args??null,f.env??null,f.headers??null,f.oauth,f.oauthTokens??null,f.enabled,f.createdAt])}catch(a){if(C(a))throw Error(`Slug '${e.slug}' already exists`);throw a}return A(b.get("SELECT * FROM mcpInstances WHERE id = ?",[e.id]))}async function H(a,b){let c=await (0,d.c)(),e=null;return c.transaction(()=>{let d=c.get("SELECT * FROM mcpInstances WHERE id = ?",[a]);if(!d)return;let f=B({...A(d),...b});try{c.run("UPDATE mcpInstances SET slug=?, title=?, kind=?, transport=?, url=?, command=?, args=?, env=?, headers=?, oauth=?, oauthTokens=?, enabled=? WHERE id=?",[f.slug,f.title??null,f.kind,f.transport,f.url??null,f.command??null,f.args??null,f.env??null,f.headers??null,f.oauth,f.oauthTokens??null,f.enabled,a])}catch(a){if(C(a))throw Error(`Slug '${f.slug}' already exists`);throw a}e=A(c.get("SELECT * FROM mcpInstances WHERE id = ?",[a]))}),e}async function I(a){let b=(await (0,d.c)()).run("DELETE FROM mcpInstances WHERE id = ?",[a]);return(b?.changes??0)>0}function J(a){return a?{id:a.id,name:a.name??null,key:a.key,machineId:a.machineId,isActive:1===a.isActive||!0===a.isActive,createdAt:a.createdAt}:null}async function K(){return(await (0,d.c)()).all("SELECT * FROM mcpGatewayKeys ORDER BY createdAt ASC").map(J)}async function L(a){return J((await (0,d.c)()).get("SELECT * FROM mcpGatewayKeys WHERE id = ?",[a]))}async function M(a,b){if(!b)throw Error("machineId is required");let e=await (0,d.c)(),{generateApiKeyWithMachine:f}=await c.e(6844).then(c.bind(c,86844)),{key:g}=f(b),h={id:(0,i.A)(),name:a??null,key:g,machineId:b,isActive:!0,createdAt:new Date().toISOString()};return e.run("INSERT INTO mcpGatewayKeys(id, name, key, machineId, isActive, createdAt) VALUES(?, ?, ?, ?, ?, ?)",[h.id,h.name,h.key,h.machineId,1,h.createdAt]),h}async function N(a){let b=await (0,d.c)();b.run("DELETE FROM mcpKeyGrants WHERE keyId = ?",[a]);let c=b.run("DELETE FROM mcpGatewayKeys WHERE id = ?",[a]);return(c?.changes??0)>0}async function O(a){if(!a||"string"!=typeof a)return null;let b=(await (0,d.c)()).get("SELECT * FROM mcpGatewayKeys WHERE key = ?",[a]);return b&&(1===b.isActive||!0===b.isActive)?J(b):null}async function P(a){return(await (0,d.c)()).all("SELECT instanceId, toolAllowlist FROM mcpKeyGrants WHERE keyId = ?",[a]).map(a=>{let b=null,c=a.toolAllowlist;if(null!=c&&""!==c){let a=(0,e.q)(c,null);Array.isArray(a)&&(b=a.map(String))}return{instanceId:a.instanceId,toolAllowlist:b}})}async function Q(a,b,c){let f=await (0,d.c)();f.transaction(()=>{f.run("DELETE FROM mcpKeyGrants WHERE keyId = ?",[a]),Array.isArray(b)&&b.length>0&&b.forEach((b,d)=>{let g=c?.[d],h=Array.isArray(g)&&g.length>0?(0,e.s)(g.map(String)):null;f.run("INSERT OR IGNORE INTO mcpKeyGrants(keyId, instanceId, toolAllowlist) VALUES(?, ?, ?)",[a,b,h])})})}var R=c(9460),S=c(97914);let T="disabledModels";async function U(){let a=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[T]),b={};for(let c of a)b[c.key]=(0,e.q)(c.value,[]);return b}async function V(a,b){if(!a||!Array.isArray(b))return;let c=await (0,d.c)();c.transaction(()=>{let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[T,a]),f=[...new Set([...d&&(0,e.q)(d.value,[])||[],...b])];c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[T,a,(0,e.s)(f)])})}async function W(a,b){if(!a)return;let c=await (0,d.c)();c.transaction(()=>{if(!Array.isArray(b)||0===b.length)return void c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[T,a]);let d=c.get("SELECT value FROM kv WHERE scope = ? AND key = ?",[T,a]),f=d&&(0,e.q)(d.value,[])||[],g=new Set(b),h=f.filter(a=>!g.has(a));0===h.length?c.run("DELETE FROM kv WHERE scope = ? AND key = ?",[T,a]):c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[T,a,(0,e.s)(h)])})}var X=c(77598),Y=c(94735);function Z(a){return a&&"string"==typeof a?a.length<=8?a.charAt(0)+"***":a.slice(0,8)+"***":null}function $(a,b){return a&&"string"==typeof a?b?.id?b.id:"anon-"+(0,X.createHash)("sha256").update(a).digest("hex").slice(0,12):"local-no-key"}c(62674);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new Y.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._statsEmitTimers||(global._statsEmitTimers={pending:null,update:null});let _=global._pendingRequests,aa=global._lastErrorProvider,ab=global._pendingTimers,ac=global._recentRing,ad=global._connectionMapCache,ae=global._statsEmitTimers,af=global._statsEmitter;function ag(a,b=150){let c="update"===a?"update":"pending";ae[c]||(ae[c]=setTimeout(()=>{ae[c]=null,af.emit(a)},b),ae[c]?.unref?.())}function ah(a,b,c){a[b]||(a[b]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),a[b].requests+=c.requests||1,a[b].promptTokens+=c.promptTokens||0,a[b].completionTokens+=c.completionTokens||0,a[b].cachedTokens+=c.cachedTokens||0,a[b].cost+=c.cost||0,c.meta&&Object.assign(a[b],c.meta)}async function ai(){if(Date.now()-ad.ts<3e4)return ad.map;try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781)),b=await a(),d={};for(let a of b)d[a.id]=a.name||a.email||a.id;ad.map=d,ad.ts=Date.now()}catch{}return ad.map}async function aj(){if(!ac.initialized){ac.initialized=!0;try{ac.items=(await (0,d.c)()).all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, cost, status, tokens, meta FROM usageHistory ORDER BY id DESC LIMIT ?",[50]).reverse().map(a=>({timestamp:a.timestamp,provider:a.provider,model:a.model,connectionId:a.connectionId,apiKey:a.apiKey,endpoint:a.endpoint,cost:a.cost,status:a.status,tokens:(0,e.q)(a.tokens,{}),requestedModel:a.meta&&(0,e.q)(a.meta,{}).requestedModel||null}))}catch{}}}async function ak(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,97914)),f=await e(a,b);if(!f)return 0;let{calculateCostFromTokens:g}=await c.e(4646).then(c.bind(c,84646));return g(d,f)}catch(a){return console.error("Error calculating cost:",a),0}}function al(a,b,c,d,e=!1){let f=b?`${a} (${b})`:a,g=`${c}|${f}`;_.byModel[f]||(_.byModel[f]=0),_.byModel[f]=Math.max(0,_.byModel[f]+(d?1:-1)),0===_.byModel[f]&&delete _.byModel[f],c&&(_.byAccount[c]||(_.byAccount[c]={}),_.byAccount[c][f]||(_.byAccount[c][f]=0),_.byAccount[c][f]=Math.max(0,_.byAccount[c][f]+(d?1:-1)),0===_.byAccount[c][f]&&(delete _.byAccount[c][f],0===Object.keys(_.byAccount[c]).length&&delete _.byAccount[c])),d?(clearTimeout(ab[g]),ab[g]=setTimeout(()=>{delete ab[g],_.byModel[f]>0&&(_.byModel[f]=0),c&&_.byAccount[c]?.[f]>0&&(_.byAccount[c][f]=0),ag("pending")},6e4)):(clearTimeout(ab[g]),delete ab[g]),!d&&e&&b&&(aa.provider=b.toLowerCase(),aa.ts=Date.now()),ag("pending")}function am(a){let b="string"==typeof a.tokens?(0,e.q)(a.tokens,{}):a.tokens||{},c=a.requestedModel||a.meta&&(0,e.q)(a.meta,{}).requestedModel||null;return{timestamp:a.timestamp,model:a.model||"",requestedModel:c||null,provider:a.provider||"",promptTokens:b.prompt_tokens||b.input_tokens||0,completionTokens:b.completion_tokens||b.output_tokens||0,status:a.status||"ok"}}async function an(){let a=[],b=await ai();for(let[c,d]of Object.entries(_.byAccount))for(let[e,f]of Object.entries(d))if(f>0){let d=b[c]||`Account ${c.slice(0,8)}...`,g=e.match(/^(.*) \((.*)\)$/);a.push({model:g?g[1]:e,provider:g?g[2]:"unknown",account:d,count:f})}await aj();let c=new Set;return{activeRequests:a,recentRequests:[...ac.items].sort((a,b)=>new Date(b.timestamp)-new Date(a.timestamp)).map(am).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",d=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!c.has(d)&&(c.add(d),!0)}).slice(0,20),errorProvider:Date.now()-aa.ts<1e4?aa.provider:""}}async function ao(a){try{let b=await (0,d.c)();a.timestamp||(a.timestamp=new Date().toISOString()),a.cost=await ak(a.provider,a.model,a.tokens);let c=a.tokens||{},f=c.prompt_tokens||c.input_tokens||0,g=c.completion_tokens||c.output_tokens||0,h=!1;(b.transaction(()=>{var d;let i,j,k,l,m,n,o,p,q,r,s,t=a.endpoint?b.get(`SELECT id FROM usageHistory
15
- WHERE timestamp = ?
16
- AND COALESCE(provider, '') = COALESCE(?, '')
17
- AND COALESCE(model, '') = COALESCE(?, '')
18
- AND COALESCE(connectionId, '') = COALESCE(?, '')
19
- AND COALESCE(apiKey, '') = COALESCE(?, '')
20
- AND promptTokens = ?
21
- AND completionTokens = ?
22
- AND COALESCE(endpoint, '') = ''
23
- ORDER BY id DESC LIMIT 1`,[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,f,g]):null;if(t)return void b.run("UPDATE usageHistory SET endpoint = ? WHERE id = ?",[a.endpoint,t.id]);b.run("INSERT INTO usageHistory(timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, status, tokens, meta) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a.timestamp,a.provider||null,a.model||null,a.connectionId||null,a.apiKey||null,a.endpoint||null,f,g,a.cost||0,a.status||"ok",(0,e.s)(c),(0,e.s)({requestedModel:a.requestedModel||null})]);let u=(i=(d=a.timestamp)?new Date(d):new Date,`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}-${String(i.getDate()).padStart(2,"0")}`),v=b.get("SELECT data FROM usageDaily WHERE dateKey = ?",[u]),w=v?(0,e.q)(v.data,{}):{requests:0,promptTokens:0,completionTokens:0,cost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{}};j=a.tokens?.prompt_tokens||a.tokens?.input_tokens||0,k=a.tokens?.completion_tokens||a.tokens?.output_tokens||0,l=a.tokens?.cached_tokens||a.tokens?.cache_read_input_tokens||0,m=a.cost||0,n={promptTokens:j,completionTokens:k,cachedTokens:l,cost:m},w.requests=(w.requests||0)+1,w.promptTokens=(w.promptTokens||0)+j,w.completionTokens=(w.completionTokens||0)+k,w.cachedTokens=(w.cachedTokens||0)+l,w.cost=(w.cost||0)+m,w.byProvider||={},w.byModel||={},w.byAccount||={},w.byApiKey||={},w.byEndpoint||={},a.provider&&ah(w.byProvider,a.provider,n),o=a.provider?`${a.model}|${a.provider}`:a.model,ah(w.byModel,o,{...n,meta:{rawModel:a.model,provider:a.provider}}),a.connectionId&&ah(w.byAccount,a.connectionId,{...n,meta:{rawModel:a.model,provider:a.provider}}),p=a.apiKey&&"string"==typeof a.apiKey?a.apiKey:"local-no-key",q=`${p}|${a.model}|${a.provider||"unknown"}`,ah(w.byApiKey,q,{...n,meta:{rawModel:a.model,provider:a.provider,apiKey:a.apiKey||null}}),r=a.endpoint||"Unknown",s=`${r}|${a.model}|${a.provider||"unknown"}`,ah(w.byEndpoint,s,{...n,meta:{endpoint:r,rawModel:a.model,provider:a.provider}}),b.run("INSERT INTO usageDaily(dateKey, data) VALUES(?, ?) ON CONFLICT(dateKey) DO UPDATE SET data = excluded.data",[u,(0,e.s)(w)]);let x=b.get("SELECT value FROM _meta WHERE key = 'totalRequestsLifetime'"),y=(x?parseInt(x.value,10):0)+1;b.run("INSERT INTO _meta(key, value) VALUES('totalRequestsLifetime', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[String(y)]),h=!0}),h)&&(ac.items.push(a),ac.items.length>50&&(ac.items=ac.items.slice(-50)),ag("update",250))}catch(a){console.error("Failed to save usage stats:",a)}}function ap(a,b){if(null==b)return a.all("SELECT dateKey, data FROM usageDaily");let c=new Date,d=new Date(c.getFullYear(),c.getMonth(),c.getDate()-b+1),e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`;return a.all("SELECT dateKey, data FROM usageDaily WHERE dateKey >= ?",[e])}async function aq(a="all"){let b=await (0,d.c)(),[{getProviderConnections:f},{getApiKeys:g},{getProviderNodes:h}]=await Promise.all([Promise.resolve().then(c.bind(c,5781)),Promise.resolve().then(c.bind(c,74452)),Promise.resolve().then(c.bind(c,1129))]),i=[];try{i=await f()}catch{}let j={};for(let a of i)j[a.id]=a.name||a.email||a.id;let k={};try{for(let a of(await h()))a.id&&a.name&&(k[a.id]=a.name)}catch{}let l=[];try{l=await g()}catch{}let m={};for(let a of l)m[a.key]={name:a.name,id:a.id,createdAt:a.createdAt};let n=b.all("SELECT timestamp, provider, model, tokens, status, meta FROM usageHistory ORDER BY id DESC LIMIT 100"),o=new Set,p={totalRequests:0,totalPromptTokens:0,totalCompletionTokens:0,totalCachedTokens:0,totalCost:0,byProvider:{},byModel:{},byAccount:{},byApiKey:{},byEndpoint:{},last10Minutes:[],pending:_,activeRequests:[],recentRequests:n.map(am).filter(a=>{if(0===a.promptTokens&&0===a.completionTokens)return!1;let b=a.timestamp?a.timestamp.slice(0,16):"",c=`${a.model}|${a.provider}|${a.promptTokens}|${a.completionTokens}|${b}`;return!o.has(c)&&(o.add(c),!0)}).slice(0,20),errorProvider:Date.now()-aa.ts<1e4?aa.provider:""};for(let[a,b]of Object.entries(_.byAccount))for(let[c,d]of Object.entries(b))if(d>0){let b=j[a]||`Account ${a.slice(0,8)}...`,e=c.match(/^(.*) \((.*)\)$/);p.activeRequests.push({model:e?e[1]:c,provider:e?e[2]:"unknown",account:b,count:d})}let q=new Date,r=new Date(6e4*Math.floor(q.getTime()/6e4)),s=new Date(r.getTime()-54e4),t={};for(let a=0;a<10;a++){let b=r.getTime()-(9-a)*6e4;t[b]={requests:0,promptTokens:0,completionTokens:0,cost:0},p.last10Minutes.push(t[b])}for(let a of b.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ? AND timestamp <= ?",[s.toISOString(),q.toISOString()])){let b=6e4*Math.floor(new Date(a.timestamp).getTime()/6e4);t[b]&&(t[b].requests++,t[b].promptTokens+=a.promptTokens||0,t[b].completionTokens+=a.completionTokens||0,t[b].cost+=a.cost||0)}if("24h"!==a&&"today"!==a){let c={"7d":7,"30d":30,"60d":60,"90d":90,"180d":180,"365d":365}[a]||null;for(let a of ap(b,c)){let b=a.dateKey,c=(0,e.q)(a.data,{});for(let[a,b]of(p.totalPromptTokens+=c.promptTokens||0,p.totalCompletionTokens+=c.completionTokens||0,p.totalCachedTokens+=c.cachedTokens||0,p.totalCost+=c.cost||0,Object.entries(c.byProvider||{})))p.byProvider[a]||(p.byProvider[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),p.byProvider[a].requests+=b.requests||0,p.byProvider[a].promptTokens+=b.promptTokens||0,p.byProvider[a].completionTokens+=b.completionTokens||0,p.byProvider[a].cachedTokens+=b.cachedTokens||0,p.byProvider[a].cost+=b.cost||0;for(let[a,d]of Object.entries(c.byModel||{})){let c=d.rawModel||a.split("|")[0],e=d.provider||a.split("|")[1]||"",f=e?`${c} (${e})`:c,g=k[e]||e;p.byModel[f]||(p.byModel[f]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:g,lastUsed:b}),p.byModel[f].requests+=d.requests||0,p.byModel[f].promptTokens+=d.promptTokens||0,p.byModel[f].completionTokens+=d.completionTokens||0,p.byModel[f].cachedTokens+=d.cachedTokens||0,p.byModel[f].cost+=d.cost||0,b>(p.byModel[f].lastUsed||"")&&(p.byModel[f].lastUsed=b)}for(let[a,d]of Object.entries(c.byAccount||{})){let c=j[a]||`Account ${a.slice(0,8)}...`,e=d.rawModel||"",f=d.provider||"",g=k[f]||f,h=`${e} (${f} - ${c})`;p.byAccount[h]||(p.byAccount[h]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:e,provider:g,connectionId:a,accountName:c,lastUsed:b}),p.byAccount[h].requests+=d.requests||0,p.byAccount[h].promptTokens+=d.promptTokens||0,p.byAccount[h].completionTokens+=d.completionTokens||0,p.byAccount[h].cachedTokens+=d.cachedTokens||0,p.byAccount[h].cost+=d.cost||0,b>(p.byAccount[h].lastUsed||"")&&(p.byAccount[h].lastUsed=b)}for(let[,a]of Object.entries(c.byApiKey||{})){let c=a.rawModel||"",d=a.provider||"",e=k[d]||d,f=a.apiKey,g=f?m[f]:null,h=g?.name||(f?f.slice(0,8)+"...":"Local (No API Key)"),i=Z(f),j=i||"local-no-key",l=`${$(f,g)}|${c}|${d||"unknown"}`;p.byApiKey[l]||(p.byApiKey[l]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:c,provider:e,apiKeyMasked:i,keyName:h,apiKeyKey:j,lastUsed:b}),p.byApiKey[l].requests+=a.requests||0,p.byApiKey[l].promptTokens+=a.promptTokens||0,p.byApiKey[l].completionTokens+=a.completionTokens||0,p.byApiKey[l].cachedTokens+=a.cachedTokens||0,p.byApiKey[l].cost+=a.cost||0,b>(p.byApiKey[l].lastUsed||"")&&(p.byApiKey[l].lastUsed=b)}for(let[a,d]of Object.entries(c.byEndpoint||{})){let c=d.endpoint||a.split("|")[0]||"Unknown",e=d.rawModel||"",f=d.provider||"",g=k[f]||f;p.byEndpoint[a]||(p.byEndpoint[a]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:c,rawModel:e,provider:g,lastUsed:b}),p.byEndpoint[a].requests+=d.requests||0,p.byEndpoint[a].promptTokens+=d.promptTokens||0,p.byEndpoint[a].completionTokens+=d.completionTokens||0,p.byEndpoint[a].cachedTokens+=d.cachedTokens||0,p.byEndpoint[a].cost+=d.cost||0,b>(p.byEndpoint[a].lastUsed||"")&&(p.byEndpoint[a].lastUsed=b)}}let d=c?Date.now()-864e5*c:0;for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint FROM usageHistory WHERE timestamp >= ?",[new Date(d).toISOString()])){let b=a.timestamp,c=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[c]&&new Date(b)>new Date(p.byModel[c].lastUsed)&&(p.byModel[c].lastUsed=b),a.connectionId){let c=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,d=`${a.model} (${a.provider} - ${c})`;p.byAccount[d]&&new Date(b)>new Date(p.byAccount[d].lastUsed)&&(p.byAccount[d].lastUsed=b)}let d=a.apiKey&&"string"==typeof a.apiKey?`${$(a.apiKey,m[a.apiKey])}|${a.model}|${a.provider||"unknown"}`:"local-no-key";p.byApiKey[d]&&new Date(b)>new Date(p.byApiKey[d].lastUsed)&&(p.byApiKey[d].lastUsed=b);let e=a.endpoint||"Unknown",f=`${e}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[f]&&new Date(b)>new Date(p.byEndpoint[f].lastUsed)&&(p.byEndpoint[f].lastUsed=b)}}else{let c;if("today"===a){let a=new Date;a.setHours(0,0,0,0),c=a.toISOString()}else c=new Date(Date.now()-864e5).toISOString();for(let a of b.all("SELECT timestamp, provider, model, connectionId, apiKey, endpoint, promptTokens, completionTokens, cost, tokens FROM usageHistory WHERE timestamp >= ?",[c])){let b=(0,e.q)(a.tokens,{})||{},c=a.promptTokens||b.prompt_tokens||b.input_tokens||0,d=a.completionTokens||b.completion_tokens||b.output_tokens||0,f=b.cached_tokens||b.cache_read_input_tokens||0,g=a.cost||0,h=k[a.provider]||a.provider;p.totalPromptTokens+=c,p.totalCompletionTokens+=d,p.totalCachedTokens+=f,p.totalCost+=g,p.byProvider[a.provider]||(p.byProvider[a.provider]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0}),p.byProvider[a.provider].requests++,p.byProvider[a.provider].promptTokens+=c,p.byProvider[a.provider].completionTokens+=d,p.byProvider[a.provider].cachedTokens+=f,p.byProvider[a.provider].cost+=g;let i=a.provider?`${a.model} (${a.provider})`:a.model;if(p.byModel[i]||(p.byModel[i]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,lastUsed:a.timestamp}),p.byModel[i].requests++,p.byModel[i].promptTokens+=c,p.byModel[i].completionTokens+=d,p.byModel[i].cachedTokens+=f,p.byModel[i].cost+=g,new Date(a.timestamp)>new Date(p.byModel[i].lastUsed)&&(p.byModel[i].lastUsed=a.timestamp),a.connectionId){let b=j[a.connectionId]||`Account ${a.connectionId.slice(0,8)}...`,e=`${a.model} (${a.provider} - ${b})`;p.byAccount[e]||(p.byAccount[e]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,connectionId:a.connectionId,accountName:b,lastUsed:a.timestamp}),p.byAccount[e].requests++,p.byAccount[e].promptTokens+=c,p.byAccount[e].completionTokens+=d,p.byAccount[e].cachedTokens+=f,p.byAccount[e].cost+=g,new Date(a.timestamp)>new Date(p.byAccount[e].lastUsed)&&(p.byAccount[e].lastUsed=a.timestamp)}if(a.apiKey&&"string"==typeof a.apiKey){let b=m[a.apiKey],e=b?.name||a.apiKey.slice(0,8)+"...",i=Z(a.apiKey),j=`${$(a.apiKey,b)}|${a.model}|${a.provider||"unknown"}`;p.byApiKey[j]||(p.byApiKey[j]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,rawModel:a.model,provider:h,apiKeyMasked:i,keyName:e,apiKeyKey:i,lastUsed:a.timestamp});let k=p.byApiKey[j];k.requests++,k.promptTokens+=c,k.completionTokens+=d,k.cachedTokens+=f,k.cost+=g,new Date(a.timestamp)>new Date(k.lastUsed)&&(k.lastUsed=a.timestamp)}let l=a.endpoint||"Unknown",n=`${l}|${a.model}|${a.provider||"unknown"}`;p.byEndpoint[n]||(p.byEndpoint[n]={requests:0,promptTokens:0,completionTokens:0,cachedTokens:0,cost:0,endpoint:l,rawModel:a.model,provider:h,lastUsed:a.timestamp});let o=p.byEndpoint[n];o.requests++,o.promptTokens+=c,o.completionTokens+=d,o.cachedTokens+=f,o.cost+=g,new Date(a.timestamp)>new Date(o.lastUsed)&&(o.lastUsed=a.timestamp)}}return p.totalRequests=Object.values(p.byProvider).reduce((a,b)=>a+(b.requests||0),0),p}async function ar(a="7d",b){let c=await (0,d.c)(),f=Date.now(),g=!function(a){if(!a||"string"!=typeof a)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:a}),!0}catch{return!1}}(b)?void 0:b;if("today"===a){var h;let a,b,d,e,i=g?(h=new Date(f),b=Date.UTC((a=new Intl.DateTimeFormat("en-US",{timeZone:g,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(h).reduce((a,b)=>(a[b.type]=b.value,a),{})).year,a.month-1,a.day,a.hour,a.minute,a.second)-h.getTime(),(d=new Date(h.getTime()+b)).setUTCHours(0,0,0,0),d.getTime()-b):((e=new Date).setHours(0,0,0,0),e.getTime()),j=i+864e5,k=Array.from({length:24},(a,b)=>({label:new Date(i+36e5*b).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,...g?{timeZone:g}:{}}),tokens:0,cost:0}));for(let a of c.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(i).toISOString()])){let b=new Date(a.timestamp).getTime();if(b<i||b>=j)continue;let c=Math.floor((b-i)/36e5);c>=0&&c<24&&(k[c].tokens+=(a.promptTokens||0)+(a.completionTokens||0),k[c].cost+=a.cost||0)}return k}if("24h"===a){let a=f-864e5,b=Array.from({length:24},(b,c)=>({label:new Date(a+36e5*c).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1,...g?{timeZone:g}:{}}),tokens:0,cost:0}));for(let d of c.all("SELECT timestamp, promptTokens, completionTokens, cost FROM usageHistory WHERE timestamp >= ?",[new Date(a).toISOString()])){let c=new Date(d.timestamp).getTime();if(c<a||c>f)continue;let e=Math.min(Math.floor((c-a)/36e5),23);b[e].tokens+=(d.promptTokens||0)+(d.completionTokens||0),b[e].cost+=d.cost||0}return b}let i=new Date,j=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"});if("all"===a){let a=ap(c,null).sort((a,b)=>a.dateKey.localeCompare(b.dateKey));return 0===a.length?[]:a.map(a=>{let b=(0,e.q)(a.data,{}),[c,d,f]=a.dateKey.split("-").map(Number);return{label:j(new Date(c,d-1,f)),tokens:b?(b.promptTokens||0)+(b.completionTokens||0):0,cost:b&&b.cost||0}})}let k={"7d":7,"30d":30,"60d":60,"90d":90,"180d":180,"365d":365}[a]||7,l=ap(c,k),m={};for(let a of l)m[a.dateKey]=(0,e.q)(a.data,{});return Array.from({length:k},(a,b)=>{let c=new Date(i);c.setDate(c.getDate()-(k-1-b));let d=m[`${c.getFullYear()}-${String(c.getMonth()+1).padStart(2,"0")}-${String(c.getDate()).padStart(2,"0")}`];return{label:j(c),tokens:d?(d.promptTokens||0)+(d.completionTokens||0):0,cost:d&&d.cost||0}})}async function as(){}async function at(a=200){try{let b=(await (0,d.c)()).all("SELECT timestamp, provider, model, connectionId, promptTokens, completionTokens, status, tokens, meta FROM usageHistory ORDER BY id DESC LIMIT ?",[a]);if(!b.length)return[];let f={};try{let{getProviderConnections:a}=await Promise.resolve().then(c.bind(c,5781));for(let b of(await a()))f[b.id]=b.name||b.email||""}catch{}return b.map(a=>{let b=function(a=new Date){let b=a=>String(a).padStart(2,"0");return`${b(a.getDate())}-${b(a.getMonth()+1)}-${a.getFullYear()} ${b(a.getHours())}:${b(a.getMinutes())}:${b(a.getSeconds())}`}(new Date(a.timestamp)),c=a.provider?.toUpperCase()||"-",d=(a.meta?(0,e.q)(a.meta,{}):{}).requestedModel||null,g=d&&d!==a.model?`${d} → ${a.model}`:a.model||"-",h=f[a.connectionId]||(a.connectionId?a.connectionId.slice(0,8):"-"),i=a.tokens?(0,e.q)(a.tokens,{}):{},j=a.promptTokens??i.prompt_tokens??"-",k=a.completionTokens??i.completion_tokens??"-";return`${b} | ${g} | ${c} | ${h} | ${j} | ${k} | ${a.status||"-"}`})}catch(a){return console.error("[usageRepo] getRecentLogs failed:",a.message),[]}}var au=c(16329);let av=null,aw=0;function ax(a,b){let c=a[b];return void 0===c||""===c.trim()?null:"true"===c.trim().toLowerCase()}async function ay(){if(av&&Date.now()-aw<5e3)return av;try{let{getSettings:a}=await Promise.resolve().then(c.bind(c,42655)),b=await a();av={enabled:function(a,b=process.env){let c=ax(b,"OBSERVABILITY_ENABLED");if(null!==c)return c;let d=ax(b,"ENABLE_REQUEST_LOGS");return null!==d?d:a?.enableObservability===!0}(b),maxRecords:b.observabilityMaxRecords||parseInt(process.env.OBSERVABILITY_MAX_RECORDS||String(200),10),batchSize:b.observabilityBatchSize||parseInt(process.env.OBSERVABILITY_BATCH_SIZE||String(20),10),flushIntervalMs:b.observabilityFlushIntervalMs||parseInt(process.env.OBSERVABILITY_FLUSH_INTERVAL_MS||String(5e3),10),maxJsonSize:1024*(b.observabilityMaxJsonSize||parseInt(process.env.OBSERVABILITY_MAX_JSON_SIZE||"5",10))}}catch{av={enabled:!1,maxRecords:200,batchSize:20,flushIntervalMs:5e3,maxJsonSize:5120}}return aw=Date.now(),av}let az=[],aA=null,aB=!1;function aC(a,b){let c=JSON.stringify(a||{});return c.length>b?{_truncated:!0,_originalSize:c.length,_preview:c.substring(0,200)}:a||{}}function aD(a,b){let c=aC(a,b);return c?._truncated&&a&&"object"==typeof a&&void 0!==a.tools?{...c,tools:aC(a.tools,65536)}:c}async function aE(){if(!aB&&0!==az.length){aB=!0;try{for(;az.length>0;){let a=az.splice(0,az.length),b=await (0,d.c)(),c=await ay();b.transaction(()=>{for(let d of a){d.id||(d.id=function(a){let b=new Date().toISOString(),c=Math.random().toString(36).substring(2,8),d=a?a.replace(/[^a-zA-Z0-9-]/g,"-"):"unknown";return`${b}-${c}-${d}`}(d.model)),d.timestamp||(d.timestamp=new Date().toISOString()),d.request?.headers&&(d.request.headers=function(a){if(!a||"object"!=typeof a)return{};let b=["authorization","x-api-key","cookie","token","api-key"],c={...a};for(let a of Object.keys(c))b.some(b=>a.toLowerCase().includes(b))&&delete c[a];return c}(d.request.headers));let a={id:d.id,provider:d.provider||null,model:d.model||null,connectionId:d.connectionId||null,timestamp:d.timestamp,status:d.status||null,latency:d.latency||{},tokens:d.tokens||{},request:aD(d.request,c.maxJsonSize),providerRequest:aD(d.providerRequest,c.maxJsonSize),providerResponse:aC(d.providerResponse,c.maxJsonSize),response:aC(d.response,c.maxJsonSize),pxpipe:d.pxpipe||void 0,convoy:d.convoy||void 0};b.run("INSERT INTO requestDetails(id, timestamp, provider, model, connectionId, status, data) VALUES(?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET timestamp = excluded.timestamp, provider = excluded.provider, model = excluded.model, connectionId = excluded.connectionId, status = excluded.status, data = excluded.data",[a.id,a.timestamp,a.provider,a.model,a.connectionId,a.status,(0,e.s)(a)])}let d=b.get("SELECT COUNT(*) as c FROM requestDetails");d&&d.c>c.maxRecords&&b.run("DELETE FROM requestDetails WHERE id IN (SELECT id FROM requestDetails ORDER BY timestamp ASC LIMIT ?)",[d.c-c.maxRecords])})}}catch(a){console.error("[requestDetailsRepo] Batch write failed:",a)}finally{aB=!1}}}async function aF(a){let b=await ay();b.enabled&&(az.push(a),az.length>=b.batchSize?(aA&&(clearTimeout(aA),aA=null),aE().catch(a=>console.error("[requestDetailsRepo] flush err:",a))):aA||(aA=setTimeout(()=>{aA=null,aE().catch(()=>{})},b.flushIntervalMs)))}async function aG(a={}){let b=await (0,d.c)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.status&&(c.push("status = ?"),f.push(a.status)),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=b.get(`SELECT COUNT(*) as c FROM requestDetails ${g}`,f),i=h?h.c:0,j=a.page||1,k=a.pageSize||50,l=Math.ceil(i/k);return{details:b.all(`SELECT data FROM requestDetails ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,k,(j-1)*k]).map(a=>(0,e.q)(a.data,{})),pagination:{page:j,pageSize:k,totalItems:i,totalPages:l,hasNext:j<l,hasPrev:j>1}}}async function aH(){return(await (0,d.c)()).all("SELECT DISTINCT provider FROM requestDetails WHERE provider IS NOT NULL ORDER BY provider ASC").map(a=>a.provider)}let aI=async()=>{aA&&(clearTimeout(aA),aA=null),az.length>0&&await aE()};(0,au.Bb)(aI);let aJ=new Set(["today","24h","7d","30d","60d","365d"]);function aK(a){return`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`}function aL(){return{requestsObserved:0,rtk:{requestsWithHits:0,hits:0,bytesBefore:0,bytesAfter:0,bytesSaved:0},headroom:{compressed:0,skipped:0,disabled:0,tokensBefore:0,tokensAfter:0,tokensSaved:0,bodyBytesBefore:0,bodyBytesAfter:0,messageBytesBefore:0,messageBytesAfter:0,phantomSavings:0,skipReasons:{}},totals:{actualBytesSaved:0}}}async function aM(a="7d"){if(!aJ.has(a))throw Error(`Invalid period: ${a}`);let b=await (0,d.c)(),c={today:1,"24h":1,"7d":7,"30d":30,"60d":60,"365d":365}[a],f=function(a,b){if(!b)return a.all("SELECT dateKey, data FROM tokenSaverDaily");let c=new Date;c.setDate(c.getDate()-(b-1));let d=aK(c);return a.all("SELECT dateKey, data FROM tokenSaverDaily WHERE dateKey >= ?",[d])}(b,c),g=aL();for(let a of f){let b=(0,e.q)(a.data,aL());if(!function(a,b){a.requestsObserved+=b.requestsObserved,a.rtk.requestsWithHits+=b.rtk.requestsWithHits,a.rtk.hits+=b.rtk.hits,a.rtk.bytesBefore+=b.rtk.bytesBefore,a.rtk.bytesAfter+=b.rtk.bytesAfter,a.rtk.bytesSaved+=b.rtk.bytesSaved;let c=a.headroom;if(c.compressed+=b.headroom.compressed,c.skipped+=b.headroom.skipped,c.disabled+=b.headroom.disabled,c.tokensBefore+=b.headroom.tokensBefore,c.tokensAfter+=b.headroom.tokensAfter,c.tokensSaved+=b.headroom.tokensSaved,c.bodyBytesBefore+=b.headroom.bodyBytesBefore,c.bodyBytesAfter+=b.headroom.bodyBytesAfter,c.messageBytesBefore+=b.headroom.messageBytesBefore,c.messageBytesAfter+=b.headroom.messageBytesAfter,c.phantomSavings+=b.headroom.phantomSavings,b.headroom.skipReasonKey){let a=b.headroom.skipReasonKey;c.skipReasons[a]=(c.skipReasons[a]||0)+1}let d=a.rtk.bytesSaved||0,e=Math.max(0,(a.headroom.bodyBytesBefore||0)-(a.headroom.bodyBytesAfter||0));a.totals.actualBytesSaved=d+e}(g,{state:"compressed",requestsObserved:b.requestsObserved||0,rtk:b.rtk||{},headroom:{...b.headroom,compressed:b.headroom?.compressed||0,skipped:b.headroom?.skipped||0,disabled:b.headroom?.disabled||0,tokensBefore:b.headroom?.tokensBefore||0,tokensAfter:b.headroom?.tokensAfter||0,tokensSaved:b.headroom?.tokensSaved||0,bodyBytesBefore:b.headroom?.bodyBytesBefore||0,bodyBytesAfter:b.headroom?.bodyBytesAfter||0,messageBytesBefore:b.headroom?.messageBytesBefore||0,messageBytesAfter:b.headroom?.messageBytesAfter||0,phantomSavings:b.headroom?.phantomSavings||0,skipReasonKey:null}}),b.headroom?.skipReasons)for(let[a,c]of Object.entries(b.headroom.skipReasons))g.headroom.skipReasons[a]=(g.headroom.skipReasons[a]||0)+(c||0)}let h=Object.fromEntries(f.map(a=>[a.dateKey,(0,e.q)(a.data,aL())])),i=Array.from({length:c},(a,b)=>{let d=new Date;d.setHours(0,0,0,0),d.setDate(d.getDate()-(c-1-b));let e=h[aK(d)]||aL();return{dateKey:aK(d),actualBytesSaved:Math.max(0,(e.rtk?.bytesSaved||0)+((e.headroom?.bodyBytesBefore||0)-(e.headroom?.bodyBytesAfter||0))),rtkBytesSaved:e.rtk?.bytesSaved||0,headroomBytesSaved:Math.max(0,(e.headroom?.bodyBytesBefore||0)-(e.headroom?.bodyBytesAfter||0)),headroomCompressed:e.headroom?.compressed||0}});return{requestsObserved:g.requestsObserved,rtk:g.rtk,headroom:g.headroom,totals:g.totals,dailyPoints:i}}var aN=c(57473);async function aO(){let a=await (0,d.c)(),{exportSettings:b}=await Promise.resolve().then(c.bind(c,42655)),f={settings:await b(),providerConnections:a.all("SELECT * FROM providerConnections").map(a=>({...(0,e.q)(a.data,{}),id:a.id,provider:a.provider,authType:a.authType,name:a.name,email:a.email,priority:a.priority,isActive:1===a.isActive,createdAt:a.createdAt,updatedAt:a.updatedAt})),providerNodes:a.all("SELECT * FROM providerNodes").map(a=>({...(0,e.q)(a.data,{}),id:a.id,type:a.type,name:a.name,createdAt:a.createdAt,updatedAt:a.updatedAt})),proxyPools:a.all("SELECT * FROM proxyPools").map(a=>({...(0,e.q)(a.data,{}),id:a.id,isActive:1===a.isActive,testStatus:a.testStatus,createdAt:a.createdAt,updatedAt:a.updatedAt})),apiKeys:a.all("SELECT * FROM apiKeys").map(a=>({id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive,expiresAt:a.expiresAt||null,tokenLimit:null==a.tokenLimit?null:Number(a.tokenLimit),tokensUsed:Number(a.tokensUsed||0),tokensReserved:Number(a.tokensReserved||0),allowedModels:(0,e.q)(a.allowedModels,null),scope:a.scope?(0,e.q)(a.scope,null):null,createdAt:a.createdAt})),combos:a.all("SELECT * FROM combos").map(a=>({id:a.id,name:a.name,kind:a.kind,models:(0,e.q)(a.models,[]),config:a.config?(0,e.q)(a.config,null):void 0,createdAt:a.createdAt,updatedAt:a.updatedAt})),modelAliases:{},customModels:[],mitmAlias:{},pricing:{}};for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'modelAliases'"))f.modelAliases[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'customModels'"))f.customModels.push((0,e.q)(b.value));for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'mitmAlias'"))f.mitmAlias[b.key]=(0,e.q)(b.value);for(let b of a.all("SELECT key, value FROM kv WHERE scope = 'pricing'"))f.pricing[b.key]=(0,e.q)(b.value);return f}async function aP(a){if(!a||"object"!=typeof a||Array.isArray(a))throw Error("Invalid database payload");let b=await (0,d.c)();return b.transaction(()=>{for(let c of(b.run("DELETE FROM settings"),b.run("DELETE FROM providerConnections"),b.run("DELETE FROM providerNodes"),b.run("DELETE FROM proxyPools"),b.run("DELETE FROM apiKeys"),b.run("DELETE FROM combos"),b.run("DELETE FROM kv WHERE scope IN ('modelAliases', 'customModels', 'mitmAlias', 'pricing')"),a.settings&&b.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(a.settings)]),a.providerConnections||[])){let{id:a,provider:d,authType:f,name:g,email:h,priority:i,isActive:j,createdAt:k,updatedAt:l,...m}=c;b.run("INSERT OR REPLACE INTO providerConnections(id, provider, authType, name, email, priority, isActive, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[a,d,f||"oauth",g||null,h||null,i||null,+(!1!==j),(0,e.s)(m),k||new Date().toISOString(),l||new Date().toISOString()])}for(let c of a.providerNodes||[]){let{id:a,type:d,name:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO providerNodes(id, type, name, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,d||null,f||null,(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.proxyPools||[]){let{id:a,isActive:d,testStatus:f,createdAt:g,updatedAt:h,...i}=c;b.run("INSERT OR REPLACE INTO proxyPools(id, isActive, testStatus, data, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?)",[a,+(!1!==d),f||"unknown",(0,e.s)(i),g||new Date().toISOString(),h||new Date().toISOString()])}for(let c of a.apiKeys||[])b.run("INSERT OR REPLACE INTO apiKeys(id, key, name, machineId, isActive, expiresAt, tokenLimit, tokensUsed, tokensReserved, allowedModels, createdAt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[c.id,c.key,c.name||null,c.machineId||null,+(!1!==c.isActive),c.expiresAt||null,null==c.tokenLimit?null:Number(c.tokenLimit),Number(c.tokensUsed||0),Number(c.tokensReserved||0),(0,e.s)(c.allowedModels||null),c.createdAt||new Date().toISOString()]);for(let c of a.combos||[])b.run("INSERT OR REPLACE INTO combos(id, name, kind, models, config, createdAt, updatedAt) VALUES(?, ?, ?, ?, ?, ?, ?)",[c.id,c.name,c.kind||null,(0,e.s)(c.models||[]),c.config?(0,e.s)(c.config):null,c.createdAt||new Date().toISOString(),c.updatedAt||new Date().toISOString()]);for(let[c,d]of Object.entries(a.modelAliases||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('modelAliases', ?, ?)",[c,(0,e.s)(d)]);for(let c of a.customModels||[]){let a=`${c.providerAlias}|${c.id}|${c.type||"llm"}`;b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[a,(0,e.s)(c)])}for(let[c,d]of Object.entries(a.mitmAlias||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('mitmAlias', ?, ?)",[c,(0,e.s)(d||{})]);for(let[c,d]of Object.entries(a.pricing||{}))b.run("INSERT OR REPLACE INTO kv(scope, key, value) VALUES('pricing', ?, ?)",[c,(0,e.s)(d||{})])}),await aO()}},9460:(a,b,c)=>{c.d(b,{L9:()=>r,OM:()=>j,S8:()=>o,fv:()=>l,getMitmAlias:()=>q,o5:()=>k,uL:()=>p,uv:()=>n});var d=c(36366),e=c(644),f=c(22846);let g=(0,f.U)("modelAliases"),h=(0,f.U)("customModels"),i=(0,f.U)("mitmAlias");async function j(){return await g.getAll()}async function k(a,b){await g.set(a,b)}async function l(a){await g.remove(a)}function m(a,b,c){return`${a}|${b}|${c}`}async function n(){return Object.values(await h.getAll())}async function o({providerAlias:a,id:b,type:c="llm",name:f,caps:g}){let h=m(a,b,c),i=await (0,d.c)(),j=!1;return i.transaction(()=>{let d=i.get("SELECT value FROM kv WHERE scope = 'customModels' AND key = ?",[h]);if(d){let a={...(0,e.q)(d.value)||{},...f?{name:f}:{},...g?{caps:g}:{}};i.run("UPDATE kv SET value = ? WHERE scope = 'customModels' AND key = ?",[(0,e.s)(a),h]);return}let k=(0,e.s)({providerAlias:a,id:b,type:c,name:f||b,...g?{caps:g}:{}});i.run("INSERT INTO kv(scope, key, value) VALUES('customModels', ?, ?)",[h,k]),j=!0}),j}async function p({providerAlias:a,id:b,type:c="llm"}){await h.remove(m(a,b,c))}async function q(a){return a?await i.get(a)||{}:await i.getAll()}async function r(a,b){await i.set(a,b||{})}},16329:(a,b,c)=>{c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},22846:(a,b,c)=>{c.d(b,{U:()=>f});var d=c(36366),e=c(644);function f(a){return{async get(b,c=null){let f=(await (0,d.c)()).get("SELECT value FROM kv WHERE scope = ? AND key = ?",[a,b]);return f?(0,e.q)(f.value,c):c},async getAll(){let b=(await (0,d.c)()).all("SELECT key, value FROM kv WHERE scope = ?",[a]),c={};for(let a of b)c[a.key]=(0,e.q)(a.value);return c},async set(b,c){(await (0,d.c)()).run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,b,(0,e.s)(c)])},async setMany(b){let c=await (0,d.c)();c.transaction(()=>{for(let[d,f]of Object.entries(b))c.run("INSERT INTO kv(scope, key, value) VALUES(?, ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,d,(0,e.s)(f)])})},async remove(b){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ? AND key = ?",[a,b])},async clear(){(await (0,d.c)()).run("DELETE FROM kv WHERE scope = ?",[a])}}}},29686:(a,b,c)=>{c.d(b,{MH:()=>h,Uw:()=>g,s7:()=>i});var d=c(40615);function e(a){return!a||"object"!=typeof a}function f(a){return a&&"string"==typeof a?(0,d.rs)(a):a}function g(a,b,c){if(!function(a,b){if(e(a))return!0;let c=a.providers;if(!Array.isArray(c))return!0;let d=f(b);return c.some(a=>f(a)===d)}(a,b))return!1;if(e(a))return!0;let d=a.models;if(!Array.isArray(d)||0===d.length)return!0;let g=f(b);return d.some(a=>{if("string"!=typeof a||!a.includes("/"))return!1;let b=a.indexOf("/"),d=f(a.slice(0,b)),e=a.slice(b+1);return d===g&&e===c})}function h(a,b){if(e(a))return!0;if("string"!=typeof b||!b.includes("/"))return!1;let c=b.indexOf("/");return g(a,b.slice(0,c),b.slice(c+1))}function i(a){if(null==a||"object"!=typeof a)return null;let b={};return(Array.isArray(a.providers)&&(b.providers=a.providers.filter(a=>"string"==typeof a&&""!==a.trim())),Array.isArray(a.models)&&(b.models=a.models.filter(a=>"string"==typeof a&&a.includes("/"))),"providers"in b||"models"in b)?b:null}},36366:(a,b,c)=>{c.d(b,{c:()=>k});var d=c(95658);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,logged:!1});let e=global._dbAdapter;async function f(a){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(4739).then(c.bind(c,24739));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] bun:sqlite unavailable: ${b.message}`),a&&a.push(`bun:sqlite: ${b.message}`),null}}async function g(a){if(process.versions.bun)return null;let[b]=process.versions.node.split(".").map(Number);if(b>=24)return null;try{let{createBetterSqliteAdapter:a}=await c.e(5258).then(c.bind(c,25258));return a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] better-sqlite3 unavailable: ${b.message}`),a&&a.push(`better-sqlite3: ${b.message}`),null}}async function h(a){if(process.versions.bun)return null;let[b,e]=process.versions.node.split(".").map(Number);if(b<22||22===b&&e<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(8520).then(c.bind(c,88520));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] node:sqlite unavailable: ${b.message}`),a&&a.push(`node:sqlite: ${b.message}`),null}}async function i(a){try{let{createSqlJsAdapter:a}=await c.e(3593).then(c.bind(c,53593));return await a(d.AL)}catch(b){return process.env.DEBUG_DB&&console.warn(`[DB] sql.js unavailable: ${b.message}`),a&&a.push(`sql.js: ${b.message}`),null}}async function j(){(0,d.Jh)();let a=[],b=await f(a);if(b||(b=await g(a)),b||(b=await h(a)),b||(b=await i(a)),!b)throw Error(`[DB] No SQLite driver available (bun/better/node/sql.js all failed):
24
- ${a.join("\n")}`);e.logged||(console.log(`[DB] Driver: ${b.driver} | file: ${d.AL}`),e.logged=!0);let{runMigrationOnce:j}=await c.e(8586).then(c.bind(c,58586));return await j(b),b}async function k(){return e.instance?e.instance:(e.initPromise||(e.initPromise=j().then(a=>(e.instance=a,a))),e.initPromise)}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>u,js:()=>B,DI:()=>n,fg:()=>k,Pd:()=>o,Vj:()=>p,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>D,wb:()=>C,br:()=>l,wG:()=>A,zt:()=>v,gb:()=>r,gC:()=>s,AR:()=>t,mq:()=>q,YI:()=>x,rs:()=>w,p5:()=>z});var d=c(30717);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.fastMode?{fastMode:a.fastMode}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.baseUrlField?{baseUrlField:a.baseUrlField}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.models?{models:a.models}:{},...a.authModes?{authModes:a.authModes}:{},...a.features?{features:{...a.features}}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.apiKeyOptionalWith?{apiKeyOptionalWith:a.apiKeyOptionalWith}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-",p="custom-video-";function q(a){return"string"==typeof a&&a.startsWith(m)}function r(a){return"string"==typeof a&&a.startsWith(n)}function s(a){return"string"==typeof a&&a.startsWith(o)}function t(a){return"string"==typeof a&&a.startsWith(p)}let u={...h,...i,...j,...k,...l};function v(a){for(let b of Object.values(u))if(b.alias===a||b.id===a)return b;return null}function w(a){let b=v(a);return b?.id||a}function x(a){return!!a&&(!!v(a)||q(a)||r(a))}let y={nvidia:40};function z(a,b){let c=(a?.rpmByProvider||{})[b];if(0===c||"0"===c)return 0;let d=Number(c);return Number.isFinite(d)&&d>0?d:y[b]||0}function A(a){let b=u[a];return b?.alias||a}let B=Object.values(u).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(u).reduce((a,b)=>(a[b.id]=b.alias,a),{});let C=d.default.filter(a=>a.features?.usage).map(a=>a.id),D=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},42655:(a,b,c)=>{c.d(b,{Xx:()=>j,exportSettings:()=>k,getSettings:()=>i});var d=c(36366),e=c(644);let f={cloudEnabled:!1,tunnelEnabled:!1,tunnelUrl:"",tunnelProvider:"cloudflare",tailscaleEnabled:!1,tailscaleUrl:"",stickyRoundRobinLimit:3,providerStrategies:{},latencyAwareConfig:{},quotaVisibility:{},retryDelayByProvider:{},rpmByProvider:{},comboStrategy:"fallback",comboStickyRoundRobinLimit:1,comboStrategies:{},exposeComboOnly:!1,requireLogin:!0,tunnelDashboardAccess:!0,authMode:"password",ssoType:"oidc",oidcIssuerUrl:"",oidcClientId:"",oidcClientSecret:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC",samlEntryPoint:"",samlIssuer:"urn:ezrouter:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name",enableObservability:!0,observabilityMaxRecords:1e3,observabilityBatchSize:20,observabilityFlushIntervalMs:5e3,observabilityMaxJsonSize:5,outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",mitmRouterBaseUrl:"http://localhost:20126",dnsToolEnabled:{},rtkEnabled:!0,headroomEnabled:!0,headroomUrl:process.env.HEADROOM_URL||"http://localhost:8787",headroomCompressUserMessages:!1,headroomTimeoutMs:3e3,cavemanEnabled:!0,cavemanLevel:"full",ponytailEnabled:!0,ponytailLevel:"full",customSystemPromptEnabled:!1,customSystemPrompt:"",pxpipeEnabled:!1,pxpipeAutoInstall:!1,pxpipeMinChars:25e3,pxpipeTimeoutMs:15e3,toolDisclosureEnabled:!1,toolDisclosureFilterEnabled:!1,toolDisclosureMaxTools:20,toolHistoryPruning:{enabled:!0,maxToolTurns:15,maxCharsPerResult:3e4,maxTotalChars:15e4,preserveErrors:!0}};async function g(){let a=(await (0,d.c)()).get("SELECT data FROM settings WHERE id = 1");return a?(0,e.q)(a.data,{}):{}}function h(a){let b={...f,...a||{}};for(let[a,c]of Object.entries(f))void 0===b[a]&&("outboundProxyEnabled"===a&&"string"==typeof b.outboundProxyUrl&&b.outboundProxyUrl.trim()?b[a]=!0:b[a]=c);return b}async function i(){return h(await g())}async function j(a){let b,c=await (0,d.c)();return c.transaction(()=>{let d=c.get("SELECT data FROM settings WHERE id = 1");b={...d?(0,e.q)(d.data,{}):{},...a},c.run("INSERT INTO settings(id, data) VALUES(1, ?) ON CONFLICT(id) DO UPDATE SET data = excluded.data",[(0,e.s)(b)])}),h(b)}async function k(){return await g()}},49120:(a,b,c)=>{c.d(b,{n:()=>l});var d=c(73024),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h);let j="ezrouter";function k(){return"win32"===process.platform?g().join(process.env.APPDATA||g().join(i().homedir(),"AppData","Roaming"),j):g().join(i().homedir(),`.${j}`)}let l=function(){let a=process.env.DATA_DIR;if(!a)return k();if("win32"===process.platform&&/^\//.test(a))return console.warn(`[DATA_DIR] '${a}' is a Unix path on Windows → fallback to default`),k();try{return e().mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable → fallback ~/.${j}`),k();throw b}}()},57473:(a,b,c)=>{c.d(b,{Nb:()=>j,QB:()=>h,oH:()=>i});var d=c(36366),e=c(644),f=c(94755);function g(a,b){if(null==a)return null;let c="string"==typeof a?a:JSON.stringify(a);if(Buffer.byteLength(c,"utf8")<=b)return c;let d=c.slice(0,b);return`${d}…`}async function h(a){let b=await (0,d.c)(),c=a.id||(0,f.A)(),h={id:c,timestamp:a.timestamp||new Date().toISOString(),endpoint:a.endpoint||null,provider:a.provider||null,model:a.model||null,connectionId:a.connectionId||null,comboName:a.comboName||null,statusCode:null!=a.statusCode?String(a.statusCode):null,errorMessage:"string"==typeof a.errorMessage?a.errorMessage:a.errorMessage?JSON.stringify(a.errorMessage):null,request:g(a.request,5120),providerRequest:g(a.providerRequest,5120),providerResponse:g(a.providerResponse,5120),meta:(0,e.s)({latency:a.latency||{},tokens:a.tokens||{},retryAfter:a.retryAfter||null,retryAfterHuman:a.retryAfterHuman||null,fallback:!!a.fallback,fallbackReason:a.fallbackReason||null,extra:a.meta||{}})};b.run(`INSERT INTO errorLogs(
25
- id, timestamp, endpoint, provider, model, connectionId, comboName,
26
- statusCode, errorMessage, request, providerRequest, providerResponse, meta
27
- ) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
28
- ON CONFLICT(id) DO UPDATE SET
29
- timestamp = excluded.timestamp,
30
- endpoint = excluded.endpoint,
31
- provider = excluded.provider,
32
- model = excluded.model,
33
- connectionId = excluded.connectionId,
34
- comboName = excluded.comboName,
35
- statusCode = excluded.statusCode,
36
- errorMessage = excluded.errorMessage,
37
- request = excluded.request,
38
- providerRequest = excluded.providerRequest,
39
- providerResponse = excluded.providerResponse,
40
- meta = excluded.meta`,[h.id,h.timestamp,h.endpoint,h.provider,h.model,h.connectionId,h.comboName,h.statusCode,h.errorMessage,h.request,h.providerRequest,h.providerResponse,h.meta]);let i=b.get("SELECT COUNT(*) c FROM errorLogs"),j=i?.c||0;return j>200&&b.run("DELETE FROM errorLogs WHERE id IN (SELECT id FROM errorLogs ORDER BY timestamp ASC LIMIT ?)",[j-200]),c}async function i(a={}){let b=await (0,d.c)(),c=[],f=[];a.provider&&(c.push("provider = ?"),f.push(a.provider)),a.model&&(c.push("model = ?"),f.push(a.model)),a.connectionId&&(c.push("connectionId = ?"),f.push(a.connectionId)),a.comboName&&(c.push("comboName = ?"),f.push(a.comboName)),a.statusCode&&(c.push("statusCode = ?"),f.push(String(a.statusCode))),a.startDate&&(c.push("timestamp >= ?"),f.push(new Date(a.startDate).toISOString())),a.endDate&&(c.push("timestamp <= ?"),f.push(new Date(a.endDate).toISOString()));let g=c.length?`WHERE ${c.join(" AND ")}`:"",h=a.page&&a.page>0?a.page:1,j=a.pageSize&&a.pageSize>0?Math.min(a.pageSize,100):20,k=b.get(`SELECT COUNT(*) c FROM errorLogs ${g}`,f),l=k?.c||0,m=Math.ceil(l/j)||1;return{details:b.all(`SELECT * FROM errorLogs ${g} ORDER BY timestamp DESC LIMIT ? OFFSET ?`,[...f,j,(h-1)*j]).map(a=>({id:a.id,timestamp:a.timestamp,endpoint:a.endpoint,provider:a.provider,model:a.model,connectionId:a.connectionId,comboName:a.comboName,statusCode:a.statusCode,errorMessage:a.errorMessage,request:(0,e.q)(a.request,null),providerRequest:(0,e.q)(a.providerRequest,null),providerResponse:(0,e.q)(a.providerResponse,null),meta:(0,e.q)(a.meta,{})})),pagination:{page:h,pageSize:j,totalItems:l,totalPages:m,hasNext:h<m,hasPrev:h>1}}}async function j(a){let b=(await (0,d.c)()).get("SELECT * FROM errorLogs WHERE id = ?",[a]);return b?{id:b.id,timestamp:b.timestamp,endpoint:b.endpoint,provider:b.provider,model:b.model,connectionId:b.connectionId,comboName:b.comboName,statusCode:b.statusCode,errorMessage:b.errorMessage,request:(0,e.q)(b.request,null),providerRequest:(0,e.q)(b.providerRequest,null),providerResponse:(0,e.q)(b.providerResponse,null),meta:(0,e.q)(b.meta,{})}:null}},62674:(a,b,c)=>{function d(a,b,c=null){let e=a.get("SELECT value FROM _meta WHERE key = ?",[b]);return e?e.value:c}function e(a,b,c){a.run("INSERT INTO _meta(key, value) VALUES(?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value",[b,String(c)])}c.d(b,{dy:()=>d,np:()=>e}),c(36366)},74452:(a,b,c)=>{c.r(b),c.d(b,{addKeySpend:()=>u,budgetPeriodMs:()=>t,createApiKey:()=>o,deleteApiKey:()=>q,getApiKeyById:()=>m,getApiKeyBySecret:()=>s,getApiKeyByValue:()=>n,getApiKeyScopeByKey:()=>x,getApiKeys:()=>l,reserveApiKeyTokens:()=>v,settleApiKeyTokens:()=>w,updateApiKey:()=>p,validateApiKey:()=>r});var d=c(94755),e=c(36366),f=c(29686);function g(a){if(!a)return null;try{let b=JSON.parse(a);return b&&"object"==typeof b?b:null}catch{return null}}function h(a){if(!Array.isArray(a))return null;let b=[...new Set(a.filter(a=>"string"==typeof a&&a.trim()).map(a=>a.trim()))];return b.length?b:null}function i(a){if(null==a||""===a)return null;let b=Number(a);if(!Number.isSafeInteger(b)||b<1)throw Error("tokenLimit must be a positive integer");return b}function j(a){if(null==a||""===a)return null;let b=new Date(a);if(Number.isNaN(b.getTime()))throw Error("expiresAt must be a valid date");return b.toISOString()}function k(a){return a?{id:a.id,key:a.key,name:a.name,machineId:a.machineId,isActive:1===a.isActive||!0===a.isActive,expiresAt:a.expiresAt||null,tokenLimit:null==a.tokenLimit?null:Number(a.tokenLimit),tokensUsed:Number(a.tokensUsed||0),tokensReserved:Number(a.tokensReserved||0),allowedModels:(()=>{try{return a.allowedModels?JSON.parse(a.allowedModels):null}catch{return null}})(),createdAt:a.createdAt,scope:g(a.scope)}:null}async function l(){return(await (0,e.c)()).all("SELECT * FROM apiKeys ORDER BY createdAt ASC").map(k)}async function m(a){return k((await (0,e.c)()).get("SELECT * FROM apiKeys WHERE id = ?",[a]))}async function n(a){return k((await (0,e.c)()).get("SELECT * FROM apiKeys WHERE key = ?",[a]))}async function o(a,b,g={}){if(!b)throw Error("machineId is required");let k=await (0,e.c)(),{generateApiKeyWithMachine:l}=await c.e(6844).then(c.bind(c,86844)),m=l(b),n=g&&"object"==typeof g&&"scope"in g?g.scope:g&&("providers"in g||"models"in g)?g:null,p=(0,f.s7)(n),q={id:(0,d.A)(),name:a,key:m.key,machineId:b,isActive:!0,expiresAt:j(g?.expiresAt),tokenLimit:i(g?.tokenLimit),tokensUsed:0,tokensReserved:0,allowedModels:h(g?.allowedModels),createdAt:new Date().toISOString(),scope:p};return k.run("INSERT INTO apiKeys(id, key, name, machineId, isActive, expiresAt, tokenLimit, tokensUsed, tokensReserved, allowedModels, createdAt, scope) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",[q.id,q.key,q.name,q.machineId,1,q.expiresAt,q.tokenLimit,0,0,q.allowedModels?JSON.stringify(q.allowedModels):null,q.createdAt,p?JSON.stringify(p):null]),q}async function p(a,b){let c=await (0,e.c)(),d=null;return c.transaction(()=>{let e=c.get("SELECT * FROM apiKeys WHERE id = ?",[a]);if(!e)return;let g={...k(e),...b};if(void 0!==b.allowedModels&&(g.allowedModels=h(b.allowedModels)),void 0!==b.expiresAt&&(g.expiresAt=j(b.expiresAt)),void 0!==b.tokenLimit&&(g.tokenLimit=i(b.tokenLimit)),void 0!==b.tokenLimitIncrement){let a=i(b.tokenLimitIncrement);if(null==g.tokenLimit)throw Error("Cannot add tokens to an unlimited key; set a token limit first");g.tokenLimit+=a}"scope"in b&&(g.scope=(0,f.s7)(b.scope)),c.run("UPDATE apiKeys SET key = ?, name = ?, machineId = ?, isActive = ?, expiresAt = ?, tokenLimit = ?, tokensUsed = ?, tokensReserved = ?, allowedModels = ?, scope = ? WHERE id = ?",[g.key,g.name,g.machineId,+!!g.isActive,g.expiresAt||null,null==g.tokenLimit?null:Number(g.tokenLimit),Number(g.tokensUsed||0),Number(g.tokensReserved||0),g.allowedModels?JSON.stringify(g.allowedModels):null,g.scope?JSON.stringify(g.scope):null,a]),d=g}),d}async function q(a){let b=await (0,e.c)();return(b.run("DELETE FROM apiKeys WHERE id = ?",[a])?.changes??0)>0}async function r(a){let b=await n(a);return!!b&&b.isActive&&(!b.expiresAt||new Date(b.expiresAt).getTime()>Date.now())}async function s(a){return n(a)}function t(a){switch(a){case"daily":return 864e5;case"weekly":return 6048e5;case"monthly":return 2592e6;default:return null}}async function u(a,b){b&&!(b<=0)&&await n(a)&&(await (0,e.c)()).run("UPDATE apiKeys SET tokensUsed = tokensUsed + ? WHERE key = ?",[Math.round(1e4*b),a])}async function v(a,b){let c=await n(a);if(c?.tokenLimit==null)return{ok:!0,reserved:0};let d=Math.max(0,Math.floor(Number(b)||0)),f=await (0,e.c)(),g=!1;return f.transaction(()=>{let b=f.get("SELECT tokenLimit, tokensUsed, tokensReserved FROM apiKeys WHERE key = ? AND isActive = 1",[a]);!b||null==b.tokenLimit||Number(b.tokensUsed||0)+Number(b.tokensReserved||0)+d>Number(b.tokenLimit)||(f.run("UPDATE apiKeys SET tokensReserved = tokensReserved + ? WHERE key = ?",[d,a]),g=!0)}),g?{ok:!0,reserved:d}:{ok:!1,error:"API key token quota exceeded"}}async function w(a,b,c){if(!b)return;let d=Math.min(b,Math.max(0,Math.floor(Number(c)||0))),f=await (0,e.c)();f.transaction(()=>{f.run("UPDATE apiKeys SET tokensReserved = MAX(0, tokensReserved - ?), tokensUsed = tokensUsed + ? WHERE key = ?",[b,d,a])})}async function x(a){let b=(await (0,e.c)()).get("SELECT scope, isActive FROM apiKeys WHERE key = ?",[a]);return b&&(1===b.isActive||!0===b.isActive)?g(b.scope):null}},95658:(a,b,c)=>{c.d(b,{AL:()=>j,HG:()=>i,Jh:()=>m,KQ:()=>k,Or:()=>l});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(49120);let i=e().join(h.n,"db"),j=e().join(i,"data.sqlite"),k=e().join(i,"backups"),l={main:e().join(h.n,"db.json"),usage:e().join(h.n,"usage.json"),disabled:e().join(h.n,"disabledModels.json"),details:e().join(h.n,"request-details.json")};function m(){for(let a of[h.n,i,k])g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},97914:(a,b,c)=>{c.d(b,{KJ:()=>l,VT:()=>n,getPricingForModel:()=>k,r4:()=>j,yF:()=>m});var d=c(36366),e=c(644);let f=(0,c(22846).U)("pricing"),g={value:null,expiresAt:0};function h(){g={value:null,expiresAt:0}}async function i(){return await f.getAll()}async function j(){let a=Date.now();if(g.value&&g.expiresAt>a)return g.value;let b=await i(),{PROVIDER_PRICING:d}=await c.e(4646).then(c.bind(c,84646)),e={};for(let[a,c]of Object.entries(d))if(e[a]={...c},b[a])for(let[c,d]of Object.entries(b[a]))e[a][c]=e[a][c]?{...e[a][c],...d}:d;for(let[a,c]of Object.entries(b))if(e[a])for(let[b,d]of Object.entries(c))e[a][b]||(e[a][b]=d);else e[a]={...c};return g={value:e,expiresAt:a+5e3},e}async function k(a,b){if(!b)return null;let d=await i();if(a&&d[a]?.[b])return d[a][b];let{getPricingForModel:e}=await c.e(4646).then(c.bind(c,84646));return e(a,b)}async function l(a){let b=await (0,d.c)();return b.transaction(()=>{for(let[c,d]of Object.entries(a)){let a=b.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[c]),f={...a&&(0,e.q)(a.value,{})||{}};for(let[a,b]of Object.entries(d))f[a]=b;b.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[c,(0,e.s)(f)])}}),h(),await i()}async function m(a,b){if(!a)return await i();let c=await (0,d.c)();return c.transaction(()=>{if(!b)return void c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]);let d=c.get("SELECT value FROM kv WHERE scope = 'pricing' AND key = ?",[a]),f=d&&(0,e.q)(d.value,{})||{};delete f[b],0===Object.keys(f).length?c.run("DELETE FROM kv WHERE scope = 'pricing' AND key = ?",[a]):c.run("INSERT INTO kv(scope, key, value) VALUES('pricing', ?, ?) ON CONFLICT(scope, key) DO UPDATE SET value = excluded.value",[a,(0,e.s)(f)])}),h(),await i()}async function n(){return await f.clear(),h(),{}}}};
@@ -1,27 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{64827:(e,t,a)=>{"use strict";function i(e){if(!e)return null;let t=null,a=Date.now();for(let[i,s]of Object.entries(e)){if(!i.startsWith("modelLock_")||!s)continue;let e=new Date(s).getTime();e<=a||(!t||e<t)&&(t=e)}return t?new Date(t).toISOString():null}a.d(t,{kJ:()=>i}),a(10904)},70217:(e,t,a)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>i})},79355:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>er});var i=a(95155),s=a(12115),l=a(73321),r=a(98500),n=a.n(r),o=a(5772),d=a(8247),c=a(35497),m=a(88105),p=a(28777),u=a(57151),x=a(47224),h=a(40228);let f=["none","low","medium","high"],g=["none","thinking"],y=["none","low","medium","high","max"],b=["none","low","medium","high","xhigh","max"],v=["none","low","medium","high","xhigh","max"],j={qoder:v,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":y,"claude-budget":v,"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:y,opencode:y,deepseek:["none","high","max"],minimax:g,hunyuan:f,step:f,nous:f,meta:["minimal","low","medium","high","xhigh"],ollama:y},w=["none","minimal","low","medium","high","xhigh","max"],k=[{provider:"codex",pattern:"*gpt-6*",levels:w},{provider:"claude",pattern:"claude-opus-5*",levels:b},{provider:"claude",pattern:"claude-opus-4-7*",levels:b},{provider:"claude",pattern:"claude-opus-4-8*",levels:b},{provider:"claude",pattern:"claude-sonnet-5*",levels:b},{provider:"claude",pattern:"claude-fable-5*",levels:b},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...w,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...w,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:w},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"qoder",pattern:"*",levels:v},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function N(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let a=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!a)return null;let[,i,s]=a,l=Number(i),r=void 0===s?null:Number(s);return l<4||4===l&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let a=(0,u.nl)(e,t);if(!a.reasoning)return null;let i=k.find(a=>(!a.providers||!e||a.providers.includes(e))&&(!a.provider||a.provider===e)&&(0,x.gH)(a.pattern,t)),s=(e?h.xq[e]?.thinkingFormat:null)||a.thinkingFormat,l=a.thinkingLevels||i?.levels||j[s]||f;return!1===a.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var C=a(11059),S=a(929),A=a(73006);let T=new Map;async function $(e){if(e?.type==="static")return e.models||[];if(!e?.url||!e?.type)return[];let t=T.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),a=await fetch(`/api/providers/suggested-models?${t}`);if(!a.ok)return[];let i=(await a.json()).data??[];return T.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function O({customModels:e=[],modelAliases:t={},providerAlias:a,builtInModels:i=[],type:s="llm",includeLegacyAliases:l=!0}){let r=new Set(i.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==a)continue;let e=t?.kind||t?.type||"llm";if(s&&e!==s||r.has(t.id))continue;let i=`${a}/${t.id}`;n.has(i)||(n.add(i),o.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e}))}if(!l)return o;let d=`${a}/`;for(let[e,a]of Object.entries(t||{})){if("string"!=typeof a||!a.startsWith(d))continue;let t=a.slice(d.length);!t||r.has(t)||n.has(a)||(n.add(a),o.push({id:t,alias:e,fullModel:a,source:"legacyAlias",type:s||"llm"}))}return o}var P=a(14051),I=a.n(P);function E({model:e,fullModel:t,alias:a,copied:s,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":"slow"===r||"rate_limited"===r?"#f59e0b":void 0;return(0,i.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":"slow"===r||"rate_limited"===r?"border-amber-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"slow"===r||"rate_limited"===r?"warning":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.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:f}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,i.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:p?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,i.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function R({modelId:e,fullModel:t,copied:a,onCopy:s,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,i.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,i.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,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>s(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e}`?"check":"content_copy"})}),(0,i.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:a===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,i.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,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function D({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u,onTestModel:x,externalTestResults:h,externalTestingModelIds:f,disabledModelIds:g=[]}){let y,b,[v,j]=(0,s.useState)(""),[w,k]=(0,s.useState)(!1),[N,C]=(0,s.useState)(!1),[S,A]=(0,s.useState)([]),[T,$]=(0,s.useState)(()=>new Set),[P,I]=(0,s.useState)({});(0,s.useEffect)(()=>{let e=p.find(e=>!1!==e.isActive);if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e.id}/models`);if(!a.ok)return;let i=await a.json();if(t)return;let s=(i.models||[]).map(e=>e.id||e.name||e.model).filter(e=>"string"==typeof e&&""!==e.trim());A([...new Set(s)])}catch{}})(),()=>{t=!0}},[p]);let E=async t=>{if(x)return void await x(t);if(!T.has(t)){$(e=>new Set(e).add(t));try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await a.json();I(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{I(e=>({...e,[t]:"error"}))}finally{$(e=>{let a=new Set(e);return a.delete(t),a})}}},_=O({customModels:l,modelAliases:a,providerAlias:e,type:"llm"}),z=_.filter(e=>!g.includes(e.id)),M=async()=>{if(!v.trim()||w)return;let e=v.trim();if(_.some(t=>t.id===e))return void alert("Model already exists for this provider.");k(!0);try{await d(e),j("")}catch(e){console.log("Error adding model:",e)}finally{k(!1)}},U=async()=>{if(N)return;let e=p.find(e=>!1!==e.isActive);if(e){C(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||"Failed to fetch models");let i=(a.models||[]).map(e=>e.id||e.name||e.model).filter(e=>"string"==typeof e&&""!==e.trim());A([...new Set(i)])}catch(e){console.log("Error fetching models:",e)}finally{C(!1)}}},q=async e=>{_.some(t=>t.id===e)||(await d(e),A(t=>t.filter(t=>t!==e)))},K=p.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or discover them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:v,onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&M(),placeholder:u?"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,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:M,disabled:!v.trim()||w,children:w?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"search",onClick:U,disabled:!K||N,children:N?"Fetching...":"Fetch /models"})]}),!K&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to discover models from /models."}),z.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:z.map(({id:a,alias:s,source:l})=>(0,i.jsx)(R,{modelId:a,fullModel:`${t}/${a}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(a):o(s),onTest:p.length>0?()=>E(a):void 0,testStatus:h?.[a]||P[a],isTesting:f?.has(a)||T.has(a)},`${l}-${e}/${a}`))}),S.length>0&&(y=new Set(_.map(e=>e.id)),0===(b=S.filter(e=>!y.has(e))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Suggested models from /models (",b.length,"):"]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:b.map(e=>(0,i.jsxs)("button",{onClick:()=>q(e),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,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e]},e))})]}))]})}E.propTypes={model:I().shape({id:I().string.isRequired}).isRequired,fullModel:I().string.isRequired,alias:I().string,copied:I().string,onCopy:I().func.isRequired,testStatus:I().oneOf(["ok","error","slow","rate_limited","not_tested"]),isCustom:I().bool,isFree:I().bool,onDeleteAlias:I().func,onTest:I().func,isTesting:I().bool,onDisable:I().func,caps:I().object,thinkingSuffix:I().string},I().string.isRequired,I().string.isRequired,I().string,I().func.isRequired,I().func.isRequired,I().func,I().oneOf(["ok","error"]),I().bool,I().string.isRequired,I().object.isRequired,I().arrayOf(I().object),I().string,I().func.isRequired,I().func.isRequired,I().func.isRequired,I().func.isRequired,D.propTypes={providerStorageAlias:I().string.isRequired,providerDisplayAlias:I().string.isRequired,modelAliases:I().object.isRequired,customModels:I().arrayOf(I().object),copied:I().string,onCopy:I().func.isRequired,onDeleteAlias:I().func.isRequired,onAddCustomModel:I().func.isRequired,onDeleteCustomModel:I().func.isRequired,connections:I().arrayOf(I().shape({id:I().string,isActive:I().bool})).isRequired,isAnthropic:I().bool,onTestModel:I().func,externalTestResults:I().object,externalTestingModelIds:I().instanceOf(Set),disabledModelIds:I().arrayOf(I().string)};var _=a(70217);function z({until:e}){let[t,a]=(0,s.useState)("");return((0,s.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let i=Math.floor(t/1e3);if(i<60)a(`${i}s`);else if(i<3600)a(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);a(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}z.propTypes={until:I().string.isRequired};var M=a(64827);let U=["invalid_grant","refresh_token_expired","reauth_required","unrecoverable_refresh_error","refresh_token_reused","refresh_token_invalidated"];function q(e){if(!e||"string"!=typeof e)return!1;let t=e.toLowerCase();return U.some(e=>t.includes(e))}function K({connection:e,plan:t=null,proxyPools:a,isOAuth:l,isFirst:r,isLast:n,onMoveUp:o,onMoveDown:d,onToggleActive:m,onUpdateProxy:p,onEdit:u,onDelete:x,onReconnect:h=null,oneByOneStatus:f=null,autoPing:g=null}){let[y,b]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),w=(0,s.useRef)(null),k=new Map((a||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,C=N?k.get(N):null,S=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!N||S,T=C?`Pool: ${C.name}`:N?`Pool: ${N} (inactive/missing)`:S?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$=g?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny request to an available model. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",O="";if(C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);O=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{O=t}}let P=C?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";C?.isActive===!0?I="success":(N||S)&&(I="error"),(0,s.useEffect)(()=>{if(!y)return;let e=e=>{w.current&&!w.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y]);let E=async e=>{j(!0);try{await p("__none__"===e?null:e)}finally{j(!1),b(!1)}},R=e.authType||(l?"oauth":"apikey"),D="oauth"===R,U="cookie"===R,F=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(D?"OAuth Account":U?"Cookie Account":"API Key"),J=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,L=t?.trim(),H=e.providerSpecificData?.chatgptPlanType?.trim(),B="codex"===e.provider?L&&"unknown"!==L.toLowerCase()?L:H:null,[W,G]=(0,s.useState)(!1),Q=(0,M.kJ)(e);(0,s.useEffect)(()=>{let t=()=>{G(!!(0,M.kJ)(e))};t();let a=Q?setInterval(t,1e3):null;return()=>{a&&clearInterval(a)}},[Q]);let V="unavailable"!==e.testStatus||W?e.testStatus:"active",Z=(D||U)&&"unavailable"===e.testStatus&&function(e,t){if(401===e||403===e)return!0;if(!t||"string"!=typeof t)return!1;let a=t.toLowerCase();return a.includes("unauthorized")||a.includes("token")||a.includes("invalid api key")||a.includes("revoked")||a.includes("auth")||q(t)}(e.errorCode,e.lastError),X=q(e.lastError)?"Auth expired — reconnect required":e.lastError,Y=()=>f?"queued"===f.state?"queued":"testing"===f.state?"testing":"success"===f.state?"success":"failed"===f.state?f.error?`failed: ${f.error}`:"failed":null:null;return(0,i.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,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:d,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:U?"cookie":D?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:F}),J&&(0,i.jsx)("p",{className:"text-xs text-text-muted truncate",children:J}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,_.g)(e.isActive,V),size:"sm",dot:!0,children:!1===e.isActive?"disabled":V||"Unknown"}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:D?"OAuth":U?"Cookie":"API Key"}),B&&"unknown"!==B.toLowerCase()&&(0,i.jsx)(c.Ex,{variant:"primary",size:"sm",children:B}),A&&(0,i.jsx)(c.Ex,{variant:I,size:"sm",children:"Proxy"}),W&&!1!==e.isActive&&(0,i.jsx)(z,{until:Q}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:X}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Y()&&(0,i.jsx)(c.Ex,{variant:f?"success"===f.state?"success":"failed"===f.state?"error":"testing"===f.state?"primary":"default":"default",size:"sm",children:Y()})]}),A&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),O&&(0,i.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:O}),P&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(a||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:w,children:[(0,i.jsxs)("button",{onClick:()=>b(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 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:v,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:v?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),y&&(0,i.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,i.jsx)("button",{onClick:()=>E("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(a||[]).map(e=>(0,i.jsx)("button",{onClick:()=>E(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),fastMode&&(0,i.jsx)(c.m_,{text:"Uses the provider's faster processing mode for this account at a higher token cost. Off by default.",children:(0,i.jsxs)("button",{type:"button",role:"switch","aria-label":"Fast mode","aria-checked":fastMode.on,disabled:updatingFastMode,onClick:handleToggleFastMode,className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 disabled:opacity-50 ${fastMode.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:updatingFastMode?"progress_activity":fastMode.on?"toggle_on":"toggle_off"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Fast mode"})]})}),g&&(0,i.jsx)(c.m_,{text:$,children:(0,i.jsxs)("button",{onClick:()=>g.onToggle(!g.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${g.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),Z&&h&&(0,i.jsxs)("button",{onClick:()=>h(e),className:"flex flex-col items-center rounded px-2 py-1 text-amber-600 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:bg-amber-500/20 transition-colors",title:"Reconnect account",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"lock_reset"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight font-semibold",children:"Reconnect"})]}),(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:m,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}K.propTypes={connection:I().shape({id:I().string,name:I().string,email:I().string,displayName:I().string,modelLockUntil:I().string,testStatus:I().string,isActive:I().bool,lastError:I().string,priority:I().number,globalPriority:I().number}).isRequired,plan:I().string,proxyPools:I().arrayOf(I().shape({id:I().string,name:I().string,proxyUrl:I().string,noProxy:I().string,isActive:I().bool})),isOAuth:I().bool.isRequired,isFirst:I().bool.isRequired,isLast:I().bool.isRequired,onMoveUp:I().func.isRequired,onMoveDown:I().func.isRequired,onToggleActive:I().func.isRequired,onUpdateProxy:I().func,onEdit:I().func.isRequired,onDelete:I().func.isRequired,onReconnect:I().func,oneByOneStatus:I().shape({state:I().string,error:I().string}),autoPing:I().shape({on:I().bool,onToggle:I().func,provider:I().string})};let F=`name1|sk-key1
2
- name2|sk-key2
3
- sk-key-only-auto-named`,J="__none__",L=()=>({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:J,baseUrl:"",ollamaHostUrl:""}),H=()=>({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""});function B({isOpen:e,provider:t,providerName:a,isCompatible:l,isAnthropic:r,providerNode:n,authType:o,authHint:d,website:p,proxyPools:u,error:x,existingNames:h,onSave:f,onBulkDone:g,onClose:y}){let b="ollama-local"===t,v="cookie"===o,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",k=m.Q2?.[t]?.baseUrlField||null,N="azure"===t,C="cloudflare-ai"===t,S="vertex"===t||"vertex-partner"===t,A="bedrock"===t,T=m.Q2?.[t]?.apiKeyOptionalWith||null,$=m.Q2?.[t]?.regions||null,O=m.Q2?.[t]?.defaultRegion||$?.[0]?.id||"",[P,I]=(0,s.useState)(L),[E,R]=(0,s.useState)(H),[D,_]=(0,s.useState)({accountId:""}),[z,M]=(0,s.useState)({location:"global",reasoningEffort:"high"}),[U,q]=(0,s.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[K,W]=(0,s.useState)(O),[G,Q]=(0,s.useState)(!1),[V,Z]=(0,s.useState)(null),[X,Y]=(0,s.useState)(!1),ee=C?`name1|sk-key1|acc123456
4
- name2|sk-key2|def789012
5
- sk-key-only-auto-named`:"qoder"===t?`name1|pt-xxxxx
6
- name2|pt-yyyyy
7
- pt-only-auto-named`:F,[et,ea]=(0,s.useState)("single"),[ei,es]=(0,s.useState)(""),[el,er]=(0,s.useState)(null),en=()=>{I(L()),R(H()),_({accountId:""}),M({location:"global",reasoningEffort:"high"}),W(O),Z(null),ea("single"),es(""),er(null),y()},eo=()=>{if(l&&n)return{prefix:n.prefix,...n.apiType?{apiType:n.apiType}:{},baseUrl:n.baseUrl,nodeName:n.name,clientIdentityProfile:n.clientIdentityProfile||"default",clientIdentityHeaders:n.clientIdentityHeaders||{}};if(S)return{location:z.location||"global",reasoningEffort:z.reasoningEffort||"high"};if(A){let e={};return U.profile.trim()&&(e.profile=U.profile.trim()),U.region.trim()&&(e.region=U.region.trim()),U.accessKeyId.trim()&&(e.accessKeyId=U.accessKeyId.trim()),U.sessionToken.trim()&&(e.sessionToken=U.sessionToken.trim()),Object.keys(e).length?e:void 0}return function({hasBaseUrlField:e=!1,baseUrl:t="",isAzure:a=!1,azureData:i=null,isCloudflareAi:s=!1,cloudflareData:l=null,region:r="",hasRegions:n=!1}={}){if(e){let e=String(t||"").trim();return e?{baseUrl:e}:void 0}return a?{azureEndpoint:i?.azureEndpoint,apiVersion:i?.apiVersion,deployment:i?.deployment,organization:i?.organization}:s?{accountId:l?.accountId}:n&&r?{region:r}:void 0}({hasBaseUrlField:!!k,baseUrl:P.baseUrl,isAzure:N,azureData:E,isCloudflareAi:C,cloudflareData:D,region:K,hasRegions:!!$})},ed=()=>!!P.apiKey||!!(T&&eo()?.[T]),ec=async()=>{if(l&&!P.defaultModel.trim())return void Z("failed");Q(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,providerSpecificData:eo()})}),a=await e.json();Z(a.valid?"success":"failed")}catch{Z("failed")}finally{Q(!1)}},em=async()=>{if(t&&(b||ed())&&(b||P.name)&&(!l||P.defaultModel.trim())){Y(!0);try{let e=!1;try{Q(!0),Z(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,providerSpecificData:eo()})});e=!!(await a.json()).valid,Z(e?"success":"failed")}catch{Z("failed")}finally{Q(!1)}await f({name:P.name||(b?"Ollama Local":""),apiKey:P.apiKey,defaultModel:l?P.defaultModel.trim():void 0,priority:P.priority,proxyPoolId:P.proxyPoolId===J?null:P.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:eo()})&&en()}finally{Y(!1)}}},ep=async()=>{let e=ei.split("\n");if(!e.length)return;let a=function(e,t,a={}){let{isCloudflareAi:i=!1}=a,s=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,a="string"==typeof t?t.trim():"";if(!a)continue;let r=function(e,t={}){let{isCloudflareAi:a=!1}=t,i=e.split("|");if(a&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(a,{isCloudflareAi:i});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,s.has(e.toLowerCase());)o+=1;s.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,h,{isCloudflareAi:C});if(!a.length)return;Y(!0),er(null);let i=0,s=0;for(let e of a)try{let a=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});a=!!(await i.json().catch(()=>({}))).valid}catch{a=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:a?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:s++}catch{s++}Y(!1),er({success:i,failed:s}),i>0&&g&&g()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${a||t} ${w}`,onClose:en,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===et?"primary":"ghost",onClick:()=>{ea("single"),er(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===et?"primary":"ghost",onClick:()=>{ea("bulk"),er(null)},children:"Bulk Add"})]}),"bulk"===et&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:C?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.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:ee,value:ei,onChange:e=>es(e.target.value)}),el&&(0,i.jsxs)("div",{className:`text-sm font-medium ${el.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",el.success," added",el.failed>0?`, ✗ ${el.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:ep,fullWidth:!0,disabled:X||!ei.trim(),children:X?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:en,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===et&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:P.name,onChange:e=>I({...P,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),k&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:k.label,value:P.baseUrl,onChange:e=>I({...P,baseUrl:e.target.value}),placeholder:k.placeholder,hint:k.help,className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:ec,disabled:G||X,variant:"secondary",children:G?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:w,type:v?"text":"password",value:P.apiKey,onChange:e=>I({...P,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:ec,disabled:!P.apiKey||G||X,variant:"secondary",children:G?"Checking...":"Check"})})]}),j&&(0,i.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."}),v&&d&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[d,p&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),$&&(0,i.jsx)(c.l6,{label:"Region",value:K,onChange:e=>W(e.target.value),options:$.map(e=>({value:e.id,label:e.label}))}),l&&(0,i.jsx)(c.pd,{label:"Default Model",value:P.defaultModel,onChange:e=>I({...P,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),V&&(0,i.jsx)(c.Ex,{variant:"success"===V?"success":"error",children:"success"===V?"Valid":"Invalid"}),x&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,i.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."}),C&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:D.accountId,onChange:e=>_({...D,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),S&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Vertex AI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.l6,{label:"Location",value:z.location,onChange:e=>M({...z,location:e.target.value}),options:[{value:"global",label:"global (recommended for Gemini 3.x)"},{value:"us-central1",label:"us-central1"},{value:"us-east4",label:"us-east4"},{value:"europe-west1",label:"europe-west1"},{value:"europe-west4",label:"europe-west4"},{value:"asia-east1",label:"asia-east1"},{value:"asia-northeast1",label:"asia-northeast1"}]}),(0,i.jsx)(c.l6,{label:"Reasoning Effort (default)",value:z.reasoningEffort,onChange:e=>M({...z,reasoningEffort:e.target.value}),options:[{value:"high",label:"high (32k tokens — default for Pro)"},{value:"medium",label:"medium (8k tokens)"},{value:"low",label:"low (1k tokens)"},{value:"",label:"none (let model decide)"}]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Location ",(0,i.jsx)("code",{children:"global"})," is required for Gemini 3.1 Pro Preview. Reasoning effort sets the default ",(0,i.jsx)("code",{children:"thinkingBudget"}),"; clients can override per-request via ",(0,i.jsx)("code",{children:"reasoning_effort"}),"."]})]})]}),A&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"AWS Profile (SSO — recommended)",value:U.profile,onChange:e=>q({...U,profile:e.target.value}),placeholder:"my-sso-profile"}),(0,i.jsx)(c.pd,{label:"Region",value:U.region,onChange:e=>q({...U,region:e.target.value}),placeholder:"us-east-1"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,i.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,i.jsxs)("code",{children:["aws sso login --profile ",U.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,i.jsx)(c.pd,{label:"Access Key ID (only for static keys)",value:U.accessKeyId,onChange:e=>q({...U,accessKeyId:e.target.value}),placeholder:"AKIA..."}),(0,i.jsx)(c.pd,{label:"Session Token (only for temporary ASIA… keys)",value:U.sessionToken,onChange:e=>q({...U,sessionToken:e.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,i.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),N&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:E.azureEndpoint,onChange:e=>R({...E,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:E.deployment,onChange:e=>R({...E,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:E.apiVersion,onChange:e=>R({...E,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:E.organization,onChange:e=>R({...E,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:P.priority,onChange:e=>I({...P,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:P.proxyPoolId,onChange:e=>I({...P,proxyPoolId:e.target.value}),options:[{value:J,label:"None"},...(u||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(u||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:em,fullWidth:!0,disabled:X||!b&&(!P.name||!ed())||l&&!P.defaultModel.trim()||N&&(!E.azureEndpoint||!E.deployment||!E.organization)||C&&!D.accountId,children:X?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:en,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}B.propTypes={isOpen:I().bool.isRequired,provider:I().string,providerName:I().string,isCompatible:I().bool,isAnthropic:I().bool,providerNode:I().shape({name:I().string,prefix:I().string,apiType:I().string,baseUrl:I().string,clientIdentityProfile:I().string,clientIdentityHeaders:I().object}),authType:I().string,authHint:I().string,website:I().string,proxyPools:I().arrayOf(I().shape({id:I().string,name:I().string})),error:I().string,existingNames:I().arrayOf(I().string),onSave:I().func.isRequired,onBulkDone:I().func,onClose:I().func.isRequired};let W=[{value:"default",label:"Default"},{value:"claude-cli",label:"Claude CLI"},{value:"codex-cli",label:"Codex CLI"},{value:"openclaw",label:"OpenClaw"},{value:"custom",label:"Custom Headers"}],G=new Set(["authorization","x-api-key","api-key","cookie"]);function Q(e){let t=String(e||"").trim();if(!t)return{headers:{}};try{let e;if(t.startsWith("{")){let a=JSON.parse(t);if(!a||"object"!=typeof a||Array.isArray(a))return{error:"Use a JSON object or Header: value lines."};e=Object.entries(a)}else for(let a of(e=[],t.split(/\r?\n/))){let t=a.trim();if(!t||t.startsWith("#"))continue;let i=t.indexOf(":");if(i<=0)return{error:"Each custom header line must use Header: value."};e.push([t.slice(0,i),t.slice(i+1)])}let a={};for(let[t,i]of e){let e=String(t||"").trim(),s=String(i||"").trim();!e||!s||G.has(e.toLowerCase())||(a[e]=s)}return{headers:a}}catch{return{error:"Use valid JSON or Header: value lines."}}}function V({isOpen:e,node:t,onSave:a,onClose:l,isAnthropic:r}){let[n,o]=(0,s.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",clientIdentityProfile:"default",clientIdentityHeadersText:""}),[d,m]=(0,s.useState)(!1),[p,u]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[y,b]=(0,s.useState)(null);(0,s.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"),clientIdentityProfile:t.clientIdentityProfile||"default",clientIdentityHeadersText:t.clientIdentityHeaders?JSON.stringify(t.clientIdentityHeaders,null,2):""})},[t,r]);let v=async()=>{if(!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim())return;let e="custom"===n.clientIdentityProfile?Q(n.clientIdentityHeadersText):{headers:{}};if(e.error)return void b("failed");m(!0);try{let t={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,clientIdentityProfile:n.clientIdentityProfile,clientIdentityHeaders:e.headers};r||(t.apiType=n.apiType),await a(t)}finally{m(!1)}},j=async()=>{let e="custom"===n.clientIdentityProfile?Q(n.clientIdentityHeadersText):{headers:{}};if(e.error)return void b("failed");g(!0);try{let t=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0,clientIdentityProfile:n.clientIdentityProfile,clientIdentityHeaders:e.headers})}),a=await t.json();b(a.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.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,i.jsx)(c.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,i.jsx)(c.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,i.jsx)(c.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,i.jsx)(c.l6,{label:"Client Identity",options:W,value:n.clientIdentityProfile,onChange:e=>o({...n,clientIdentityProfile:e.target.value}),hint:"Optional. Adds client fingerprint headers for compatible gateways."}),"custom"===n.clientIdentityProfile&&(0,i.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,i.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Custom Headers"}),(0,i.jsx)("textarea",{value:n.clientIdentityHeadersText,onChange:e=>o({...n,clientIdentityHeadersText:e.target.value}),placeholder:'{\n "User-Agent": "custom/1.0"\n}',rows:5,className:"w-full resize-y rounded-[10px] border border-transparent bg-surface-2 px-3 py-2.5 text-[16px] text-text-main placeholder-text-muted/70 transition-all duration-150 focus:border-brand-500/40 focus:outline-none focus:ring-2 focus:ring-brand-500/30 sm:text-sm"}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"JSON object or Header: value lines. Auth headers are ignored."})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(c.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."}),y&&(0,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}V.propTypes={isOpen:I().bool.isRequired,node:I().shape({id:I().string,name:I().string,prefix:I().string,apiType:I().string,baseUrl:I().string,clientIdentityProfile:I().string,clientIdentityHeaders:I().object}),onSave:I().func.isRequired,onClose:I().func.isRequired,isAnthropic:I().bool};let Z=()=>Object.fromEntries(Object.keys(p.bs).map(e=>[e,!1]));function X({isOpen:e,providerAlias:t,providerDisplayAlias:a,notice:l,onSave:r,onClose:n}){let[o,d]=(0,s.useState)(""),[m,u]=(0,s.useState)(Z),[x,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(""),[y,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(d(""),u(Z()),h(null),g(""))},[e]);let v=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},j=async()=>{let e=v(o.trim());if(e){h("testing"),g("");try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await a.json();h(i.ok?"ok":"error"),g(i.error||"")}catch(e){h("error"),g(e.message)}}},w=async()=>{let e=v(o.trim());if(e&&!y){b(!0);try{await r(e,m)}finally{b(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[l&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-xs text-text-muted bg-sidebar rounded-lg p-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"info"}),(0,i.jsx)("span",{children:l})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:o,onChange:e=>{d(e.target.value),h(null),g("")},onKeyDown:e=>{"Enter"===e.key&&j()},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,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===x,onClick:j,disabled:!o.trim()||"testing"===x,children:"testing"===x?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:v(o.trim())||"model-id"})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(p.bs).map(([e,t])=>(0,i.jsx)(c.lM,{checked:!!m[e],onChange:t=>u(a=>({...a,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),"ok"===x&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===x&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:f||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:w,fullWidth:!0,size:"sm",disabled:!o.trim()||y,children:y?"Adding...":"Add Model"})]})]})})}X.propTypes={isOpen:I().bool.isRequired,providerAlias:I().string.isRequired,providerDisplayAlias:I().string.isRequired,notice:I().string,onSave:I().func.isRequired,onClose:I().func.isRequired};let Y=`[
8
- {
9
- "accessToken": "eyJhbGc...",
10
- "refreshToken": "rt_...",
11
- "idToken": "eyJhbGc...",
12
- "email": "user@example.com"
13
- }
14
- ]`;function ee({isOpen:e,onClose:t,onSuccess:a}){let[l,r]=(0,s.useState)(""),[n,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(""),[p,u]=(0,s.useState)(null),x=()=>{n||(r(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let i=l.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){m(`${(0,A.Tl)("Invalid JSON")}: ${e.message}`);return}let s=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!s||0===s.length)return void m((0,A.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:s})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,A.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,A.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,A.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:Y,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,A.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,A.Tl)("failed")}`:""]}),f.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,A.Tl)("Importing..."):(0,A.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,A.Tl)("Close")})]})]})})}ee.propTypes={isOpen:I().bool.isRequired,onClose:I().func.isRequired,onSuccess:I().func};let et=`[
15
- {
16
- "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
17
- "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
18
- "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
19
- "email": "account1@example.com"
20
- },
21
- {
22
- "access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
23
- "refresh_token": "LZhriF9bf88pPykpXCuZ9...",
24
- "id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
25
- "email": "account2@example.com"
26
- }
27
- ]`;function ea(e){let t,a=e.trim();if(!a)return[];try{t=JSON.parse(a)}catch(e){try{let e=a;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function ei({isOpen:e,onClose:t,onSuccess:a}){let[l,r]=(0,s.useState)(""),[n,o]=(0,s.useState)(!1),[d,m]=(0,s.useState)(""),[p,u]=(0,s.useState)(null),[x,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(null),y=(0,s.useRef)(null),b=()=>{n||(r(""),m(""),u(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,A.Tl)("Please select valid .json files"));try{let e=[];for(let a of t){let t=await a.text(),i=ea(t);Array.isArray(i)?e.push(...i):i&&e.push(i)}if(0===e.length)return void m((0,A.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,A.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),u(null);try{e=ea(l)}catch(e){m(`${(0,A.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,A.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),i=await t.json();if(!t.ok)return void m(i?.error||`Request failed: ${t.status}`);u(i),i.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,A.Tl)("Request failed"))}finally{o(!1)}},w=p?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,A.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,A.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,i.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,i.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,A.Tl)("Upload JSON Files")})]}),(0,i.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,i.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:et,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,i.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,i.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,A.Tl)("Drop .json files here")})]})]}),f&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,i.jsxs)("span",{children:[(0,A.Tl)("Loaded")," ",f.accountsCount," ",(0,A.Tl)("account(s) from")," ",f.filesCount," ",(0,A.Tl)("file(s)")]})]}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&p.failed>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,A.Tl)("failed")]}),w.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,A.Tl)("Importing..."):(0,A.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,A.Tl)("Close")})]})]})})}let es={claude:"claudeAutoPing",codex:"codexAutoPing"},el=[{value:"auto",label:"Retry: Auto"},{value:"15",label:"Retry: 15s"},{value:"30",label:"Retry: 30s"},{value:"60",label:"Retry: 1m"},{value:"120",label:"Retry: 2m"},{value:"300",label:"Retry: 5m"},{value:"600",label:"Retry: 10m"},{value:"1800",label:"Retry: 30m"},{value:"3600",label:"Retry: 1h"}];function er(){let e,t,a,r,u,x=(0,l.useParams)(),h=(0,l.useRouter)(),f=x.id,{getCaps:g}=(0,S.y)(),[y,b]=(0,s.useState)([]),[v,j]=(0,s.useState)(1),[w,k]=(0,s.useState)(10),[T,P]=(0,s.useState)(!0),[I,R]=(0,s.useState)(null),[_,z]=(0,s.useState)([]),[M,U]=(0,s.useState)(!1),[q,F]=(0,s.useState)(!1),[J,L]=(0,s.useState)(!1),[H,W]=(0,s.useState)(!1),[G,Q]=(0,s.useState)(""),[Z,Y]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(!1),[er,en]=(0,s.useState)(!1),[eo,ed]=(0,s.useState)(!1),[ec,em]=(0,s.useState)(!1),[ep,eu]=(0,s.useState)(null),[ex,eh]=(0,s.useState)({}),[ef,eg]=(0,s.useState)([]),[ey,eb]=(0,s.useState)(!1),[ev,ej]=(0,s.useState)({}),[ew,ek]=(0,s.useState)(""),[eN,eC]=(0,s.useState)(()=>new Set),[eS,eA]=(0,s.useState)(!1),[eT,e$]=(0,s.useState)([]),[eO,eP]=(0,s.useState)("__none__"),[eI,eE]=(0,s.useState)(!1),[eR,eD]=(0,s.useState)(null),[e_,ez]=(0,s.useState)(""),[eM,eU]=(0,s.useState)("auto"),[eq,eK]=(0,s.useState)("auto"),[eF,eJ]=(0,s.useState)(""),[eL,eH]=(0,s.useState)({enabled:!1,connections:{}}),[eB,eW]=(0,s.useState)([]),[eG,eQ]=(0,s.useState)([]),[eV,eZ]=(0,s.useState)(null),[eX,eY]=(0,s.useState)([]),[e0,e1]=(0,s.useState)([]),[e2,e5]=(0,s.useState)(null),[e3,e4]=(0,s.useState)(!1),[e6,e8]=(0,s.useState)(!1),[e7,e9]=(0,s.useState)(!1),[te,tt]=(0,s.useState)(null),[ta,ti]=(0,s.useState)({}),[ts,tl]=(0,s.useState)(null),tr=(0,s.useRef)(!1),[tn,to]=(0,s.useState)(!1),[td,tc]=(0,s.useState)(!1),{copied:tm,copy:tp}=(0,C.C)(),tu="ag_risk_confirmed",tx=()=>{U(!0)},th=()=>{"antigravity"===f&&"true"!==window.localStorage.getItem(tu)?e4(!0):"xiaomi-mimo"===f?F(!0):tv?tx():(Q(""),W(!0))},tf=()=>{Q(""),W(!0)},tg=()=>{tv?th():tf()},ty=I?{id:I.id,name:I.name||("anthropic-compatible"===I.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===I.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===I.type?"AC":"OC",apiType:I.apiType,baseUrl:I.baseUrl,type:I.type}:m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f]||m.br[f],tb=ty?.authModes||[],tv=!!m.zN[f]||!!m.IS[f]||tb.includes("oauth"),tj=!!m.fg[f]||tb.includes("apikey"),tw=!!m.IS[f]?.noAuth,tk=(0,p.KC)(f),tN=("cursor"===f||"zed"===f)&&eG.length>0?eG:tk,tC=(0,m.wG)(f),tS=(0,m.mq)(f),tA=(0,m.gb)(f),tT=tS||tA,t$=!tT&&tv&&tj,tO="xai"===f?"Grok Build OAuth":"grok-cli"===f?"Grok CLI Device Login":"kimi"===f?"Kimi Coding OAuth":"OAuth",tP="xai"===f?"xAI API Key":"kimi"===f?"Kimi API Key":"API Key",tI=e=>{if(!eM||"auto"===eM)return null;let t=N(f,e);return t&&t.includes(eM)?eM:null},tE=tT?f:tC,tR=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let i=N(f,a);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tN)a(e.id);for(let e of eX)a(e.id);for(let e of ef)e.providerAlias===tE&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),tD=tT?I?.prefix||f:tC,t_=(0,s.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tE)}`,{cache:"no-store"}),t=await e.json();e.ok&&e1(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tE]),tz=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tE,ids:[e]})})).ok&&await t_()}catch(e){console.log("Error disabling model:",e)}},tM=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tE)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t_()}catch(e){console.log("Error enabling model:",e)}},tU=async e=>{e.length&&e5({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{e5(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tE,ids:e})})).ok&&await t_()}catch(e){console.log("Error disabling all models:",e)}}})},tq=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tE)}`,{method:"DELETE"})).ok&&await t_()}catch(e){console.log("Error enabling all models:",e)}},tK=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&eh(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tF=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eg(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,s.useEffect)(()=>{"kilocode"===f&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eY(e.models)}).catch(()=>{})},[f]);let tJ=(0,s.useCallback)(async()=>{try{let[e,t,a,i]=await Promise.all([fetch(`/api/providers?provider=${encodeURIComponent(f)}`,{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),s=await e.json(),l=await t.json(),r=await a.json(),n=i.ok?await i.json():{};e.ok&&b(s.connections||[]),a.ok&&z(r.proxyPools||[]);let o=(n.providerStrategies||{})[f]||{};eD(o.fallbackStrategy||null),ez(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[f]||{};eU(d.mode||"auto");let c=(n.retryDelayByProvider||{})[f];eK(null!=c&&"auto"!==c?String(c):"auto");let m=(n.rpmByProvider||{})[f];eJ(null!=m?String(m):"");let p=es[f],u=p&&n[p]||{};if(eH({enabled:!0===u.enabled,connections:u.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===f)||null;if(!e&&tT)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===f)||null))break}R(e)}}catch(e){console.log("Error fetching connections:",e)}finally{P(!1)}},[f,tT]),tL=async e=>{try{let t=await fetch(`/api/provider-nodes/${f}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(R(a.node),await tJ(),ed(!1))}catch(e){console.log("Error updating provider node:",e)}},tH=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),i=(a.ok?await a.json():{}).providerStrategies||{},s={};e&&(s.fallbackStrategy=e),"round-robin"===e&&""!==t&&(s.stickyRoundRobinLimit=Number(t)||3);let l={...i};0===Object.keys(s).length?delete l[f]:l[f]=s,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)}},tB=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[f]={mode:e}:delete a[f],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tW=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).retryDelayByProvider||{}};e&&"auto"!==e?a[f]=Number(e):delete a[f],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({retryDelayByProvider:a})})}catch(e){console.log("Error saving retry delay:",e)}},tG=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).rpmByProvider||{}},i=String(e??"").trim();""===i?delete a[f]:a[f]=Math.max(0,Number(i)||0),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rpmByProvider:a})})}catch(e){console.log("Error saving RPM limit:",e)}},tQ=async e=>{let t=es[f];if(t){eH(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,s.useEffect)(()=>{tJ(),tK(),tF(),t_()},[tJ,tK,tF,t_]),(0,s.useEffect)(()=>{if("cursor"!==f&&"zed"!==f)return void eQ([]);let e=y.find(e=>!1!==e.isActive);if(!e?.id){eQ([]),"zed"===f&&eZ(null);return}let t=!1;return"zed"===f&&eZ(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:a})=>{if(!t){if(e&&Array.isArray(a?.models)&&a.models.length>0){eQ(a.models),"zed"===f&&a?.warning&&eZ(a.warning);return}"zed"===f&&(eQ([]),eZ(a?.warning||a?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==f||(eQ([]),eZ("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[f,y]),(0,s.useEffect)(()=>{let e=(m.zN[f]||m.fg[f]||m.IS[f]||m.nJ[f])?.modelsFetcher;e&&$(e).then(eW)},[f]);let tV=async(e,t,a=tC)=>{let i=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await tK();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tZ=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tK()}catch(e){console.log("Error deleting alias:",e)}},tX=async(e,t="llm",a=tE,i)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t,...i?{caps:i}:{}})}),l=await s.json().catch(()=>({}));s.ok?(!1===l.added&&alert("Model already exists (duplicate). Check built-in or custom list."),await tF(),window.dispatchEvent(new CustomEvent("customModelChanged"))):alert(l.error||"Failed to add custom model")}catch(e){console.log("Error adding custom model:",e),alert(e.message||"Failed to add custom model")}},tY=async(e,t="llm",a=tE)=>{try{let i=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await tF(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},t0=async()=>{if(tn)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,A.Tl)("Please add an active Qoder connection first"));to(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,A.Tl)("Failed to fetch models"));let i=a.models||[];if(0===i.length)return void alert((0,A.Tl)("No models returned"));let s=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^qoder\//,"");ef.some(e=>e.providerAlias===tE&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(ex).includes(`${tE}/${a}`)||(await tX(a,"llm",tE),s+=1)}0===s?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${s} `+(0,A.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,A.Tl)("Error fetching models")+": "+e.message)}finally{to(!1)}},t1=async()=>{if(td)return;let e=y.find(e=>!1!==e.isActive);if(!e)return void alert((0,A.Tl)("Please add an active Cline connection first"));tc(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,A.Tl)("Failed to fetch models"));let i=a.models||[];if(0===i.length)return void alert((0,A.Tl)("No models returned"));let s=0;for(let e of i){let t=e.id||e.name;t&&(ef.some(e=>e.providerAlias===tE&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(ex).includes(`${tE}/${t}`)||(await tX(t,"llm",tE),s+=1))}0===s?alert((0,A.Tl)("All models already exist, no new models added")):alert((0,A.Tl)("Successfully added")+` ${s} `+(0,A.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,A.Tl)("Error fetching models")+": "+e.message)}finally{tc(!1)}},t2=async()=>{if(e6||0===y.length)return;let e=Object.fromEntries(y.map(e=>[e.id,{state:"queued",error:null}]));tr.current=!1,e8(!0),e9(!1),tt(null),ti(e),tl({total:y.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<y.length;e+=1){if(tr.current){tl({total:y.length,completed:e,passed:t,failed:a,stopped:!0});break}let i=y[e];tt(i.id),ti(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),s=await e.json(),l=!!s.valid;l?t+=1:a+=1,ti(e=>({...e,[i.id]:{state:l?"success":"failed",error:l?null:s.error||null}}))}catch(e){a+=1,ti(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}tl({total:y.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<y.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tt(null),e8(!1),e9(!1),tr.current=!1}},t5=async e=>{e5({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{e5(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&b(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},t3=()=>{tJ(),U(!1)},t4=async e=>{Q("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:f,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok)return await tJ(),!0;Q(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Q("Failed to save connection")}return!1},t6=async e=>{try{(await fetch(`/api/providers/${ep.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tJ(),en(!1))}catch(e){console.log("Error updating connection:",e)}},t8=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&b(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},t7=async(e,t)=>{let a=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t}})}),i=await a.json();if(!a.ok)throw Error(i.error||"Failed to save fast mode");b(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData,fastMode:t}}:a))},t9=async(e,t)=>{let a=[...y];[a[e],a[t]]=[a[t],a[e]],b(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tJ()}},ae=y.filter(e=>eT.includes(e.id));(0,s.useEffect)(()=>{e$(e=>e.filter(e=>y.some(t=>t.id===e)))},[y]),(()=>{if(0===ae.length)return;let e=new Set(ae.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=_.find(e=>e.id===t);return a?.name}})();let at=()=>{eI||em(!1)},aa=async e=>{eE(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tJ(),em(!1)}finally{eE(!1)}},ai=e=>aa(y.map(t=>({connectionId:t.id,proxyPoolId:e}))),{currentPage:as,items:al,start:ar}=function(e=[],t=1,a=10){let i=Array.isArray(e)?e:[],s=Number.isFinite(a)&&a>=1?Math.floor(a):10,l=i.length,r=Math.max(1,Math.ceil(l/s)),n=Math.floor(Number(t)),o=Math.min(Number.isFinite(n)&&n>0?n:1,r),d=(o-1)*s,c=i.slice(d,d+s);return{currentPage:o,totalPages:r,totalItems:l,start:d,items:c,pageSize:s}}(y,v,w),an=new Set(al.map(e=>e.id)),ao=al.length>0&&al.every(e=>eT.includes(e.id)),ad=(0,i.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[al.map((e,t)=>{let a,s=ar+t;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(a=e.id,eT.includes(a)),onChange:()=>{var t;return t=e.id,void e$(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(K,{connection:e,proxyPools:_,isOAuth:tv,isFirst:0===s,isLast:s===y.length-1,onMoveUp:()=>t9(s,s-1),onMoveDown:()=>t9(s,s+1),onToggleActive:t=>t8(e.id,t),fastMode:ty?.fastMode?{on:e.providerSpecificData?.fastMode===!0,onToggle:t=>t7(e.id,t)}:null,autoPing:es[f]&&"oauth"===e.authType?{on:!0===eL.connections[e.id],onToggle:t=>{var a;return a=e.id,void tQ({...eL,connections:{...eL.connections,[a]:t}})},provider:f}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&b(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{eu(e),en(!0)},onReconnect:()=>{"iflow"===f?L(!0):U(!0)},onDelete:()=>t5(e.id),oneByOneStatus:ta[e.id]||null})})]},e.id)}),y.length>10&&(0,i.jsx)(c.dK,{currentPage:as,pageSize:w,totalItems:y.length,onPageChange:j,onPageSizeChange:e=>{k(e),j(1)},allowCustomPageSize:!0,maxPageSize:200})]}),ac=_.filter(e=>!0===e.isActive),am=(0,i.jsx)(c.aF,{isOpen:ec,onClose:at,title:`Apply Proxy (${y.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=_.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):aa(y.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eI||0===ac.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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>ai(null),disabled:eI,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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),_.map(e=>(0,i.jsxs)("button",{onClick:()=>ai(e.id),disabled:eI||!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,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eI&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:at,variant:"ghost",fullWidth:!0,disabled:eI,children:"Cancel"})]})}),ap=async e=>{if(!eN.has(e)){eC(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tE}/${e}`})}),a=await t.json();ej(t=>({...t,[e]:a.ok?"ok":"error"})),ek(a.ok?"":a.error||"Model not reachable")}catch{ej(t=>({...t,[e]:"error"})),ek("Network error")}finally{eC(t=>{let a=new Set(t);return a.delete(e),a})}}};if(T)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!ty)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let au=()=>tS&&ty.apiType?"responses"===ty.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tA?"/providers/anthropic-m.png":(0,d.HY)(ty.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${ty.color}15`},children:ey||!au()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:ty.color},children:ty.textIcon||ty.id.slice(0,2).toUpperCase()}):(0,i.jsx)(o.default,{src:au(),alt:ty.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(ty.id),eb(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:ty.name}),(ty.notice?.apiKeyUrl||ty.notice?.signupUrl||ty.website)&&(0,i.jsxs)("a",{href:ty.notice?.apiKeyUrl||ty.notice?.signupUrl||ty.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),ty.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[y.length," connection",1===y.length?"":"s"]})]}),(0,i.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[(0,i.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"RPM / account"}),(0,i.jsx)("input",{type:"number",min:"0",value:eF,placeholder:String(m.W[f]||0),onChange:e=>eJ(e.target.value),onBlur:e=>tG(e.target.value),title:"Max requests per minute per account. Accounts over the cap are skipped before a request is sent, so the provider never sees a 429. Blank = provider default, 0 = unlimited.",className:"w-16 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none"}),(0,i.jsx)("span",{className:"hidden text-xs text-text-muted sm:inline",children:"Retry delay"}),(0,i.jsx)("select",{value:eq,onChange:e=>{var t;eK(t=e.target.value),tW(t)},title:"Cooldown after a rate-limit/error when the provider reports no reset time of its own. Auto = honor the provider's reported delay, else built-in backoff.",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:el.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))})]})]})]}),ty.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:ty.deprecationNotice})]}),ty.notice?.text&&!ty.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:ty.notice.text}),ty.notice.apiKeyUrl&&(0,i.jsx)("a",{href:ty.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 →"})]}),tT&&I&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:tA?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tA?"Messages API":"responses"===I.apiType?"Responses API":"Chat Completions"," \xb7 ",(I.baseUrl||"").replace(/\/$/,""),"/",tA?"messages":"responses"===I.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{Q(""),W(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ed(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{e5({title:"Delete Compatible Node",message:`Delete this ${tA?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{e5(null);try{(await fetch(`/api/provider-nodes/${f}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tw?(0,i.jsx)(c.gw,{providerId:f}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[y.length>0&&_.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>em(!0),children:"Apply Proxy"}),y.length>0&&(0,i.jsxs)(i.Fragment,{children:[eT.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eT.length;0!==e&&e5({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{e5(null);let e=0,t=[...eT];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}b(e=>e.filter(e=>!t.includes(e.id))),e$([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eT.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:t2,disabled:e6,children:e6?"Testing Connection One-by-One...":"Test Connection One-by-One"}),e6&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{e6&&(tr.current=!0,e9(!0))},disabled:e7,children:e7?"Stopping...":"Stop"})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,i.jsx)(c.lM,{checked:"round-robin"===eR,onChange:e=>{let t=e?"round-robin":null,a=e?e_||"1":e_;e&&!e_&&ez("1"),eD(t),tH(t,a)}}),(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium ml-2",children:"Cache Affinity"}),(0,i.jsx)(c.lM,{checked:"cache-affinity"===eR,onChange:e=>{let t=e?"cache-affinity":null;eD(t),tH(t,e_)}}),"round-robin"===eR&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,i.jsx)("input",{type:"number",min:1,value:e_,onChange:e=>{var t;ez(t=e.target.value),tH("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"})]})]})]})]}),0===y.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tv?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),t$&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tO," or ",tP,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:t$?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:th,children:tO}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tf,children:tP})]}):(0,i.jsxs)(i.Fragment,{children:[!tT&&"iflow"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),children:"Cookie"}),"codex"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,A.Tl)("Bulk Add")}),"grok-cli"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),children:(0,A.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tg,children:tT?"Add API Key":"iflow"===f?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[ts&&(0,i.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,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:["Total: ",ts.total]}),(0,i.jsxs)("span",{children:["Completed: ",ts.completed]}),(0,i.jsxs)("span",{children:["Passed: ",ts.passed]}),(0,i.jsxs)("span",{children:["Failed: ",ts.failed]}),ts.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),e6&&te&&(0,i.jsxs)("span",{children:["Running: ",y.find(e=>e.id===te)?.name||te]})]})}),y.length>0&&(0,i.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:ao,onChange:()=>{ao?e$(e=>e.filter(e=>!an.has(e))):e$(e=>{let t=new Set(e);for(let e of an)t.add(e);return[...t]})},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),ad,!tT&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>L(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),title:(0,A.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),"grok-cli"===f&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),title:(0,A.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,A.Tl)("Bulk Add")}),t$?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:th,className:"w-full sm:w-auto",children:tO}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tf,className:"w-full sm:w-auto",children:tP})]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:tg,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tR&&(0,i.jsx)("select",{value:eM,onChange:e=>{var t;eU(t=e.target.value),tB(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tR.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tT&&(e=[...tN,...eX.filter(e=>!tN.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!e0.includes(e)),(0,i.jsxs)("div",{className:"flex gap-2",children:[e0.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tq,children:"Active All"}),e.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tU(e),children:"Disable All"})]}))]}),!!ew&&(0,i.jsxs)("div",{className:"mb-3",children:[(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:ew}),/RegionError|hosted in China|regionNotAllowed/i.test(ew)&&(a=(t="string"==typeof ew?ew:JSON.stringify(ew)).match(/https:\/\/opencode\.ai\/workspace\/[^\s"')]+/),r=t.match(/wrk_[0-9A-Za-z]+/),u=a?a[0].endsWith("/go")?a[0]:`${a[0]}/go`:r?`https://opencode.ai/workspace/${r[0]}/go`:"https://opencode.ai",(0,i.jsx)("div",{className:"mt-1.5",children:(0,i.jsxs)("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-600 hover:bg-amber-500/20 dark:text-amber-400 transition-colors",children:[(0,i.jsx)("span",{children:"Allow China-hosted models"}),(0,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"open_in_new"})]})}))]}),"zed"===f&&!!eV&&(0,i.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eV}),(()=>{let e,t,a;if(tT)return(0,i.jsx)(D,{providerStorageAlias:tE,providerDisplayAlias:tD,modelAliases:ex,customModels:ef,copied:tm,onCopy:tp,onSetAlias:tV,onDeleteAlias:tZ,onAddCustomModel:e=>tX(e,"llm",tE),onDeleteCustomModel:e=>tY(e,"llm",tE),connections:y,isAnthropic:tA});let s=[...tN,...eX.filter(e=>!tN.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(e0),r=s.filter(e=>!l.has(e.id)),n=s.filter(e=>l.has(e.id)),o=O({customModels:ef,modelAliases:ex,providerAlias:tE,builtInModels:tN,type:"llm"});return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o.map(e=>(0,i.jsx)(E,{model:{id:e.id,name:e.name},fullModel:`${tD}/${e.id}`,alias:e.alias,copied:tm,onCopy:tp,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tY(e.id,"llm",tE):tZ(e.alias)},testStatus:ev[e.id],onTest:y.length>0||tw?()=>ap(e.id):void 0,isTesting:eN.has(e.id),isCustom:!0,isFree:!1,caps:g(`${f}/${e.id}`),thinkingSuffix:tI(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tE}/${e.id}`,a=`${f}/${e.id}`,s=Object.entries(ex).find(([,e])=>e===t||e===a)?.[0];return(0,i.jsx)(E,{model:e,fullModel:`${tD}/${e.id}`,alias:s,copied:tm,onCopy:tp,onSetAlias:t=>tV(e.id,t,tE),onDeleteAlias:()=>tZ(s),testStatus:ev[e.id],onTest:y.length>0||tw?()=>ap(e.id):void 0,isTesting:eN.has(e.id),isFree:e.isFree,onDisable:()=>tz(e.id),caps:g(`${f}/${e.id}`),thinkingSuffix:tI(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>eA(!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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===f&&y.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:t0,disabled:tn,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:tn?{animation:"spin 1s linear infinite"}:void 0,children:tn?"progress_activity":"download"}),tn?(0,A.Tl)("Fetching..."):(0,A.Tl)("Fetch Qoder Models")]}),("cline"===f||"clinepass"===f)&&y.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:t1,disabled:td,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:td?{animation:"spin 1s linear infinite"}:void 0,children:td?"progress_activity":"download"}),td?(0,A.Tl)("Fetching..."):(0,A.Tl)("Import from /models")]}),eB.length>0&&(e=new Set([...Object.values(ex),...o.map(e=>e.fullModel)]),t=new Set(tN.map(e=>e.id)),0===(a=eB.filter(a=>!e.has(`${tE}/${a.id}`)&&!t.has(a.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await tX(e.id,"llm",tE)},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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,i.jsxs)("button",{onClick:()=>tM(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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),am,"kiro"===f?(0,i.jsx)(c.Mh,{isOpen:M,providerInfo:ty,onSuccess:t3,onClose:()=>U(!1)}):"cursor"===f?(0,i.jsx)(c.G9,{isOpen:M,onSuccess:t3,onClose:()=>U(!1)}):"gitlab"===f?(0,i.jsx)(c.vj,{isOpen:M,providerInfo:ty,onSuccess:t3,onClose:()=>U(!1)}):(0,i.jsx)(c.LF,{isOpen:M,provider:f,providerInfo:ty,onSuccess:t3,onClose:()=>U(!1)}),(0,i.jsx)(c.LH,{isOpen:q,onSuccess:t3,onClose:()=>F(!1)}),"iflow"===f&&(0,i.jsx)(c.vE,{isOpen:J,onSuccess:()=>{tJ(),L(!1)},onClose:()=>L(!1)}),(0,i.jsx)(B,{isOpen:H,provider:f,providerName:ty.name,isCompatible:tT,isAnthropic:tA,authType:ty?.authType,authHint:ty?.authHint,website:ty?.website,proxyPools:_,error:G,existingNames:y.map(e=>e.name).filter(Boolean),onSave:t4,onBulkDone:tJ,onClose:()=>{Q(""),W(!1)}}),(0,i.jsx)(c.wI,{isOpen:er,connection:ep,proxyPools:_,onSave:t6,onClose:()=>en(!1)}),tT&&(0,i.jsx)(V,{isOpen:eo,node:I,onSave:tL,onClose:()=>ed(!1),isAnthropic:tA}),!tT&&(0,i.jsx)(X,{isOpen:eS,providerAlias:tE,providerDisplayAlias:tD,onSave:async(e,t)=>{await tX(e,"llm",tE,t),eA(!1)},onClose:()=>eA(!1)}),"codex"===f&&(0,i.jsx)(ee,{isOpen:Z,onClose:()=>Y(!1),onSuccess:tJ}),"grok-cli"===f&&(0,i.jsx)(ei,{isOpen:et,onClose:()=>ea(!1),onSuccess:tJ}),(0,i.jsx)(c.uo,{isOpen:e3,onClose:()=>e4(!1),onConfirm:()=>{(window.localStorage.setItem(tu,"true"),e4(!1),tv)?tx():tf()},title:"Risk Notice",message:ty?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!e2,onClose:()=>e5(null),onConfirm:e2?.onConfirm,title:e2?.title||"Confirm",message:e2?.message,variant:"danger"})]})}},85295:(e,t,a)=>{Promise.resolve().then(a.bind(a,79355))}},e=>{e.O(0,[8010,5772,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=85295)),_N_E=e.O()}]);