@jheavenknows/bluerouter 5.2.33 → 5.2.34

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 (503) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +26 -26
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +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.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  44. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  45. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  46. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  47. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  48. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  49. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  50. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  51. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  53. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  54. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  55. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  56. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  57. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  58. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  59. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  60. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  207. package/app/.next-cli-build/server/app/callback.html +1 -1
  208. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  209. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  210. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  211. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  212. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  213. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  214. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  215. package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
  216. package/app/.next-cli-build/server/app/dashboard/analytics.rsc +7 -7
  217. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
  218. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
  219. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  220. package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  221. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +7 -7
  222. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  223. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +5 -5
  224. package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
  225. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  226. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +7 -7
  227. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
  228. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
  229. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  230. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  231. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +7 -7
  232. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
  233. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +5 -5
  234. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  236. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  237. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  238. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  239. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  241. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  242. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  243. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  244. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  246. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  247. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  248. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  249. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  251. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  252. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  253. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  254. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
  257. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +1 -1
  258. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster.segment.rsc +1 -1
  259. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  260. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  261. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
  262. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_head.segment.rsc +1 -1
  263. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_index.segment.rsc +5 -5
  264. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
  265. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  267. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  268. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  269. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  271. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  272. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  273. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  274. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  275. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  277. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  278. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  279. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  281. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  282. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  283. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  284. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  285. package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
  286. package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +6 -6
  287. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +1 -1
  288. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report.segment.rsc +1 -1
  289. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  290. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  291. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +6 -6
  292. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_head.segment.rsc +1 -1
  293. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_index.segment.rsc +5 -5
  294. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +1 -1
  295. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  296. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  297. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  298. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  299. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  300. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  301. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  302. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  303. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  304. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  305. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  306. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  307. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  308. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  309. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  310. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  311. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  312. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  313. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  314. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  315. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  316. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  317. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  318. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  319. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  320. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  321. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  322. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  323. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  324. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  325. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  326. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  327. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  328. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
  329. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
  330. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  331. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  332. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  333. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
  334. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +5 -5
  335. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  336. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  337. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  338. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
  339. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
  340. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  341. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  342. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  343. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +5 -5
  345. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  347. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  348. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  349. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  351. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  352. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  353. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  354. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  356. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  357. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  358. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  359. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  360. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  361. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  362. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  363. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  364. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  366. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  367. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  368. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  369. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  370. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  371. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  372. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  373. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  374. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
  376. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  377. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  378. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  379. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  380. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  381. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  382. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  383. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  384. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  386. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  387. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
  389. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor.segment.rsc +1 -1
  391. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  393. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
  394. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_head.segment.rsc +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_index.segment.rsc +5 -5
  396. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  399. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  401. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  404. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  405. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  407. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  409. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  410. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  414. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  415. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  416. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  417. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  419. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  420. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +1 -1
  421. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  424. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  425. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  426. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  427. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  429. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  430. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  435. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  436. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  437. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  439. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  440. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  441. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  445. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  446. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  447. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  448. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  451. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  454. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  456. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/index.html +1 -1
  458. package/app/.next-cli-build/server/app/index.rsc +5 -5
  459. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  460. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  461. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  463. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  464. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  465. package/app/.next-cli-build/server/app/landing.html +1 -1
  466. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  467. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  468. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  470. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  471. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  473. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  474. package/app/.next-cli-build/server/app/login.html +1 -1
  475. package/app/.next-cli-build/server/app/login.rsc +6 -6
  476. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  477. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  478. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  479. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  480. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  483. package/app/.next-cli-build/server/app-paths-manifest.json +26 -26
  484. package/app/.next-cli-build/server/chunks/2731.js +25 -25
  485. package/app/.next-cli-build/server/chunks/3110.js +1 -1
  486. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  487. package/app/.next-cli-build/server/chunks/5434.js +25 -25
  488. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  489. package/app/.next-cli-build/server/chunks/6759.js +1 -1
  490. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  491. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  492. package/app/.next-cli-build/server/pages/404.html +1 -1
  493. package/app/.next-cli-build/server/pages/500.html +1 -1
  494. package/app/.next-cli-build/static/chunks/{5263-7b1791f35ecc300e.js → 5263-7ccd9e67c154f033.js} +1 -1
  495. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-f66f29a1b615400c.js +1 -0
  496. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  497. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  498. package/app/package.json +1 -1
  499. package/package.json +1 -1
  500. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/analytics/page-e1974abdaef5071e.js +0 -1
  501. /package/app/.next-cli-build/static/{efrAykVQr0OWdFwb0bG6S → 9GvvKQ1kOtH7cioE8nvTw}/_buildManifest.js +0 -0
  502. /package/app/.next-cli-build/static/{efrAykVQr0OWdFwb0bG6S → 9GvvKQ1kOtH7cioE8nvTw}/_ssgManifest.js +0 -0
  503. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.2.25-to-5.2.29-5.2.29-20260724-101807 → upgrade-5.2.32-to-5.2.33-5.2.33-20260724-130617}/data.sqlite +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5263],{28777:(e,i,a)=>{a.d(i,{KC:()=>t.KC,Xg:()=>t.Xg});var t=a(45564);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},44656:(e,i,a)=>{a.d(i,{BrandingProvider:()=>m,notifyBrandingChanged:()=>d,useBranding:()=>p});var t=a(95155),o=a(12115),s=a(14051),n=a.n(s);let r={siteTitle:"",siteShortName:"",siteDescription:"",logoUrl:null,faviconUrl:null,logoMime:null,faviconMime:null,hasLogo:!1,hasFavicon:!1},c=(0,o.createContext)({...r,loading:!0,refresh:async()=>{}}),l="bluerouter:branding-updated";function d(){window.dispatchEvent(new CustomEvent(l))}function m({initialBranding:e,children:i}){let[a,s]=(0,o.useState)(e||r),[n,d]=(0,o.useState)(!e),p=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/branding",{cache:"no-store"});if(!e.ok)return;let i=await e.json();s({...r,...i})}catch{}finally{d(!1)}},[]);(0,o.useEffect)(()=>{p()},[p]),(0,o.useEffect)(()=>{let e=()=>p();return window.addEventListener(l,e),()=>window.removeEventListener(l,e)},[p]);let h=(0,o.useMemo)(()=>({...a,loading:n,refresh:p}),[a,n,p]);return(0,t.jsx)(c.Provider,{value:h,children:i})}function p(){return(0,o.useContext)(c)}m.propTypes={initialBranding:n().object,children:n().node}},52679:(e,i,a)=>{a.d(i,{DI:()=>h,IS:()=>o,JH:()=>p,MA:()=>T,Ox:()=>x,Q2:()=>k,U_:()=>w,_8:()=>b,br:()=>d,fg:()=>l,gC:()=>f,gb:()=>v,hb:()=>g,mq:()=>y,nJ:()=>s,o5:()=>I,rj:()=>m,rs:()=>M,s9:()=>n,wG:()=>U,wb:()=>K,zN:()=>c,zt:()=>C});let t="⚠️ Lưu \xfd: Mỗi t\xe0i khoản OAuth chỉ n\xean d\xf9ng cho một user. Kh\xf4ng chia sẻ OAuth account cho nhiều user/API key để tr\xe1nh lỗi quota, kh\xf3a phi\xean hoặc bị provider hạn chế.",o={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35",deprecated:!0,deprecationNotice:t,website:"https://kiro.dev",notice:{signupUrl:"https://kiro.dev"}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:t,website:"https://github.com/google-gemini/gemini-cli",notice:{signupUrl:"https://github.com/google-gemini/gemini-cli"}},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",mediaPriority:1,website:"https://ai.google.dev",notice:{apiKeyUrl:"https://aistudio.google.com/app/apikey"},serviceKinds:["llm","embedding","image","imageToText","webSearch","tts","stt"],sttConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-stt",models:[{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro (Best)"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite (Cheapest)"},{id:"gemini-2.0-flash",name:"Gemini 2.0 Flash"}]},searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]},ttsConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-tts",models:[{id:"gemini-2.5-flash-preview-tts",name:"Gemini 2.5 Flash TTS"},{id:"gemini-2.5-pro-preview-tts",name:"Gemini 2.5 Pro TTS"}]}},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare",icon:"cloud",color:"#F38020",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",notice:{text:"Workers AI free tier. Requires a Cloudflare API token and Account ID.",apiKeyUrl:"https://dash.cloudflare.com/profile/api-tokens"},serviceKinds:["llm","image"],hasProviderSpecificData:!0},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},n={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},r=[{id:"speech-2.8-hd",name:"Speech 2.8 HD"},{id:"speech-2.8-turbo",name:"Speech 2.8 Turbo"},{id:"speech-2.6-hd",name:"Speech 2.6 HD"},{id:"speech-2.6-turbo",name:"Speech 2.6 Turbo"},{id:"speech-02-hd",name:"Speech 02 HD"},{id:"speech-02-turbo",name:"Speech 02 Turbo"},{id:"speech-01-hd",name:"Speech 01 HD"},{id:"speech-01-turbo",name:"Speech 01 Turbo"}],c={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757",deprecated:!0,deprecationNotice:t,website:"https://claude.ai",notice:{signupUrl:"https://claude.ai"}},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"⚠️ 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.",website:"https://antigravity.google",notice:{signupUrl:"https://antigravity.google"}},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",deprecated:!0,deprecationNotice:t,thinkingConfig:n.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."},website:"https://chatgpt.com/codex",notice:{signupUrl:"https://chatgpt.com/codex"}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",deprecated:!0,deprecationNotice:t,serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]},website:"https://github.com/features/copilot",notice:{signupUrl:"https://github.com/features/copilot"}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA",website:"https://cursor.com",notice:{signupUrl:"https://cursor.com"}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai",signupUrl:"https://x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC",website:"https://kilocode.ai",notice:{signupUrl:"https://kilocode.ai"}},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL",website:"https://cline.bot",notice:{signupUrl:"https://cline.bot"}}},l={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",notice:{apiKeyUrl:"https://platform.moonshot.ai/console/api-keys"},serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","image","imageToText","webSearch","tts"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"},ttsConfig:{baseUrl:"https://api.minimax.io/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.minimaxi.com/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com",notice:{apiKeyUrl:"https://bailian.console.aliyun.com/?apiKey=1"}},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl Coding Plan",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"alims-intl":{id:"alims-intl",alias:"alims-intl",name:"Alibaba Intl Model Studio",icon:"cloud",color:"#FF6A00",textIcon:"AMS",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"xiaomi-mimo":{id:"xiaomi-mimo",alias:"mimo",name:"Xiaomi MiMo",icon:"smart_toy",color:"#FF6900",textIcon:"XM",website:"https://xiaomimimo.com",notice:{apiKeyUrl:"https://xiaomimimo.com"}},"xiaomi-tokenplan":{id:"xiaomi-tokenplan",alias:"xmtp",name:"Xiaomi MiMo (Token Plan)",icon:"smart_toy",color:"#FF6700",textIcon:"XT",website:"https://mimo.xiaomi.com",notice:{text:"Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",apiKeyUrl:"https://mimo.xiaomi.com"},hasProviderSpecificData:!0,regions:[{id:"sgp",label:"Singapore",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1"},{id:"cn",label:"China",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1"},{id:"ams",label:"Europe",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1"}],defaultRegion:"sgp"},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com",notice:{apiKeyUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey"}},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",notice:{apiKeyUrl:"https://platform.openai.com/api-keys"},serviceKinds:["llm","embedding","tts","stt","image","imageToText","webSearch"],thinkingConfig:n.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},sttConfig:{baseUrl:"https://api.openai.com/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-1",name:"Whisper 1"},{id:"gpt-4o-transcribe",name:"GPT-4o Transcribe"},{id:"gpt-4o-mini-transcribe",name:"GPT-4o Mini Transcribe"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},"vercel-ai-gateway":{id:"vercel-ai-gateway",alias:"vercel",name:"Vercel AI Gateway",icon:"deployed_code",color:"#111827",textIcon:"VG",website:"https://vercel.com/ai-gateway",notice:{text:"Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",apiKeyUrl:"https://vercel.com/dashboard/~/ai-gateway"},passthroughModels:!0,serviceKinds:["llm"]},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",notice:{apiKeyUrl:"https://console.anthropic.com/settings/keys"},serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",notice:{apiKeyUrl:"https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"},hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com",notice:{apiKeyUrl:"https://platform.deepseek.com/api_keys"}},commandcode:{id:"commandcode",alias:"cmc",name:"Command Code",icon:"smart_toy",color:"#000000",textIcon:"CC",website:"https://commandcode.ai",notice:{text:"Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.",apiKeyUrl:"https://commandcode.ai/studio"}},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",notice:{apiKeyUrl:"https://console.groq.com/keys"},serviceKinds:["llm","imageToText","stt"],sttConfig:{baseUrl:"https://api.groq.com/openai/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-large-v3",name:"Whisper Large v3"},{id:"whisper-large-v3-turbo",name:"Whisper Large v3 Turbo"},{id:"distil-whisper-large-v3-en",name:"Distil Whisper Large v3 EN"}]}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",notice:{apiKeyUrl:"https://console.mistral.ai/api-keys"},serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",notice:{apiKeyUrl:"https://www.perplexity.ai/settings/api"},serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",notice:{apiKeyUrl:"https://api.together.xyz/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",notice:{apiKeyUrl:"https://fireworks.ai/account/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai",notice:{apiKeyUrl:"https://cloud.cerebras.ai/platform"}},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com",notice:{apiKeyUrl:"https://dashboard.cohere.com/api-keys"}},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",notice:{apiKeyUrl:"https://studio.nebius.com/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com",notice:{apiKeyUrl:"https://cloud.siliconflow.com/account/ak"}},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",notice:{apiKeyUrl:"https://app.hyperbolic.xyz/settings"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]},sttConfig:{baseUrl:"https://api.deepgram.com/v1/listen",authType:"apikey",authHeader:"token",format:"deepgram",models:[{id:"nova-3",name:"Nova 3"},{id:"nova-2",name:"Nova 2"},{id:"whisper-large",name:"Whisper Large"}]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",notice:{apiKeyUrl:"https://www.assemblyai.com/app/api-keys"},serviceKinds:["stt"],sttConfig:{baseUrl:"https://api.assemblyai.com/v2/transcript",authType:"apikey",authHeader:"bearer",format:"assemblyai",async:!0,models:[{id:"universal-3-pro",name:"Universal 3 Pro"},{id:"universal-2",name:"Universal 2"}]}},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana API",icon:"extension",color:"#FFD700",textIcon:"\uD83C\uDF4C",website:"https://nanobananaapi.ai",notice:{text:"3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.",apiKeyUrl:"https://nanobananaapi.ai/dashboard"},serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",notice:{apiKeyUrl:"https://elevenlabs.io/app/settings/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",notice:{apiKeyUrl:"https://play.cartesia.ai/keys"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",notice:{apiKeyUrl:"https://play.ht/studio/api-access"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",notice:{apiKeyUrl:"https://huggingface.co/settings/tokens"},serviceKinds:["image","imageToText","tts","stt"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]},sttConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-asr",models:[{id:"openai/whisper-large-v3",name:"Whisper Large v3 (HF)"},{id:"openai/whisper-small",name:"Whisper Small (HF)"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",notice:{apiKeyUrl:"https://www.blackbox.ai/api-management"},serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai",notice:{apiKeyUrl:"https://chutes.ai/app/api"}},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models",notice:{apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"fal-ai":{id:"fal-ai",alias:"fal",name:"Fal.ai",icon:"image",color:"#2563EB",textIcon:"FL",website:"https://fal.ai",notice:{apiKeyUrl:"https://fal.ai/dashboard/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.fal.ai/v1/models?limit=1",method:"GET",authType:"apikey",authHeader:"key"}},"stability-ai":{id:"stability-ai",alias:"stability",name:"Stability AI",icon:"image",color:"#8B5CF6",textIcon:"SA",website:"https://stability.ai",notice:{apiKeyUrl:"https://platform.stability.ai/account/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.stability.ai/v1/user/account",method:"GET",authType:"apikey",authHeader:"bearer"}},"black-forest-labs":{id:"black-forest-labs",alias:"bfl",name:"Black Forest Labs",icon:"image",color:"#111827",textIcon:"BF",website:"https://blackforestlabs.ai",notice:{apiKeyUrl:"https://api.bfl.ai"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.bfl.ai/v1/get_result?id=ping",method:"GET",authType:"apikey",authHeader:"x-key"}},recraft:{id:"recraft",alias:"recraft",name:"Recraft",icon:"image",color:"#EC4899",textIcon:"RC",website:"https://recraft.ai",notice:{apiKeyUrl:"https://www.recraft.ai/profile/api"},serviceKinds:["image"],imageConfig:{baseUrl:"https://external.api.recraft.ai/v1/users/me",method:"GET",authType:"apikey",authHeader:"bearer"}},topaz:{id:"topaz",alias:"topaz",name:"Topaz",icon:"image",color:"#059669",textIcon:"TP",website:"https://topazlabs.com",notice:{apiKeyUrl:"https://topazlabs.com/account"},serviceKinds:["image"]},runwayml:{id:"runwayml",alias:"runway",name:"Runway ML",icon:"movie",color:"#000000",textIcon:"RW",website:"https://runwayml.com",notice:{apiKeyUrl:"https://dev.runwayml.com"},serviceKinds:["image","video"],imageConfig:{baseUrl:"https://api.dev.runwayml.com/v1/organization",method:"GET",authType:"apikey",authHeader:"bearer",extraHeaders:{"X-Runway-Version":"2024-11-06"}}},"aws-polly":{id:"aws-polly",alias:"polly",name:"AWS Polly",icon:"record_voice_over",color:"#FF9900",textIcon:"PL",website:"https://aws.amazon.com/polly/",notice:{text:"Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region.",apiKeyUrl:"https://console.aws.amazon.com/iam/home#/security_credentials"},serviceKinds:["tts"],hasProviderSpecificData:!0,ttsConfig:{baseUrl:"https://polly.{region}.amazonaws.com/v1/speech",authType:"apikey",authHeader:"aws-sigv4",format:"aws-polly",models:[{id:"standard",name:"Standard"},{id:"neural",name:"Neural"},{id:"long-form",name:"Long-form"},{id:"generative",name:"Generative"}]}},"jina-ai":{id:"jina-ai",alias:"jina",name:"Jina AI",icon:"blur_on",color:"#2563EB",textIcon:"JA",website:"https://jina.ai",notice:{text:"10M free tokens on signup (non-commercial), no credit card required.",apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.jina.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"jina-embeddings-v3",name:"Jina Embeddings v3",dimensions:1024},{id:"jina-embeddings-v2-base-en",name:"Jina Embeddings v2 Base EN",dimensions:768},{id:"jina-embeddings-v2-base-code",name:"Jina Embeddings v2 Base Code",dimensions:768}]}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},d={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"Speech To Text",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],p="openai-compatible-",h="anthropic-compatible-",u=Object.freeze({GENERIC:"generic",LLAMA_CPP:"llamacpp",VLLM:"vllm",OLLAMA:"ollama"}),g=u.LLAMA_CPP,b=[{value:u.GENERIC,label:"Generic OpenAI-compatible",description:"Only standard request fields are forwarded. Thinking/reasoning-specific fields are not injected."},{value:u.LLAMA_CPP,label:"llama.cpp / llama-server",description:"Supports chat_template_kwargs.enable_thinking and reasoning_budget for Qwen-style thinking control."},{value:u.VLLM,label:"vLLM",description:"Supports chat_template_kwargs.enable_thinking and maps reasoning budget to thinking_token_budget."},{value:u.OLLAMA,label:"Ollama OpenAI-compatible",description:"Uses standard OpenAI-compatible fields only. Thinking/reasoning fields are not injected."}];function y(e){return"string"==typeof e&&e.startsWith(p)}function v(e){return"string"==typeof e&&e.startsWith(h)}function f(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}function x(e){return"string"==typeof e&&e.startsWith("custom-stt-")}function w(e){return"string"==typeof e&&e.startsWith("custom-tts-")}Object.freeze({generic:u.GENERIC,default:u.GENERIC,openai:u.GENERIC,strict:u.GENERIC,llama:u.LLAMA_CPP,llamacpp:u.LLAMA_CPP,"llama.cpp":u.LLAMA_CPP,"llama-cpp":u.LLAMA_CPP,"llama-server":u.LLAMA_CPP,llamaserver:u.LLAMA_CPP,vllm:u.VLLM,"v-llm":u.VLLM,ollama:u.OLLAMA,"ollama-openai":u.OLLAMA});let k={...o,...s,...c,...l,...d},T={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function C(e){for(let i of Object.values(k))if(i.alias===e||i.id===e)return i;return null}function M(e){let i=C(e);return i?.id||e}function U(e){let i=k[e];return i?.alias||e}function I(e){return Object.values(k).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e))).sort((e,i)=>(e.mediaPriority??100)-(i.mediaPriority??100))}Object.values(k).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(k).reduce((e,i)=>(e[i.id]=i.alias,e),{});let K=["claude","antigravity","kiro","github","codex","kimi-coding","ollama","gemini-cli","glm","glm-cn","minimax","minimax-cn"]},90620:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>o,MA:()=>t.MA,UY:()=>c,Nu:()=>s,zN:()=>t.zN,X3:()=>l,B2:()=>r,h0:()=>n});var t=a(52679);a(28777);let o={name:"AI Router Gateway",description:"AI Infrastructure Management",version:"5.2.33"},s={changelogUrl:"https://raw.githubusercontent.com/decolua/bluerouter/refs/heads/master/CHANGELOG.md",donateUrl:"https://bluerouter.com/api/donate"},n={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},c={maxLines:200,pollIntervalMs:1e3},l={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","alims-intl":"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5263],{28777:(e,i,a)=>{a.d(i,{KC:()=>t.KC,Xg:()=>t.Xg});var t=a(45564);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},44656:(e,i,a)=>{a.d(i,{BrandingProvider:()=>m,notifyBrandingChanged:()=>d,useBranding:()=>p});var t=a(95155),o=a(12115),s=a(14051),n=a.n(s);let r={siteTitle:"",siteShortName:"",siteDescription:"",logoUrl:null,faviconUrl:null,logoMime:null,faviconMime:null,hasLogo:!1,hasFavicon:!1},c=(0,o.createContext)({...r,loading:!0,refresh:async()=>{}}),l="bluerouter:branding-updated";function d(){window.dispatchEvent(new CustomEvent(l))}function m({initialBranding:e,children:i}){let[a,s]=(0,o.useState)(e||r),[n,d]=(0,o.useState)(!e),p=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/branding",{cache:"no-store"});if(!e.ok)return;let i=await e.json();s({...r,...i})}catch{}finally{d(!1)}},[]);(0,o.useEffect)(()=>{p()},[p]),(0,o.useEffect)(()=>{let e=()=>p();return window.addEventListener(l,e),()=>window.removeEventListener(l,e)},[p]);let h=(0,o.useMemo)(()=>({...a,loading:n,refresh:p}),[a,n,p]);return(0,t.jsx)(c.Provider,{value:h,children:i})}function p(){return(0,o.useContext)(c)}m.propTypes={initialBranding:n().object,children:n().node}},52679:(e,i,a)=>{a.d(i,{DI:()=>h,IS:()=>o,JH:()=>p,MA:()=>T,Ox:()=>x,Q2:()=>k,U_:()=>w,_8:()=>b,br:()=>d,fg:()=>l,gC:()=>f,gb:()=>v,hb:()=>g,mq:()=>y,nJ:()=>s,o5:()=>I,rj:()=>m,rs:()=>M,s9:()=>n,wG:()=>U,wb:()=>K,zN:()=>c,zt:()=>C});let t="⚠️ Lưu \xfd: Mỗi t\xe0i khoản OAuth chỉ n\xean d\xf9ng cho một user. Kh\xf4ng chia sẻ OAuth account cho nhiều user/API key để tr\xe1nh lỗi quota, kh\xf3a phi\xean hoặc bị provider hạn chế.",o={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35",deprecated:!0,deprecationNotice:t,website:"https://kiro.dev",notice:{signupUrl:"https://kiro.dev"}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:t,website:"https://github.com/google-gemini/gemini-cli",notice:{signupUrl:"https://github.com/google-gemini/gemini-cli"}},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",mediaPriority:1,website:"https://ai.google.dev",notice:{apiKeyUrl:"https://aistudio.google.com/app/apikey"},serviceKinds:["llm","embedding","image","imageToText","webSearch","tts","stt"],sttConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-stt",models:[{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro (Best)"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite (Cheapest)"},{id:"gemini-2.0-flash",name:"Gemini 2.0 Flash"}]},searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]},ttsConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-tts",models:[{id:"gemini-2.5-flash-preview-tts",name:"Gemini 2.5 Flash TTS"},{id:"gemini-2.5-pro-preview-tts",name:"Gemini 2.5 Pro TTS"}]}},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare",icon:"cloud",color:"#F38020",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",notice:{text:"Workers AI free tier. Requires a Cloudflare API token and Account ID.",apiKeyUrl:"https://dash.cloudflare.com/profile/api-tokens"},serviceKinds:["llm","image"],hasProviderSpecificData:!0},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},n={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},r=[{id:"speech-2.8-hd",name:"Speech 2.8 HD"},{id:"speech-2.8-turbo",name:"Speech 2.8 Turbo"},{id:"speech-2.6-hd",name:"Speech 2.6 HD"},{id:"speech-2.6-turbo",name:"Speech 2.6 Turbo"},{id:"speech-02-hd",name:"Speech 02 HD"},{id:"speech-02-turbo",name:"Speech 02 Turbo"},{id:"speech-01-hd",name:"Speech 01 HD"},{id:"speech-01-turbo",name:"Speech 01 Turbo"}],c={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757",deprecated:!0,deprecationNotice:t,website:"https://claude.ai",notice:{signupUrl:"https://claude.ai"}},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"⚠️ 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.",website:"https://antigravity.google",notice:{signupUrl:"https://antigravity.google"}},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",deprecated:!0,deprecationNotice:t,thinkingConfig:n.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."},website:"https://chatgpt.com/codex",notice:{signupUrl:"https://chatgpt.com/codex"}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",deprecated:!0,deprecationNotice:t,serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]},website:"https://github.com/features/copilot",notice:{signupUrl:"https://github.com/features/copilot"}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA",website:"https://cursor.com",notice:{signupUrl:"https://cursor.com"}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai",signupUrl:"https://x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC",website:"https://kilocode.ai",notice:{signupUrl:"https://kilocode.ai"}},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL",website:"https://cline.bot",notice:{signupUrl:"https://cline.bot"}}},l={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",notice:{apiKeyUrl:"https://platform.moonshot.ai/console/api-keys"},serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","image","imageToText","webSearch","tts"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"},ttsConfig:{baseUrl:"https://api.minimax.io/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.minimaxi.com/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com",notice:{apiKeyUrl:"https://bailian.console.aliyun.com/?apiKey=1"}},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl Coding Plan",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"alims-intl":{id:"alims-intl",alias:"alims-intl",name:"Alibaba Intl Model Studio",icon:"cloud",color:"#FF6A00",textIcon:"AMS",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"xiaomi-mimo":{id:"xiaomi-mimo",alias:"mimo",name:"Xiaomi MiMo",icon:"smart_toy",color:"#FF6900",textIcon:"XM",website:"https://xiaomimimo.com",notice:{apiKeyUrl:"https://xiaomimimo.com"}},"xiaomi-tokenplan":{id:"xiaomi-tokenplan",alias:"xmtp",name:"Xiaomi MiMo (Token Plan)",icon:"smart_toy",color:"#FF6700",textIcon:"XT",website:"https://mimo.xiaomi.com",notice:{text:"Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",apiKeyUrl:"https://mimo.xiaomi.com"},hasProviderSpecificData:!0,regions:[{id:"sgp",label:"Singapore",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1"},{id:"cn",label:"China",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1"},{id:"ams",label:"Europe",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1"}],defaultRegion:"sgp"},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com",notice:{apiKeyUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey"}},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",notice:{apiKeyUrl:"https://platform.openai.com/api-keys"},serviceKinds:["llm","embedding","tts","stt","image","imageToText","webSearch"],thinkingConfig:n.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},sttConfig:{baseUrl:"https://api.openai.com/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-1",name:"Whisper 1"},{id:"gpt-4o-transcribe",name:"GPT-4o Transcribe"},{id:"gpt-4o-mini-transcribe",name:"GPT-4o Mini Transcribe"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},"vercel-ai-gateway":{id:"vercel-ai-gateway",alias:"vercel",name:"Vercel AI Gateway",icon:"deployed_code",color:"#111827",textIcon:"VG",website:"https://vercel.com/ai-gateway",notice:{text:"Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",apiKeyUrl:"https://vercel.com/dashboard/~/ai-gateway"},passthroughModels:!0,serviceKinds:["llm"]},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",notice:{apiKeyUrl:"https://console.anthropic.com/settings/keys"},serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",notice:{apiKeyUrl:"https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"},hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com",notice:{apiKeyUrl:"https://platform.deepseek.com/api_keys"}},commandcode:{id:"commandcode",alias:"cmc",name:"Command Code",icon:"smart_toy",color:"#000000",textIcon:"CC",website:"https://commandcode.ai",notice:{text:"Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.",apiKeyUrl:"https://commandcode.ai/studio"}},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",notice:{apiKeyUrl:"https://console.groq.com/keys"},serviceKinds:["llm","imageToText","stt"],sttConfig:{baseUrl:"https://api.groq.com/openai/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-large-v3",name:"Whisper Large v3"},{id:"whisper-large-v3-turbo",name:"Whisper Large v3 Turbo"},{id:"distil-whisper-large-v3-en",name:"Distil Whisper Large v3 EN"}]}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",notice:{apiKeyUrl:"https://console.mistral.ai/api-keys"},serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",notice:{apiKeyUrl:"https://www.perplexity.ai/settings/api"},serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",notice:{apiKeyUrl:"https://api.together.xyz/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",notice:{apiKeyUrl:"https://fireworks.ai/account/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai",notice:{apiKeyUrl:"https://cloud.cerebras.ai/platform"}},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com",notice:{apiKeyUrl:"https://dashboard.cohere.com/api-keys"}},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",notice:{apiKeyUrl:"https://studio.nebius.com/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com",notice:{apiKeyUrl:"https://cloud.siliconflow.com/account/ak"}},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",notice:{apiKeyUrl:"https://app.hyperbolic.xyz/settings"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]},sttConfig:{baseUrl:"https://api.deepgram.com/v1/listen",authType:"apikey",authHeader:"token",format:"deepgram",models:[{id:"nova-3",name:"Nova 3"},{id:"nova-2",name:"Nova 2"},{id:"whisper-large",name:"Whisper Large"}]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",notice:{apiKeyUrl:"https://www.assemblyai.com/app/api-keys"},serviceKinds:["stt"],sttConfig:{baseUrl:"https://api.assemblyai.com/v2/transcript",authType:"apikey",authHeader:"bearer",format:"assemblyai",async:!0,models:[{id:"universal-3-pro",name:"Universal 3 Pro"},{id:"universal-2",name:"Universal 2"}]}},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana API",icon:"extension",color:"#FFD700",textIcon:"\uD83C\uDF4C",website:"https://nanobananaapi.ai",notice:{text:"3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.",apiKeyUrl:"https://nanobananaapi.ai/dashboard"},serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",notice:{apiKeyUrl:"https://elevenlabs.io/app/settings/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",notice:{apiKeyUrl:"https://play.cartesia.ai/keys"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",notice:{apiKeyUrl:"https://play.ht/studio/api-access"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",notice:{apiKeyUrl:"https://huggingface.co/settings/tokens"},serviceKinds:["image","imageToText","tts","stt"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]},sttConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-asr",models:[{id:"openai/whisper-large-v3",name:"Whisper Large v3 (HF)"},{id:"openai/whisper-small",name:"Whisper Small (HF)"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",notice:{apiKeyUrl:"https://www.blackbox.ai/api-management"},serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai",notice:{apiKeyUrl:"https://chutes.ai/app/api"}},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models",notice:{apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"fal-ai":{id:"fal-ai",alias:"fal",name:"Fal.ai",icon:"image",color:"#2563EB",textIcon:"FL",website:"https://fal.ai",notice:{apiKeyUrl:"https://fal.ai/dashboard/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.fal.ai/v1/models?limit=1",method:"GET",authType:"apikey",authHeader:"key"}},"stability-ai":{id:"stability-ai",alias:"stability",name:"Stability AI",icon:"image",color:"#8B5CF6",textIcon:"SA",website:"https://stability.ai",notice:{apiKeyUrl:"https://platform.stability.ai/account/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.stability.ai/v1/user/account",method:"GET",authType:"apikey",authHeader:"bearer"}},"black-forest-labs":{id:"black-forest-labs",alias:"bfl",name:"Black Forest Labs",icon:"image",color:"#111827",textIcon:"BF",website:"https://blackforestlabs.ai",notice:{apiKeyUrl:"https://api.bfl.ai"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.bfl.ai/v1/get_result?id=ping",method:"GET",authType:"apikey",authHeader:"x-key"}},recraft:{id:"recraft",alias:"recraft",name:"Recraft",icon:"image",color:"#EC4899",textIcon:"RC",website:"https://recraft.ai",notice:{apiKeyUrl:"https://www.recraft.ai/profile/api"},serviceKinds:["image"],imageConfig:{baseUrl:"https://external.api.recraft.ai/v1/users/me",method:"GET",authType:"apikey",authHeader:"bearer"}},topaz:{id:"topaz",alias:"topaz",name:"Topaz",icon:"image",color:"#059669",textIcon:"TP",website:"https://topazlabs.com",notice:{apiKeyUrl:"https://topazlabs.com/account"},serviceKinds:["image"]},runwayml:{id:"runwayml",alias:"runway",name:"Runway ML",icon:"movie",color:"#000000",textIcon:"RW",website:"https://runwayml.com",notice:{apiKeyUrl:"https://dev.runwayml.com"},serviceKinds:["image","video"],imageConfig:{baseUrl:"https://api.dev.runwayml.com/v1/organization",method:"GET",authType:"apikey",authHeader:"bearer",extraHeaders:{"X-Runway-Version":"2024-11-06"}}},"aws-polly":{id:"aws-polly",alias:"polly",name:"AWS Polly",icon:"record_voice_over",color:"#FF9900",textIcon:"PL",website:"https://aws.amazon.com/polly/",notice:{text:"Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region.",apiKeyUrl:"https://console.aws.amazon.com/iam/home#/security_credentials"},serviceKinds:["tts"],hasProviderSpecificData:!0,ttsConfig:{baseUrl:"https://polly.{region}.amazonaws.com/v1/speech",authType:"apikey",authHeader:"aws-sigv4",format:"aws-polly",models:[{id:"standard",name:"Standard"},{id:"neural",name:"Neural"},{id:"long-form",name:"Long-form"},{id:"generative",name:"Generative"}]}},"jina-ai":{id:"jina-ai",alias:"jina",name:"Jina AI",icon:"blur_on",color:"#2563EB",textIcon:"JA",website:"https://jina.ai",notice:{text:"10M free tokens on signup (non-commercial), no credit card required.",apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.jina.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"jina-embeddings-v3",name:"Jina Embeddings v3",dimensions:1024},{id:"jina-embeddings-v2-base-en",name:"Jina Embeddings v2 Base EN",dimensions:768},{id:"jina-embeddings-v2-base-code",name:"Jina Embeddings v2 Base Code",dimensions:768}]}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},d={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"Speech To Text",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],p="openai-compatible-",h="anthropic-compatible-",u=Object.freeze({GENERIC:"generic",LLAMA_CPP:"llamacpp",VLLM:"vllm",OLLAMA:"ollama"}),g=u.LLAMA_CPP,b=[{value:u.GENERIC,label:"Generic OpenAI-compatible",description:"Only standard request fields are forwarded. Thinking/reasoning-specific fields are not injected."},{value:u.LLAMA_CPP,label:"llama.cpp / llama-server",description:"Supports chat_template_kwargs.enable_thinking and reasoning_budget for Qwen-style thinking control."},{value:u.VLLM,label:"vLLM",description:"Supports chat_template_kwargs.enable_thinking and maps reasoning budget to thinking_token_budget."},{value:u.OLLAMA,label:"Ollama OpenAI-compatible",description:"Uses standard OpenAI-compatible fields only. Thinking/reasoning fields are not injected."}];function y(e){return"string"==typeof e&&e.startsWith(p)}function v(e){return"string"==typeof e&&e.startsWith(h)}function f(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}function x(e){return"string"==typeof e&&e.startsWith("custom-stt-")}function w(e){return"string"==typeof e&&e.startsWith("custom-tts-")}Object.freeze({generic:u.GENERIC,default:u.GENERIC,openai:u.GENERIC,strict:u.GENERIC,llama:u.LLAMA_CPP,llamacpp:u.LLAMA_CPP,"llama.cpp":u.LLAMA_CPP,"llama-cpp":u.LLAMA_CPP,"llama-server":u.LLAMA_CPP,llamaserver:u.LLAMA_CPP,vllm:u.VLLM,"v-llm":u.VLLM,ollama:u.OLLAMA,"ollama-openai":u.OLLAMA});let k={...o,...s,...c,...l,...d},T={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function C(e){for(let i of Object.values(k))if(i.alias===e||i.id===e)return i;return null}function M(e){let i=C(e);return i?.id||e}function U(e){let i=k[e];return i?.alias||e}function I(e){return Object.values(k).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e))).sort((e,i)=>(e.mediaPriority??100)-(i.mediaPriority??100))}Object.values(k).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(k).reduce((e,i)=>(e[i.id]=i.alias,e),{});let K=["claude","antigravity","kiro","github","codex","kimi-coding","ollama","gemini-cli","glm","glm-cn","minimax","minimax-cn"]},90620:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>o,MA:()=>t.MA,UY:()=>c,Nu:()=>s,zN:()=>t.zN,X3:()=>l,B2:()=>r,h0:()=>n});var t=a(52679);a(28777);let o={name:"AI Router Gateway",description:"AI Infrastructure Management",version:"5.2.34"},s={changelogUrl:"https://raw.githubusercontent.com/decolua/bluerouter/refs/heads/master/CHANGELOG.md",donateUrl:"https://bluerouter.com/api/donate"},n={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},c={maxLines:200,pollIntervalMs:1e3},l={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","alims-intl":"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8978],{39944:(e,t,s)=>{Promise.resolve().then(s.bind(s,70959))},70959:(e,t,s)=>{"use strict";s.d(t,{default:()=>ea});var n=s(95155),l=s(12115),r=s(9233),a=s(94027);r.xI.setOptions({gfm:!0,breaks:!0});let i=[{value:"today",label:"H\xf4m nay"},{value:"todayWorking",label:"H\xf4m nay (Working time)"},{value:"yesterday",label:"H\xf4m qua"},{value:"yesterdayWorking",label:"H\xf4m qua (Working time)"},{value:"24h",label:"24 giờ"},{value:"thisWeek",label:"Tuần n\xe0y"},{value:"lastWeek",label:"Tuần trước"},{value:"7d",label:"7 ng\xe0y"},{value:"thisMonth",label:"Th\xe1ng n\xe0y"},{value:"lastMonth",label:"Th\xe1ng trước"},{value:"30d",label:"30 ng\xe0y"},{value:"60d",label:"60 ng\xe0y"},{value:"all",label:"Tất cả (60 ng\xe0y)"},{value:"custom",label:"T\xf9y chọn"}],o=[{value:"overview",label:"Tổng quan",icon:"dashboard"},{value:"apiKeys",label:"API keys",icon:"vpn_key"},{value:"clients",label:"Client/User",icon:"groups"},{value:"sources",label:"Source IP / Tool",icon:"hub"},{value:"providers",label:"Provider / Model",icon:"dns"},{value:"experience",label:"Trải nghiệm",icon:"speed"},{value:"errors",label:"Lỗi & bất thường",icon:"warning"},{value:"raw",label:"Raw usage",icon:"table"},{value:"aiHealth",label:"Đ\xe1nh gi\xe1 AI",icon:"neurology"}],d="blueRouterAnalyticsTab",c={normal:{className:"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",label:"B\xecnh thường"},warning:{className:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",label:"Cảnh b\xe1o"},critical:{className:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",label:"Nghi\xeam trọng"},no_traffic:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng c\xf3 lưu lượng"},unknown:{className:"border-border bg-surface-2 text-text-muted",label:"Kh\xf4ng r\xf5"}};function x({status:e}){let t=c[e]||c.unknown;return(0,n.jsxs)("span",{className:q("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold",t.className),children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),t.label]})}function m(e){let t=Number(e||0);if(!t)return"-";let s=["B","KiB","MiB","GiB","TiB"],n=Math.min(Math.floor(Math.log(t)/Math.log(1024)),s.length-1);return`${(t/1024**n).toLocaleString("vi-VN",{maximumFractionDigits:1})} ${s[n]}`}function u({nodes:e=[]}){return e.length?(0,n.jsxs)("section",{className:"border-y border-border py-4",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[19px] text-primary",children:"developer_board"}),(0,n.jsx)("h4",{className:"text-sm font-semibold text-text-main",children:"Cấu h\xecnh phần cứng từng node tại l\xfac đ\xe1nh gi\xe1"})]}),(0,n.jsx)("div",{className:"divide-y divide-border",children:e.map(e=>(0,n.jsxs)("div",{className:"grid gap-2 py-3 text-xs md:grid-cols-[minmax(180px,0.8fr)_minmax(0,2.2fr)]",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.name}),(0,n.jsx)("div",{className:"mt-0.5 text-text-muted",children:e.host||e.hostname||"-"}),(0,n.jsx)("div",{className:e.reachable?"mt-1 text-emerald-600 dark:text-emerald-300":"mt-1 text-red-600 dark:text-red-300",children:e.reachable?"C\xf3 dữ liệu":e.error||"Chưa c\xf3 snapshot"})]}),e.reachable?(0,n.jsxs)("div",{className:"space-y-1 text-text-muted",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium text-text-main",children:"CPU:"})," ",e.cpu?.model||"-"," \xb7 ",e.cpu?.cores||0," cores \xb7 sử dụng ",Number(e.cpu?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium text-text-main",children:"RAM:"})," ",m(e.memory?.totalBytes)," \xb7 đang d\xf9ng ",m(e.memory?.usedBytes)," (",Number(e.memory?.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%)"]}),e.gpus?.length?e.gpus.map(t=>(0,n.jsxs)("p",{children:[(0,n.jsxs)("span",{className:"font-medium text-text-main",children:["GPU ",t.index,":"]})," ",t.name," \xb7 VRAM ",(Number(t.memoryTotalMb||0)/1024).toLocaleString("vi-VN",{maximumFractionDigits:1})," GiB \xb7 sử dụng ",Number(t.usagePercent||0).toLocaleString("vi-VN",{maximumFractionDigits:1}),"%"]},`${e.id}-${t.index}`)):(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"font-medium text-text-main",children:"GPU:"})," Kh\xf4ng ph\xe1t hiện NVIDIA GPU"]}),(0,n.jsxs)("p",{className:"text-text-subtle",children:["Snapshot: ",e.statusAt?new Date(e.statusAt).toLocaleString("vi-VN"):"-"]})]}):null]},e.id))})]}):null}function h(){let[e,t]=(0,l.useState)([]),[s,a]=(0,l.useState)(""),[i,o]=(0,l.useState)(null),[d,c]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),[p,b]=(0,l.useState)(""),[g,j]=(0,l.useState)(!1),[y,v]=(0,l.useState)(""),[k,f]=(0,l.useState)(""),[N,T]=(0,l.useState)(!1),[w,q]=(0,l.useState)("");(0,l.useEffect)(()=>{(async()=>{let e="";try{let t=await fetch("/api/dashboard/analytics/analyze",{cache:"no-store"}),s=await t.json().catch(()=>({}));if(t.ok){o(s.analysis||null),c(!0===s.standby),e=s.selectedModel||"";let t=s.vllmConfig||"";v(t),f(t)}}catch{}try{let s=await fetch("/api/dashboard/analytics/ai-models",{cache:"no-store"}),n=(await s.json().catch(()=>({}))).options||[];t(n),a(t=>{let s=t||e;return s&&n.some(e=>e.value===s)?s:n[0]?.value||""})}catch{t([])}finally{j(!0)}})()},[]);let S=(0,l.useCallback)(e=>{a(e),fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[]),P=(0,l.useCallback)(async({showMessage:e=!0}={})=>{T(!0),e&&q("");try{let t=await fetch("/api/dashboard/analytics/analyze",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({vllmConfig:y})}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Kh\xf4ng thể lưu cấu h\xecnh vLLM");let n=s.vllmConfig||"";return v(n),f(n),e&&q("Đ\xe3 lưu cấu h\xecnh vLLM"),n}finally{T(!1)}},[y]),R=(0,l.useCallback)(async()=>{b("");try{await P()}catch(e){q(""),b(e?.message||"Kh\xf4ng thể lưu cấu h\xecnh vLLM")}},[P]),I=(0,l.useCallback)(async()=>{if(!s)return;let e=s.indexOf("::"),t=s.slice(0,e),n=s.slice(e+2);h(!0),b("");try{y.trim()!==k&&await P({showMessage:!1});let e=await fetch("/api/dashboard/analytics/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:t,model:n})}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng thể ph\xe2n t\xedch");o(s.analysis)}catch(e){b(e?.message||"Kh\xf4ng thể ph\xe2n t\xedch")}finally{h(!1)}},[P,k,s,y]),M=(0,l.useMemo)(()=>i?.summary?r.xI.parse(i.summary):"",[i]);return(0,n.jsxs)("section",{className:"overflow-hidden rounded-3xl border border-border bg-surface shadow-[var(--shadow-soft)]",children:[(0,n.jsx)("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5",children:(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[27px]",children:"neurology"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Đ\xe1nh gi\xe1 AI về trải nghiệm & hiệu năng"}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-text-muted",children:'Ph\xe2n t\xedch giờ l\xe0m việc h\xf4m nay, tập trung v\xe0o tab "Trải nghiệm" v\xe0 c\xe1c vLLM AI server local. Chạy nền tự động mỗi 1 giờ.'})]})]})}),(0,n.jsxs)("div",{className:"space-y-5 p-6",children:[d?(0,n.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Standby mode: kết quả ph\xe2n t\xedch được đồng bộ tự động từ Master. Node n\xe0y kh\xf4ng tự chạy ph\xe2n t\xedch AI."}):null,(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("label",{htmlFor:"analytics-vllm-config",className:"text-xs font-medium text-text-muted",children:"Cấu h\xecnh vLLM của c\xe1c server"}),(0,n.jsxs)("span",{className:"text-xs text-text-subtle",children:[y.length.toLocaleString("vi-VN")," / 50.000 k\xfd tự"]})]}),(0,n.jsx)("textarea",{id:"analytics-vllm-config",rows:8,maxLength:5e4,value:y,onChange:e=>{v(e.target.value),q("")},disabled:d||N,placeholder:"M\xf4 tả theo từng node, v\xed dụ:\nnode-gpu-01: model=..., --tensor-parallel-size 4, --max-model-len 32768, --gpu-memory-utilization 0.9\nnode-gpu-02: model=..., replicas=2, c\xe1c tham số batching/concurrency...",className:"w-full resize-y rounded-lg border border-border bg-surface px-3 py-2.5 font-mono text-xs leading-5 text-text-main outline-none transition focus:border-primary focus:ring-2 focus:ring-primary/15 disabled:opacity-60"}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"D\xf9ng t\xean hoặc host tr\xf9ng với Linux node trong Resource Monitor để AI \xe1nh xạ ch\xednh x\xe1c."}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[w?(0,n.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-300",children:w}):null,(0,n.jsxs)("button",{type:"button",onClick:R,disabled:d||N||y.trim()===k,className:"inline-flex items-center gap-2 rounded-lg border border-border bg-surface px-3 py-2 text-xs font-semibold text-text-main transition hover:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:N?"progress_activity":"save"}),N?"Đang lưu...":"Lưu cấu h\xecnh"]})]})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,n.jsxs)("label",{className:"flex min-w-[280px] flex-1 flex-col gap-1.5 text-sm",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"AI model d\xf9ng để ph\xe2n t\xedch"}),(0,n.jsxs)("select",{className:"rounded-xl border border-border bg-surface px-3 py-2.5 text-sm text-text-main disabled:opacity-60",value:s,onChange:e=>S(e.target.value),disabled:!e.length||d,children:[e.length?null:(0,n.jsx)("option",{value:"",children:"Chưa c\xf3 kết nối AI n\xe0o đang hoạt động"}),e.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})]}),(0,n.jsxs)("button",{type:"button",onClick:I,disabled:!s||d||m,className:"flex items-center gap-2 rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition disabled:cursor-not-allowed disabled:opacity-60",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:m?"progress_activity":"auto_awesome"}),m?"Đang ph\xe2n t\xedch...":"Ph\xe2n t\xedch lại"]})]}),p?(0,n.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-300",children:p}):null,i?(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-text-muted",children:[(0,n.jsxs)("span",{children:["Model: ",(0,n.jsx)("span",{className:"font-semibold",children:i.modelLabel})]}),(0,n.jsxs)("span",{children:["Cập nhật l\xfac ",i.generatedAt?new Date(i.generatedAt).toLocaleString("vi-VN"):"-"]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"Tổng quan:"}),(0,n.jsx)(x,{status:i.status}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"vLLM local:"}),(0,n.jsx)(x,{status:i.vllmStatus}),"number"==typeof i.vllmServerCount?(0,n.jsxs)("span",{className:"text-xs text-text-subtle",children:["(",i.vllmServerCount," node)"]}):null]}),(0,n.jsx)(u,{nodes:i.hardwareNodes||[]}),(0,n.jsx)("div",{className:"analytics-ai-body rounded-2xl border border-border bg-surface-2/40 p-5 text-sm leading-6 text-text-main",dangerouslySetInnerHTML:{__html:M}})]}):!m&&g?(0,n.jsx)("div",{className:"rounded-2xl border border-dashed border-border bg-surface-2/40 py-10 text-center text-sm text-text-muted",children:'Chưa c\xf3 ph\xe2n t\xedch n\xe0o — bấm "Ph\xe2n t\xedch lại" để bắt đầu.'}):null]})]})}function p(e,t=0){return Number(e||0).toLocaleString("vi-VN",{maximumFractionDigits:t})}function b(e){let t=Number(e||0);return Intl.NumberFormat("vi-VN",{notation:"compact",maximumFractionDigits:1}).format(t)}function g(e){let t=100*Number(e||0);return`${t.toLocaleString("vi-VN",{maximumFractionDigits:1})}%`}function j(e){let t=Number(e||0);return t?`$${t.toLocaleString("vi-VN",{minimumFractionDigits:4,maximumFractionDigits:6})}`:"$0"}function y(e){if(null==e||Number.isNaN(Number(e)))return"-";let t=Number(e);return t>=1e3?`${(t/1e3).toLocaleString("vi-VN",{maximumFractionDigits:2})}s`:`${t.toLocaleString("vi-VN",{maximumFractionDigits:0})}ms`}function v(e,t="/s"){if(null==e||Number.isNaN(Number(e)))return"-";let s=Number(e);return`${s.toLocaleString("vi-VN",{maximumFractionDigits:s>=10?1:2})}${t}`}function k(e){return null==e||Number.isNaN(Number(e))?"-":`${Number(e).toLocaleString("vi-VN",{maximumFractionDigits:0})}/100`}function f(e){if(!e)return null;let t=String(e).trim();return new Date(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(t)?`${t.replace(" ","T")}Z`:t)}function N(e){if(!e)return"-";try{let t=f(e);if(!t||Number.isNaN(t.getTime()))return String(e);return t.toLocaleString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return String(e)}}function T(e){if(!e)return"";try{let t=f(e);if(!t||Number.isNaN(t.getTime()))return String(e);return t.toLocaleString("vi-VN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return String(e)}}function w(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,a.s)();return e||t||s}function q(...e){return e.filter(Boolean).join(" ")}function S(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function P(e,t={}){let s=new URLSearchParams;return Object.entries({...e,...t}).forEach(([e,t])=>{let n=String(t??"").trim();n&&s.set(e,n)}),s.toString()}function R({children:e,className:t=""}){return(0,n.jsx)("div",{className:q("min-w-0 rounded-2xl border border-border bg-surface p-5 shadow-sm",t),children:e})}function I({icon:e,label:t,value:s,hint:l,help:r,tone:a="blue"}){return(0,n.jsx)(R,{className:"min-h-[126px]",children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-sm font-medium text-text-muted",children:t}),(0,n.jsx)("div",{className:"mt-2 text-2xl font-semibold text-text-main",children:s}),l?(0,n.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:l}):null,r?(0,n.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-text-muted/70",children:r}):null]}),(0,n.jsx)("div",{className:q("flex h-10 w-10 items-center justify-center rounded-xl",{blue:"bg-blue-500/10 text-blue-600 dark:text-blue-300",green:"bg-green-500/10 text-green-600 dark:text-green-300",red:"bg-red-500/10 text-red-600 dark:text-red-300",amber:"bg-amber-500/10 text-amber-600 dark:text-amber-300",purple:"bg-purple-500/10 text-purple-600 dark:text-purple-300",slate:"bg-slate-500/10 text-slate-600 dark:text-slate-300"}[a]||"bg-blue-500/10 text-blue-600 dark:text-blue-300"),children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:e})})]})})}function M({label:e,children:t}){return(0,n.jsxs)("label",{className:"space-y-1.5 text-xs font-medium text-text-muted",children:[(0,n.jsx)("span",{children:e}),t]})}function L({value:e,onChange:t,children:s}){return(0,n.jsx)("select",{value:e||"",onChange:e=>t(e.target.value),className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition focus:border-primary/60 focus:ring-2 focus:ring-primary/20",children:s})}function C({value:e,onChange:t,placeholder:s="",type:l="text"}){return(0,n.jsx)("input",{value:e||"",type:l,onChange:e=>t(e.target.value),placeholder:s,className:"h-10 w-full rounded-xl border border-border bg-background px-3 text-sm text-text-main outline-none transition placeholder:text-text-muted/60 focus:border-primary/60 focus:ring-2 focus:ring-primary/20"})}function A(){return(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Array.from({length:8}).map((e,t)=>(0,n.jsx)("div",{className:"h-32 animate-pulse rounded-2xl border border-border bg-surface"},t))}),(0,n.jsx)("div",{className:"h-80 animate-pulse rounded-2xl border border-border bg-surface"})]})}function $({title:e="Kh\xf4ng c\xf3 dữ liệu",description:t="Kh\xf4ng t\xecm thấy dữ liệu theo bộ lọc hiện tại."}){return(0,n.jsxs)("div",{className:"flex min-h-[180px] flex-col items-center justify-center rounded-2xl border border-dashed border-border bg-surface/60 p-8 text-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-4xl text-text-muted",children:"database_off"}),(0,n.jsx)("div",{className:"mt-3 text-sm font-semibold text-text-main",children:e}),(0,n.jsx)("div",{className:"mt-1 max-w-xl text-sm text-text-muted",children:t})]})}function K({data:e=[],valueKey:t="totalTokens",secondaryKey:s="requests",height:l=220}){let r=e||[],a=Math.max(...r.map(e=>Number(e[t]||0)),1),i=Math.max(...r.map(e=>Number(e[s]||0)),1);return 0===r.length?(0,n.jsx)($,{description:"Chưa c\xf3 time-series trong khoảng thời gian n\xe0y."}):(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("div",{className:"min-w-[720px]",children:[(0,n.jsx)("div",{className:"flex items-end gap-1",style:{height:l},children:r.map((e,r)=>{let o=Math.max(2,Number(e[t]||0)/a*(l-42)),d=Math.max(2,Number(e[s]||0)/i*(l-42));return(0,n.jsx)("div",{className:"group flex flex-1 flex-col items-center justify-end gap-1",children:(0,n.jsxs)("div",{className:"relative flex h-full w-full max-w-[34px] items-end justify-center gap-0.5",children:[(0,n.jsx)("div",{className:"w-2 rounded-t bg-primary/70",style:{height:o}}),(0,n.jsx)("div",{className:"w-2 rounded-t bg-amber-500/70",style:{height:d}}),(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-full left-1/2 z-20 hidden w-56 -translate-x-1/2 rounded-xl border border-border bg-surface p-3 text-left text-xs shadow-xl group-hover:block",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:T(e.label)}),(0,n.jsxs)("div",{className:"mt-1 text-text-muted",children:["Request: ",p(e.requests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Input token: ",p(e.promptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Output token: ",p(e.completionTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Tổng token: ",p(e.totalTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Lỗi: ",p(e.errors)]})]})]})},`${e.label}-${r}`)})}),(0,n.jsxs)("div",{className:"mt-3 flex justify-between gap-2 text-[11px] text-text-muted",children:[(0,n.jsx)("span",{children:T(r[0]?.label)}),(0,n.jsx)("span",{children:T(r[Math.floor(r.length/2)]?.label)}),(0,n.jsx)("span",{children:T(r[r.length-1]?.label)})]})]})})}function O(){return(0,n.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-primary/70"}),"Token"]}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-amber-500/70"}),"Request"]})]})}function F({columns:e,rows:t,empty:s="Kh\xf4ng c\xf3 dữ liệu"}){return t&&0!==t.length?(0,n.jsx)("div",{className:"overflow-x-auto overflow-y-auto rounded-2xl border border-border",style:{maxHeight:"500px"},children:(0,n.jsxs)("table",{className:"min-w-full divide-y divide-border text-sm",children:[(0,n.jsx)("thead",{className:"bg-background/70",children:(0,n.jsx)("tr",{children:e.map(e=>(0,n.jsx)("th",{className:q("whitespace-nowrap px-4 py-3 text-left text-xs font-semibold uppercase tracking-wide text-text-muted",e.className),children:e.label},e.key))})}),(0,n.jsx)("tbody",{className:"divide-y divide-border bg-surface",children:t.map((t,s)=>(0,n.jsx)("tr",{className:"hover:bg-background/60",children:e.map(e=>(0,n.jsx)("td",{className:q("whitespace-nowrap px-4 py-3 align-top text-text-main",e.className),children:e.render?e.render(t,s):t[e.key]??"-"},e.key))},t.key||t.id||`${t.label}-${s}`))})]})}):(0,n.jsx)($,{title:s})}function E({items:e=[]}){return e&&0!==e.length?(0,n.jsx)("div",{className:"flex max-w-[360px] flex-wrap gap-1.5",children:e.slice(0,3).map(e=>(0,n.jsxs)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs text-primary",children:[e.label||e.key," \xb7 ",p(e.count??e.requests??e.totalTokens??0)]},e.key))}):(0,n.jsx)("span",{className:"text-text-muted",children:"-"})}function _({row:e}){return(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{className:"font-semibold text-text-main",children:[b(e.totalTokens)," token"]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["In ",b(e.promptTokens)," / Out ",b(e.completionTokens)]})]})}function U({leaderboard:e={}}){let t=w(),s=e.rows||[],l=e.status||"warming",r="ready"===l?`${e.periodLabel||"H\xf4m nay"} \xb7 cập nhật ${N(e.generatedAt)} \xb7 refresh nền mỗi ${Math.round((e.refreshEveryMs||9e5)/6e4)} ph\xfat`:"error"===l?"Leaderboard đang chờ job nền tổng hợp lại dữ liệu.":"Leaderboard đang được job nền khởi tạo.";return(0,n.jsxs)(R,{className:"border-amber-500/20 bg-amber-500/[0.03]",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-amber-500",children:"crown"}),(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top 5 vinh danh token"})]}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp hạng theo API key owner d\xf9ng nhiều input + output token nhất."})]}),(0,n.jsx)("span",{className:"rounded-full bg-amber-500/10 px-3 py-1 text-xs font-semibold text-amber-700 dark:text-amber-300",children:r})]}),(0,n.jsx)(F,{rows:s,empty:"Chưa c\xf3 snapshot leaderboard từ job nền.",columns:[{key:"rank",label:"Hạng",render:e=>(0,n.jsxs)("div",{className:"flex min-w-[170px] items-center gap-3",children:[(0,n.jsx)("div",{className:q("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl",1===e.rank?"bg-amber-500/15 text-amber-600":"bg-primary/10 text-primary"),children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"crown"})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-semibold text-text-main",children:["#",e.rank," \xb7 ",e.title]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[g(e.tokenShare||0)," tổng token"]})]})]})},{key:"owner",label:"Owner",render:e=>(0,n.jsxs)("div",{className:"min-w-[210px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.ownerUser||e.label}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[e.apiKeyName||"API key",t&&e.apiKeyFingerprint?` \xb7 ${e.apiKeyFingerprint}`:""]})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"scope",label:"Phạm vi",render:e=>(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["API key ",p(e.apiKeyCount)," \xb7 IP ",p(e.sourceIpCount)]}),(0,n.jsxs)("div",{children:["Model ",p(e.modelCount)," \xb7 Provider ",p(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]})}function V({value:e}){let t=Number(e||0);return(0,n.jsx)("span",{className:q("rounded-full px-2 py-1 text-xs font-semibold",t>=.2?"bg-red-500/10 text-red-600 dark:text-red-300":t>=.05?"bg-amber-500/10 text-amber-600 dark:text-amber-300":"bg-green-500/10 text-green-600 dark:text-green-300"),children:g(t)})}function D({level:e,label:t}){let s=String(e||"none");return(0,n.jsx)("span",{className:q("rounded-full px-2 py-1 text-xs font-semibold",{fast:"bg-green-500/10 text-green-700 dark:text-green-300",ok:"bg-blue-500/10 text-blue-700 dark:text-blue-300",slow:"bg-amber-500/10 text-amber-700 dark:text-amber-300",very_slow:"bg-red-500/10 text-red-700 dark:text-red-300",low_sample:"bg-amber-500/10 text-amber-700 dark:text-amber-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[s]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:t||"-"})}function H({level:e,label:t}){let s=String(e||"normal");return(0,n.jsx)("span",{className:q("rounded-full px-2 py-1 text-xs font-semibold",{critical:"bg-red-500/10 text-red-700 dark:text-red-300",high:"bg-amber-500/10 text-amber-700 dark:text-amber-300",medium:"bg-blue-500/10 text-blue-700 dark:text-blue-300",normal:"bg-green-500/10 text-green-700 dark:text-green-300",none:"bg-slate-500/10 text-slate-700 dark:text-slate-300"}[s]||"bg-slate-500/10 text-slate-700 dark:text-slate-300"),children:t||"-"})}function B({value:e}){let t=String(e||"unknown"),s={gateway:{label:"Gateway",cls:"bg-purple-500/10 text-purple-700 dark:text-purple-300"},upstream:{label:"Upstream",cls:"bg-red-500/10 text-red-700 dark:text-red-300"},client:{label:"Client",cls:"bg-slate-500/10 text-slate-700 dark:text-slate-300"},rate_limit:{label:"Rate limit",cls:"bg-amber-500/10 text-amber-700 dark:text-amber-300"},unknown:{label:"Unknown",cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"}}[t]||{label:t,cls:"bg-zinc-500/10 text-zinc-700 dark:text-zinc-300"};return(0,n.jsx)("span",{className:q("rounded-full px-2 py-1 text-xs font-semibold",s.cls),children:s.label})}function G({row:e}){let t=e.sampleMessage||e.errorMessageShort||"";return t?(0,n.jsx)("span",{className:"block max-w-[360px] truncate text-xs text-text-muted",title:t,children:t}):(0,n.jsx)("span",{className:"text-text-muted",children:"-"})}function z({icon:e,label:t,value:s,hint:l,tone:r="slate"}){return(0,n.jsx)("div",{className:q("rounded-2xl border p-4 shadow-sm",{red:"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300",amber:"border-amber-500/20 bg-amber-500/10 text-amber-700 dark:text-amber-300",purple:"border-purple-500/20 bg-purple-500/10 text-purple-700 dark:text-purple-300",slate:"border-border bg-surface text-text-main",green:"border-green-500/20 bg-green-500/10 text-green-700 dark:text-green-300"}[r]||"border-border bg-surface text-text-main"),children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide opacity-75",children:t}),(0,n.jsx)("div",{className:"mt-2 text-2xl font-bold",children:p(s)}),l?(0,n.jsx)("div",{className:"mt-1 text-xs opacity-80",children:l}):null]}),(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px] opacity-80",children:e})]})})}function X({anomaly:e}){let t="danger"===e.level?"border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300":"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",s="danger"===e.level?"error":"warning";return(0,n.jsx)("div",{className:q("rounded-2xl border p-4",t),children:(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:s}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.title}),(0,n.jsx)("div",{className:"mt-1 text-sm opacity-90",children:e.detail})]})]})})}function W({notes:e=[]}){return e.length?(0,n.jsx)("div",{className:"space-y-2 rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:e.map((e,t)=>(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"}),(0,n.jsx)("span",{children:e})]},t))}):null}function J(e){let t=e=>String(e).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`}function Z({filters:e,setFilters:t,options:s,onRefresh:l,onExportCsv:r,loading:a,showProviderFilters:o=!0}){let d=(e,s)=>{let n=null;t(t=>{if("period"===e&&"custom"===s){let e,l;return n={...t,period:s,...((l=new Date(e=new Date)).setHours(8,0,0,0),{dateFrom:J(l),dateTo:J(e)})}}return{...t,[e]:s}}),n&&l?.(n)};return(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-6",children:[(0,n.jsx)(M,{label:"Khoảng thời gian",children:(0,n.jsx)(L,{value:e.period,onChange:e=>d("period",e),children:i.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,n.jsx)(M,{label:"Từ ng\xe0y",children:(0,n.jsx)(C,{type:"datetime-local",value:e.dateFrom,onChange:e=>d("dateFrom",e)})}),(0,n.jsx)(M,{label:"Đến ng\xe0y",children:(0,n.jsx)(C,{type:"datetime-local",value:e.dateTo,onChange:e=>d("dateTo",e)})}),o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(M,{label:"Provider",children:(0,n.jsxs)(L,{value:e.provider,onChange:e=>d("provider",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả provider"}),(s.providers||[]).map(e=>{let t="string"==typeof e?e:e.value,s="string"==typeof e?e:e.label||e.value;return(0,n.jsx)("option",{value:t,children:s},t)})]})}),(0,n.jsx)(M,{label:"Model",children:(0,n.jsxs)(L,{value:e.model,onChange:e=>d("model",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả model"}),(s.models||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(M,{label:"Provider account",children:(0,n.jsxs)(L,{value:e.connectionId,onChange:e=>d("connectionId",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả account"}),(s.connections||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})})]}):null,(0,n.jsx)(M,{label:"API key",children:(0,n.jsxs)(L,{value:e.apiKey,onChange:e=>d("apiKey",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả API key"}),(s.apiKeys||[]).map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]})}),(0,n.jsx)(M,{label:"Source IP",children:(0,n.jsx)(C,{value:e.clientIp,onChange:e=>d("clientIp",e),placeholder:"172.16.253.1"})}),(0,n.jsx)(M,{label:"Source tool",children:(0,n.jsx)(C,{value:e.sourceTool,onChange:e=>d("sourceTool",e),placeholder:"copilot, antigravity..."})}),(0,n.jsx)(M,{label:"Endpoint",children:(0,n.jsxs)(L,{value:e.endpoint,onChange:e=>d("endpoint",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả endpoint"}),(s.endpoints||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(M,{label:"Status",children:(0,n.jsxs)(L,{value:e.status,onChange:e=>d("status",e),children:[(0,n.jsx)("option",{value:"",children:"Tất cả status"}),(s.statuses||[]).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(M,{label:"Session / keyword",children:(0,n.jsx)(C,{value:e.sessionId||e.keyword,onChange:e=>d("keyword",e),placeholder:"session, prompt, error..."})})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsx)("div",{className:"text-xs text-text-muted",children:"Token/cost lấy từ UsageHistory. Source IP/tool/session lấy từ Prompt Logs."}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{onClick:()=>t({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:"Reset"}),(0,n.jsxs)("button",{onClick:r,className:"rounded-xl border border-border px-3 py-2 text-sm font-medium text-text-main hover:bg-background",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"download"}),"Export CSV"]}),(0,n.jsxs)("button",{onClick:()=>l?.(),disabled:a,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm disabled:opacity-60",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-1 align-[-4px] text-[18px]",children:"refresh"}),a?"Đang tải...":"Refresh"]})]})]})]})}function Q({data:e}){let t=w(),s=e.overview||{},l=e.latency||{},r=e.experience||{};return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsx)(U,{leaderboard:e.tokenLeaderboard}),(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(I,{icon:"call_made",label:"Tổng request",value:p(s.requests),hint:`${p(s.requestsPerMinute,2)} request/ph\xfat`,help:"Số request khớp bộ lọc hiện tại."}),(0,n.jsx)(I,{icon:"check_circle",label:"Th\xe0nh c\xf4ng",value:p(s.success),hint:`Tỷ lệ lỗi ${g(s.errorRate)}`,help:"Request trả về th\xe0nh c\xf4ng v\xe0 c\xf3 trạng th\xe1i OK.",tone:"green"}),(0,n.jsx)(I,{icon:"dns",label:"Lỗi server/provider",value:p(s.serverErrorEvents),hint:`Server-impacting ${g(s.serverErrorRate)} \xb7 client ${p(s.clientErrorEvents)}`,help:"Lỗi từ gateway, provider hoặc model server; t\xe1ch ri\xeang lỗi client.",tone:s.serverErrorEvents?"red":"green"}),(0,n.jsx)(I,{icon:"speed",label:"Trải nghiệm",value:k(r.score),hint:`${r.label||"-"} \xb7 ${p(r.samples)} mẫu`,help:"Điểm 0-100. Trừ tối đa 45 cho tốc độ (latency/TTFT/slow-rate t\xednh gộp, kh\xf4ng cộng dồn) v\xe0 40 cho lỗi server. Rate limit v\xe0 lỗi client chỉ trừ nhẹ v\xec kh\xf4ng phản \xe1nh chất lượng dịch vụ.",tone:r.tone||"purple"}),(0,n.jsx)(I,{icon:"timer",label:"Latency P95",value:y(r.p95LatencyMs||l.p95Ms),hint:`AVG ${y(r.avgLatencyMs||l.avgMs)} \xb7 P50 ${y(r.p50LatencyMs||l.p50Ms)}`,help:"95% request ho\xe0n tất nhanh hơn gi\xe1 trị n\xe0y.",tone:"purple"}),(0,n.jsx)(I,{icon:"bolt",label:"TTFT P95",value:y(r.p95TtftMs),hint:"Thời gian chờ token đầu ti\xean",help:"95% request nhận token đầu ti\xean nhanh hơn gi\xe1 trị n\xe0y.",tone:r.slowTtftRate>=.2?"amber":"blue"}),(0,n.jsx)(I,{icon:"input",label:"Input P95",value:b(r.p95PromptTokens||0),hint:`Avg ${b(r.avgPromptTokens||s.avgPromptTokens)} \xb7 >=30k ${g(r.longInputRate)}`,help:"95% request c\xf3 k\xedch thước input nhỏ hơn gi\xe1 trị n\xe0y."}),(0,n.jsx)(I,{icon:"psychology_alt",label:"Auto-off thinking",value:g(e.thinkingAnalytics?.autoOffRate),hint:`${p(e.thinkingAnalytics?.autoOffRequests||0)} request bị tắt theo policy`,help:"Tỷ lệ request bị tắt thinking do vượt ngưỡng hoặc policy.",tone:(e.thinkingAnalytics?.autoOffRate||0)>=.3?"amber":"slate"}),(0,n.jsx)(I,{icon:"data_object",label:"Large context >=50k",value:g(e.largeContextAnalytics?.gte50kRate),hint:`>=100k ${g(e.largeContextAnalytics?.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context rất lớn, dễ l\xe0m tăng TTFT/latency.",tone:(e.largeContextAnalytics?.gte50kRate||0)>=.3?"amber":"slate"}),(0,n.jsx)(I,{icon:"person_alert",label:"Top user nặng",value:s.topHeavyUser||"-",hint:`Chiếm ${g(s.topHeavyUserTokenShare)} tổng token`,help:"User/API key ti\xeau thụ nhiều token nhất trong bộ lọc.",tone:s.topHeavyUserTokenShare>=.35?"amber":"slate"}),(0,n.jsx)(I,{icon:"running_with_errors",label:"Request chậm",value:g(r.slowRequestRate),hint:`>= ${y(r.thresholds?.slowLatencyMs||45e3)} \xb7 max ${y(r.maxLatencyMs)}`,help:"Tỷ lệ request vượt ngưỡng chậm đ\xe3 cấu h\xecnh.",tone:r.slowRequestRate>=.2?"amber":"green"}),(0,n.jsx)(I,{icon:"output",label:"Output tokens",value:b(s.completionTokens),hint:`Avg ${p(s.avgCompletionTokens,1)} / request`,help:"Tổng token model sinh ra."}),(0,n.jsx)(I,{icon:"token",label:"Tổng tokens",value:b(s.totalTokens),hint:`${b(s.tokensPerMinute)} token/ph\xfat`,help:"Tổng input + output token.",tone:"amber"}),(0,n.jsx)(I,{icon:"speed",label:"Output speed",value:v(r.decodeTokensPerSecond," tok/s"),hint:`Latency/10k input ${y(r.latencyMsPer10kInputTokens)}`,help:"Tốc độ sinh token trung b\xecnh sau khi model bắt đầu trả lời.",tone:"slate"}),(0,n.jsx)(I,{icon:"payments",label:"Cost ước t\xednh",value:j(s.cost),hint:"Dựa tr\xean pricing đ\xe3 cấu h\xecnh",help:"Chi ph\xed suy ra từ token usage v\xe0 bảng gi\xe1 hiện tại.",tone:"green"})]}),(0,n.jsxs)("div",{className:"grid min-w-0 gap-5 xl:grid-cols-[2fr_1fr]",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Tần suất request & token theo thời gian"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Cột xanh l\xe0 token, cột v\xe0ng l\xe0 số request trong từng bucket thời gian."})]}),(0,n.jsx)(O,{})]}),(0,n.jsx)(K,{data:e.timeSeries||[]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"T\xf3m tắt active"}),(0,n.jsx)("div",{className:"mt-4 space-y-3",children:[["API key đang d\xf9ng",s.activeApiKeys],["Provider active",s.activeProviders],["Model active",s.activeModels],["Endpoint active",s.activeEndpoints],["Cached tokens",s.cachedTokens],["Reasoning tokens",s.reasoningTokens],["Latency AVG",y(r.avgLatencyMs||l.avgMs)],["Latency P50",y(r.p50LatencyMs||l.p50Ms)],["Latency P99",y(r.p99LatencyMs||l.p99Ms)],["TTFT P95",y(r.p95TtftMs)],["Input P95",b(r.p95PromptTokens||0)],["Long input >=30k",g(r.longInputRate)]].map(([e,t])=>(0,n.jsxs)("div",{className:"flex items-center justify-between rounded-xl bg-background px-3 py-2",children:[(0,n.jsx)("span",{className:"text-sm text-text-muted",children:e}),(0,n.jsx)("span",{className:"font-semibold text-text-main",children:"number"==typeof t?p(t):t})]},e))})]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token"}),(0,n.jsx)(F,{rows:(e.clientRequests?.topApiKeysByTokens||e.groups?.apiKeys||[]).slice(0,8),columns:[{key:"name",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.name||e.label}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[t?e.fingerprint||e.apiKeyFingerprint:"",e.ownerUser||e.apiKeyOwner?`${t&&(e.fingerprint||e.apiKeyFingerprint)?" \xb7 ":""}${e.ownerUser||e.apiKeyOwner}`:""]})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"input",label:"P95/Max input",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:b(e.p95PromptTokens||0)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",b(e.maxPromptTokens||0)]})]})}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token"}),(0,n.jsx)(F,{rows:(e.clientRequests?.topSourceIpsByTokens||[]).slice(0,8),columns:[{key:"label",label:"Source IP",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"heavy",label:"Nặng",render:e=>(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:[p(e.heavyRequests||0)," req"]})}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]})]})}function Y({data:e}){let t=w(),s=e.clientRequests||{},l=s.summary||{},r=s.topHeavyUsers||[],a=s.topProblemClients||[],i=s.topApiKeysByTokens||[],o=s.topSourceIpsByTokens||[];s.topSourceIpsByHeavyRequests;let d=s.inputBuckets||[],c=e=>(0,n.jsxs)("div",{className:"min-w-[220px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.label}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.ownerUser?`Owner ${e.ownerUser}`:e.apiKeyName||"Kh\xf4ng c\xf3 owner"}),(0,n.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:t?e.apiKeyFingerprint||e.primaryClientIp||e.key:e.primaryClientIp||""})]}),x=e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Nặng ",p(e.heavyRequests)," \xb7 ",g(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",b(e.p95PromptTokens)," \xb7 Max ",b(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",p(e.extremeInputRequests)," \xb7 ",g(e.extremeInputRate)]})]});return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(I,{icon:"person_alert",label:"Top user nặng nhất",value:l.topUserLabel||"-",hint:`${b(l.topUserTokens)} token \xb7 ${g(l.topUserTokenShare)} tổng token`,tone:l.topUserTokenShare>=.35?"amber":"slate"}),(0,n.jsx)(I,{icon:"vpn_key",label:"Top API key nhiều token",value:l.topApiKeyLabel||"-",hint:`${b(l.topApiKeyTokens)} token \xb7 ${g(l.topApiKeyTokenShare)} tổng token`,tone:l.topApiKeyTokenShare>=.35?"amber":"blue"}),(0,n.jsx)(I,{icon:"lan",label:"Top IP nhiều token",value:l.topSourceIpLabel||"-",hint:`${b(l.topSourceIpTokens)} token \xb7 ${g(l.topSourceIpTokenShare)} tổng token`,tone:l.topSourceIpTokenShare>=.35?"amber":"purple"}),(0,n.jsx)(I,{icon:"input",label:"Input d\xe0i >=30k",value:g(l.longInputBucketShare||0),hint:`>=70k ${g(l.extremeInputShare||0)}`,tone:(l.extremeInputShare||0)>=.1?"amber":"green"}),(0,n.jsx)(I,{icon:"groups",label:"User/API key được theo d\xf5i",value:p(l.trackedUsers||0),hint:"Theo owner/API key fingerprint/source IP",tone:"blue"}),(0,n.jsx)(I,{icon:"network_check",label:"Top IP request nặng",value:l.topSourceIpHeavyLabel||"-",hint:`${p(l.topSourceIpHeavyRequests||0)} request >=30k input/total`,tone:l.topSourceIpHeavyRequests?"amber":"slate"}),(0,n.jsx)(I,{icon:"report",label:"Client lỗi nhiều",value:p(l.problemClients||0),hint:"Nh\xf3m user/API key c\xf3 error rows",tone:l.problemClients?"amber":"green"})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top user/API key gửi request nặng nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input/output token của request th\xe0nh c\xf4ng c\xf3 token. D\xf9ng để ph\xe1t hiện user VS Code/agent đang tạo tải long-context lớn."})]}),(0,n.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary",children:"Kh\xf4ng hiển thị full bearer token"})]}),(0,n.jsx)(F,{rows:r,columns:[{key:"user",label:"User/API key",render:c},{key:"quality",label:"\xc1p lực",render:e=>(0,n.jsx)(H,{level:e.level,label:e.pressureLabel})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"input",label:"Input pressure",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Avg ",b(e.avgPromptTokens)," \xb7 P95 ",b(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["Max ",b(e.maxPromptTokens)," \xb7 >=30k ",g(e.longInputRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=50k ",g(e.hugeInputRate)," \xb7 >=70k ",g(e.extremeInputRate)]})]})},{key:"latency",label:"Latency / TTFT",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["P95 ",y(e.p95LatencyMs)," \xb7 Max ",y(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",y(e.p95TtftMs)," \xb7 Slow ",g(e.slowRequestRate)]})]})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"topIps",label:"IP / Tool",render:e=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(E,{items:e.topIps}),(0,n.jsx)(E,{items:e.topTools})]})},{key:"meta",label:"Meta",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["Key ",p(e.apiKeyCount)," \xb7 IP ",p(e.sourceIpCount)," \xb7 Tool ",p(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Session ",p(e.sessionCount)," \xb7 Last ",N(e.lastSeen)]})]})}],empty:"Kh\xf4ng c\xf3 request th\xe0nh c\xf4ng c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top API key d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo tổng input + output token từ UsageHistory, kh\xf4ng lộ full bearer token."})]}),(0,n.jsx)(F,{rows:i,columns:[{key:"apiKey",label:"API key",render:e=>(0,n.jsxs)("div",{className:"min-w-[220px]",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e.label}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.apiKeyOwner?`Owner ${e.apiKeyOwner}`:e.apiKeyName||e.primarySourceTool||"-"}),(0,n.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:t?e.apiKeyFingerprint||e.primaryClientIp||e.key:e.primaryClientIp||""})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"input",label:"Input nặng",render:x},{key:"meta",label:"Nguồn",render:e=>(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[(0,n.jsxs)("div",{children:["IP ",p(e.sourceIpCount)," \xb7 Tool ",p(e.sourceToolCount)]}),(0,n.jsxs)("div",{children:["Model ",p(e.modelCount)," \xb7 Provider ",p(e.providerCount)]})]})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 API key c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top Source IP d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Dựa tr\xean UsageHistory n\xean c\xf3 input/output token, kh\xe1c với bảng Source IP từ Prompt Logs chỉ đếm log."})]}),(0,n.jsx)(F,{rows:o,columns:[{key:"ip",label:"Source IP",render:e=>(0,n.jsxs)("div",{className:"min-w-[180px]",children:[(0,n.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:e.label}),(0,n.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Tool ",p(e.sourceToolCount)," \xb7 API key ",p(e.apiKeyCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",p(e.modelCount)," \xb7 Provider ",p(e.providerCount)]})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"input",label:"Input nặng",render:x},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố request theo k\xedch thước input"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Gi\xfap admin biết workload đang l\xe0 chat ngắn hay long-context VS Code/agent."})]}),(0,n.jsx)(F,{rows:d,columns:[{key:"label",label:"Input bucket",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"share",label:"Tỷ trọng",render:e=>g(e.share)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"latency",label:"Latency P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[y(e.p95LatencyMs)," / ",y(e.maxLatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT P95 ",y(e.p95TtftMs)]})]})}],empty:"Kh\xf4ng c\xf3 dữ liệu bucket input."})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Client/API key lỗi nhiều"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng để ph\xe1t hiện sai endpoint/model/auth/policy hoặc client tool cấu h\xecnh sai."})]}),(0,n.jsx)(F,{rows:a,columns:[{key:"user",label:"Client",render:c},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"errors",label:"Lỗi",render:e=>p(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"source",label:"IP/Tool",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{className:"font-mono",children:e.primaryClientIp||"-"}),(0,n.jsx)("div",{className:"text-text-muted",children:e.primarySourceTool||"-"})]})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 client lỗi theo bộ lọc hiện tại."})]})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"G\xf3c nh\xecn monitor client n\xean d\xf9ng"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"C\xe1c chỉ số n\xe0y bổ sung cho latency/model để admin ph\xe2n biệt server chậm hay client gửi request qu\xe1 nặng."})]}),(0,n.jsx)("div",{className:"grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3",children:[["Token/user","X\xe1c định user/API key tạo tải lớn nhất, hữu \xedch cho quota v\xe0 hướng dẫn workflow VS Code."],["Input bucket","Nếu phần lớn request nằm ở 30k-70k+, P95/P99 cao chủ yếu do prompt eval/context d\xe0i."],["TTFT theo user","TTFT cao cho một user thường l\xe0 input d\xe0i hoặc chờ slot, kh\xf4ng nhất thiết provider lỗi."],["Error theo client","T\xe1ch lỗi sai endpoint/model/API key khỏi lỗi server/provider để kh\xf4ng cảnh b\xe1o nhầm."],["Source IP/tool","Ph\xe1t hiện m\xe1y/tool gửi request nhiều hoặc cấu h\xecnh sai."],["Top request nặng","D\xf9ng Raw usage để drill-down request cụ thể khi một user k\xe9o tải hệ thống."]].map(([e,t])=>(0,n.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,n.jsx)("div",{className:"font-semibold text-text-main",children:e}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:t})]},e))})]})]})}function ee({data:e}){let t=w();return(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thống k\xea theo API key"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Kh\xf4ng hiển thị full bearer token. Dashboard chỉ d\xf9ng fingerprint/masked key."})]}),(0,n.jsx)(F,{rows:e.groups?.apiKeys||[],columns:[{key:"name",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.name}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:[t?e.fingerprint:"",e.ownerUser?`${t&&e.fingerprint?" \xb7 ":""}Owner: ${e.ownerUser}`:""]})]})},{key:"requests",label:"Requests",render:e=>p(e.requests)},{key:"success",label:"OK/Lỗi",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{className:"text-green-600",children:["OK ",p(e.success)]}),(0,n.jsxs)("div",{className:"text-red-600",children:["Lỗi ",p(e.errors)]})]})},{key:"tokens",label:"In/Out token",render:e=>(0,n.jsx)(_,{row:e})},{key:"cost",label:"Cost",render:e=>j(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"topProviders",label:"Top provider",render:e=>(0,n.jsx)(E,{items:e.topProviders})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]})}function et({data:e}){let t=e.clientRequests?.topSourceIpsByTokens||[],s=e.clientRequests?.topSourceIpsByHeavyRequests||[],l=e=>(0,n.jsxs)("div",{className:"min-w-[180px]",children:[(0,n.jsx)("div",{className:"font-mono text-sm font-semibold text-text-main",children:e.label}),(0,n.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["API key ",p(e.apiKeyCount)," \xb7 Tool ",p(e.sourceToolCount)]}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Model ",p(e.modelCount)," \xb7 Provider ",p(e.providerCount)]})]});return(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP d\xf9ng nhiều token nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Aggregate từ UsageHistory, xếp theo tổng input + output token."})]}),(0,n.jsx)(F,{rows:t,columns:[{key:"ip",label:"Source IP",render:l},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP c\xf3 token trong khoảng lọc."})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Top IP gửi request nặng nhất"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Xếp theo số request input/total token từ 30k trở l\xean, sau đ\xf3 theo max/P95 input."})]}),(0,n.jsx)(F,{rows:s,columns:[{key:"ip",label:"Source IP",render:l},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"heavy",label:"Request nặng",render:e=>(0,n.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,n.jsxs)("div",{children:["Nặng ",p(e.heavyRequests)," \xb7 ",g(e.heavyRequestRate)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["P95 input ",b(e.p95PromptTokens)," \xb7 Max ",b(e.maxPromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=70k ",p(e.extremeInputRequests)," \xb7 ",g(e.extremeInputRate)]})]})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 Source IP gửi request nặng trong khoảng lọc."})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source IP từ Prompt Logs"}),(0,n.jsx)(F,{rows:e.promptLogs?.topClientIps||[],columns:[{key:"label",label:"IP",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Logs",render:e=>p(e.requests)},{key:"errors",label:"Lỗi",render:e=>p(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"topTools",label:"Tools",render:e=>(0,n.jsx)(E,{items:e.topTools})},{key:"topModels",label:"Models",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Source tool"}),(0,n.jsx)(F,{rows:e.promptLogs?.topSourceTools||[],columns:[{key:"label",label:"Tool",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Logs",render:e=>p(e.requests)},{key:"errors",label:"Lỗi",render:e=>p(e.errors)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"topIps",label:"Top IP",render:e=>(0,n.jsx)(E,{items:e.topIps})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]}),(0,n.jsxs)(R,{className:"xl:col-span-2",children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Session nhiều hoạt động"}),(0,n.jsx)(F,{rows:e.promptLogs?.topSessions||[],columns:[{key:"label",label:"Session",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Logs",render:e=>p(e.requests)},{key:"errors",label:"Lỗi",render:e=>p(e.errors)},{key:"topIps",label:"IP",render:e=>(0,n.jsx)(E,{items:e.topIps})},{key:"topTools",label:"Tool",render:e=>(0,n.jsx)(E,{items:e.topTools})},{key:"topModels",label:"Model",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]})]})}function es({data:e}){return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider"}),(0,n.jsx)(F,{rows:e.groups?.providers||[],columns:[{key:"label",label:"Provider",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Requests",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"cost",label:"Cost",render:e=>j(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"topModels",label:"Top model",render:e=>(0,n.jsx)(E,{items:e.topModels})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Model"}),(0,n.jsx)(F,{rows:e.groups?.models||[],columns:[{key:"label",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(V,{value:e.errorRate})}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Provider account / connection"}),(0,n.jsx)(F,{rows:e.groups?.providerAccounts||[],columns:[{key:"label",label:"Account",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.label}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider||e.connectionId})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"errorRate",label:"Lỗi",render:e=>(0,n.jsx)(V,{value:e.errorRate})}]})]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Endpoint"}),(0,n.jsx)(F,{rows:e.groups?.endpoints||[],columns:[{key:"label",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.label})},{key:"requests",label:"Requests",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"cost",label:"Cost",render:e=>j(e.cost)},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]})]})}function en({data:e}){let t=w(),s=e.experience||{},l=s.thresholds||{},r=e.thinkingAnalytics||{},a=e.largeContextAnalytics||{},i=s.byModel||[],o=s.slowestRequests||[];return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(I,{icon:"verified",label:"Đ\xe1nh gi\xe1 tổng",value:k(s.score),hint:`${s.label||"-"} \xb7 ${p(s.samples)} mẫu success c\xf3 token`,help:"Điểm 0-100 từ request th\xe0nh c\xf4ng c\xf3 token. Tốc độ trừ tối đa 45 (chuẩn ho\xe1 theo k\xedch thước input khi prompt lớn), lỗi server trừ tối đa 40. Rate limit trừ nhẹ v\xec đ\xf3 l\xe0 hệ thống tự bảo vệ.",tone:s.tone||"slate"}),(0,n.jsx)(I,{icon:"timer",label:"Latency AVG / P95",value:`${y(s.avgLatencyMs)} / ${y(s.p95LatencyMs)}`,hint:`P50 ${y(s.p50LatencyMs)} \xb7 P99 ${y(s.p99LatencyMs)}`,help:"AVG l\xe0 trung b\xecnh; P95 thể hiện nh\xf3m 5% request chậm nhất.",tone:"purple"}),(0,n.jsx)(I,{icon:"bolt",label:"TTFT AVG / P95",value:`${y(s.avgTtftMs)} / ${y(s.p95TtftMs)}`,hint:"TTFT cao thường l\xe0 queue/prompt eval/input d\xe0i",help:"Thời gian từ l\xfac gửi request đến token đầu ti\xean.",tone:s.slowTtftRate>=.2?"amber":"blue"}),(0,n.jsx)(I,{icon:"keyboard_double_arrow_up",label:"Input AVG / P95",value:`${b(s.avgPromptTokens)} / ${b(s.p95PromptTokens)}`,hint:`>=30k ${g(s.longInputRate)} \xb7 >=50k ${g(s.hugeInputRate)}`,help:"Input c\xe0ng lớn th\xec prompt eval v\xe0 TTFT thường c\xe0ng cao."}),(0,n.jsx)(I,{icon:"running_with_errors",label:"Slow request",value:g(s.slowRequestRate),hint:`Latency >= ${y(l.slowLatencyMs||45e3)} \xb7 rất chậm ${g(s.verySlowRequestRate)}`,help:"Tỷ lệ request ho\xe0n tất chậm hơn ngưỡng vận h\xe0nh.",tone:s.slowRequestRate>=.2?"amber":"green"}),(0,n.jsx)(I,{icon:"pending_actions",label:"Slow TTFT",value:g(s.slowTtftRate),hint:`TTFT >= ${y(l.slowTtftMs||2e4)}`,help:"Tỷ lệ request chờ token đầu ti\xean qu\xe1 l\xe2u.",tone:s.slowTtftRate>=.2?"amber":"green"}),(0,n.jsx)(I,{icon:"speed",label:"Output tốc độ",value:v(s.decodeTokensPerSecond," tok/s"),hint:`Output/latency ${v(s.outputTokensPerSecond," tok/s")}`,tone:"slate"}),(0,n.jsx)(I,{icon:"data_usage",label:"Latency / 10k input",value:y(s.latencyMsPer10kInputTokens),hint:"Hữu \xedch khi VS Code gửi 30k–70k token",help:"Chuẩn h\xf3a latency theo k\xedch thước input để so s\xe1nh c\xf4ng bằng hơn.",tone:"slate"}),(0,n.jsx)(I,{icon:"psychology_alt",label:"Thinking auto-off",value:g(r.autoOffRate),hint:`${p(r.autoOffRequests||0)} / ${p(r.totalRequests||0)} request`,help:"Request bị tắt thinking tự động do vượt ngưỡng prompt chars.",tone:(r.autoOffRate||0)>=.3?"amber":"green"}),(0,n.jsx)(I,{icon:"toggle_off",label:"Thinking OFF",value:g(r.thinkingOffRate),hint:`ON ${g(r.thinkingOnRate)} \xb7 unknown ${g(r.unknownRate)}`,help:"Tỷ lệ request cuối c\xf9ng chạy ở chế độ kh\xf4ng thinking.",tone:(r.thinkingOffRate||0)>=.5?"blue":"slate"}),(0,n.jsx)(I,{icon:"data_object",label:"Large context",value:g(a.gte50kRate),hint:`>=30k ${g(a.gte30kRate)} \xb7 >=100k ${g(a.gte100kRate)}`,help:"Tỷ lệ request c\xf3 context lớn; thường l\xe0 nguy\xean nh\xe2n l\xe0m P95/P99 tăng.",tone:(a.gte50kRate||0)>=.3?"amber":"slate"})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Thinking Analytics"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Theo d\xf5i request bật/tắt thinking v\xe0 tỷ lệ auto-off do vượt ngưỡng prompt chars."})]}),(0,n.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:[["Thinking ON",p(r.thinkingOnRequests||0),g(r.thinkingOnRate)],["Thinking OFF",p(r.thinkingOffRequests||0),g(r.thinkingOffRate)],["Auto-off hit",p(r.autoOffRequests||0),g(r.autoOffRate)],["C\xf3 ngưỡng auto-off",p(r.thresholdConfiguredRequests||0),`hit ${g(r.autoOffEligibleHitRate)}`]].map(([e,t,s])=>(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,n.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:t}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:s})]},e))}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(F,{rows:r.byModel||[],empty:"Chưa c\xf3 dữ liệu thinking trong khoảng lọc.",columns:[{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.provider})]})},{key:"requests",label:"Req",render:e=>p(e.requests)},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:p(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:g(e.autoOffRate)})]})},{key:"thinking",label:"ON/OFF",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:["ON ",p(e.thinkingOnRequests)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["OFF ",p(e.thinkingOffRequests)]})]})},{key:"chars",label:"Chars avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:b(e.avgPromptChars)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",b(e.maxPromptChars)]})]})}]})})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Large Context Analytics"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Bucket theo request size, ưu ti\xean prompt chars; nếu chưa c\xf3 chars th\xec fallback prompt tokens."})]}),(0,n.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[[">=30k",a.gte30kRequests,a.gte30kRate],[">=50k",a.gte50kRequests,a.gte50kRate],[">=100k",a.gte100kRequests,a.gte100kRate]].map(([e,t,s])=>(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,n.jsx)("div",{className:"mt-2 text-xl font-semibold text-text-main",children:p(t||0)}),(0,n.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:g(s)})]},e))}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(F,{rows:a.buckets||[],empty:"Chưa c\xf3 large context buckets trong khoảng lọc.",columns:[{key:"label",label:"Bucket",render:e=>(0,n.jsx)("span",{className:"font-semibold",children:e.label})},{key:"requests",label:"Req",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:p(e.requests)}),(0,n.jsx)("div",{className:"text-text-muted",children:g(e.share)})]})},{key:"chars",label:"Size avg/max",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:b(e.avgRequestSize)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",b(e.maxRequestSize)]})]})},{key:"latency",label:"Latency/TTFT",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:y(e.avgLatencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",y(e.avgTtftMs)]})]})},{key:"autoOff",label:"Auto-off",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:p(e.autoOffRequests)}),(0,n.jsx)("div",{className:"text-text-muted",children:g(e.autoOffRate)})]})}]})})]})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"C\xe1ch đọc trải nghiệm user"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Nh\xf3m n\xe0y chỉ t\xednh request th\xe0nh c\xf4ng c\xf3 token v\xe0 latency > 0. Error/pending/success 0-token kh\xf4ng trộn v\xe0o tốc độ model. TTFT l\xe0 thời gian tới token đầu ti\xean; với VS Code input 30k–70k, TTFT cao thường phản \xe1nh chờ slot hoặc prompt eval d\xe0i."})]}),(0,n.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Nhanh/chậm thực tế"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Latency AVG/P50/P95/MAX cho biết user phải chờ bao l\xe2u để request ho\xe0n tất."})]}),(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Queue hoặc prompt eval"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"TTFT cao + input P95 cao l\xe0 t\xedn hiệu request d\xe0i, hết slot hoặc upstream đang queue."})]}),(0,n.jsxs)("div",{className:"rounded-2xl bg-background p-4",children:[(0,n.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"VS Code / agent"}),(0,n.jsx)("div",{className:"mt-2 text-sm text-text-main",children:"Theo d\xf5i tỷ lệ input >=30k/50k/70k để biết P95/P99 cao c\xf3 phải do context cực d\xe0i hay kh\xf4ng."})]})]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Chất lượng phản hồi theo provider/model"}),(0,n.jsx)(F,{rows:i,empty:"Chưa c\xf3 mẫu latency cho model trong khoảng lọc.",columns:[{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"quality",label:"Đ\xe1nh gi\xe1",render:e=>(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(D,{level:e.level,label:e.labelQuality}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:k(e.score)})]})},{key:"samples",label:"Mẫu",render:e=>p(e.samples)},{key:"latency",label:"Latency P50/P95/MAX",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[y(e.p50LatencyMs)," / ",y(e.p95LatencyMs)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:["max ",y(e.maxLatencyMs)]})]})},{key:"ttft",label:"TTFT P95",render:e=>y(e.p95TtftMs)},{key:"input",label:"Input avg/P95",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsxs)("div",{children:[b(e.avgPromptTokens)," / ",b(e.p95PromptTokens)]}),(0,n.jsxs)("div",{className:"text-text-muted",children:[">=30k ",g(e.longInputRate)]})]})},{key:"slow",label:"Chậm",render:e=>(0,n.jsx)(V,{value:e.slowRequestRate})},{key:"speed",label:"Output tok/s",render:e=>v(e.outputTokensPerSecond," tok/s")}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Request chậm nhất"}),(0,n.jsx)(F,{rows:o,empty:"Kh\xf4ng c\xf3 request chậm trong khoảng lọc.",columns:[{key:"timestamp",label:"Time",render:e=>N(e.timestamp)},{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"latency",label:"Latency / TTFT",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{className:"font-semibold",children:y(e.latencyMs)}),(0,n.jsxs)("div",{className:"text-text-muted",children:["TTFT ",y(e.ttftMs)]})]})},{key:"tokens",label:"In / Out",render:e=>(0,n.jsx)(_,{row:e})},{key:"apiKeyName",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:e.apiKeyName}),t?(0,n.jsx)("div",{className:"font-mono text-xs text-text-muted",children:e.apiKeyFingerprint}):null]})},{key:"sourceTool",label:"Tool/IP",render:e=>(0,n.jsxs)("div",{className:"text-xs",children:[(0,n.jsx)("div",{children:e.sourceTool||"-"}),(0,n.jsx)("div",{className:"font-mono text-text-muted",children:e.clientIp||"-"})]})},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint||"-"})}]})]})]})}function el({data:e}){let t=w(),s=e.requestErrors||{},l=s.summary||{},r=e.overview||{},a=Number(r.serverErrorRate||0),i=Number(r.clientErrorRate||0),o=Number(r.rateLimitErrorRate||0),d=[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(B,{value:e.faultOwner})},{key:"status",label:"Status",render:e=>(0,n.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:e.status})},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"requests",label:"Lỗi",render:e=>p(e.errors||e.requests)},{key:"errorType",label:"Type",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.errorType||e.errorCode||"-"})},{key:"sampleMessage",label:"Sample",render:e=>(0,n.jsx)(G,{row:e})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}];return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[(0,n.jsx)(z,{icon:"dns",label:"Server/provider",value:l.serverImpacting||0,hint:`${g(a)} tr\xean tổng request`,tone:l.serverImpacting?"red":"green"}),(0,n.jsx)(z,{icon:"cloud_off",label:"Upstream",value:l.upstream||0,hint:"Provider/model server, timeout, network, 5xx",tone:l.upstream?"red":"green"}),(0,n.jsx)(z,{icon:"router",label:"Gateway",value:l.gateway||0,hint:"Lỗi nội bộ BlueRouter/gateway",tone:l.gateway?"purple":"green"}),(0,n.jsx)(z,{icon:"integration_instructions",label:"Client/request",value:l.client||0,hint:`${g(i)} do endpoint/model/body/auth`,tone:l.client?"slate":"green"}),(0,n.jsx)(z,{icon:"speed",label:"Rate/quota",value:l.rateLimit||0,hint:`${g(o)} rate-limit/quota`,tone:l.rateLimit?"amber":"green"})]}),(0,n.jsx)("div",{className:"rounded-2xl border border-blue-500/20 bg-blue-500/10 p-4 text-sm text-blue-700 dark:text-blue-300",children:(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"rule_settings"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:"Ph\xe2n loại lỗi đ\xe3 t\xe1ch client khỏi server/provider"}),(0,n.jsxs)("div",{className:"mt-1 opacity-90",children:["Cảnh b\xe1o vận h\xe0nh n\xean ưu ti\xean nh\xf3m ",(0,n.jsx)("b",{children:"Server/provider"})," gồm gateway, upstream, timeout, network v\xe0 5xx. Nh\xf3m ",(0,n.jsx)("b",{children:"Client/request"})," vẫn được log đầy đủ nhưng thường l\xe0 sai endpoint, model, auth, JSON/body hoặc context."]})]})]})}),e.anomalies?.length?(0,n.jsx)("div",{className:"grid gap-4 xl:grid-cols-2",children:e.anomalies.map((e,t)=>(0,n.jsx)(X,{anomaly:e},t))}):(0,n.jsxs)("div",{className:"rounded-2xl border border-green-500/20 bg-green-500/10 p-4 text-sm text-green-700 dark:text-green-300",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"check_circle"}),"Chưa ph\xe1t hiện bất thường server/provider r\xf5 r\xe0ng theo bộ lọc hiện tại."]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi server/provider cần xử l\xfd"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Chỉ gồm gateway/upstream/server-impacting errors. Đ\xe2y l\xe0 bảng quan trọng nhất cho vận h\xe0nh."})]}),(0,n.jsxs)("span",{className:"rounded-full bg-red-500/10 px-3 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:[p(l.serverImpacting||0)," lỗi"]})]}),(0,n.jsx)(F,{rows:s.topServerErrors||[],columns:d,empty:"Kh\xf4ng c\xf3 lỗi server/provider trong khoảng lọc."})]}),(0,n.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Lỗi client/request sai"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Sai endpoint, model, auth, JSON/body, context length. D\xf9ng để hướng dẫn client sửa request."})]}),(0,n.jsx)(F,{rows:s.topClientErrors||[],columns:d.filter(e=>!["sampleMessage"].includes(e.key)),empty:"Kh\xf4ng c\xf3 lỗi client/request trong khoảng lọc."})]}),(0,n.jsxs)(R,{children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Ph\xe2n bố loại lỗi"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xe1ch nguồn chịu tr\xe1ch nhiệm để kh\xf4ng nhầm lỗi client th\xe0nh lỗi server."})]}),(0,n.jsx)(F,{rows:s.byFaultOwner||[],columns:[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(B,{value:e.faultOwner||e.key})},{key:"requests",label:"Số lỗi",render:e=>p(e.requests)},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}],empty:"Kh\xf4ng c\xf3 lỗi để ph\xe2n loại."})]})]}),s.topRateLimitErrors?.length?(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Rate limit / quota"}),(0,n.jsx)(F,{rows:s.topRateLimitErrors||[],columns:d})]}):null,(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Tất cả lỗi raw theo status/provider/model/endpoint"}),(0,n.jsx)(F,{rows:[...e.groups?.errors||[]].sort((e,t)=>new Date(f(t.lastSeen)||0)-new Date(f(e.lastSeen)||0)||Number(t.errors||t.requests||0)-Number(e.errors||e.requests||0)),columns:[{key:"faultOwner",label:"Loại",render:e=>(0,n.jsx)(B,{value:e.faultOwner})},{key:"status",label:"Status",render:e=>(0,n.jsx)("span",{className:"rounded-full bg-red-500/10 px-2 py-1 text-xs font-semibold text-red-600 dark:text-red-300",children:e.status})},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"requests",label:"Lỗi",render:e=>p(e.errors||e.requests)},{key:"apiKey",label:"API key",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:t?e.apiKey:e.apiKeyName||"•••"})},{key:"lastSeen",label:"Last seen",render:e=>N(e.lastSeen)}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Status distribution"}),(0,n.jsx)(F,{rows:e.groups?.statuses||[],columns:[{key:"label",label:"Status"},{key:"requests",label:"Requests",render:e=>p(e.requests)},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"errorRate",label:"Error %",render:e=>(0,n.jsx)(V,{value:e.errorRate})}]})]})]})}function er({data:e}){let t=w();return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Top request nặng token"}),(0,n.jsx)(F,{rows:e.heavyRequests||[],columns:[{key:"timestamp",label:"Time",render:e=>N(e.timestamp)},{key:"model",label:"Model",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-semibold",children:e.model}),(0,n.jsx)("div",{className:"text-xs text-text-muted",children:e.providerLabel||e.provider})]})},{key:"apiKeyName",label:"API key",render:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:e.apiKeyName}),t?(0,n.jsx)("div",{className:"font-mono text-xs text-text-muted",children:e.apiKeyFingerprint}):null]})},{key:"accountName",label:"Account"},{key:"endpoint",label:"Endpoint",render:e=>(0,n.jsx)("span",{className:"font-mono text-xs",children:e.endpoint})},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"status",label:"Status"}]})]}),(0,n.jsxs)(R,{children:[(0,n.jsx)("h2",{className:"mb-4 text-lg font-semibold text-text-main",children:"Recent usage"}),(0,n.jsx)(F,{rows:e.recentUsage||[],columns:[{key:"timestamp",label:"Time",render:e=>N(e.timestamp)},{key:"provider",label:"Provider",render:e=>e.providerLabel||e.provider},{key:"model",label:"Model"},{key:"apiKeyName",label:"API key"},{key:"tokens",label:"Token",render:e=>(0,n.jsx)(_,{row:e})},{key:"cost",label:"Cost",render:e=>j(e.cost)},{key:"status",label:"Status"}]})]})]})}function ea(){let{isAdmin:e,isMonitorAdmin:t,isAiGatewaysMonitor:s}=(0,a.s)(),r=e||t||s,i=(0,l.useMemo)(()=>e?o:o.filter(e=>"aiHealth"!==e.value),[e]),[c,x]=(0,l.useState)({period:"today",dateFrom:"",dateTo:"",provider:"",model:"",connectionId:"",status:"",endpoint:"",apiKey:"",clientIp:"",sourceTool:"",sessionId:"",keyword:""}),[m,u]=(0,l.useState)(null),[p,b]=(0,l.useState)(!0),[g,j]=(0,l.useState)(""),[y,v]=(0,l.useState)("overview"),[k,f]=(0,l.useState)(null),T=function(e,t=450){let[s,n]=(0,l.useState)(e);return(0,l.useEffect)(()=>{let s=setTimeout(()=>n(e),t);return()=>clearTimeout(s)},[e,t]),s}(c,450),w=(0,l.useRef)(0),R=(0,l.useCallback)(async({clear:e=!1,filtersOverride:t=null}={})=>{let s=w.current+1;w.current=s,e&&u(null),b(!0),j("");let n=Date.now();try{let e=t||T,l=P(e,{timeZone:S()}),r=await fetch(`/api/dashboard/analytics?${l}`,{cache:"no-store"}),a=await r.json().catch(()=>({}));if(s!==w.current)return;if(!r.ok)throw Error(a.error||"Kh\xf4ng tải được dữ liệu analytics");u(a),f({loadedMs:Date.now()-n,cacheState:a.cacheState||"",cacheAgeMs:a.cacheAgeMs||0})}catch(e){if(s!==w.current)return;j(e.message||"Kh\xf4ng tải được dữ liệu analytics")}finally{s===w.current&&b(!1)}},[T]);(0,l.useEffect)(()=>{R({clear:!0})},[R]),(0,l.useEffect)(()=>{let e=localStorage.getItem(d);e&&i.some(t=>t.value===e)&&v(e)},[i]),(0,l.useEffect)(()=>{i.some(e=>e.value===y)||v("overview")},[i,y]),(0,l.useEffect)(()=>{localStorage.setItem(d,y)},[y]);let I=m?.options||{},M=(0,l.useMemo)(()=>m?.generatedAt?N(m.generatedAt):"-",[m]);return(0,n.jsxs)("div",{className:"space-y-5 p-4 md:p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,n.jsx)("span",{className:"material-symbols-outlined",children:"monitoring"}),(0,n.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wide",children:"BlueRouter Analytics"})]}),(0,n.jsx)("h1",{className:"mt-2 text-2xl font-bold text-text-main",children:"Thống k\xea sử dụng Gateway"}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-text-muted",children:"Theo d\xf5i tần suất request, input/output token, API key, provider, model, endpoint, Source IP, source tool v\xe0 lỗi vận h\xe0nh."})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-surface px-4 py-3 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"schedule"}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{children:["Generated: ",M]}),k?(0,n.jsxs)("div",{className:"mt-0.5 text-xs",children:["Loaded in ",k.loadedMs>=1e3?`${(k.loadedMs/1e3).toLocaleString("vi-VN",{maximumFractionDigits:1})}s`:`${k.loadedMs}ms`,"hit"===k.cacheState?(0,n.jsxs)("span",{className:"ml-1.5 rounded bg-emerald-500/10 px-1.5 py-0.5 font-medium text-emerald-500",children:["cache hit",k.cacheAgeMs?` \xb7 ${Math.round(k.cacheAgeMs/1e3)}s`:""]}):"joined"===k.cacheState?(0,n.jsx)("span",{className:"ml-1.5 rounded bg-sky-500/10 px-1.5 py-0.5 font-medium text-sky-500",children:"shared compute"}):"fresh"===k.cacheState?(0,n.jsx)("span",{className:"ml-1.5 rounded bg-amber-500/10 px-1.5 py-0.5 font-medium text-amber-500",children:"fresh compute"}):null]}):null]})]})]}),(0,n.jsx)(Z,{filters:c,setFilters:x,options:I,onRefresh:e=>R({filtersOverride:e||c}),onExportCsv:()=>{let e=P(c,{format:"csv",timeZone:S()});window.open(`/api/dashboard/analytics?${e}`,"_blank","noopener,noreferrer")},loading:p,showProviderFilters:r}),g?(0,n.jsxs)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-700 dark:text-red-300",children:[(0,n.jsx)("span",{className:"material-symbols-outlined mr-2 align-[-5px]",children:"error"}),g]}):null,m?.qualityNotes?.length?(0,n.jsx)(W,{notes:m.qualityNotes}):null,(0,n.jsx)("div",{className:"flex flex-wrap gap-2 rounded-2xl border border-border bg-surface p-2",children:i.map(e=>(0,n.jsxs)("button",{onClick:()=>v(e.value),className:q("flex items-center gap-2 rounded-xl px-3 py-2 text-sm font-medium transition",y===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-background hover:text-text-main"),children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon}),e.label]},e.value))}),p&&!m?(0,n.jsx)(A,{}):null,!p&&m&&m.overview?.requests===0&&0===(m.promptLogs?.total||0)?(0,n.jsx)($,{title:"Chưa c\xf3 dữ liệu analytics",description:"Kh\xf4ng c\xf3 UsageHistory hoặc Prompt Logs theo bộ lọc hiện tại."}):null,m?(0,n.jsxs)(n.Fragment,{children:["overview"===y?(0,n.jsx)(Q,{data:m}):null,"apiKeys"===y?(0,n.jsx)(ee,{data:m}):null,"clients"===y?(0,n.jsx)(Y,{data:m}):null,"sources"===y?(0,n.jsx)(et,{data:m}):null,"providers"===y?(0,n.jsx)(es,{data:m}):null,"experience"===y?(0,n.jsx)(en,{data:m}):null,"errors"===y?(0,n.jsx)(el,{data:m}):null,"raw"===y?(0,n.jsx)(er,{data:m}):null]}):null,"aiHealth"===y&&e?(0,n.jsx)(h,{}):null]})}},94027:(e,t,s)=>{"use strict";s.d(t,{Y:()=>o,s:()=>d});var n=s(95155),l=s(12115),r=s(14051),a=s.n(r);let i=(0,l.createContext)(null);function o({children:e}){let[t,s]=(0,l.useState)(null),[r,a]=(0,l.useState)(!0),[d,c]=(0,l.useState)(""),x=(0,l.useCallback)(async()=>{a(!0),c("");try{let e=await fetch("/api/auth/status",{cache:"no-store"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t?.error||"Kh\xf4ng tải được trạng th\xe1i đăng nhập");return s(t||{}),t||{}}catch(e){return c(e?.message||"Kh\xf4ng tải được trạng th\xe1i đăng nhập"),s({}),{}}finally{a(!1)}},[]);(0,l.useEffect)(()=>{let e=!1;return(async()=>{a(!0),c("");try{let t=await fetch("/api/auth/status",{cache:"no-store"}),n=await t.json().catch(()=>({}));if(e)return;if(!t.ok)throw Error(n?.error||"Kh\xf4ng tải được trạng th\xe1i đăng nhập");s(n||{})}catch(t){e||(c(t?.message||"Kh\xf4ng tải được trạng th\xe1i đăng nhập"),s({}))}finally{e||a(!1)}})(),()=>{e=!0}},[]);let m=(0,l.useMemo)(()=>{let e,s,n,l,r;return s=(e=t&&"object"==typeof t?t:{}).displayName||e.oidcName||e.oidcEmail||e.userId||"",n=!0===e.isAdmin,l=!0===e.isMonitorAdmin,r=!0===e.isAiGatewaysMonitor,{status:e,displayName:s,userId:e.userId||"",loginMethod:e.loginMethod||"",role:e.role||"guest",isAdmin:n,isMonitorAdmin:l,isAiGatewaysMonitor:r,canManageApiKeys:!0===e.canManageApiKeys||n||l,canUseMonitorAdminTabs:!0===e.canUseMonitorAdminTabs||n||l,canViewAllAnalytics:!0===e.canViewAllAnalytics||n||l||r}},[t]),u=(0,l.useMemo)(()=>({...m,loading:r,error:d,reload:x}),[m,r,d,x]);return(0,n.jsx)(i.Provider,{value:u,children:e})}function d(){let e=(0,l.useContext)(i);return e||{status:{},displayName:"",userId:"",loginMethod:"",role:"admin",isAdmin:!0,isMonitorAdmin:!1,isAiGatewaysMonitor:!1,canManageApiKeys:!0,canUseMonitorAdminTabs:!0,canViewAllAnalytics:!0,loading:!1,error:"",reload:async()=>({})}}o.propTypes={children:a().node}}},e=>{e.O(0,[9959,8441,3794,7358],()=>e(e.s=39944)),_N_E=e.O()}]);
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluerouter-app",
3
- "version": "5.2.33",
3
+ "version": "5.2.34",
4
4
  "description": "Router web dashboard",
5
5
  "private": false,
6
6
  "scripts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jheavenknows/bluerouter",
3
- "version": "5.2.33",
3
+ "version": "5.2.34",
4
4
  "description": "Bluerouter CLI - Start and manage Bluerouter server",
5
5
  "bin": {
6
6
  "bluerouter": "./cli.js"