@jheavenknows/bluerouter 5.2.30 → 5.2.31
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.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +24 -24
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +24 -24
- package/app/.next-cli-build/server/chunks/1340.js +1 -1
- package/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/app/.next-cli-build/server/chunks/402.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/6108.js +1 -1
- package/app/.next-cli-build/server/chunks/6328.js +1 -1
- package/app/.next-cli-build/server/chunks/6759.js +1 -1
- package/app/.next-cli-build/server/chunks/6811.js +1 -1
- package/app/.next-cli-build/server/chunks/689.js +1 -1
- package/app/.next-cli-build/server/chunks/7341.js +1 -1
- package/app/.next-cli-build/server/chunks/7464.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{5263-0de8f5d0c9d73bae.js → 5263-c859e769ec92beae.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-6a03b79691097f3c.js → 5497-ed106851c7a9289d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/settings/pricing/page-5e51dfdfdc7eca07.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/settings/pricing/page-6c83bcac76e31968.js +0 -1
- /package/app/.next-cli-build/static/{Mz3kUglmPQGIt583Sd6NW → KBYkB5wlnWGSSyTbrnAHd}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{Mz3kUglmPQGIt583Sd6NW → KBYkB5wlnWGSSyTbrnAHd}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.2.16-to-5.2.23-5.2.23-20260724-092014 → upgrade-5.2.29-to-5.2.30-5.2.30-20260724-103243}/data.sqlite +0 -0
package/app/.next-cli-build/static/chunks/{5263-0de8f5d0c9d73bae.js → 5263-c859e769ec92beae.js}
RENAMED
|
@@ -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.30"},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.31"},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"}}}]);
|
package/app/.next-cli-build/static/chunks/{5497-6a03b79691097f3c.js → 5497-ed106851c7a9289d.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>l});var a=s(95155),r=s(31474);function l({label:e,options:t=[],value:s,onChange:n,placeholder:i="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",u),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{value:s,onChange:n,disabled:c,className:(0,r.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,a.jsx)("option",{value:"",disabled:!0,children:i}),function(e){let t=new Map,s=[];for(let a of e){if(!a.group){s.push(a);continue}t.has(a.group)||t.set(a.group,[]),t.get(a.group).push(a)}let r=[];for(let[e,s]of t)r.push((0,a.jsx)("optgroup",{label:e,children:s.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))},e));for(let e of s)r.push((0,a.jsx)("option",{value:e.value,children:e.label},e.value));return r}(t)]}),(0,a.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var a=s(12115),r=s(90085);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,r.A)(),d=(0,a.useSyncExternalStore)(l,n,i);(0,a.useEffect)(()=>{o()},[o]),(0,a.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},4809:(e,t,s)=>{s.d(t,{default:()=>eh});var a=s(95155),r=s(12115),l=s(73321),n=s(52679),i=s(56061),o=s(84588),d=s(98500),c=s.n(d),m=s(14051),u=s.n(m),x=s(94027);let p=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},h=e=>new Intl.NumberFormat().format(p(e)),b=e=>`$${p(e).toFixed(2)}`,f=(e,t)=>{let s=p(t);return s<=0?0:Math.round(p(e)/s*100)};function g({label:e,dotClass:t,requests:s,promptTokens:r,completionTokens:l,cost:n,showCost:i}){return(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${t}`}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:e})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(p(r)+p(l)),i&&(0,a.jsx)("span",{className:"ml-1.5 text-warning",children:b(n)}),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[h(s)," req"]})]})]})}g.propTypes={label:u().string.isRequired,dotClass:u().string.isRequired,requests:u().number,promptTokens:u().number,completionTokens:u().number,cost:u().number,showCost:u().bool};let y=[{name:"Anthropic (Claude)",dot:"bg-warning",mode:"Thủ c\xf4ng",modeNote:"phải đ\xe1nh dấu cache_control trong request",write:"1,25x gi\xe1 input",read:"0,1x gi\xe1 input",ttl:"5 ph\xfat, gia hạn mỗi lần đọc (tuỳ chọn 1 giờ)",fields:"cache_creation_input_tokens + cache_read_input_tokens",note:"Provider duy nhất t\xednh ph\xed ri\xeang cho việc ghi cache, n\xean l\xe0 nguồn duy nhất của \xf4 “Cache creation” ở tr\xean."},{name:"OpenAI",dot:"bg-success",mode:"Tự động",modeNote:"prompt từ 1024 token trở l\xean, khớp phần đầu",write:"Miễn ph\xed",read:"khoảng 0,5x gi\xe1 input",ttl:"5–10 ph\xfat kh\xf4ng hoạt động",fields:"prompt_tokens_details.cached_tokens",note:"Kh\xf4ng c\xf3 kh\xe1i niệm “cache creation”. prompt_tokens đ\xe3 bao gồm phần cached."},{name:"Google Gemini",dot:"bg-primary",mode:"Hai chế độ",modeNote:"implicit tự động, explicit do người d\xf9ng tạo",write:"Miễn ph\xed (implicit) / ph\xed lưu trữ theo giờ (explicit)",read:"giảm gi\xe1 đ\xe1ng kể so với input",ttl:"Implicit ngắn hạn; explicit theo TTL tự đặt",fields:"cachedContentTokenCount",note:"Explicit caching t\xednh tiền theo thời gian lưu, kh\xe1c hẳn m\xf4 h\xecnh của Anthropic v\xe0 OpenAI."},{name:"Local (vLLM, llama.cpp, Ollama)",dot:"bg-text-muted",mode:"Tự động",modeNote:"prefix caching / KV cache reuse",write:"Miễn ph\xed",read:"Miễn ph\xed — chỉ tiết kiệm compute v\xe0 giảm TTFT",ttl:"Tuỳ cấu h\xecnh v\xe0 dung lượng KV cache",fields:"Thường kh\xf4ng t\xe1ch ri\xeang trong usage",note:"Tiết kiệm thời gian chứ kh\xf4ng tiết kiệm tiền, v\xe0 phần lớn gộp v\xe0o “New input” ở tr\xean."}];function v(){let[e,t]=(0,r.useState)(!1);return(0,a.jsxs)(o.default,{className:"min-w-0 px-4 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>t(e=>!e),className:"flex w-full min-w-0 items-center justify-between gap-2 text-left",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"help"}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase text-text-muted",children:"Cache read / creation hoạt động thế n\xe0o"})]}),(0,a.jsx)("span",{className:`material-symbols-outlined shrink-0 text-[20px] text-text-muted transition-transform duration-200 ${e?"rotate-180":""}`,children:"expand_more"})]}),e&&(0,a.jsxs)("div",{className:"mt-3 flex min-w-0 flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("p",{className:"text-xs leading-relaxed text-text-muted",children:[(0,a.jsx)("span",{className:"font-semibold text-text",children:"Cache creation"})," l\xe0 lần đầu một đoạn context được lưu lại. ",(0,a.jsx)("span",{className:"font-semibold text-text",children:"Cache read"})," l\xe0 những lần sau t\xe1i sử dụng đoạn đ\xf3 thay v\xec xử l\xfd lại. Cơ chế v\xe0 c\xe1ch t\xednh tiền kh\xe1c nhau tuỳ provider — gi\xe1 dưới đ\xe2y l\xe0 bội số so với gi\xe1 input thường của ch\xednh model đ\xf3."]}),(0,a.jsx)("div",{className:"grid min-w-0 grid-cols-1 gap-2 xl:grid-cols-2",children:y.map(e=>(0,a.jsxs)("div",{className:"min-w-0 rounded-[10px] bg-bg px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${e.dot}`}),(0,a.jsx)("span",{className:"truncate text-xs font-semibold",children:e.name})]}),(0,a.jsx)("span",{className:"shrink-0 rounded-full bg-surface px-2 py-0.5 text-[10px] text-text-muted",children:e.mode})]}),(0,a.jsxs)("dl",{className:"mt-2 flex min-w-0 flex-col gap-1 text-[11px]",children:[(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Ghi cache"}),(0,a.jsx)("dd",{className:"truncate text-right font-medium",children:e.write})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Đọc cache"}),(0,a.jsx)("dd",{className:"truncate text-right font-medium text-success",children:e.read})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Thời hạn"}),(0,a.jsx)("dd",{className:"truncate text-right",children:e.ttl})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"K\xedch hoạt"}),(0,a.jsx)("dd",{className:"truncate text-right",children:e.modeNote})]})]}),(0,a.jsx)("p",{className:"mt-1.5 border-t border-border-subtle pt-1.5 text-[10px] leading-relaxed text-text-muted",children:e.note}),(0,a.jsx)("p",{className:"mt-1 font-mono text-[9px] leading-relaxed text-text-muted opacity-70",children:e.fields})]},e.name))}),(0,a.jsx)("p",{className:"text-[10px] leading-relaxed text-text-muted",children:"Gi\xe1 v\xe0 thời hạn do provider c\xf4ng bố v\xe0 c\xf3 thể thay đổi — h\xe3y đối chiếu bảng gi\xe1 ch\xednh thức trước khi d\xf9ng cho mục đ\xedch t\xednh chi ph\xed."})]})]})}function j({stats:e}){let{isAdmin:t}=(0,x.s)(),s=p(e.totalPromptTokens),r=p(e.totalCachedInputTokens),l=p(e.totalCacheCreationInputTokens),n=null!=e.totalNewInputTokens?p(e.totalNewInputTokens):Math.max(0,s-r-l),i=e.cloudVsLocal||{},d=i.cloud||{},m=i.local||{},u=p(d.requests)>0||p(m.requests)>0,y=p(d.promptTokens)+p(d.completionTokens),N=f(y,y+(p(m.promptTokens)+p(m.completionTokens)));return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold",children:h(e.totalRequests)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:h(s)}),s>0&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[f(r,s),"% cached"]})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:h(e.totalCompletionTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[t?(0,a.jsxs)(c(),{href:"/dashboard/settings/pricing",className:"group flex min-w-0 items-center gap-1 text-text-muted text-sm uppercase font-semibold transition-colors hover:text-primary",title:"Chỉnh bảng gi\xe1 d\xf9ng để t\xednh cost",children:[(0,a.jsx)("span",{className:"truncate",children:"Est. Cost"}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px] opacity-0 transition-opacity group-hover:opacity-100",children:"edit"})]}):(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,a.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",b(e.totalCost)]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]}),(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 lg:grid-cols-2 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-2 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Input Token Breakdown"}),s>0&&(0,a.jsxs)("div",{className:"flex h-1.5 w-full overflow-hidden rounded-full bg-bg",children:[(0,a.jsx)("div",{className:"bg-primary",style:{width:`${f(n,s)}%`}}),(0,a.jsx)("div",{className:"bg-success",style:{width:`${f(r,s)}%`}}),(0,a.jsx)("div",{className:"bg-warning",style:{width:`${f(l,s)}%`}})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-primary"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"New input"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(n),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(n,s),"%"]})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-success"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"Cached read"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(r),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(r,s),"%"]})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-warning"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"Cache creation"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(l),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(l,s),"%"]})]})]})]})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-2 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Cloud vs Local"}),u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex h-1.5 w-full overflow-hidden rounded-full bg-bg",children:[(0,a.jsx)("div",{className:"bg-warning",style:{width:`${N}%`}}),(0,a.jsx)("div",{className:"bg-primary",style:{width:`${100-N}%`}})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,a.jsx)(g,{label:"Cloud providers",dotClass:"bg-warning",requests:p(d.requests),promptTokens:p(d.promptTokens),completionTokens:p(d.completionTokens),cost:p(d.cost),showCost:!0}),(0,a.jsx)(g,{label:"Local (self-hosted)",dotClass:"bg-primary",requests:p(m.requests),promptTokens:p(m.promptTokens),completionTokens:p(m.completionTokens),cost:p(m.cost),showCost:p(m.cost)>0})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Local = custom OpenAI/Anthropic-compatible providers. Token counts include input + output."})]}):(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No usage in this period."})]})]}),(0,a.jsx)(v,{})]})}j.propTypes={stats:u().object.isRequired};let N=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},k=e=>new Intl.NumberFormat().format(N(e)),w=e=>`$${N(e).toFixed(2)}`;function C(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function S({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,a.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,a.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function T({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":k(e.promptTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":k(e.completionTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:k(e.totalTokens)})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":w(e.inputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":w(e.outputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:w(e.totalCost||e.cost)})]})}function _({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,b]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&b(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,r.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let f=(0,r.useCallback)(e=>{b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),g=(0,r.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),y=t.length+g.length;return(0,a.jsxs)(o.default,{className:"overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,a.jsx)("h3",{className:"font-semibold",children:e})}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[t.map(e=>(0,a.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,a.jsx)(S,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),g.map(e=>(0,a.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,a.jsx)(S,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>f(e.groupKey),children:[(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,a.jsx)(T,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,a.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,a.jsx)(T,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:y,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}S.propTypes={field:u().string.isRequired,currentSort:u().string.isRequired,currentOrder:u().string.isRequired},T.propTypes={item:u().object.isRequired,viewMode:u().string.isRequired,isSummary:u().bool},_.propTypes={title:u().string.isRequired,columns:u().arrayOf(u().shape({field:u().string.isRequired,label:u().string.isRequired,align:u().string})).isRequired,groupedData:u().array.isRequired,tableType:u().string.isRequired,sortBy:u().string.isRequired,sortOrder:u().string.isRequired,onToggleSort:u().func.isRequired,viewMode:u().string.isRequired,storageKey:u().string.isRequired,renderDetailCells:u().func.isRequired,renderSummaryCells:u().func.isRequired,emptyMessage:u().string.isRequired};var A=s(81750),M=s(6793);function I(e){return"string"==typeof e&&e.startsWith(n.JH)}function $(e){return"string"==typeof e&&e.startsWith(n.DI)}function O(e={}){return String(e.apiType||e.providerSpecificData?.apiType||e.provider_specific_data?.apiType||"chat").toLowerCase()}function R({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,r.useState)(!1);return(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,a.jsx)(A.h7,{type:"target",position:M.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:l&&!o?(0,a.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)}):(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n})}),(0,a.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,a.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,a.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function P({data:e}){return(0,a.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,a.jsx)(A.h7,{type:"source",position:M.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)("img",{src:"/favicon.svg",alt:"Bluerouter",className:"w-6 h-6 mr-2"}),(0,a.jsx)("span",{className:"text-sm font-bold text-primary",children:"Blue Router"}),e.activeCount>0&&(0,a.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(53255),R.propTypes={data:u().object.isRequired},P.propTypes={data:u().object.isRequired};let E={provider:R,router:P};function L({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let i=(0,r.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,r.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,r.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,r.useMemo)(()=>new Set(d?[d]:[]),[d]),x=(0,r.useRef)({}),[p,h]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=x.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,r.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let b=(0,r.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let a=x.current[s];(!a||e-a<6e4)&&t.add(s)}return t},[c,p]),{nodes:f,edges:g}=(0,r.useMemo)(()=>(function(e,t,s,a){let r=e.length,l=Math.max(320,204*r/(2*Math.PI)),i=Math.max(200,.55*l);if(0===r)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{let m,u,x=function(e,t={}){if(n.Q2[e])return n.Q2[e];if(I(e)){let e=O(t);return{color:"#10A37F",name:t.name||("responses"===e?"OpenAI Compatible Responses":"OpenAI Compatible Chat"),textIcon:"responses"===e?"OR":"OC"}}return $(e)?{color:"#D97757",name:t.name||"Anthropic Compatible",textIcon:"AC"}:{color:"#6b7280",name:t.name||e,textIcon:(e||"?").slice(0,2).toUpperCase()}}(e.provider,e),p=t.has(e.provider?.toLowerCase()),h=!p&&s.has(e.provider?.toLowerCase()),b=!p&&a.has(e.provider?.toLowerCase()),f=`provider-${e.provider}`,g={label:(x.name!==e.provider?x.name:null)||e.name||e.provider,color:x.color||"#6b7280",imageUrl:function(e={}){let t=e.provider||e.id||"";return t?I(t)?"responses"===O(e)?"/providers/oai-r.png":"/providers/oai-cc.png":$(t)?"/providers/anthropic-m.png":`/providers/${t}.png`:null}(e),textIcon:x.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:p},y=-Math.PI/2+2*Math.PI*c/r,v=l*Math.cos(y),j=i*Math.sin(y);Math.abs(y+Math.PI/2)<Math.PI/4||Math.abs(y-3*Math.PI/2)<Math.PI/4?(m="top",u="bottom"):Math.abs(y-Math.PI/2)<Math.PI/4?(m="bottom",u="top"):v>0?(m="right",u="left"):(m="left",u="right"),o.push({id:f,type:"provider",position:{x:v-90,y:j-15},data:g,draggable:!1}),d.push({id:`e-${f}`,source:"router",sourceHandle:m,target:f,targetHandle:u,animated:p,style:(x.color,b?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:p?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:h?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,b,m,u),[e,b,o,d]),y=(0,r.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,r.useRef)(null),j=(0,r.useRef)(null),N={padding:.2,duration:200},k=(0,r.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(N),50)},[]);return(0,r.useEffect)(()=>{let e=j.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(N)});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(N),50);return()=>clearTimeout(e)}},[f.length]),(0,a.jsx)("div",{ref:j,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,a.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,a.jsx)(A.Gc,{nodes:f,edges:g,nodeTypes:E,fitView:!0,fitViewOptions:N,minZoom:.1,maxZoom:2,onInit:k,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,a.jsx)(A.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}L.propTypes={providers:u().arrayOf(u().shape({id:u().string,provider:u().string,name:u().string})),activeRequests:u().arrayOf(u().shape({provider:u().string,model:u().string,account:u().string})),lastProvider:u().string,errorProvider:u().string};var q=s(1728),U=s(90639),z=s(28408),D=s(32539),F=s(59656),K=s(65671),W=s(34122);let B=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},V=e=>{let t=B(e);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)},G=e=>`$${B(e).toFixed(4)}`;function H({period:e="7d"}){let[t,s]=(0,r.useState)([]),[l,n]=(0,r.useState)(!0),[i,d]=(0,r.useState)("tokens"),c=(0,r.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,r.useEffect)(()=>{c()},[c]);let m=t.map(e=>({...e,tokens:B(e.tokens),cost:B(e.cost)})),u=m.some(e=>e.tokens>0||e.cost>0);return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,a.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,a.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):u?(0,a.jsx)(q.u,{width:"100%",height:220,children:(0,a.jsxs)(U.Q,{data:m,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,a.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,a.jsx)(z.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(D.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,a.jsx)(F.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?V:G,width:50}),(0,a.jsx)(K.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[V(e),"Tokens"]:[G(e),"Cost"]}),"tokens"===i?(0,a.jsx)(W.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,a.jsx)(W.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function Q(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function J(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function X(e){let t=String(e||"").trim();return/^openai-compatible-chat-[0-9a-f-]{20,}$/i.test(t)||/^openai-compatible-[0-9a-f-]{20,}$/i.test(t)}function Y(e){return String(e||"").trim()}function Z(e=[]){let t={},s={};for(let a of e||[]){let e=function(e={}){let t=Y(e.provider||e.providerId||e.provider_id||e.id),s=Y(e.accountName||e.account_name||e.email||e.displayName||e.display_name||e.name||e.label||e.connectionName||e.connection_name),a=J(e.endpoint)||J(e.baseUrl)||J(e.baseURL)||J(e.base_url)||J(e.providerUrl)||J(e.provider_url)||J(e.url),r=Y(e.email);return{providerId:t,accountName:s,displayName:Y(e.displayName||e.display_name),email:r,endpointHost:a,ownerUser:Y(e.ownerUser||e.owner_user),isPersonal:"personal"===e.scope||"private"===e.visibility||!!(e.ownerUser||e.owner_user)}}(a);for(let s of[a.id,a.connectionId,a.connection_id].map(Y).filter(Boolean))t[s]||(t[s]=e);e.accountName&&!s[e.accountName]&&(s[e.accountName]=e)}return{byConnectionId:t,byAccount:s}}function ee(e={},t={}){let s=e.model||e.rawModel||e.raw_model||"-",a=function(e={},t={}){let s=function(e={},t={}){for(let s of[e.connectionId,e.connection_id].map(Y).filter(Boolean))if(t.byConnectionId?.[s])return t.byConnectionId[s];let s=Y(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return s&&t.byAccount?.[s]?t.byAccount[s]:null}(e,t),a=function(e={},t=null){let s=Y(e.provider||e.providerId||e.provider_id).toLowerCase();if(!(!0===e.isPersonalOAuth||!0===e.is_personal_oauth||"personal"===e.connectionScope||"personal"===e.connection_scope||"private"===e.visibility||t?.isPersonal)||!s)return"";let a=Y(e.ownerUser||e.owner_user||e.apiKeyOwner||e.api_key_owner||t?.ownerUser),r=Y(e.accountEmail||e.account_email||e.email||t?.email),l=Y(e.accountDisplayName||e.account_display_name||e.accountName||e.account_name||e.connectionName||e.connection_name||t?.accountName||t?.displayName),n=[];return(a&&n.push(a),r&&r!==a?n.push(r):l&&l!==a&&n.push(l),n.length)?(n.push(s),n.join("/")):""}(e,s);if(a)return a;if(s){let e=s.providerId,t=s.accountName,a=s.endpointHost;if(e&&!X(e)){if(s.isPersonal&&s.ownerUser){let a=[s.ownerUser];return s.email&&s.email!==s.ownerUser?a.push(s.email):t&&t!==s.ownerUser&&a.push(t),a.push(e),a.join("/")}return t&&t!==e?`${e}/${t}`:e}if(t)return t;if(a)return a}let r=J(e.endpoint)||J(e.providerUrl)||J(e.provider_url)||J(e.baseUrl)||J(e.baseURL)||J(e.base_url)||J(e.url);if(r)return r;let l=Y(e.provider||e.providerId||e.provider_id),n=Y(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return l&&!X(l)?n&&n!==l?`${l}/${n}`:l:n||""}(e,t),r=Y(e.provider||e.providerId||e.provider_id);return!a||"-"===s||String(s).startsWith(`${a}/`)?s:r&&String(s).startsWith(`${r}/`)&&(a.startsWith(`${r}/`)||a.endsWith(`/${r}`))?`${a}/${String(s).slice(r.length+1)}`:`${a}/${s}`}function et({timestamp:e}){let t,[,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}H.propTypes={period:u().string};let es=new Set(["ok","success","succeeded","complete","completed","done","200 ok"]),ea=new Set(["pending","running","queued","in_progress","in-progress"]);function er(e={}){let t,s=String(e.status||e.statusText||e.status_text||"").trim().toLowerCase(),a=(t=String(s||"").match(/\b([1-5]\d{2})\b/))?Number(t[1]):null,r=function(...e){for(let t of e){if(null==t||""===t)continue;let e=Number(t);if(Number.isFinite(e))return e}return null}(e.statusCode,e.status_code,e.gatewayStatusCode,e.gateway_status_code,e.upstreamStatusCode,e.upstream_status_code,a),l=Y(e.errorCode||e.error_code),n=Y(e.errorType||e.error_type),i=Y(e.errorMessageShort||e.error_message_short||e.message||e.error);if(ea.has(s))return{kind:"pending",label:"PENDING",title:"Request is still pending/running.",dotClass:"bg-amber-500",rowClass:"hover:bg-amber-50/60",badgeClass:"bg-amber-100 text-amber-700 border border-amber-200"};if(/\b(error|fail|failed|failure|timeout|cancelled|canceled)\b/i.test(s)||null!==r&&r>=400||l||n||i){let t=null!==r?`ERR ${r}`:s?s.toUpperCase():"ERROR",a=[`Status: ${t}`,l?`Code: ${l}`:"",n?`Type: ${n}`:"",i?`Message: ${i}`:"",e.endpoint?`Endpoint: ${e.endpoint}`:""].filter(Boolean);return{kind:"error",label:t,title:a.join("\n"),dotClass:"bg-error",rowClass:"hover:bg-error/5",badgeClass:"bg-error/10 text-error border border-error/20"}}return null!==r&&r>=200&&r<300||!s||es.has(s)?{kind:"success",label:r?`OK ${r}`:"OK",title:"Request completed successfully.",dotClass:"bg-success",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-success/10 text-success border border-success/20"}:{kind:"unknown",label:s?s.toUpperCase():"UNKNOWN",title:s?`Status: ${s}`:"Unknown request status.",dotClass:"bg-text-muted",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-bg-subtle text-text-muted border border-border"}}function el({request:e}){let{cachedTokens:t,cacheCreationTokens:s,totalTokens:r,totalInputTokens:l,newInputTokens:n,reasoningTokens:i,outputTokens:o}=function(e={}){let t=Number(e.promptTokens??e.prompt_tokens??0)||0,s=Number(e.cachedTokens??e.cached_tokens??e.cache_read_input_tokens??0)||0,a=Number(e.cacheCreationTokens??e.cache_creation_input_tokens??0)||0,r=Number(e.completionTokens??e.completion_tokens??0)||0,l=Number(e.totalTokens??e.total_tokens??t+r)||0,n=Number(e.displayTotalInputTokens??e.display_total_input_tokens??t)||0,i=Number(e.displayNewInputTokens??e.display_new_input_tokens??Math.max(0,n-s-a))||0,o=Number(e.displayCachedInputTokens??e.display_cached_input_tokens??s)||0,d=Number(e.displayCacheCreationInputTokens??e.display_cache_creation_input_tokens??a)||0,c=Number(e.displayReasoningTokens??e.display_reasoning_tokens??e.reasoningTokens??e.reasoning_tokens??0)||0,m=Number(e.displayOutputTokens??e.display_output_tokens??r)||0;return{promptTokens:t,cachedTokens:o,cacheCreationTokens:d,completionTokens:r,totalTokens:l,totalInputTokens:n,newInputTokens:i,reasoningTokens:c,outputTokens:m}}(e),d=er(e),c=l>0?Math.min(100,Math.max(0,Math.round(t/l*100))):0,m=`Total Input: ${k(l)}
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,s)=>{s.d(t,{default:()=>l});var a=s(95155),r=s(31474);function l({label:e,options:t=[],value:s,onChange:n,placeholder:i="Select an option",error:o,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",u),children:[e&&(0,a.jsxs)("label",{className:"text-sm font-medium text-text-main",children:[e,m&&(0,a.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{value:s,onChange:n,disabled:c,className:(0,r.cn)("w-full py-2.5 px-3 pr-10 text-sm text-text-main","bg-surface-2 border border-transparent rounded-[10px] appearance-none","focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",o&&"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500/40 border-red-500/40",x),...p,children:[(0,a.jsx)("option",{value:"",disabled:!0,children:i}),function(e){let t=new Map,s=[];for(let a of e){if(!a.group){s.push(a);continue}t.has(a.group)||t.set(a.group,[]),t.get(a.group).push(a)}let r=[];for(let[e,s]of t)r.push((0,a.jsx)("optgroup",{label:e,children:s.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))},e));for(let e of s)r.push((0,a.jsx)("option",{value:e.value,children:e.label},e.value));return r}(t)]}),(0,a.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"expand_more"})})]}),o&&(0,a.jsxs)("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),o]}),d&&!o&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,s)=>{s.d(t,{D:()=>o});var a=s(12115),r=s(90085);function l(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function n(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function i(){return!1}function o(){let{theme:e,setTheme:t,toggleTheme:s,initTheme:o}=(0,r.A)(),d=(0,a.useSyncExternalStore)(l,n,i);(0,a.useEffect)(()=>{o()},[o]),(0,a.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>o();return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},[e,o]);let c="dark"===e||"system"===e&&d;return{theme:e,setTheme:t,toggleTheme:s,isDark:c}}},4809:(e,t,s)=>{s.d(t,{default:()=>eh});var a=s(95155),r=s(12115),l=s(73321),n=s(52679),i=s(56061),o=s(84588),d=s(98500),c=s.n(d),m=s(14051),u=s.n(m),x=s(94027);let p=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},h=e=>new Intl.NumberFormat().format(p(e)),b=e=>`$${p(e).toFixed(2)}`,f=(e,t)=>{let s=p(t);return s<=0?0:Math.round(p(e)/s*100)};function g({label:e,dotClass:t,requests:s,promptTokens:r,completionTokens:l,cost:n,showCost:i}){return(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${t}`}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:e})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(p(r)+p(l)),i&&(0,a.jsx)("span",{className:"ml-1.5 text-warning",children:b(n)}),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[h(s)," req"]})]})]})}g.propTypes={label:u().string.isRequired,dotClass:u().string.isRequired,requests:u().number,promptTokens:u().number,completionTokens:u().number,cost:u().number,showCost:u().bool};let y=[{name:"Anthropic (Claude)",dot:"bg-warning",mode:"Thủ c\xf4ng",modeNote:"BlueRouter chỉ \xe1p dụng cache write 5 ph\xfat",write:"1,25x gi\xe1 input",read:"0,1x gi\xe1 input",ttl:"5 ph\xfat; TTL d\xe0i hơn vẫn d\xf9ng c\xf9ng mức gi\xe1",fields:"cache_creation_input_tokens + cache_read_input_tokens",note:"Kh\xf4ng lưu cache 1 giờ. Mọi cache creation được t\xednh bằng rate 5 ph\xfat của model."},{name:"OpenAI",dot:"bg-success",mode:"Tự động",modeNote:"d\xf9ng Standard / short-context rate",write:"GPT-5.6 theo cache-write rate; model kh\xe1c fallback về input",read:"Theo cached rate của từng model",ttl:"Kh\xf4ng t\xe1ch TTL trong BlueRouter",fields:"prompt_tokens_details.cached_tokens + cache creation fields khi c\xf3",note:"Request tr\xean 272K hoặc cache d\xe0i hơn vẫn d\xf9ng đ\xfang rate short-context/cache 5 ph\xfat đ\xe3 cấu h\xecnh."},{name:"Google Gemini",dot:"bg-primary",mode:"Hai chế độ",modeNote:"implicit tự động, explicit do người d\xf9ng tạo",write:"Miễn ph\xed (implicit) / ph\xed lưu trữ theo giờ (explicit)",read:"giảm gi\xe1 đ\xe1ng kể so với input",ttl:"Implicit ngắn hạn; explicit theo TTL tự đặt",fields:"cachedContentTokenCount",note:"Explicit caching t\xednh tiền theo thời gian lưu, kh\xe1c hẳn m\xf4 h\xecnh của Anthropic v\xe0 OpenAI."},{name:"Local (vLLM, llama.cpp, Ollama)",dot:"bg-text-muted",mode:"Tự động",modeNote:"prefix caching / KV cache reuse",write:"Miễn ph\xed",read:"Miễn ph\xed — chỉ tiết kiệm compute v\xe0 giảm TTFT",ttl:"Tuỳ cấu h\xecnh v\xe0 dung lượng KV cache",fields:"Thường kh\xf4ng t\xe1ch ri\xeang trong usage",note:"Tiết kiệm thời gian chứ kh\xf4ng tiết kiệm tiền, v\xe0 phần lớn gộp v\xe0o “New input” ở tr\xean."}];function v(){let[e,t]=(0,r.useState)(!1);return(0,a.jsxs)(o.default,{className:"min-w-0 px-4 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>t(e=>!e),className:"flex w-full min-w-0 items-center justify-between gap-2 text-left",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"help"}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase text-text-muted",children:"Cache read / creation hoạt động thế n\xe0o"})]}),(0,a.jsx)("span",{className:`material-symbols-outlined shrink-0 text-[20px] text-text-muted transition-transform duration-200 ${e?"rotate-180":""}`,children:"expand_more"})]}),e&&(0,a.jsxs)("div",{className:"mt-3 flex min-w-0 flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("p",{className:"text-xs leading-relaxed text-text-muted",children:[(0,a.jsx)("span",{className:"font-semibold text-text",children:"Cache creation"})," l\xe0 lần đầu một đoạn context được lưu lại. ",(0,a.jsx)("span",{className:"font-semibold text-text",children:"Cache read"})," l\xe0 những lần sau t\xe1i sử dụng đoạn đ\xf3 thay v\xec xử l\xfd lại. Cơ chế v\xe0 c\xe1ch t\xednh tiền kh\xe1c nhau tuỳ provider — gi\xe1 dưới đ\xe2y l\xe0 bội số so với gi\xe1 input thường của ch\xednh model đ\xf3."]}),(0,a.jsx)("div",{className:"grid min-w-0 grid-cols-1 gap-2 xl:grid-cols-2",children:y.map(e=>(0,a.jsxs)("div",{className:"min-w-0 rounded-[10px] bg-bg px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:`h-2 w-2 shrink-0 rounded-full ${e.dot}`}),(0,a.jsx)("span",{className:"truncate text-xs font-semibold",children:e.name})]}),(0,a.jsx)("span",{className:"shrink-0 rounded-full bg-surface px-2 py-0.5 text-[10px] text-text-muted",children:e.mode})]}),(0,a.jsxs)("dl",{className:"mt-2 flex min-w-0 flex-col gap-1 text-[11px]",children:[(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Ghi cache"}),(0,a.jsx)("dd",{className:"truncate text-right font-medium",children:e.write})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Đọc cache"}),(0,a.jsx)("dd",{className:"truncate text-right font-medium text-success",children:e.read})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"Thời hạn"}),(0,a.jsx)("dd",{className:"truncate text-right",children:e.ttl})]}),(0,a.jsxs)("div",{className:"flex min-w-0 justify-between gap-2",children:[(0,a.jsx)("dt",{className:"shrink-0 text-text-muted",children:"K\xedch hoạt"}),(0,a.jsx)("dd",{className:"truncate text-right",children:e.modeNote})]})]}),(0,a.jsx)("p",{className:"mt-1.5 border-t border-border-subtle pt-1.5 text-[10px] leading-relaxed text-text-muted",children:e.note}),(0,a.jsx)("p",{className:"mt-1 font-mono text-[9px] leading-relaxed text-text-muted opacity-70",children:e.fields})]},e.name))}),(0,a.jsx)("p",{className:"text-[10px] leading-relaxed text-text-muted",children:"Gi\xe1 v\xe0 thời hạn do provider c\xf4ng bố v\xe0 c\xf3 thể thay đổi — h\xe3y đối chiếu bảng gi\xe1 ch\xednh thức trước khi d\xf9ng cho mục đ\xedch t\xednh chi ph\xed."})]})]})}function j({stats:e}){let{isAdmin:t}=(0,x.s)(),s=p(e.totalPromptTokens),r=p(e.totalCachedInputTokens),l=p(e.totalCacheCreationInputTokens),n=null!=e.totalNewInputTokens?p(e.totalNewInputTokens):Math.max(0,s-r-l),i=e.cloudVsLocal||{},d=i.cloud||{},m=i.local||{},u=p(d.requests)>0||p(m.requests)>0,y=p(d.promptTokens)+p(d.completionTokens),N=f(y,y+(p(m.promptTokens)+p(m.completionTokens)));return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold",children:h(e.totalRequests)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:h(s)}),s>0&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[f(r,s),"% cached"]})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,a.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:h(e.totalCompletionTokens)})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[t?(0,a.jsxs)(c(),{href:"/dashboard/settings/pricing",className:"group flex min-w-0 items-center gap-1 text-text-muted text-sm uppercase font-semibold transition-colors hover:text-primary",title:"Chỉnh bảng gi\xe1 d\xf9ng để t\xednh cost",children:[(0,a.jsx)("span",{className:"truncate",children:"Est. Cost"}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px] opacity-0 transition-opacity group-hover:opacity-100",children:"edit"})]}):(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,a.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",b(e.totalCost)]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]}),(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 lg:grid-cols-2 sm:gap-4",children:[(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-2 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Input Token Breakdown"}),s>0&&(0,a.jsxs)("div",{className:"flex h-1.5 w-full overflow-hidden rounded-full bg-bg",children:[(0,a.jsx)("div",{className:"bg-primary",style:{width:`${f(n,s)}%`}}),(0,a.jsx)("div",{className:"bg-success",style:{width:`${f(r,s)}%`}}),(0,a.jsx)("div",{className:"bg-warning",style:{width:`${f(l,s)}%`}})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-primary"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"New input"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(n),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(n,s),"%"]})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-success"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"Cached read"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(r),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(r,s),"%"]})]})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-warning"}),(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:"Cache creation"})]}),(0,a.jsxs)("span",{className:"shrink-0 text-xs font-semibold tabular-nums",children:[h(l),(0,a.jsxs)("span",{className:"ml-1.5 font-normal text-text-muted",children:[f(l,s),"%"]})]})]})]})]}),(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-2 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Cloud vs Local"}),u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex h-1.5 w-full overflow-hidden rounded-full bg-bg",children:[(0,a.jsx)("div",{className:"bg-warning",style:{width:`${N}%`}}),(0,a.jsx)("div",{className:"bg-primary",style:{width:`${100-N}%`}})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,a.jsx)(g,{label:"Cloud providers",dotClass:"bg-warning",requests:p(d.requests),promptTokens:p(d.promptTokens),completionTokens:p(d.completionTokens),cost:p(d.cost),showCost:!0}),(0,a.jsx)(g,{label:"Local (self-hosted)",dotClass:"bg-primary",requests:p(m.requests),promptTokens:p(m.promptTokens),completionTokens:p(m.completionTokens),cost:p(m.cost),showCost:p(m.cost)>0})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"Local = custom OpenAI/Anthropic-compatible providers. Token counts include input + output."})]}):(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No usage in this period."})]})]}),(0,a.jsx)(v,{})]})}j.propTypes={stats:u().object.isRequired};let N=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},k=e=>new Intl.NumberFormat().format(N(e)),w=e=>`$${N(e).toFixed(2)}`;function C(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function S({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,a.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,a.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function T({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":k(e.promptTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":k(e.completionTokens)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:k(e.totalTokens)})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":w(e.inputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":w(e.outputCost)}),(0,a.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:w(e.totalCost||e.cost)})]})}function _({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:u,renderSummaryCells:x,emptyMessage:p}){let[h,b]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&b(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,r.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let f=(0,r.useCallback)(e=>{b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),g=(0,r.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),y=t.length+g.length;return(0,a.jsxs)(o.default,{className:"overflow-hidden",children:[(0,a.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,a.jsx)("h3",{className:"font-semibold",children:e})}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[t.map(e=>(0,a.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,a.jsx)(S,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),g.map(e=>(0,a.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,a.jsx)(S,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>f(e.groupKey),children:[(0,a.jsx)("td",{className:"px-6 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),x(e),(0,a.jsx)(T,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,a.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[u(e),(0,a.jsx)(T,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:y,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}S.propTypes={field:u().string.isRequired,currentSort:u().string.isRequired,currentOrder:u().string.isRequired},T.propTypes={item:u().object.isRequired,viewMode:u().string.isRequired,isSummary:u().bool},_.propTypes={title:u().string.isRequired,columns:u().arrayOf(u().shape({field:u().string.isRequired,label:u().string.isRequired,align:u().string})).isRequired,groupedData:u().array.isRequired,tableType:u().string.isRequired,sortBy:u().string.isRequired,sortOrder:u().string.isRequired,onToggleSort:u().func.isRequired,viewMode:u().string.isRequired,storageKey:u().string.isRequired,renderDetailCells:u().func.isRequired,renderSummaryCells:u().func.isRequired,emptyMessage:u().string.isRequired};var A=s(81750),M=s(6793);function I(e){return"string"==typeof e&&e.startsWith(n.JH)}function $(e){return"string"==typeof e&&e.startsWith(n.DI)}function O(e={}){return String(e.apiType||e.providerSpecificData?.apiType||e.provider_specific_data?.apiType||"chat").toLowerCase()}function R({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,r.useState)(!1);return(0,a.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,a.jsx)(A.h7,{type:"target",position:M.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"target",position:M.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:l&&!o?(0,a.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)}):(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n})}),(0,a.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,a.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,a.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function P({data:e}){return(0,a.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,a.jsx)(A.h7,{type:"source",position:M.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)(A.h7,{type:"source",position:M.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,a.jsx)("img",{src:"/favicon.svg",alt:"Bluerouter",className:"w-6 h-6 mr-2"}),(0,a.jsx)("span",{className:"text-sm font-bold text-primary",children:"Blue Router"}),e.activeCount>0&&(0,a.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(53255),R.propTypes={data:u().object.isRequired},P.propTypes={data:u().object.isRequired};let E={provider:R,router:P};function L({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let i=(0,r.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,r.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,r.useMemo)(()=>new Set(o?[o]:[]),[o]),u=(0,r.useMemo)(()=>new Set(d?[d]:[]),[d]),x=(0,r.useRef)({}),[p,h]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=x.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,r.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let b=(0,r.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let a=x.current[s];(!a||e-a<6e4)&&t.add(s)}return t},[c,p]),{nodes:f,edges:g}=(0,r.useMemo)(()=>(function(e,t,s,a){let r=e.length,l=Math.max(320,204*r/(2*Math.PI)),i=Math.max(200,.55*l);if(0===r)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{let m,u,x=function(e,t={}){if(n.Q2[e])return n.Q2[e];if(I(e)){let e=O(t);return{color:"#10A37F",name:t.name||("responses"===e?"OpenAI Compatible Responses":"OpenAI Compatible Chat"),textIcon:"responses"===e?"OR":"OC"}}return $(e)?{color:"#D97757",name:t.name||"Anthropic Compatible",textIcon:"AC"}:{color:"#6b7280",name:t.name||e,textIcon:(e||"?").slice(0,2).toUpperCase()}}(e.provider,e),p=t.has(e.provider?.toLowerCase()),h=!p&&s.has(e.provider?.toLowerCase()),b=!p&&a.has(e.provider?.toLowerCase()),f=`provider-${e.provider}`,g={label:(x.name!==e.provider?x.name:null)||e.name||e.provider,color:x.color||"#6b7280",imageUrl:function(e={}){let t=e.provider||e.id||"";return t?I(t)?"responses"===O(e)?"/providers/oai-r.png":"/providers/oai-cc.png":$(t)?"/providers/anthropic-m.png":`/providers/${t}.png`:null}(e),textIcon:x.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:p},y=-Math.PI/2+2*Math.PI*c/r,v=l*Math.cos(y),j=i*Math.sin(y);Math.abs(y+Math.PI/2)<Math.PI/4||Math.abs(y-3*Math.PI/2)<Math.PI/4?(m="top",u="bottom"):Math.abs(y-Math.PI/2)<Math.PI/4?(m="bottom",u="top"):v>0?(m="right",u="left"):(m="left",u="right"),o.push({id:f,type:"provider",position:{x:v-90,y:j-15},data:g,draggable:!1}),d.push({id:`e-${f}`,source:"router",sourceHandle:m,target:f,targetHandle:u,animated:p,style:(x.color,b?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:p?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:h?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,b,m,u),[e,b,o,d]),y=(0,r.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,r.useRef)(null),j=(0,r.useRef)(null),N={padding:.2,duration:200},k=(0,r.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(N),50)},[]);return(0,r.useEffect)(()=>{let e=j.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(N)});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(N),50);return()=>clearTimeout(e)}},[f.length]),(0,a.jsx)("div",{ref:j,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,a.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,a.jsx)(A.Gc,{nodes:f,edges:g,nodeTypes:E,fitView:!0,fitViewOptions:N,minZoom:.1,maxZoom:2,onInit:k,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,a.jsx)(A.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}L.propTypes={providers:u().arrayOf(u().shape({id:u().string,provider:u().string,name:u().string})),activeRequests:u().arrayOf(u().shape({provider:u().string,model:u().string,account:u().string})),lastProvider:u().string,errorProvider:u().string};var q=s(1728),U=s(90639),z=s(28408),D=s(32539),F=s(59656),K=s(65671),W=s(34122);let B=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t},V=e=>{let t=B(e);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)},G=e=>`$${B(e).toFixed(4)}`;function H({period:e="7d"}){let[t,s]=(0,r.useState)([]),[l,n]=(0,r.useState)(!0),[i,d]=(0,r.useState)("tokens"),c=(0,r.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,r.useEffect)(()=>{c()},[c]);let m=t.map(e=>({...e,tokens:B(e.tokens),cost:B(e.cost)})),u=m.some(e=>e.tokens>0||e.cost>0);return(0,a.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,a.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,a.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,a.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):u?(0,a.jsx)(q.u,{width:"100%",height:220,children:(0,a.jsxs)(U.Q,{data:m,margin:{top:4,right:8,left:0,bottom:0},children:[(0,a.jsxs)("defs",{children:[(0,a.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,a.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,a.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,a.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,a.jsx)(z.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,a.jsx)(D.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,a.jsx)(F.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?V:G,width:50}),(0,a.jsx)(K.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[V(e),"Tokens"]:[G(e),"Cost"]}),"tokens"===i?(0,a.jsx)(W.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,a.jsx)(W.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,a.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function Q(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function J(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function X(e){let t=String(e||"").trim();return/^openai-compatible-chat-[0-9a-f-]{20,}$/i.test(t)||/^openai-compatible-[0-9a-f-]{20,}$/i.test(t)}function Y(e){return String(e||"").trim()}function Z(e=[]){let t={},s={};for(let a of e||[]){let e=function(e={}){let t=Y(e.provider||e.providerId||e.provider_id||e.id),s=Y(e.accountName||e.account_name||e.email||e.displayName||e.display_name||e.name||e.label||e.connectionName||e.connection_name),a=J(e.endpoint)||J(e.baseUrl)||J(e.baseURL)||J(e.base_url)||J(e.providerUrl)||J(e.provider_url)||J(e.url),r=Y(e.email);return{providerId:t,accountName:s,displayName:Y(e.displayName||e.display_name),email:r,endpointHost:a,ownerUser:Y(e.ownerUser||e.owner_user),isPersonal:"personal"===e.scope||"private"===e.visibility||!!(e.ownerUser||e.owner_user)}}(a);for(let s of[a.id,a.connectionId,a.connection_id].map(Y).filter(Boolean))t[s]||(t[s]=e);e.accountName&&!s[e.accountName]&&(s[e.accountName]=e)}return{byConnectionId:t,byAccount:s}}function ee(e={},t={}){let s=e.model||e.rawModel||e.raw_model||"-",a=function(e={},t={}){let s=function(e={},t={}){for(let s of[e.connectionId,e.connection_id].map(Y).filter(Boolean))if(t.byConnectionId?.[s])return t.byConnectionId[s];let s=Y(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return s&&t.byAccount?.[s]?t.byAccount[s]:null}(e,t),a=function(e={},t=null){let s=Y(e.provider||e.providerId||e.provider_id).toLowerCase();if(!(!0===e.isPersonalOAuth||!0===e.is_personal_oauth||"personal"===e.connectionScope||"personal"===e.connection_scope||"private"===e.visibility||t?.isPersonal)||!s)return"";let a=Y(e.ownerUser||e.owner_user||e.apiKeyOwner||e.api_key_owner||t?.ownerUser),r=Y(e.accountEmail||e.account_email||e.email||t?.email),l=Y(e.accountDisplayName||e.account_display_name||e.accountName||e.account_name||e.connectionName||e.connection_name||t?.accountName||t?.displayName),n=[];return(a&&n.push(a),r&&r!==a?n.push(r):l&&l!==a&&n.push(l),n.length)?(n.push(s),n.join("/")):""}(e,s);if(a)return a;if(s){let e=s.providerId,t=s.accountName,a=s.endpointHost;if(e&&!X(e)){if(s.isPersonal&&s.ownerUser){let a=[s.ownerUser];return s.email&&s.email!==s.ownerUser?a.push(s.email):t&&t!==s.ownerUser&&a.push(t),a.push(e),a.join("/")}return t&&t!==e?`${e}/${t}`:e}if(t)return t;if(a)return a}let r=J(e.endpoint)||J(e.providerUrl)||J(e.provider_url)||J(e.baseUrl)||J(e.baseURL)||J(e.base_url)||J(e.url);if(r)return r;let l=Y(e.provider||e.providerId||e.provider_id),n=Y(e.accountName||e.account_name||e.keyName||e.key_name||e.connectionName||e.connection_name||e.providerName||e.provider_name||e.providerLabel||e.provider_label);return l&&!X(l)?n&&n!==l?`${l}/${n}`:l:n||""}(e,t),r=Y(e.provider||e.providerId||e.provider_id);return!a||"-"===s||String(s).startsWith(`${a}/`)?s:r&&String(s).startsWith(`${r}/`)&&(a.startsWith(`${r}/`)||a.endsWith(`/${r}`))?`${a}/${String(s).slice(r.length+1)}`:`${a}/${s}`}function et({timestamp:e}){let t,[,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}H.propTypes={period:u().string};let es=new Set(["ok","success","succeeded","complete","completed","done","200 ok"]),ea=new Set(["pending","running","queued","in_progress","in-progress"]);function er(e={}){let t,s=String(e.status||e.statusText||e.status_text||"").trim().toLowerCase(),a=(t=String(s||"").match(/\b([1-5]\d{2})\b/))?Number(t[1]):null,r=function(...e){for(let t of e){if(null==t||""===t)continue;let e=Number(t);if(Number.isFinite(e))return e}return null}(e.statusCode,e.status_code,e.gatewayStatusCode,e.gateway_status_code,e.upstreamStatusCode,e.upstream_status_code,a),l=Y(e.errorCode||e.error_code),n=Y(e.errorType||e.error_type),i=Y(e.errorMessageShort||e.error_message_short||e.message||e.error);if(ea.has(s))return{kind:"pending",label:"PENDING",title:"Request is still pending/running.",dotClass:"bg-amber-500",rowClass:"hover:bg-amber-50/60",badgeClass:"bg-amber-100 text-amber-700 border border-amber-200"};if(/\b(error|fail|failed|failure|timeout|cancelled|canceled)\b/i.test(s)||null!==r&&r>=400||l||n||i){let t=null!==r?`ERR ${r}`:s?s.toUpperCase():"ERROR",a=[`Status: ${t}`,l?`Code: ${l}`:"",n?`Type: ${n}`:"",i?`Message: ${i}`:"",e.endpoint?`Endpoint: ${e.endpoint}`:""].filter(Boolean);return{kind:"error",label:t,title:a.join("\n"),dotClass:"bg-error",rowClass:"hover:bg-error/5",badgeClass:"bg-error/10 text-error border border-error/20"}}return null!==r&&r>=200&&r<300||!s||es.has(s)?{kind:"success",label:r?`OK ${r}`:"OK",title:"Request completed successfully.",dotClass:"bg-success",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-success/10 text-success border border-success/20"}:{kind:"unknown",label:s?s.toUpperCase():"UNKNOWN",title:s?`Status: ${s}`:"Unknown request status.",dotClass:"bg-text-muted",rowClass:"hover:bg-bg-subtle",badgeClass:"bg-bg-subtle text-text-muted border border-border"}}function el({request:e}){let{cachedTokens:t,cacheCreationTokens:s,totalTokens:r,totalInputTokens:l,newInputTokens:n,reasoningTokens:i,outputTokens:o}=function(e={}){let t=Number(e.promptTokens??e.prompt_tokens??0)||0,s=Number(e.cachedTokens??e.cached_tokens??e.cache_read_input_tokens??0)||0,a=Number(e.cacheCreationTokens??e.cache_creation_input_tokens??0)||0,r=Number(e.completionTokens??e.completion_tokens??0)||0,l=Number(e.totalTokens??e.total_tokens??t+r)||0,n=Number(e.displayTotalInputTokens??e.display_total_input_tokens??t)||0,i=Number(e.displayNewInputTokens??e.display_new_input_tokens??Math.max(0,n-s-a))||0,o=Number(e.displayCachedInputTokens??e.display_cached_input_tokens??s)||0,d=Number(e.displayCacheCreationInputTokens??e.display_cache_creation_input_tokens??a)||0,c=Number(e.displayReasoningTokens??e.display_reasoning_tokens??e.reasoningTokens??e.reasoning_tokens??0)||0,m=Number(e.displayOutputTokens??e.display_output_tokens??r)||0;return{promptTokens:t,cachedTokens:o,cacheCreationTokens:d,completionTokens:r,totalTokens:l,totalInputTokens:n,newInputTokens:i,reasoningTokens:c,outputTokens:m}}(e),d=er(e),c=l>0?Math.min(100,Math.max(0,Math.round(t/l*100))):0,m=`Total Input: ${k(l)}
|
|
2
2
|
New Input: ${k(n)}
|
|
3
3
|
Cached: ${k(t)}
|
|
4
4
|
Cache Create: ${k(s)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{14899:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var a=s(95155),r=s(12115),l=s(84588),n=s(81127),i=s(92542);let d=[{key:"input",label:"Input"},{key:"output",label:"Output"},{key:"cached",label:"Cached"},{key:"reasoning",label:"Reasoning"},{key:"cache_creation",label:"Cache create (5m)"}],o={override:{label:"Custom",cls:"bg-brand-500/15 text-brand-500"},provider:{label:"Provider",cls:"bg-warning/15 text-warning"},canonical:{label:"Canonical",cls:"bg-success/15 text-success"},pattern:{label:"Pattern",cls:"bg-primary/15 text-primary"},none:{label:"Chưa c\xf3 gi\xe1",cls:"bg-red-500/15 text-red-500"}},c=(e,t=0)=>{let s=Number(e);return Number.isFinite(s)?s:t};function x(e={}){let t=Math.max(0,c(e.input,0)),s=Math.max(0,c(e.output,0));return{input:t,output:s,cached:Math.max(0,c(e.cached,t)),reasoning:Math.max(0,c(e.reasoning,s)),cache_creation:Math.max(0,c(e.cache_creation,t))}}function m({rates:e,onChange:t,disabled:s}){return d.map(r=>(0,a.jsx)("td",{className:"px-1.5 py-1.5",children:(0,a.jsx)("input",{type:"number",step:"any",min:"0",inputMode:"decimal",disabled:s,value:e?.[r.key]??0,onChange:e=>t?.(r.key,e.target.value),className:"h-8 w-full min-w-[64px] rounded-[8px] border border-border bg-surface px-2 text-right text-xs tabular-nums text-text-main focus:border-brand-500 focus:outline-none disabled:opacity-60"})},r.key))}function u({isOpen:e,onClose:t,onSave:s}){let[l,c]=(0,r.useState)("inUse"),[h,p]=(0,r.useState)(null),[b,g]=(0,r.useState)({}),[f,j]=(0,r.useState)(!0),[v,y]=(0,r.useState)(!1),[N,w]=(0,r.useState)(""),[k,C]=(0,r.useState)(""),S=(0,r.useCallback)(async()=>{j(!0),w("");try{let e=await fetch("/api/pricing/catalog");if(!e.ok)throw Error(`HTTP ${e.status}`);p(await e.json()),g({})}catch(e){w(`Kh\xf4ng tải được bảng gi\xe1: ${e.message}`)}finally{j(!1)}},[]);(0,r.useEffect)(()=>{e&&S()},[e,S]);let T=(e,t,s,a)=>{g(r=>({...r,[e]:{...r[e]||{},[t]:{...(r[e]||{})[t]||{},[s]:a}}}))},O=(e,t,s)=>{let a=b[e]?.[t];return x({...s||{},...a||{}})},$=(0,r.useMemo)(()=>Object.values(b).reduce((e,t)=>e+Object.keys(t||{}).length,0),[b]),P=async()=>{if(0===$)return void t?.();y(!0),w("");let e={};for(let[t,s]of Object.entries(b))for(let[a,r]of(e[t]={},Object.entries(s||{}))){let s=x({...h?.inUse?.find(e=>e.provider===t&&e.model===a)?.pricing||h?.canonical?.[a]||{},...r});for(let{key:r}of(e[t][a]={},d))e[t][a][r]=s[r]}try{let a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e?.error||`HTTP ${a.status}`)}s?.(),t?.()}catch(e){w(`Kh\xf4ng lưu được: ${e.message}`)}finally{y(!1)}},L=async()=>{if(confirm("Xo\xe1 to\xe0n bộ gi\xe1 tuỳ chỉnh v\xe0 quay về mặc định trong code?")){w("");try{let e=await fetch("/api/pricing",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);await S(),s?.()}catch(e){w(`Kh\xf4ng reset được: ${e.message}`)}}},M=k.trim().toLowerCase(),E=(0,r.useMemo)(()=>(h?.inUse||[]).filter(e=>!M||e.model.toLowerCase().includes(M)||e.provider.toLowerCase().includes(M)),[h,M]),_=(0,r.useMemo)(()=>{let e=h?.overrides?.canonical||{},t=Object.entries(h?.canonical||{}).map(([t,s])=>[t,e[t]?{...s,...e[t]}:s,!!e[t]]);for(let[s,a]of Object.entries(e))h?.canonical?.[s]||t.push([s,a,!0]);return t.filter(([e])=>!M||e.toLowerCase().includes(M)).sort((e,t)=>e[0].localeCompare(t[0]))},[h,M]),F=(0,r.useMemo)(()=>(h?.patterns||[]).filter(e=>!M||e.pattern.toLowerCase().includes(M)),[h,M]),K=[{id:"inUse",label:"Đang d\xf9ng",count:h?.inUse?.length||0},{id:"canonical",label:"Tất cả model",count:Object.keys(h?.canonical||{}).length},{id:"patterns",label:"Pattern",count:h?.patterns?.length||0}];return(0,a.jsx)(n.default,{isOpen:e,onClose:t,title:"Pricing Configuration",size:"full",busy:v,className:"max-w-6xl",footer:(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-3",children:[(0,a.jsx)(i.default,{variant:"danger",size:"sm",onClick:L,disabled:v||f,children:"Reset to defaults"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[$>0&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[$," model đ\xe3 sửa"]}),(0,a.jsx)(i.default,{variant:"ghost",onClick:t,disabled:v,children:"Cancel"}),(0,a.jsx)(i.default,{onClick:P,disabled:v||f,children:v?"Đang lưu...":"Save changes"})]})]}),children:f?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Đang tải bảng gi\xe1..."})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,a.jsxs)("div",{className:"rounded-[10px] border border-border-subtle bg-bg p-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Đơn vị: $ tr\xean mỗi triệu token ($/1M)"}),(0,a.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:["Chỉ d\xf9ng một profile gi\xe1: ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Standard / Global"}),", context chuẩn ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"≤272K"})," v\xe0 cache create",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:" 5 ph\xfat"}),". Request d\xe0i hơn 272K hoặc cache TTL kh\xe1c vẫn d\xf9ng đ\xfang mức gi\xe1 n\xe0y; hệ thống kh\xf4ng t\xe1ch long-context hay cache 1 giờ."]}),(0,a.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-text-muted",children:["Thứ tự \xe1p dụng: ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Custom"})," → "," ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Provider"})," → "," ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Canonical"})," → "," ",(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Pattern"}),"."]})]}),N&&(0,a.jsx)("div",{className:"rounded-[10px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-500",children:N}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("div",{className:"flex gap-1 rounded-[10px] border border-border-subtle bg-bg p-1",children:K.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>c(e.id),className:`rounded-[8px] px-3 py-1 text-xs font-medium transition-colors ${l===e.id?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"}`,children:[e.label," ",(0,a.jsxs)("span",{className:"opacity-60",children:["(",e.count,")"]})]},e.id))}),(0,a.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-[18px] text-text-muted",children:"search"}),(0,a.jsx)("input",{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:"Lọc theo model hoặc provider...",className:"h-9 w-full rounded-[10px] border border-border bg-surface pl-8 pr-3 text-sm text-text-main placeholder:text-text-muted focus:border-brand-500 focus:outline-none"})]})]}),"inUse"===l&&(0,a.jsx)("div",{className:"min-w-0 overflow-x-auto rounded-[10px] border border-border-subtle",children:(0,a.jsxs)("table",{className:"w-full min-w-[760px] text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border-subtle bg-bg text-[10px] uppercase text-text-muted",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left font-semibold",children:"Model"}),(0,a.jsx)("th",{className:"px-2 py-2 text-left font-semibold",children:"Nguồn gi\xe1"}),(0,a.jsx)("th",{className:"px-2 py-2 text-right font-semibold",children:"Requests"}),d.map(e=>(0,a.jsx)("th",{className:"px-1.5 py-2 text-right font-semibold",children:e.label},e.key))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border-subtle",children:[E.map(e=>{let t,s,r=o[e.source]||o.none,l=!!b[e.provider]?.[e.model];return(0,a.jsxs)("tr",{className:l?"bg-brand-500/5":"hover:bg-bg/60",children:[(0,a.jsxs)("td",{className:"max-w-[200px] px-3 py-1.5",children:[(0,a.jsx)("div",{className:"truncate font-medium text-text-main",title:e.model,children:e.model}),(0,a.jsx)("div",{className:"truncate text-[10px] text-text-muted",title:e.provider,children:(s=(t=String(e.provider||"")).match(/^(openai|anthropic)-compatible-(?:chat-)?(.*)$/i))?`${s[1]}-compat…${(s[2]||"").slice(0,6)}`:t})]}),(0,a.jsx)("td",{className:"px-2 py-1.5",children:(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-medium ${r.cls}`,children:l?"Chưa lưu":r.label})}),(0,a.jsx)("td",{className:"px-2 py-1.5 text-right text-xs tabular-nums text-text-muted",children:e.requests.toLocaleString()}),(0,a.jsx)(m,{rates:O(e.provider,e.model,e.pricing),onChange:(t,s)=>T(e.provider,e.model,t,s)})]},`${e.provider}\u001f${e.model}`)}),0===E.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:8,className:"px-3 py-8 text-center text-sm text-text-muted",children:M?"Kh\xf4ng c\xf3 model n\xe0o khớp.":"Chưa c\xf3 usage trong 30 ng\xe0y gần đ\xe2y."})})]})]})}),"canonical"===l&&(0,a.jsxs)("div",{className:"min-w-0 overflow-x-auto rounded-[10px] border border-border-subtle",children:[(0,a.jsxs)("table",{className:"w-full min-w-[700px] text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border-subtle bg-bg text-[10px] uppercase text-text-muted",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left font-semibold",children:"Model (canonical)"}),d.map(e=>(0,a.jsx)("th",{className:"px-1.5 py-2 text-right font-semibold",children:e.label},e.key))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border-subtle",children:[_.map(([e,t,s])=>{let r=!!b.canonical?.[e];return(0,a.jsxs)("tr",{className:r?"bg-brand-500/5":"hover:bg-bg/60",children:[(0,a.jsxs)("td",{className:"max-w-[260px] truncate px-3 py-1.5 font-medium text-text-main",title:e,children:[e,r?(0,a.jsx)("span",{className:"ml-2 text-[10px] text-brand-500",children:"chưa lưu"}):s?(0,a.jsx)("span",{className:"ml-2 rounded-full bg-brand-500/15 px-1.5 py-0.5 text-[10px] text-brand-500",children:"Custom"}):null]}),(0,a.jsx)(m,{rates:O("canonical",e,t),onChange:(t,s)=>T("canonical",e,t,s)})]},e)}),0===_.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"px-3 py-8 text-center text-sm text-text-muted",children:"Kh\xf4ng c\xf3 model n\xe0o khớp."})})]})]}),(0,a.jsxs)("p",{className:"border-t border-border-subtle bg-bg px-3 py-2 text-[10px] leading-relaxed text-text-muted",children:["Sửa ở tab n\xe0y lưu dưới provider ảo ",(0,a.jsx)("span",{className:"font-mono",children:"canonical"}),", \xe1p dụng khi request kh\xf4ng khớp override theo provider cụ thể. Muốn chỉnh ri\xeang cho một provider, d\xf9ng tab “Đang d\xf9ng”."]})]}),"patterns"===l&&(0,a.jsxs)("div",{className:"min-w-0 overflow-x-auto rounded-[10px] border border-border-subtle",children:[(0,a.jsxs)("table",{className:"w-full min-w-[700px] text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border-subtle bg-bg text-[10px] uppercase text-text-muted",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left font-semibold",children:"Pattern"}),d.map(e=>(0,a.jsx)("th",{className:"px-1.5 py-2 text-right font-semibold",children:e.label},e.key))]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-border-subtle",children:[F.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-bg/60",children:[(0,a.jsxs)("td",{className:"px-3 py-1.5",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-text-main",children:e.pattern}),(0,a.jsxs)("span",{className:"ml-2 text-[10px] text-text-muted",children:["#",t+1]})]}),d.map(t=>(0,a.jsx)("td",{className:"px-1.5 py-1.5 text-right text-xs tabular-nums text-text-muted",children:x(e.pricing)[t.key]},t.key))]},`${e.pattern}-${t}`)),0===F.length&&(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:6,className:"px-3 py-8 text-center text-sm text-text-muted",children:"Kh\xf4ng c\xf3 pattern n\xe0o khớp."})})]})]}),(0,a.jsx)("p",{className:"border-t border-border-subtle bg-bg px-3 py-2 text-[10px] leading-relaxed text-text-muted",children:"Chỉ đọc — pattern khớp theo thứ tự từ tr\xean xuống, c\xe1i đầu ti\xean tr\xfang sẽ được d\xf9ng. Muốn đổi gi\xe1 cho một model cụ thể, sửa ở tab “Đang d\xf9ng” hoặc “Tất cả model” để tạo bản ghi đ\xe8 l\xean pattern."})]})]})})}function h(){let[e,t]=(0,r.useState)(!1),[s,n]=(0,r.useState)(null),[i,d]=(0,r.useState)(!0),[o,c]=(0,r.useState)(!1),[x,m]=(0,r.useState)("");(0,r.useEffect)(()=>{h()},[]);let h=async()=>{d(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();n(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{d(!1)}},p=async()=>{if(confirm("T\xednh lại cost cho to\xe0n bộ lịch sử usage theo bảng gi\xe1 hiện tại?")){c(!0),m("");try{let e=await fetch("/api/pricing/recalculate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok)throw Error(t?.error||`HTTP ${e.status}`);let s=Number(t.rowsUpdated??0),a=Number(t.groupsUpdated??0),r=Number(t.skippedNoPricing??0);m(`Đ\xe3 cập nhật ${s.toLocaleString()} d\xf2ng (${a.toLocaleString()} nh\xf3m provider/model)`+(r>0?` — bỏ qua ${r.toLocaleString()} nh\xf3m chưa c\xf3 gi\xe1.`:"."))}catch(e){m(`Lỗi: ${e.message}`)}finally{c(!1)}}};return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,a.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:p,disabled:o,className:"px-4 py-2 border border-border rounded text-sm text-text-main hover:bg-surface-2 transition-colors disabled:opacity-50",children:o?"Đang t\xednh lại...":"Recalculate cost"}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]})]}),x&&(0,a.jsx)("div",{className:"rounded-[10px] border border-border-subtle bg-bg px-3 py-2 text-sm text-text-muted",children:x}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(l.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:i?"...":(()=>{if(!s)return 0;let e=0;for(let t in s)e+=Object.keys(s[t]).length;return e})()})]}),(0,a.jsxs)(l.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:i?"...":(!s?[]:Object.keys(s).sort()).length})]}),(0,a.jsxs)(l.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:i?"...":"Active"})]})]}),(0,a.jsxs)(l.default,{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Pricing Profile:"})," The system uses one Standard / Global rate profile only: short context up to 272K tokens and 5-minute cache creation. Requests above 272K or using a longer cache TTL are intentionally calculated with the same rates; no long-context or 1-hour cache tier is stored."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Cost Calculation:"})," Cost is calculated from new input, cached input, cache creation, output, and reasoning usage using the five rates below. All rates are in",(0,a.jsx)("strong",{children:" dollars per million tokens"})," ($/1M tokens)."]}),(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Token Types:"})}),(0,a.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cached:"})," Cached input tokens at the model-specific cached rate"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Cache Creation:"})," 5-minute cache-write rate; all longer TTLs reuse this rate"]})]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,a.jsxs)(l.default,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),i?(0,a.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):s?(0,a.jsxs)("div",{className:"space-y-3",children:[Object.keys(s).slice(0,5).map(e=>(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,a.jsxs)("span",{className:"text-text-muted",children:[Object.keys(s[e]).length," models"]})]},e)),Object.keys(s).length>5&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(s).length-5," more providers"]})]}):(0,a.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,a.jsx)(u,{isOpen:e,onClose:()=>t(!1),onSave:()=>{h()}})]})}},31474:(e,t,s)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>a})},45015:(e,t,s)=>{Promise.resolve().then(s.bind(s,14899))},81127:(e,t,s)=>{"use strict";s.d(t,{ConfirmModal:()=>m,default:()=>x});var a=s(95155),r=s(12115),l=s(31474),n=s(92542),i=s(97677);let d=[],o="";function c(){1===d.length?(o=document.body.style.overflow,document.body.style.overflow="hidden"):0===d.length&&(document.body.style.overflow=o)}function x({isOpen:e,onClose:t,title:s,children:n,footer:o,size:m="md",closeOnOverlay:u=!0,showTrafficLights:h=!0,busy:p=!1,className:b}){let g=(0,r.useRef)({onClose:t,busy:p});return(g.current.onClose=t,g.current.busy=p,(0,r.useEffect)(()=>{if(!e)return;let t=g.current;d.push(t),c();let s=e=>{if("Escape"!==e.key)return;let s=d[d.length-1];s!==t||s.busy||(e.preventDefault(),s.onClose())};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s);let e=d.indexOf(t);-1!==e&&d.splice(e,1),c()}},[e]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:u&&!p?t:void 0}),(0,a.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[m],b),children:[(s||h)&&(0,a.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[h&&(0,a.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,a.jsx)(i.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,a.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),(0,a.jsx)("button",{onClick:t,disabled:p,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:n}),o&&(0,a.jsx)("div",{className:"flex items-center justify-end gap-3 p-6 border-t border-border-subtle",children:o})]})]}):null}function m({isOpen:e,onClose:t,onConfirm:s,title:r="Confirm",message:l,confirmText:i="Confirm",cancelText:d="Cancel",variant:o="danger",loading:c=!1}){return(0,a.jsx)(x,{isOpen:e,onClose:t,title:r,size:"sm",busy:c,footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{variant:"ghost",onClick:t,disabled:c,children:d}),(0,a.jsx)(n.default,{variant:o,onClick:s,loading:c,children:i})]}),children:(0,a.jsx)("p",{className:"text-text-muted",children:l})})}},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var a=s(95155),r=s(31474);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:d="md",hover:o=!1,elev:c=!1,className:x,...m}){return(0,a.jsxs)("div",{className:(0,r.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",o&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[d],x),...m,children:[(t||i)&&(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[n&&(0,a.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:n})}),(0,a.jsxs)("div",{children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,a.jsxs)("div",{className:(0,r.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...l,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var a=s(95155),r=s(31474);let l={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:d,iconRight:o,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...h}){return(0,a.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100",l[t],n[s],m&&"w-full",u),disabled:c||x,...h,children:[x?(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):d?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d}):null,e,o&&!x&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o})]})}},97677:(e,t,s)=>{"use strict";s.d(t,{default:()=>r});var a=s(95155);function r({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,a.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,a.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=45015)),_N_E=e.O()}]);
|
|
Binary file
|
|
Binary file
|
package/app/package.json
CHANGED