@jheavenknows/bluerouter 5.2.70 → 5.2.71
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 +8 -8
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
- 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/model-profiles/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.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_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/_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/_not-found/__PAGE__.segment.rsc +5 -5
- 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-model-profiles/cloud-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/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 +2 -2
- 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/ai-power-index/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.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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.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 +6 -6
- 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/_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 +9 -9
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +9 -9
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.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 +7 -7
- 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/_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 +6 -6
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +6 -6
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +6 -6
- 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/_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 +6 -6
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +8 -8
- 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/_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 +6 -6
- 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/_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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- 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 +7 -7
- 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/_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 +6 -6
- 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/_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 +7 -7
- 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/_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 +7 -7
- 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/_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 +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +8 -8
- package/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.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/814.js +2 -2
- package/app/.next-cli-build/server/middleware-build-manifest.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-ef89b94c462d029b.js → 5263-003b7fac59fa6628.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-16ee12d2d0745886.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.2.67-to-5.2.68-5.2.68-20260813-193601 → upgrade-5.2.69-to-5.2.70-5.2.70-20260813-200634}/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/upgrade-5.2.69-to-5.2.70-5.2.70-20260813-200635/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-fbc139f46bdcd072.js +0 -1
- /package/app/.next-cli-build/static/{uE9OqSdLupGChu1y8DAlG → eRH2T2gxNi5BOBtumvC2Y}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{uE9OqSdLupGChu1y8DAlG → eRH2T2gxNi5BOBtumvC2Y}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/{5263-ef89b94c462d029b.js → 5263-003b7fac59fa6628.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.70"},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.71"},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/app/(dashboard)/dashboard/profile/page-16ee12d2d0745886.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{7973:(e,a,t)=>{Promise.resolve().then(t.bind(t,38658))},38658:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>j});var s=t(95155),r=t(12115),l=t(44656),o=t(35497);let n={enabled:!1,fileLoggingEnabled:!1,type:"mysql",host:"",port:"",database:"",username:"",password:"",ssl:!1,createDatabase:!1,logClientRequest:!0,logSourceRequest:!0,logTargetRequest:!0,logProviderResponse:!1,logErrors:!0,retentionDays:30,payloadRotationEnabled:!1,payloadRetentionDays:60,payloadRotationScheduleTime:"21:00",payloadRotationMaxRuntimeMinutes:60,payloadRotationIntervalHours:24,payloadRotationBatchSize:500,payloadRotationMaxBatches:20},d=[{value:60,label:"1 hour"},{value:120,label:"2 hours"},{value:180,label:"3 hours"},{value:240,label:"4 hours"},{value:360,label:"6 hours"},{value:480,label:"8 hours"},{value:720,label:"12 hours"},{value:0,label:"Until finished"}];function i({label:e,value:a,onChange:t,type:r="text",placeholder:l="",disabled:o=!1,min:n,max:d,step:c}){return(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:e}),(0,s.jsx)("input",{type:r,value:a||"",placeholder:l,disabled:o,min:n,max:d,step:c,onChange:e=>t(e.target.value),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]})}function c({label:e,checked:a,onChange:t,disabled:r=!1}){return(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:!!a,disabled:r,onChange:e=>t(e.target.checked)}),e]})}function p(){let[e,a]=(0,r.useState)(n),[t,l]=(0,r.useState)(!1),[p,u]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[g,b]=(0,r.useState)(null),h=e=>a(a=>({...a,...e})),y=async()=>{l(!0),x(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db"),t=await e.json();if(!e.ok)throw Error(t.error||"Failed to load config");a({...n,...t.config||{}})}catch(e){x(e.message||"Failed to load config")}finally{l(!1)}};(0,r.useEffect)(()=>{y()},[]);let f=async()=>{l(!0),x(null),u(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})}),s=await t.json();if(!t.ok)throw Error(s.error||"Failed to save config");a({...n,...s.config||{}}),u("Saved")}catch(e){x(e.message||"Failed to save config")}finally{l(!1)}},v=async(a,t={})=>{if(!t.confirm||window.confirm("Delete all prompt_logs rows and their payloads older than the retention cutoff? Both the rows in prompt_logs (previews, model/provider/token metadata) and the referenced payloads will be removed. This cannot be undone.")){l(!0),x(null),u(null),a.includes("payload-rotation")&&b(null);try{let s=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,config:e,confirm:!0===t.confirm})}),r=await s.text(),l={};try{l=r?JSON.parse(r):{}}catch{let e=r.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,200),a=504===s.status?"Manual rotation exceeded the request timeout. Use automatic rotation for long-running cleanup.":`HTTP ${s.status}: ${e||s.statusText||"non-JSON response"}`;throw Error(a)}if(!s.ok)throw Error(l.error||`HTTP ${s.status}`);a.includes("payload-rotation")&&b(l),u(l.message||l.init?.message||"OK")}catch(e){x(e.message||"Action failed")}finally{l(!1)}}},j="postgres"===e.type||"mysql"===e.type;return(0,s.jsx)(o.Zp,{title:"Request Logging",subtitle:"Control local request files and database-backed prompt logs",icon:"receipt_long",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)(o.Ex,{variant:e.fileLoggingEnabled?"success":"default",children:["Local files: ",e.fileLoggingEnabled?"Enabled":"Disabled"]}),(0,s.jsxs)(o.Ex,{variant:e.enabled?"success":"default",children:["Database: ",e.enabled?"Enabled":"Disabled"]})]}),(0,s.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:'Prompt logs may contain source code, selected code, internal URLs, user prompts, and provider responses. Checked stages store full raw JSON; prompt/response text columns keep only short previews. Per-combo "hide content" still redacts raw JSON.'}),(0,s.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Database type"}),(0,s.jsxs)("select",{value:e.type,disabled:t,onChange:a=>{let t=a.target.value;h({type:t,port:"postgres"===t?e.port||"5432":"mysql"===t?e.port||"3306":e.port})},className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,s.jsx)("option",{value:"mysql",children:"MySQL / MariaDB"}),(0,s.jsx)("option",{value:"postgres",children:"PostgreSQL"})]})]})}),j&&(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,s.jsx)(i,{label:"Host",value:e.host,placeholder:"127.0.0.1",onChange:e=>h({host:e}),disabled:t}),(0,s.jsx)(i,{label:"Port",value:e.port,placeholder:"postgres"===e.type?"5432":"3306",onChange:e=>h({port:e}),disabled:t}),(0,s.jsx)(i,{label:"Database",value:e.database,placeholder:"bluerouter_logs",onChange:e=>h({database:e}),disabled:t}),(0,s.jsx)(i,{label:"Username",value:e.username,placeholder:"bluerouter",onChange:e=>h({username:e}),disabled:t}),(0,s.jsx)(i,{label:"Password",type:"password",value:e.password,placeholder:"Leave as ******** to keep existing password",onChange:e=>h({password:e}),disabled:t}),(0,s.jsxs)("div",{className:"flex flex-col justify-end gap-2",children:[(0,s.jsx)(c,{label:"Use SSL",checked:e.ssl,onChange:e=>h({ssl:e}),disabled:t}),(0,s.jsx)(c,{label:"Create database if missing",checked:e.createDatabase,onChange:e=>h({createDatabase:e}),disabled:t})]})]}),(0,s.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-surface/40 p-3 md:grid-cols-2",children:[(0,s.jsx)(c,{label:"Save request/response to local files",checked:e.fileLoggingEnabled,onChange:e=>h({fileLoggingEnabled:e}),disabled:t}),(0,s.jsx)(c,{label:"Save request/response to Prompt Log Database",checked:e.enabled,onChange:e=>h({enabled:e}),disabled:t}),(0,s.jsx)(c,{label:"Log client request JSON",checked:e.logClientRequest,onChange:e=>h({logClientRequest:e}),disabled:t}),(0,s.jsx)(c,{label:"Log normalized/source request JSON",checked:e.logSourceRequest,onChange:e=>h({logSourceRequest:e}),disabled:t}),(0,s.jsx)(c,{label:"Log target/provider request JSON",checked:e.logTargetRequest,onChange:e=>h({logTargetRequest:e}),disabled:t}),(0,s.jsx)(c,{label:"Log provider response JSON",checked:e.logProviderResponse,onChange:e=>h({logProviderResponse:e}),disabled:t}),(0,s.jsx)(c,{label:"Log errors",checked:e.logErrors,onChange:e=>h({logErrors:e}),disabled:t})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-border bg-background p-3 text-xs text-text-muted",children:["Local files are written under ",(0,s.jsx)("code",{children:"DATA_DIR/logs/requests"}),". Disabling local files stops new request/response dump files; existing files are kept."]}),(0,s.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-surface/40 p-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text-main",children:"Prompt log rotation"}),(0,s.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Deletes ",(0,s.jsx)("code",{children:"prompt_logs"})," rows AND their referenced payloads older than the retention cutoff. After a full run, only logs from the last N days remain — analytics/metadata for older rows are removed as well."]})]}),(0,s.jsx)(c,{label:"Enable automatic rotation",checked:e.payloadRotationEnabled,onChange:e=>h({payloadRotationEnabled:e}),disabled:t}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-4",children:[(0,s.jsx)(i,{label:"Keep logs for (days)",type:"number",min:1,max:3650,step:1,value:String(e.payloadRetentionDays||60),onChange:e=>h({payloadRetentionDays:Number(e)||60}),disabled:t}),(0,s.jsx)(i,{label:"Daily start time (Vietnam, UTC+7)",type:"time",step:60,value:String(e.payloadRotationScheduleTime||"21:00"),onChange:e=>h({payloadRotationScheduleTime:e||"21:00"}),disabled:t}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Maximum automatic run time"}),(0,s.jsx)("select",{value:String(Number(e.payloadRotationMaxRuntimeMinutes??60)),disabled:t,onChange:e=>h({payloadRotationMaxRuntimeMinutes:Number(e.target.value)}),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50",children:d.map(e=>(0,s.jsx)("option",{value:String(e.value),children:e.label},e.value))})]}),(0,s.jsx)(i,{label:"Prompt-log rows per transaction",type:"number",min:50,max:5e3,step:50,value:String(e.payloadRotationBatchSize||500),onChange:e=>h({payloadRotationBatchSize:Number(e)||500}),disabled:t})]}),(0,s.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["Automatic rotation runs once per day at the selected Vietnam time. It deletes expired ",(0,s.jsx)("code",{children:"prompt_logs"})," in small transactions and checks the run-time budget between cleanup passes. If the budget is reached, remaining rows continue at the next daily run. Choose ",(0,s.jsx)("strong",{children:"Until finished"})," to keep running until no expired rows remain. On MySQL, orphan ",(0,s.jsx)("code",{children:"prompt_log_payloads"})," rows are reaped as part of the cleanup."]}),(0,s.jsxs)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:["Deletion is permanent: previews, model/provider/token metadata, and analytics for older rows go away too. Freed space stays inside InnoDB — ",(0,s.jsx)("code",{children:"OPTIMIZE TABLE"})," is needed to shrink the .ibd file (only during a maintenance window, with enough free disk)."]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>v("preview-payload-rotation"),loading:t,children:"Preview expired logs"}),(0,s.jsx)(o.$n,{size:"sm",variant:"danger",onClick:()=>v("run-payload-rotation",{confirm:!0}),loading:t,children:"Delete expired logs now"})]}),g&&(0,s.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-background p-3 text-xs md:grid-cols-2 lg:grid-cols-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Cutoff:"})," ",(0,s.jsx)("span",{className:"text-text-main",children:g.cutoff?new Date(g.cutoff).toLocaleString():"-"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:void 0===g.promptLogRowsUpdated?"Prompt-log rows past retention:":"Prompt-log rows deleted:"})," ",(0,s.jsx)("span",{className:"text-text-main",children:Number(g.promptLogRowsUpdated??g.promptLogRows??0).toLocaleString()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:void 0===g.payloadRowsDeleted?"Payload rows to delete:":"Payload rows deleted:"})," ",(0,s.jsx)("span",{className:"text-text-main",children:Number(g.payloadRowsDeleted??g.payloadRowsPastRetention??0).toLocaleString()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-text-muted",children:void 0===g.payloadBytesDeleted?"Estimated payload size:":"Payload size deleted:"})," ",(0,s.jsx)("span",{className:"text-text-main",children:function(e){let a=Number(e||0);if(!Number.isFinite(a)||a<=0)return"0 B";let t=["B","KB","MB","GB","TB"],s=Math.min(t.length-1,Math.floor(Math.log(a)/Math.log(1024))),r=a/1024**s;return`${r.toFixed(r>=10||0===s?1:2)} ${t[s]}`}(g.payloadBytesDeleted??g.payloadBytesPastRetention??g.referencedPayloadBytes)})]}),g.hasMore?(0,s.jsx)("div",{className:"md:col-span-2 lg:col-span-4 text-amber-600",children:"More expired rows remain. Automatic rotation will continue them at the next scheduled run."}):null]}),(0,s.jsx)("div",{className:"text-[11px] text-text-muted",children:"Save to apply the automatic schedule immediately. Preview uses the values currently shown. Manual deletion is a bounded maintenance pass; use automatic rotation for multi-hour cleanup."})]}),j&&(0,s.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["Prompt logs now support MySQL/MariaDB and PostgreSQL only. MySQL/MariaDB requires ",(0,s.jsx)("code",{children:"mysql2"}),"; PostgreSQL requires ",(0,s.jsx)("code",{children:"pg"}),"."]}),p&&(0,s.jsx)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-2 text-xs text-green-600",children:p}),m&&(0,s.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-500",children:m}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:y,loading:t,children:"Reload"}),(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>v("test"),loading:t,children:"Test connection"}),(0,s.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>v("init"),loading:t,children:"Initialize schema"}),(0,s.jsx)(o.$n,{size:"sm",onClick:f,loading:t,children:"Save"}),(0,s.jsx)(o.$n,{size:"sm",variant:"success",onClick:()=>v("save-and-init"),loading:t,children:"Save & initialize"})]})]})})}let u="(|(sAMAccountName={{username}})(userPrincipalName={{username}})(mail={{username}}))",m="image/svg+xml,image/png,image/webp,image/jpeg,image/gif",x=`${m},image/x-icon,image/vnd.microsoft.icon,.ico`;function g({status:e}){if(!e?.message)return null;let a="error"===e.type?"text-red-600 bg-red-50 border-red-200":"text-green-700 bg-green-50 border-green-200";return(0,s.jsx)("div",{className:`mt-3 rounded-xl border px-4 py-3 text-sm ${a}`,children:e.message})}function b({icon:e,title:a,desc:t,children:r}){return(0,s.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-6 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-5 flex items-start gap-3",children:[e&&(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:e}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-text-main",children:a}),t&&(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:t})]})]}),r]})}function h({label:e,hint:a,children:t}){return(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-sm font-semibold text-text-main",children:e}),t,a&&(0,s.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:a})]})}function y(e){return(0,s.jsx)("input",{...e,className:`w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary ${e.className||""}`})}function f(e){return(0,s.jsx)("textarea",{...e,className:`w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary ${e.className||""}`})}function v({title:e,desc:a,checked:t,onChange:r,disabled:l}){return(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background px-4 py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text-main",children:e}),a&&(0,s.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a})]}),(0,s.jsx)("button",{type:"button",disabled:l,onClick:()=>r(!t),className:`relative mt-0.5 h-6 w-11 rounded-full transition disabled:opacity-50 ${t?"bg-primary":"bg-border"}`,children:(0,s.jsx)("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white transition ${t?"left-5":"left-0.5"}`})})]})}function j(){let[e,a]=(0,r.useState)({}),[t,o]=(0,r.useState)(!0),[n,d]=(0,r.useState)({current:"",new:"",confirm:""}),[i,c]=(0,r.useState)({type:"",message:""}),[j,w]=(0,r.useState)(!1),[N,D]=(0,r.useState)(!1),[C,S]=(0,r.useState)({type:"",message:""}),A=(0,r.useRef)(null),[L,k]=(0,r.useState)("admin"),[U,P]=(0,r.useState)({type:"",message:""}),[M,R]=(0,r.useState)({ldapEnabled:!1,ldapUrl:"",ldapBindDn:"",ldapBindPassword:"",ldapUserBaseDn:"",ldapUserSearchFilter:u,ldapUserNameAttribute:"sAMAccountName",ldapUserDisplayAttribute:"displayName",ldapUserEmailAttribute:"mail",ldapLoginAllowedGroupDn:"",ldapAdminGroupDn:"",ldapMonitorAdminGroupDn:"",ldapAiGatewaysMonitorsGroupDn:"",ldapNestedGroups:!0,ldapAllowedUsers:[],ldapTlsRejectUnauthorized:!0,ldapConnectTimeoutMs:8e3}),[B,G]=(0,r.useState)({type:"",message:""}),[E,I]=(0,r.useState)(!1),[O,T]=(0,r.useState)(!1),[F,q]=(0,r.useState)(""),[$,_]=(0,r.useState)([]),[z,J]=(0,r.useState)(!1),[V,H]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[Q,K]=(0,r.useState)(""),[W,Z]=(0,r.useState)({type:"",message:""}),[X,Y]=(0,r.useState)(!1),[ee,ea]=(0,r.useState)(!1),[et,es]=(0,r.useState)({type:"",message:""}),er=(0,l.useBranding)(),[el,eo]=(0,r.useState)(""),[en,ed]=(0,r.useState)(""),[ei,ec]=(0,r.useState)(""),[ep,eu]=(0,r.useState)({type:"",message:""}),[em,ex]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(!1),[eh,ey]=(0,r.useState)(!1),[ef,ev]=(0,r.useState)(!1),ej=(0,r.useRef)(null),ew=(0,r.useRef)(null),eN=async()=>{o(!0);try{let e=await fetch("/api/settings",{cache:"no-store"}),t=await e.json();a(t),k(t.localLoginUsername||"admin"),R({ldapEnabled:!0===t.ldapEnabled,ldapUrl:t.ldapUrl||"",ldapBindDn:t.ldapBindDn||"",ldapBindPassword:"",ldapUserBaseDn:t.ldapUserBaseDn||t.ldapBaseDn||"",ldapUserSearchFilter:t.ldapUserSearchFilter||u,ldapUserNameAttribute:t.ldapUserNameAttribute||"sAMAccountName",ldapUserDisplayAttribute:t.ldapUserDisplayAttribute||"displayName",ldapUserEmailAttribute:t.ldapUserEmailAttribute||"mail",ldapLoginAllowedGroupDn:t.ldapLoginAllowedGroupDn||"",ldapAdminGroupDn:t.ldapAdminGroupDn||"",ldapMonitorAdminGroupDn:t.ldapMonitorAdminGroupDn||"",ldapAiGatewaysMonitorsGroupDn:t.ldapAiGatewaysMonitorsGroupDn||"",ldapNestedGroups:!1!==t.ldapNestedGroups,ldapAllowedUsers:Array.isArray(t.ldapAllowedUsers)?t.ldapAllowedUsers:[],ldapTlsRejectUnauthorized:!1!==t.ldapTlsRejectUnauthorized,ldapConnectTimeoutMs:t.ldapConnectTimeoutMs||8e3}),H({authMode:t.authMode||"password",oidcIssuerUrl:t.oidcIssuerUrl||"",oidcClientId:t.oidcClientId||"",oidcScopes:t.oidcScopes||"openid profile email",oidcLoginLabel:t.oidcLoginLabel||"Sign in with OIDC"}),eo(t.siteTitle||""),ed(t.siteShortName||""),ec(t.siteDescription||""),("oidc"===t.authMode||"both"===t.authMode)&&ea(!0)}catch(e){console.log("Failed to fetch settings:",e)}finally{o(!1)}};(0,r.useEffect)(()=>{eN()},[]);let eD=async e=>{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json().catch(()=>({}));if(!t.ok)throw Error(s.error||"Failed to save settings");return a(e=>({...e,...s})),s},eC=async t=>{es({type:"",message:""});let s=!1!==e.sidebarAdvancedToolsVisible;a(e=>({...e,sidebarAdvancedToolsVisible:t}));try{let e=await eD({sidebarAdvancedToolsVisible:t}),s=!1!==e.sidebarAdvancedToolsVisible;a(e=>({...e,sidebarAdvancedToolsVisible:s})),window.dispatchEvent(new CustomEvent("bluerouter:sidebar-advanced-tools",{detail:{visible:s}})),es({type:"success",message:s?"Advanced tools are visible in the sidebar.":"Advanced tools are hidden from the sidebar."})}catch(e){a(e=>({...e,sidebarAdvancedToolsVisible:s})),window.dispatchEvent(new CustomEvent("bluerouter:sidebar-advanced-tools",{detail:{visible:s}})),es({type:"error",message:e.message||"Failed to save sidebar setting."})}},eS=async e=>{e.preventDefault(),P({type:"",message:""});try{let e=await eD({localLoginUsername:L});k(e.localLoginUsername||L||"admin"),P({type:"success",message:"Local account name saved."})}catch(e){P({type:"error",message:e.message})}},eA=async e=>{if(e.preventDefault(),n.new!==n.confirm)return void c({type:"error",message:"Passwords do not match"});w(!0),c({type:"",message:""});try{await eD({currentPassword:n.current,newPassword:n.new}),c({type:"success",message:"Password updated successfully"}),d({current:"",new:"",confirm:""})}catch(e){c({type:"error",message:e.message||"Failed to update password"})}finally{w(!1)}},eL=async()=>{D(!0),S({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a.error||"Failed to export database")}let a=await e.json(),t=JSON.stringify(a,null,2),s=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(s),l=document.createElement("a"),o=new Date().toISOString().replace(/[.:]/g,"-");l.href=r,l.download=`bluerouter-backup-${o}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r),S({type:"success",message:"Database backup downloaded."})}catch(e){S({type:"error",message:e.message||"Failed to export database."})}finally{D(!1)}},ek=async e=>{let a=e.target.files?.[0];if(a){D(!0),S({type:"",message:""});try{let e=await a.text(),t=JSON.parse(e),s=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json().catch(()=>({}));if(!s.ok)throw Error(r.error||"Failed to import database");await eN();let l=r.resourceMonitorImported?`Restored ${r.resourceMonitorServerCount||0} Resource Monitor server(s) and ${r.resourceMonitorHistoryCount||0} history sample(s).`:"Legacy backup: current Resource Monitor data was kept.",o=r.brandingImported?`Restored ${r.brandingAssetCount||0} branding asset(s).`:"Current logo and favicon were kept.";S({type:"success",message:`Database imported successfully. ${l} ${o}`})}catch(e){S({type:"error",message:e.message||"Invalid backup file."})}finally{A.current&&(A.current.value=""),D(!1)}}},eU=(e,a)=>R(t=>({...t,[e]:a})),eP=async e=>{e?.preventDefault?.(),I(!0),G({type:"",message:""});try{let e={...M,ldapBaseDn:M.ldapUserBaseDn,ldapAllowedUsers:M.ldapAllowedUsers};e.ldapBindPassword||delete e.ldapBindPassword;let a=await eD(e);R(e=>({...e,ldapBindPassword:"",ldapEnabled:!0===a.ldapEnabled,ldapUserBaseDn:a.ldapUserBaseDn||a.ldapBaseDn||e.ldapUserBaseDn,ldapLoginAllowedGroupDn:a.ldapLoginAllowedGroupDn||"",ldapAdminGroupDn:a.ldapAdminGroupDn||"",ldapMonitorAdminGroupDn:a.ldapMonitorAdminGroupDn||"",ldapAiGatewaysMonitorsGroupDn:a.ldapAiGatewaysMonitorsGroupDn||"",ldapNestedGroups:!1!==a.ldapNestedGroups,ldapAllowedUsers:Array.isArray(a.ldapAllowedUsers)?a.ldapAllowedUsers:e.ldapAllowedUsers})),G({type:"success",message:"LDAP settings saved."})}catch(e){G({type:"error",message:e.message||"Failed to save LDAP settings"})}finally{I(!1)}},eM=async()=>{T(!0),G({type:"",message:""});try{await eP();let e=await fetch("/api/auth/ldap/test",{method:"POST"}),a=await e.json().catch(()=>({}));e.ok&&a.ok?G({type:"success",message:a.message||"LDAP connection OK."}):G({type:"error",message:a.error||"LDAP test failed."})}catch(e){G({type:"error",message:e.message||"LDAP test failed."})}finally{T(!1)}},eR=async()=>{J(!0),G({type:"",message:""});try{await eP();let e=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(F)}`,{cache:"no-store"}),a=await e.json().catch(()=>({}));e.ok?(_(a.users||[]),G({type:"success",message:`Loaded ${(a.users||[]).length} LDAP user(s).`})):G({type:"error",message:a.error||"Failed to load LDAP users."})}catch(e){G({type:"error",message:e.message||"Failed to load LDAP users."})}finally{J(!1)}},eB=e=>{let a=String(e||"").trim();a&&R(e=>{let t=new Set(e.ldapAllowedUsers||[]);return t.has(a)?t.delete(a):t.add(a),{...e,ldapAllowedUsers:[...t]}})},eG=async(a=V.authMode||"password")=>{let t=V.oidcIssuerUrl.trim(),s=V.oidcClientId.trim(),r=V.oidcScopes.trim(),l=V.oidcLoginLabel.trim(),o=Q.trim();if("password"!==a&&(!t||!s||!o)&&!e.oidcConfigured)return void Z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Y(!0),Z({type:"",message:""});try{let e={authMode:a,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:r||"openid profile email",oidcLoginLabel:l||"Sign in with OIDC"};o&&(e.oidcClientSecret=o);let n=await eD(e);H({authMode:n.authMode||a,oidcIssuerUrl:n.oidcIssuerUrl||t,oidcClientId:n.oidcClientId||s,oidcScopes:n.oidcScopes||r||"openid profile email",oidcLoginLabel:n.oidcLoginLabel||l||"Sign in with OIDC"}),K(""),Z({type:"success",message:"OIDC settings saved."})}catch(e){Z({type:"error",message:e.message||"Failed to save OIDC settings"})}finally{Y(!1)}},eE=async(e,a)=>{if(!a)return;if(a.size>1048576)return void eu({type:"error",message:"File exceeds 1 MB limit."});let t="logo"===e?eb:ey;t(!0),eu({type:"",message:""});try{let t=new FormData;t.append("asset",e),t.append("file",a);let s=await fetch("/api/branding/upload",{method:"POST",body:t}),r=await s.json().catch(()=>({}));if(!s.ok)throw Error(r.error||"Upload failed");(0,l.notifyBrandingChanged)(),eu({type:"success",message:`${"logo"===e?"Logo":"Favicon"} uploaded.`})}catch(e){eu({type:"error",message:e.message||"Upload failed."})}finally{t(!1)}},eI=async e=>{let a=e.target.files?.[0];await eE("logo",a),ej.current&&(ej.current.value="")},eO=async e=>{let a=e.target.files?.[0];await eE("favicon",a),ew.current&&(ew.current.value="")},eT=async e=>{e.preventDefault(),ex(!0),eu({type:"",message:""});try{await eD({siteTitle:el.trim(),siteShortName:en.trim(),siteDescription:ei.trim()}),(0,l.notifyBrandingChanged)(),eu({type:"success",message:"Branding text saved."})}catch(e){eu({type:"error",message:e.message||"Failed to save branding."})}finally{ex(!1)}},eF=async e=>{eu({type:"",message:""});try{let a=await fetch(`/api/branding?asset=${e}`,{method:"DELETE"}),t=await a.json().catch(()=>({}));if(!a.ok)throw Error(t.error||"Failed to remove asset");(0,l.notifyBrandingChanged)(),eu({type:"success",message:`${"logo"===e?"Logo":"Favicon"} removed.`})}catch(e){eu({type:"error",message:e.message||"Failed to remove asset."})}},eq=async()=>{ev(!0),eu({type:"",message:""});try{let e=await fetch("/api/branding",{method:"DELETE"});if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a.error||"Failed to reset branding")}await eD({siteTitle:"",siteShortName:"",siteDescription:""}),eo(""),ed(""),ec(""),(0,l.notifyBrandingChanged)(),eu({type:"success",message:"Branding reset to defaults."})}catch(e){eu({type:"error",message:e.message||"Failed to reset branding."})}finally{ev(!1)}};return t?(0,s.jsx)("div",{className:"p-8 text-text-muted",children:"Loading settings..."}):(0,s.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6 p-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-bold text-text-main",children:"Settings"}),(0,s.jsx)("p",{className:"mt-1 text-text-muted",children:"Configure dashboard preferences, request logging, database backup, and authentication."})]}),(0,s.jsxs)(b,{icon:"view_sidebar",title:"Sidebar tools",desc:"Show or hide advanced dashboard tools to keep the sidebar clean.",children:[(0,s.jsx)(v,{title:"Show Advanced tools",desc:"When disabled, Media / Web, AI Traffic Gateway, CLI Tools, Proxy Pools, Skills, Console Log and Translator are hidden from the sidebar. Core admin pages remain visible.",checked:!1!==e.sidebarAdvancedToolsVisible,onChange:eC}),(0,s.jsx)(g,{status:et})]}),(0,s.jsxs)(b,{icon:"palette",title:"Branding",desc:"Customize site title, logo and favicon shown in the dashboard, browser tab and login page. Max 1 MB per file.",children:[(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:"Logo"}),(0,s.jsxs)("div",{className:"flex items-center gap-4 rounded-xl border border-border bg-background p-4",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-surface",children:er?.logoUrl?(0,s.jsx)("img",{src:er.logoUrl,alt:"Current logo",className:"max-h-full max-w-full object-contain"}):(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"hub"})}),(0,s.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Shown in the dashboard sidebar and login page. SVG, PNG, WebP, JPEG, GIF."}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eg,onClick:()=>ej.current?.click(),className:"rounded-xl bg-primary px-3 py-1.5 text-xs font-semibold text-white disabled:opacity-50",children:eg?"Uploading...":er?.logoUrl?"Replace logo":"Upload logo"}),er?.logoUrl?(0,s.jsx)("button",{type:"button",onClick:()=>eF("logo"),className:"rounded-xl border border-border px-3 py-1.5 text-xs font-semibold text-text-main hover:border-red-300 hover:text-red-600",children:"Remove"}):null]})]}),(0,s.jsx)("input",{ref:ej,type:"file",accept:m,className:"hidden",onChange:eI})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:"Favicon"}),(0,s.jsxs)("div",{className:"flex items-center gap-4 rounded-xl border border-border bg-background p-4",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-surface",children:er?.faviconUrl?(0,s.jsx)("img",{src:er.faviconUrl,alt:"Current favicon",className:"max-h-10 max-w-10 object-contain"}):(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"public"})}),(0,s.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Shown in the browser tab. ICO, SVG, PNG, WebP, JPEG, GIF."}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",disabled:eh,onClick:()=>ew.current?.click(),className:"rounded-xl bg-primary px-3 py-1.5 text-xs font-semibold text-white disabled:opacity-50",children:eh?"Uploading...":er?.faviconUrl?"Replace favicon":"Upload favicon"}),er?.faviconUrl?(0,s.jsx)("button",{type:"button",onClick:()=>eF("favicon"),className:"rounded-xl border border-border px-3 py-1.5 text-xs font-semibold text-text-main hover:border-red-300 hover:text-red-600",children:"Remove"}):null]})]}),(0,s.jsx)("input",{ref:ew,type:"file",accept:x,className:"hidden",onChange:eO})]})]})]}),(0,s.jsxs)("form",{onSubmit:eT,className:"space-y-3",children:[(0,s.jsx)(h,{label:"Site title",hint:"Shown in browser tab and login page. Leave blank for default.",children:(0,s.jsx)(y,{value:el,onChange:e=>eo(e.target.value),placeholder:"AI Router Gateway"})}),(0,s.jsx)(h,{label:"Company short name",hint:"Shown in dashboard sidebar and login hero text. Defaults to site title/sidebar default or 'Fujinet' on login.",children:(0,s.jsx)(y,{value:en,onChange:e=>ed(e.target.value),placeholder:"Fujinet"})}),(0,s.jsx)(h,{label:"Description",hint:"Used for browser metadata.",children:(0,s.jsx)(f,{rows:3,value:ei,onChange:e=>ec(e.target.value),placeholder:"AI Infrastructure Management"})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"submit",disabled:em,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:em?"Saving...":"Save branding text"}),(0,s.jsx)("button",{type:"button",disabled:ef,onClick:eq,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-red-300 hover:text-red-600 disabled:opacity-50",children:ef?"Resetting...":"Reset to defaults"})]})]})]}),(0,s.jsx)(g,{status:ep})]}),(0,s.jsx)(b,{icon:"shield",title:"Dashboard Login",desc:"Local account remains available even when LDAP is enabled.",children:(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,s.jsxs)("form",{onSubmit:eS,className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Local account"}),(0,s.jsx)(h,{label:"Local username",children:(0,s.jsx)(y,{value:L,onChange:e=>k(e.target.value)})}),(0,s.jsx)("button",{className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Save account"}),(0,s.jsx)(g,{status:U})]}),(0,s.jsxs)("form",{onSubmit:eA,className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Local password"}),e.hasPassword&&(0,s.jsx)(h,{label:"Current password",children:(0,s.jsx)(y,{type:"password",value:n.current,onChange:e=>d({...n,current:e.target.value}),required:!0})}),(0,s.jsx)(h,{label:"New password",children:(0,s.jsx)(y,{type:"password",value:n.new,onChange:e=>d({...n,new:e.target.value}),required:!0})}),(0,s.jsx)(h,{label:"Confirm password",children:(0,s.jsx)(y,{type:"password",value:n.confirm,onChange:e=>d({...n,confirm:e.target.value}),required:!0})}),(0,s.jsx)("button",{disabled:j,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:e.hasPassword?"Update Password":"Set Password"}),(0,s.jsx)(g,{status:i})]})]})}),(0,s.jsx)("div",{id:"request-logging",className:"scroll-mt-6",children:(0,s.jsx)(p,{})}),(0,s.jsxs)(b,{icon:"database",title:"Database Backup",desc:"Export or restore configuration, Linux Resource Monitor data, logo and favicon.",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("button",{onClick:eL,disabled:N,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"Download Backup"}),(0,s.jsx)("button",{onClick:()=>A.current?.click(),disabled:N,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-50",children:"Import Backup"}),(0,s.jsx)("input",{ref:A,type:"file",accept:"application/json",className:"hidden",onChange:ek})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Backup files contain API credentials, Resource Monitor agent tokens and embedded branding images. Store them securely. Legacy backups keep current Resource Monitor and branding files."}),(0,s.jsx)(g,{status:C})]}),(0,s.jsx)(b,{icon:"corporate_fare",title:"LDAP / Active Directory Login",desc:"Search users from a User Base DN, restrict login by group DN, and grant admin by group DN. The old Selected LDAP users list is kept as a manual admin list.",children:(0,s.jsxs)("form",{onSubmit:eP,className:"space-y-5",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-3",children:(0,s.jsx)("button",{type:"button",onClick:()=>eU("ldapEnabled",!M.ldapEnabled),className:`rounded-xl px-3 py-2 text-sm font-semibold ${M.ldapEnabled?"bg-primary text-white":"border border-border text-text-muted"}`,children:M.ldapEnabled?"Enabled":"Disabled"})}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsx)(h,{label:"LDAP URL",children:(0,s.jsx)(y,{value:M.ldapUrl,onChange:e=>eU("ldapUrl",e.target.value),placeholder:"ldap://dc01.company.local:389"})}),(0,s.jsx)(h,{label:"LDAP User Base DN",hint:"OU/container/domain where user objects are searched. Do not use a group DN here.",children:(0,s.jsx)(y,{value:M.ldapUserBaseDn,onChange:e=>eU("ldapUserBaseDn",e.target.value),placeholder:"OU=Users,OU=xxx,DC=xx,DC=vn"})}),(0,s.jsx)(h,{label:"LDAP Bind DN",children:(0,s.jsx)(y,{value:M.ldapBindDn,onChange:e=>eU("ldapBindDn",e.target.value),placeholder:"CN=svc-bluerouter,OU=Service Accounts,DC=company,DC=local"})}),(0,s.jsx)(h,{label:"LDAP Bind Password",children:(0,s.jsx)(y,{type:"password",value:M.ldapBindPassword,onChange:e=>eU("ldapBindPassword",e.target.value),placeholder:e.ldapHasBindPassword?"Saved — leave blank to keep":"Service account password"})}),(0,s.jsx)(h,{label:"LDAP Login Allowed Group DN",hint:"Only members of this group can log in. Leave blank to allow any valid LDAP user.",children:(0,s.jsx)(y,{value:M.ldapLoginAllowedGroupDn,onChange:e=>eU("ldapLoginAllowedGroupDn",e.target.value),placeholder:"CN=Apikeys_Groups,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,s.jsx)(h,{label:"LDAP Admin Group DN",hint:"Members of this group get full admin dashboard access.",children:(0,s.jsx)(y,{value:M.ldapAdminGroupDn,onChange:e=>eU("ldapAdminGroupDn",e.target.value),placeholder:"CN=BlueRouter_Admins,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,s.jsx)(h,{label:"LDAP Monitor Admin Group DN",hint:"Members can use only Endpoint, API Keys, Usage, Analytics, Quota Tracker and Prompt Logs with admin-like permissions inside those tabs.",children:(0,s.jsx)(y,{value:M.ldapMonitorAdminGroupDn,onChange:e=>eU("ldapMonitorAdminGroupDn",e.target.value),placeholder:"CN=BlueRouter_Monitor_Admins,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,s.jsx)(h,{label:"LDAP AI Gateways Monitors Group DN",hint:"Members log in as regular users but the Analytics page aggregates statistics for every API key that has an owner, instead of only their own keys.",children:(0,s.jsx)(y,{value:M.ldapAiGatewaysMonitorsGroupDn,onChange:e=>eU("ldapAiGatewaysMonitorsGroupDn",e.target.value),placeholder:"CN=BlueRouter_AI_Gateways_Monitors,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsx)(h,{label:"User search filter",hint:"Use {{username}} placeholder.",children:(0,s.jsx)(y,{value:M.ldapUserSearchFilter,onChange:e=>eU("ldapUserSearchFilter",e.target.value)})}),(0,s.jsx)(h,{label:"Login group mode",hint:"Nested groups uses AD matching rule 1.2.840.113556.1.4.1941.",children:(0,s.jsx)(v,{title:"Nested group membership",desc:"Recommended for Active Directory nested groups.",checked:M.ldapNestedGroups,onChange:e=>eU("ldapNestedGroups",e)})}),(0,s.jsx)(h,{label:"Username attribute",children:(0,s.jsx)(y,{value:M.ldapUserNameAttribute,onChange:e=>eU("ldapUserNameAttribute",e.target.value)})}),(0,s.jsx)(h,{label:"Display attribute",children:(0,s.jsx)(y,{value:M.ldapUserDisplayAttribute,onChange:e=>eU("ldapUserDisplayAttribute",e.target.value)})}),(0,s.jsx)(h,{label:"Email attribute",children:(0,s.jsx)(y,{value:M.ldapUserEmailAttribute,onChange:e=>eU("ldapUserEmailAttribute",e.target.value)})}),(0,s.jsx)(h,{label:"Connect timeout ms",children:(0,s.jsx)(y,{type:"number",value:M.ldapConnectTimeoutMs,onChange:e=>eU("ldapConnectTimeoutMs",e.target.value)})})]}),(0,s.jsx)(v,{title:"Reject invalid TLS certificates",desc:"Disable only for test/self-signed LDAP TLS.",checked:M.ldapTlsRejectUnauthorized,onChange:e=>eU("ldapTlsRejectUnauthorized",e)}),(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-background p-4",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Manual admin users / LDAP owner list"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Users loaded here come from Login Allowed Group DN when set. Selected users are also treated as manual admins for backward compatibility."})]}),(0,s.jsxs)("div",{className:"mb-3 flex gap-2",children:[(0,s.jsx)(y,{value:F,onChange:e=>q(e.target.value),placeholder:"Search users..."}),(0,s.jsx)("button",{type:"button",onClick:eR,disabled:z,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main disabled:opacity-50",children:z?"Loading...":"Load users"})]}),$.length>0&&(0,s.jsx)("div",{className:"max-h-72 overflow-auto rounded-xl border border-border",children:$.map(e=>{let a=M.ldapAllowedUsers.includes(e.username);return(0,s.jsxs)("button",{type:"button",onClick:()=>eB(e.username),className:`flex w-full items-center justify-between gap-3 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 ${a?"bg-primary/10":"bg-background hover:bg-surface"}`,children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-semibold text-text-main",children:e.displayName||e.username}),(0,s.jsxs)("span",{className:"ml-2 text-text-muted",children:[e.username,e.email?` \xb7 ${e.email}`:""]})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:a?"check_circle":"radio_button_unchecked"})]},e.dn||e.username)})}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:["Selected manual admin users (",M.ldapAllowedUsers.length,")"]}),0===M.ldapAllowedUsers.length?(0,s.jsx)("div",{className:"text-sm text-text-muted",children:"No users selected."}):(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:M.ldapAllowedUsers.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>eB(e),className:"rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-xs text-primary",children:[e," \xd7"]},e))})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:eM,disabled:O,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main disabled:opacity-50",children:O?"Testing...":"Save & test LDAP"}),(0,s.jsx)("button",{type:"submit",disabled:E,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:E?"Saving...":"Save LDAP settings"})]}),(0,s.jsx)(g,{status:B})]})}),(0,s.jsxs)(b,{icon:"lock_open",title:"OIDC Dashboard Login",desc:"oidc"===e.authMode?"OIDC active":"both"===e.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google",children:[(0,s.jsx)("button",{type:"button",onClick:()=>ea(e=>!e),className:"mb-4 rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main",children:ee?"Hide OIDC settings":"Show OIDC settings"}),ee&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[{value:"password",title:"Password/LDAP",desc:"Keep local and LDAP login."},{value:"oidc",title:"OIDC only",desc:"Disable local/LDAP login when configured."},{value:"both",title:"Both",desc:"Allow either OIDC or local/LDAP."}].map(e=>{let a=V.authMode===e.value;return(0,s.jsxs)("button",{type:"button",onClick:()=>H(a=>({...a,authMode:e.value})),className:`rounded-xl border p-3 text-left ${a?"border-primary bg-primary/10":"border-border bg-background hover:border-primary/40"}`,children:[(0,s.jsx)("div",{className:"font-semibold text-text-main",children:e.title}),(0,s.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.desc})]},e.value)})}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,s.jsx)(h,{label:"Issuer URL",children:(0,s.jsx)(y,{value:V.oidcIssuerUrl,onChange:e=>H({...V,oidcIssuerUrl:e.target.value})})}),(0,s.jsx)(h,{label:"Client ID",children:(0,s.jsx)(y,{value:V.oidcClientId,onChange:e=>H({...V,oidcClientId:e.target.value})})}),(0,s.jsx)(h,{label:"Client Secret",children:(0,s.jsx)(y,{type:"password",value:Q,onChange:e=>K(e.target.value),placeholder:e.oidcConfigured?"Saved — leave blank to keep":"Client secret"})}),(0,s.jsx)(h,{label:"Scopes",children:(0,s.jsx)(y,{value:V.oidcScopes,onChange:e=>H({...V,oidcScopes:e.target.value})})}),(0,s.jsx)(h,{label:"Login label",children:(0,s.jsx)(y,{value:V.oidcLoginLabel,onChange:e=>H({...V,oidcLoginLabel:e.target.value})})})]}),(0,s.jsx)("button",{type:"button",onClick:()=>eG(),disabled:X,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:X?"Saving...":"Save OIDC settings"}),(0,s.jsx)(g,{status:W})]})]})]})}}},e=>{e.O(0,[2574,3862,9893,9959,1997,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=7973)),_N_E=e.O()}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/app/package.json
CHANGED
package/package.json
CHANGED
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-fbc139f46bdcd072.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{7973:(e,a,s)=>{Promise.resolve().then(s.bind(s,38658))},38658:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>v});var t=s(95155),r=s(12115),l=s(44656),o=s(35497);let n={enabled:!1,fileLoggingEnabled:!1,type:"mysql",host:"",port:"",database:"",username:"",password:"",ssl:!1,createDatabase:!1,logClientRequest:!0,logSourceRequest:!0,logTargetRequest:!0,logProviderResponse:!1,logErrors:!0,retentionDays:30,payloadRotationEnabled:!1,payloadRetentionDays:60,payloadRotationIntervalHours:24,payloadRotationBatchSize:500,payloadRotationMaxBatches:20};function d({label:e,value:a,onChange:s,type:r="text",placeholder:l="",disabled:o=!1,min:n,max:i,step:c}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:e}),(0,t.jsx)("input",{type:r,value:a||"",placeholder:l,disabled:o,min:n,max:i,step:c,onChange:e=>s(e.target.value),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]})}function i({label:e,checked:a,onChange:s,disabled:r=!1}){return(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-main",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!a,disabled:r,onChange:e=>s(e.target.checked)}),e]})}function c(){let[e,a]=(0,r.useState)(n),[s,l]=(0,r.useState)(!1),[c,p]=(0,r.useState)(null),[u,m]=(0,r.useState)(null),[x,g]=(0,r.useState)(null),b=e=>a(a=>({...a,...e})),h=async()=>{l(!0),m(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db"),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to load config");a({...n,...s.config||{}})}catch(e){m(e.message||"Failed to load config")}finally{l(!1)}};(0,r.useEffect)(()=>{h()},[]);let y=async()=>{l(!0),m(null),p(null);try{let s=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})}),t=await s.json();if(!s.ok)throw Error(t.error||"Failed to save config");a({...n,...t.config||{}}),p("Saved")}catch(e){m(e.message||"Failed to save config")}finally{l(!1)}},f=async(a,s={})=>{if(!s.confirm||window.confirm("Delete all prompt_logs rows and their payloads older than the retention cutoff? Both the rows in prompt_logs (previews, model/provider/token metadata) and the referenced payloads will be removed. This cannot be undone.")){l(!0),m(null),p(null),a.includes("payload-rotation")&&g(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:a,config:e,confirm:!0===s.confirm})}),r=await t.text(),l={};try{l=r?JSON.parse(r):{}}catch{let e=r.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,200),a=504===t.status?"Rotation took too long and the server timed out. Try lowering 'Max transactions per run' and run again.":`HTTP ${t.status}: ${e||t.statusText||"non-JSON response"}`;throw Error(a)}if(!t.ok)throw Error(l.error||`HTTP ${t.status}`);a.includes("payload-rotation")&&g(l),p(l.message||l.init?.message||"OK")}catch(e){m(e.message||"Action failed")}finally{l(!1)}}},v="postgres"===e.type||"mysql"===e.type;return(0,t.jsx)(o.Zp,{title:"Request Logging",subtitle:"Control local request files and database-backed prompt logs",icon:"receipt_long",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)(o.Ex,{variant:e.fileLoggingEnabled?"success":"default",children:["Local files: ",e.fileLoggingEnabled?"Enabled":"Disabled"]}),(0,t.jsxs)(o.Ex,{variant:e.enabled?"success":"default",children:["Database: ",e.enabled?"Enabled":"Disabled"]})]}),(0,t.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:'Prompt logs may contain source code, selected code, internal URLs, user prompts, and provider responses. Checked stages store full raw JSON; prompt/response text columns keep only short previews. Per-combo "hide content" still redacts raw JSON.'}),(0,t.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Database type"}),(0,t.jsxs)("select",{value:e.type,disabled:s,onChange:a=>{let s=a.target.value;b({type:s,port:"postgres"===s?e.port||"5432":"mysql"===s?e.port||"3306":e.port})},className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,t.jsx)("option",{value:"mysql",children:"MySQL / MariaDB"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"})]})]})}),v&&(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(d,{label:"Host",value:e.host,placeholder:"127.0.0.1",onChange:e=>b({host:e}),disabled:s}),(0,t.jsx)(d,{label:"Port",value:e.port,placeholder:"postgres"===e.type?"5432":"3306",onChange:e=>b({port:e}),disabled:s}),(0,t.jsx)(d,{label:"Database",value:e.database,placeholder:"bluerouter_logs",onChange:e=>b({database:e}),disabled:s}),(0,t.jsx)(d,{label:"Username",value:e.username,placeholder:"bluerouter",onChange:e=>b({username:e}),disabled:s}),(0,t.jsx)(d,{label:"Password",type:"password",value:e.password,placeholder:"Leave as ******** to keep existing password",onChange:e=>b({password:e}),disabled:s}),(0,t.jsxs)("div",{className:"flex flex-col justify-end gap-2",children:[(0,t.jsx)(i,{label:"Use SSL",checked:e.ssl,onChange:e=>b({ssl:e}),disabled:s}),(0,t.jsx)(i,{label:"Create database if missing",checked:e.createDatabase,onChange:e=>b({createDatabase:e}),disabled:s})]})]}),(0,t.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-surface/40 p-3 md:grid-cols-2",children:[(0,t.jsx)(i,{label:"Save request/response to local files",checked:e.fileLoggingEnabled,onChange:e=>b({fileLoggingEnabled:e}),disabled:s}),(0,t.jsx)(i,{label:"Save request/response to Prompt Log Database",checked:e.enabled,onChange:e=>b({enabled:e}),disabled:s}),(0,t.jsx)(i,{label:"Log client request JSON",checked:e.logClientRequest,onChange:e=>b({logClientRequest:e}),disabled:s}),(0,t.jsx)(i,{label:"Log normalized/source request JSON",checked:e.logSourceRequest,onChange:e=>b({logSourceRequest:e}),disabled:s}),(0,t.jsx)(i,{label:"Log target/provider request JSON",checked:e.logTargetRequest,onChange:e=>b({logTargetRequest:e}),disabled:s}),(0,t.jsx)(i,{label:"Log provider response JSON",checked:e.logProviderResponse,onChange:e=>b({logProviderResponse:e}),disabled:s}),(0,t.jsx)(i,{label:"Log errors",checked:e.logErrors,onChange:e=>b({logErrors:e}),disabled:s})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background p-3 text-xs text-text-muted",children:["Local files are written under ",(0,t.jsx)("code",{children:"DATA_DIR/logs/requests"}),". Disabling local files stops new request/response dump files; existing files are kept."]}),(0,t.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-surface/40 p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-text-main",children:"Prompt log rotation"}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-text-muted",children:["Deletes ",(0,t.jsx)("code",{children:"prompt_logs"})," rows AND their referenced payloads older than the retention cutoff. After a full run, only logs from the last N days remain — analytics/metadata for older rows are removed as well."]})]}),(0,t.jsx)(i,{label:"Enable automatic rotation",checked:e.payloadRotationEnabled,onChange:e=>b({payloadRotationEnabled:e}),disabled:s}),(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(d,{label:"Keep logs for (days)",type:"number",min:1,max:3650,step:1,value:String(e.payloadRetentionDays||60),onChange:e=>b({payloadRetentionDays:Number(e)||60}),disabled:s}),(0,t.jsx)(d,{label:"Automatic run interval (hours)",type:"number",min:1,max:168,step:1,value:String(e.payloadRotationIntervalHours||24),onChange:e=>b({payloadRotationIntervalHours:Number(e)||24}),disabled:s}),(0,t.jsx)(d,{label:"Prompt-log rows per transaction",type:"number",min:50,max:5e3,step:50,value:String(e.payloadRotationBatchSize||500),onChange:e=>b({payloadRotationBatchSize:Number(e)||500}),disabled:s}),(0,t.jsx)(d,{label:"Max transactions per run",type:"number",min:1,max:200,step:1,value:String(e.payloadRotationMaxBatches||20),onChange:e=>b({payloadRotationMaxBatches:Number(e)||20}),disabled:s})]}),(0,t.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["Each batch deletes expired ",(0,t.jsx)("code",{children:"prompt_logs"})," rows in a transaction (MySQL uses a named lock, Postgres uses a session-level advisory lock). On MySQL, orphan ",(0,t.jsx)("code",{children:"prompt_log_payloads"})," rows are reaped in the same run so nothing is left dangling."]}),(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:["Deletion is permanent: previews, model/provider/token metadata, and analytics for older rows go away too. Freed space stays inside InnoDB — ",(0,t.jsx)("code",{children:"OPTIMIZE TABLE"})," is needed to shrink the .ibd file (only during a maintenance window, with enough free disk)."]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>f("preview-payload-rotation"),loading:s,children:"Preview expired logs"}),(0,t.jsx)(o.$n,{size:"sm",variant:"danger",onClick:()=>f("run-payload-rotation",{confirm:!0}),loading:s,children:"Delete expired logs now"})]}),x&&(0,t.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-background p-3 text-xs md:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Cutoff:"})," ",(0,t.jsx)("span",{className:"text-text-main",children:x.cutoff?new Date(x.cutoff).toLocaleString():"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-text-muted",children:void 0===x.promptLogRowsUpdated?"Prompt-log rows past retention:":"Prompt-log rows deleted:"})," ",(0,t.jsx)("span",{className:"text-text-main",children:Number(x.promptLogRowsUpdated??x.promptLogRows??0).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-text-muted",children:void 0===x.payloadRowsDeleted?"Payload rows to delete:":"Payload rows deleted:"})," ",(0,t.jsx)("span",{className:"text-text-main",children:Number(x.payloadRowsDeleted??x.payloadRowsPastRetention??0).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-text-muted",children:void 0===x.payloadBytesDeleted?"Estimated payload size:":"Payload size deleted:"})," ",(0,t.jsx)("span",{className:"text-text-main",children:function(e){let a=Number(e||0);if(!Number.isFinite(a)||a<=0)return"0 B";let s=["B","KB","MB","GB","TB"],t=Math.min(s.length-1,Math.floor(Math.log(a)/Math.log(1024))),r=a/1024**t;return`${r.toFixed(r>=10||0===t?1:2)} ${s[t]}`}(x.payloadBytesDeleted??x.payloadBytesPastRetention??x.referencedPayloadBytes)})]}),x.hasMore?(0,t.jsx)("div",{className:"md:col-span-2 lg:col-span-4 text-amber-600",children:"More expired rows remain because the per-run batch limit was reached."}):null]}),(0,t.jsx)("div",{className:"text-[11px] text-text-muted",children:"Save the settings after enabling automatic rotation. Preview and manual deletion use the values currently shown in this form."})]}),v&&(0,t.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["Prompt logs now support MySQL/MariaDB and PostgreSQL only. MySQL/MariaDB requires ",(0,t.jsx)("code",{children:"mysql2"}),"; PostgreSQL requires ",(0,t.jsx)("code",{children:"pg"}),"."]}),c&&(0,t.jsx)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-2 text-xs text-green-600",children:c}),u&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-500",children:u}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:h,loading:s,children:"Reload"}),(0,t.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>f("test"),loading:s,children:"Test connection"}),(0,t.jsx)(o.$n,{size:"sm",variant:"secondary",onClick:()=>f("init"),loading:s,children:"Initialize schema"}),(0,t.jsx)(o.$n,{size:"sm",onClick:y,loading:s,children:"Save"}),(0,t.jsx)(o.$n,{size:"sm",variant:"success",onClick:()=>f("save-and-init"),loading:s,children:"Save & initialize"})]})]})})}let p="(|(sAMAccountName={{username}})(userPrincipalName={{username}})(mail={{username}}))",u="image/svg+xml,image/png,image/webp,image/jpeg,image/gif",m=`${u},image/x-icon,image/vnd.microsoft.icon,.ico`;function x({status:e}){if(!e?.message)return null;let a="error"===e.type?"text-red-600 bg-red-50 border-red-200":"text-green-700 bg-green-50 border-green-200";return(0,t.jsx)("div",{className:`mt-3 rounded-xl border px-4 py-3 text-sm ${a}`,children:e.message})}function g({icon:e,title:a,desc:s,children:r}){return(0,t.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-6 shadow-sm",children:[(0,t.jsxs)("div",{className:"mb-5 flex items-start gap-3",children:[e&&(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-text-main",children:a}),s&&(0,t.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:s})]})]}),r]})}function b({label:e,hint:a,children:s}){return(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-semibold text-text-main",children:e}),s,a&&(0,t.jsx)("span",{className:"mt-1 block text-xs text-text-muted",children:a})]})}function h(e){return(0,t.jsx)("input",{...e,className:`w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary ${e.className||""}`})}function y(e){return(0,t.jsx)("textarea",{...e,className:`w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary ${e.className||""}`})}function f({title:e,desc:a,checked:s,onChange:r,disabled:l}){return(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background px-4 py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-text-main",children:e}),a&&(0,t.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:a})]}),(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>r(!s),className:`relative mt-0.5 h-6 w-11 rounded-full transition disabled:opacity-50 ${s?"bg-primary":"bg-border"}`,children:(0,t.jsx)("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white transition ${s?"left-5":"left-0.5"}`})})]})}function v(){let[e,a]=(0,r.useState)({}),[s,o]=(0,r.useState)(!0),[n,d]=(0,r.useState)({current:"",new:"",confirm:""}),[i,v]=(0,r.useState)({type:"",message:""}),[j,w]=(0,r.useState)(!1),[N,D]=(0,r.useState)(!1),[C,S]=(0,r.useState)({type:"",message:""}),A=(0,r.useRef)(null),[L,k]=(0,r.useState)("admin"),[U,P]=(0,r.useState)({type:"",message:""}),[M,R]=(0,r.useState)({ldapEnabled:!1,ldapUrl:"",ldapBindDn:"",ldapBindPassword:"",ldapUserBaseDn:"",ldapUserSearchFilter:p,ldapUserNameAttribute:"sAMAccountName",ldapUserDisplayAttribute:"displayName",ldapUserEmailAttribute:"mail",ldapLoginAllowedGroupDn:"",ldapAdminGroupDn:"",ldapMonitorAdminGroupDn:"",ldapAiGatewaysMonitorsGroupDn:"",ldapNestedGroups:!0,ldapAllowedUsers:[],ldapTlsRejectUnauthorized:!0,ldapConnectTimeoutMs:8e3}),[B,E]=(0,r.useState)({type:"",message:""}),[G,I]=(0,r.useState)(!1),[O,T]=(0,r.useState)(!1),[F,$]=(0,r.useState)(""),[q,_]=(0,r.useState)([]),[z,J]=(0,r.useState)(!1),[H,Q]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[V,K]=(0,r.useState)(""),[W,Z]=(0,r.useState)({type:"",message:""}),[X,Y]=(0,r.useState)(!1),[ee,ea]=(0,r.useState)(!1),[es,et]=(0,r.useState)({type:"",message:""}),er=(0,l.useBranding)(),[el,eo]=(0,r.useState)(""),[en,ed]=(0,r.useState)(""),[ei,ec]=(0,r.useState)(""),[ep,eu]=(0,r.useState)({type:"",message:""}),[em,ex]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(!1),[eh,ey]=(0,r.useState)(!1),[ef,ev]=(0,r.useState)(!1),ej=(0,r.useRef)(null),ew=(0,r.useRef)(null),eN=async()=>{o(!0);try{let e=await fetch("/api/settings",{cache:"no-store"}),s=await e.json();a(s),k(s.localLoginUsername||"admin"),R({ldapEnabled:!0===s.ldapEnabled,ldapUrl:s.ldapUrl||"",ldapBindDn:s.ldapBindDn||"",ldapBindPassword:"",ldapUserBaseDn:s.ldapUserBaseDn||s.ldapBaseDn||"",ldapUserSearchFilter:s.ldapUserSearchFilter||p,ldapUserNameAttribute:s.ldapUserNameAttribute||"sAMAccountName",ldapUserDisplayAttribute:s.ldapUserDisplayAttribute||"displayName",ldapUserEmailAttribute:s.ldapUserEmailAttribute||"mail",ldapLoginAllowedGroupDn:s.ldapLoginAllowedGroupDn||"",ldapAdminGroupDn:s.ldapAdminGroupDn||"",ldapMonitorAdminGroupDn:s.ldapMonitorAdminGroupDn||"",ldapAiGatewaysMonitorsGroupDn:s.ldapAiGatewaysMonitorsGroupDn||"",ldapNestedGroups:!1!==s.ldapNestedGroups,ldapAllowedUsers:Array.isArray(s.ldapAllowedUsers)?s.ldapAllowedUsers:[],ldapTlsRejectUnauthorized:!1!==s.ldapTlsRejectUnauthorized,ldapConnectTimeoutMs:s.ldapConnectTimeoutMs||8e3}),Q({authMode:s.authMode||"password",oidcIssuerUrl:s.oidcIssuerUrl||"",oidcClientId:s.oidcClientId||"",oidcScopes:s.oidcScopes||"openid profile email",oidcLoginLabel:s.oidcLoginLabel||"Sign in with OIDC"}),eo(s.siteTitle||""),ed(s.siteShortName||""),ec(s.siteDescription||""),("oidc"===s.authMode||"both"===s.authMode)&&ea(!0)}catch(e){console.log("Failed to fetch settings:",e)}finally{o(!1)}};(0,r.useEffect)(()=>{eN()},[]);let eD=async e=>{let s=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await s.json().catch(()=>({}));if(!s.ok)throw Error(t.error||"Failed to save settings");return a(e=>({...e,...t})),t},eC=async s=>{et({type:"",message:""});let t=!1!==e.sidebarAdvancedToolsVisible;a(e=>({...e,sidebarAdvancedToolsVisible:s}));try{let e=await eD({sidebarAdvancedToolsVisible:s}),t=!1!==e.sidebarAdvancedToolsVisible;a(e=>({...e,sidebarAdvancedToolsVisible:t})),window.dispatchEvent(new CustomEvent("bluerouter:sidebar-advanced-tools",{detail:{visible:t}})),et({type:"success",message:t?"Advanced tools are visible in the sidebar.":"Advanced tools are hidden from the sidebar."})}catch(e){a(e=>({...e,sidebarAdvancedToolsVisible:t})),window.dispatchEvent(new CustomEvent("bluerouter:sidebar-advanced-tools",{detail:{visible:t}})),et({type:"error",message:e.message||"Failed to save sidebar setting."})}},eS=async e=>{e.preventDefault(),P({type:"",message:""});try{let e=await eD({localLoginUsername:L});k(e.localLoginUsername||L||"admin"),P({type:"success",message:"Local account name saved."})}catch(e){P({type:"error",message:e.message})}},eA=async e=>{if(e.preventDefault(),n.new!==n.confirm)return void v({type:"error",message:"Passwords do not match"});w(!0),v({type:"",message:""});try{await eD({currentPassword:n.current,newPassword:n.new}),v({type:"success",message:"Password updated successfully"}),d({current:"",new:"",confirm:""})}catch(e){v({type:"error",message:e.message||"Failed to update password"})}finally{w(!1)}},eL=async()=>{D(!0),S({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a.error||"Failed to export database")}let a=await e.json(),s=JSON.stringify(a,null,2),t=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(t),l=document.createElement("a"),o=new Date().toISOString().replace(/[.:]/g,"-");l.href=r,l.download=`bluerouter-backup-${o}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r),S({type:"success",message:"Database backup downloaded."})}catch(e){S({type:"error",message:e.message||"Failed to export database."})}finally{D(!1)}},ek=async e=>{let a=e.target.files?.[0];if(a){D(!0),S({type:"",message:""});try{let e=await a.text(),s=JSON.parse(e),t=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Failed to import database");await eN();let l=r.resourceMonitorImported?`Restored ${r.resourceMonitorServerCount||0} Resource Monitor server(s) and ${r.resourceMonitorHistoryCount||0} history sample(s).`:"Legacy backup: current Resource Monitor data was kept.",o=r.brandingImported?`Restored ${r.brandingAssetCount||0} branding asset(s).`:"Current logo and favicon were kept.";S({type:"success",message:`Database imported successfully. ${l} ${o}`})}catch(e){S({type:"error",message:e.message||"Invalid backup file."})}finally{A.current&&(A.current.value=""),D(!1)}}},eU=(e,a)=>R(s=>({...s,[e]:a})),eP=async e=>{e?.preventDefault?.(),I(!0),E({type:"",message:""});try{let e={...M,ldapBaseDn:M.ldapUserBaseDn,ldapAllowedUsers:M.ldapAllowedUsers};e.ldapBindPassword||delete e.ldapBindPassword;let a=await eD(e);R(e=>({...e,ldapBindPassword:"",ldapEnabled:!0===a.ldapEnabled,ldapUserBaseDn:a.ldapUserBaseDn||a.ldapBaseDn||e.ldapUserBaseDn,ldapLoginAllowedGroupDn:a.ldapLoginAllowedGroupDn||"",ldapAdminGroupDn:a.ldapAdminGroupDn||"",ldapMonitorAdminGroupDn:a.ldapMonitorAdminGroupDn||"",ldapAiGatewaysMonitorsGroupDn:a.ldapAiGatewaysMonitorsGroupDn||"",ldapNestedGroups:!1!==a.ldapNestedGroups,ldapAllowedUsers:Array.isArray(a.ldapAllowedUsers)?a.ldapAllowedUsers:e.ldapAllowedUsers})),E({type:"success",message:"LDAP settings saved."})}catch(e){E({type:"error",message:e.message||"Failed to save LDAP settings"})}finally{I(!1)}},eM=async()=>{T(!0),E({type:"",message:""});try{await eP();let e=await fetch("/api/auth/ldap/test",{method:"POST"}),a=await e.json().catch(()=>({}));e.ok&&a.ok?E({type:"success",message:a.message||"LDAP connection OK."}):E({type:"error",message:a.error||"LDAP test failed."})}catch(e){E({type:"error",message:e.message||"LDAP test failed."})}finally{T(!1)}},eR=async()=>{J(!0),E({type:"",message:""});try{await eP();let e=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(F)}`,{cache:"no-store"}),a=await e.json().catch(()=>({}));e.ok?(_(a.users||[]),E({type:"success",message:`Loaded ${(a.users||[]).length} LDAP user(s).`})):E({type:"error",message:a.error||"Failed to load LDAP users."})}catch(e){E({type:"error",message:e.message||"Failed to load LDAP users."})}finally{J(!1)}},eB=e=>{let a=String(e||"").trim();a&&R(e=>{let s=new Set(e.ldapAllowedUsers||[]);return s.has(a)?s.delete(a):s.add(a),{...e,ldapAllowedUsers:[...s]}})},eE=async(a=H.authMode||"password")=>{let s=H.oidcIssuerUrl.trim(),t=H.oidcClientId.trim(),r=H.oidcScopes.trim(),l=H.oidcLoginLabel.trim(),o=V.trim();if("password"!==a&&(!s||!t||!o)&&!e.oidcConfigured)return void Z({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Y(!0),Z({type:"",message:""});try{let e={authMode:a,oidcIssuerUrl:s,oidcClientId:t,oidcScopes:r||"openid profile email",oidcLoginLabel:l||"Sign in with OIDC"};o&&(e.oidcClientSecret=o);let n=await eD(e);Q({authMode:n.authMode||a,oidcIssuerUrl:n.oidcIssuerUrl||s,oidcClientId:n.oidcClientId||t,oidcScopes:n.oidcScopes||r||"openid profile email",oidcLoginLabel:n.oidcLoginLabel||l||"Sign in with OIDC"}),K(""),Z({type:"success",message:"OIDC settings saved."})}catch(e){Z({type:"error",message:e.message||"Failed to save OIDC settings"})}finally{Y(!1)}},eG=async(e,a)=>{if(!a)return;if(a.size>1048576)return void eu({type:"error",message:"File exceeds 1 MB limit."});let s="logo"===e?eb:ey;s(!0),eu({type:"",message:""});try{let s=new FormData;s.append("asset",e),s.append("file",a);let t=await fetch("/api/branding/upload",{method:"POST",body:s}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Upload failed");(0,l.notifyBrandingChanged)(),eu({type:"success",message:`${"logo"===e?"Logo":"Favicon"} uploaded.`})}catch(e){eu({type:"error",message:e.message||"Upload failed."})}finally{s(!1)}},eI=async e=>{let a=e.target.files?.[0];await eG("logo",a),ej.current&&(ej.current.value="")},eO=async e=>{let a=e.target.files?.[0];await eG("favicon",a),ew.current&&(ew.current.value="")},eT=async e=>{e.preventDefault(),ex(!0),eu({type:"",message:""});try{await eD({siteTitle:el.trim(),siteShortName:en.trim(),siteDescription:ei.trim()}),(0,l.notifyBrandingChanged)(),eu({type:"success",message:"Branding text saved."})}catch(e){eu({type:"error",message:e.message||"Failed to save branding."})}finally{ex(!1)}},eF=async e=>{eu({type:"",message:""});try{let a=await fetch(`/api/branding?asset=${e}`,{method:"DELETE"}),s=await a.json().catch(()=>({}));if(!a.ok)throw Error(s.error||"Failed to remove asset");(0,l.notifyBrandingChanged)(),eu({type:"success",message:`${"logo"===e?"Logo":"Favicon"} removed.`})}catch(e){eu({type:"error",message:e.message||"Failed to remove asset."})}},e$=async()=>{ev(!0),eu({type:"",message:""});try{let e=await fetch("/api/branding",{method:"DELETE"});if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a.error||"Failed to reset branding")}await eD({siteTitle:"",siteShortName:"",siteDescription:""}),eo(""),ed(""),ec(""),(0,l.notifyBrandingChanged)(),eu({type:"success",message:"Branding reset to defaults."})}catch(e){eu({type:"error",message:e.message||"Failed to reset branding."})}finally{ev(!1)}};return s?(0,t.jsx)("div",{className:"p-8 text-text-muted",children:"Loading settings..."}):(0,t.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6 p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold text-text-main",children:"Settings"}),(0,t.jsx)("p",{className:"mt-1 text-text-muted",children:"Configure dashboard preferences, request logging, database backup, and authentication."})]}),(0,t.jsxs)(g,{icon:"view_sidebar",title:"Sidebar tools",desc:"Show or hide advanced dashboard tools to keep the sidebar clean.",children:[(0,t.jsx)(f,{title:"Show Advanced tools",desc:"When disabled, Media / Web, AI Traffic Gateway, CLI Tools, Proxy Pools, Skills, Console Log and Translator are hidden from the sidebar. Core admin pages remain visible.",checked:!1!==e.sidebarAdvancedToolsVisible,onChange:eC}),(0,t.jsx)(x,{status:es})]}),(0,t.jsxs)(g,{icon:"palette",title:"Branding",desc:"Customize site title, logo and favicon shown in the dashboard, browser tab and login page. Max 1 MB per file.",children:[(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:"Logo"}),(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-xl border border-border bg-background p-4",children:[(0,t.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-surface",children:er?.logoUrl?(0,t.jsx)("img",{src:er.logoUrl,alt:"Current logo",className:"max-h-full max-w-full object-contain"}):(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"hub"})}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs text-text-muted",children:"Shown in the dashboard sidebar and login page. SVG, PNG, WebP, JPEG, GIF."}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:eg,onClick:()=>ej.current?.click(),className:"rounded-xl bg-primary px-3 py-1.5 text-xs font-semibold text-white disabled:opacity-50",children:eg?"Uploading...":er?.logoUrl?"Replace logo":"Upload logo"}),er?.logoUrl?(0,t.jsx)("button",{type:"button",onClick:()=>eF("logo"),className:"rounded-xl border border-border px-3 py-1.5 text-xs font-semibold text-text-main hover:border-red-300 hover:text-red-600",children:"Remove"}):null]})]}),(0,t.jsx)("input",{ref:ej,type:"file",accept:u,className:"hidden",onChange:eI})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:"Favicon"}),(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-xl border border-border bg-background p-4",children:[(0,t.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-surface",children:er?.faviconUrl?(0,t.jsx)("img",{src:er.faviconUrl,alt:"Current favicon",className:"max-h-10 max-w-10 object-contain"}):(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"public"})}),(0,t.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs text-text-muted",children:"Shown in the browser tab. ICO, SVG, PNG, WebP, JPEG, GIF."}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",disabled:eh,onClick:()=>ew.current?.click(),className:"rounded-xl bg-primary px-3 py-1.5 text-xs font-semibold text-white disabled:opacity-50",children:eh?"Uploading...":er?.faviconUrl?"Replace favicon":"Upload favicon"}),er?.faviconUrl?(0,t.jsx)("button",{type:"button",onClick:()=>eF("favicon"),className:"rounded-xl border border-border px-3 py-1.5 text-xs font-semibold text-text-main hover:border-red-300 hover:text-red-600",children:"Remove"}):null]})]}),(0,t.jsx)("input",{ref:ew,type:"file",accept:m,className:"hidden",onChange:eO})]})]})]}),(0,t.jsxs)("form",{onSubmit:eT,className:"space-y-3",children:[(0,t.jsx)(b,{label:"Site title",hint:"Shown in browser tab and login page. Leave blank for default.",children:(0,t.jsx)(h,{value:el,onChange:e=>eo(e.target.value),placeholder:"AI Router Gateway"})}),(0,t.jsx)(b,{label:"Company short name",hint:"Shown in dashboard sidebar and login hero text. Defaults to site title/sidebar default or 'Fujinet' on login.",children:(0,t.jsx)(h,{value:en,onChange:e=>ed(e.target.value),placeholder:"Fujinet"})}),(0,t.jsx)(b,{label:"Description",hint:"Used for browser metadata.",children:(0,t.jsx)(y,{rows:3,value:ei,onChange:e=>ec(e.target.value),placeholder:"AI Infrastructure Management"})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"submit",disabled:em,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:em?"Saving...":"Save branding text"}),(0,t.jsx)("button",{type:"button",disabled:ef,onClick:e$,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-red-300 hover:text-red-600 disabled:opacity-50",children:ef?"Resetting...":"Reset to defaults"})]})]})]}),(0,t.jsx)(x,{status:ep})]}),(0,t.jsx)(g,{icon:"shield",title:"Dashboard Login",desc:"Local account remains available even when LDAP is enabled.",children:(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("form",{onSubmit:eS,className:"space-y-3",children:[(0,t.jsx)("h3",{className:"font-semibold text-text-main",children:"Local account"}),(0,t.jsx)(b,{label:"Local username",children:(0,t.jsx)(h,{value:L,onChange:e=>k(e.target.value)})}),(0,t.jsx)("button",{className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white",children:"Save account"}),(0,t.jsx)(x,{status:U})]}),(0,t.jsxs)("form",{onSubmit:eA,className:"space-y-3",children:[(0,t.jsx)("h3",{className:"font-semibold text-text-main",children:"Local password"}),e.hasPassword&&(0,t.jsx)(b,{label:"Current password",children:(0,t.jsx)(h,{type:"password",value:n.current,onChange:e=>d({...n,current:e.target.value}),required:!0})}),(0,t.jsx)(b,{label:"New password",children:(0,t.jsx)(h,{type:"password",value:n.new,onChange:e=>d({...n,new:e.target.value}),required:!0})}),(0,t.jsx)(b,{label:"Confirm password",children:(0,t.jsx)(h,{type:"password",value:n.confirm,onChange:e=>d({...n,confirm:e.target.value}),required:!0})}),(0,t.jsx)("button",{disabled:j,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:e.hasPassword?"Update Password":"Set Password"}),(0,t.jsx)(x,{status:i})]})]})}),(0,t.jsx)("div",{id:"request-logging",className:"scroll-mt-6",children:(0,t.jsx)(c,{})}),(0,t.jsxs)(g,{icon:"database",title:"Database Backup",desc:"Export or restore configuration, Linux Resource Monitor data, logo and favicon.",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{onClick:eL,disabled:N,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"Download Backup"}),(0,t.jsx)("button",{onClick:()=>A.current?.click(),disabled:N,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main hover:border-primary/50 disabled:opacity-50",children:"Import Backup"}),(0,t.jsx)("input",{ref:A,type:"file",accept:"application/json",className:"hidden",onChange:ek})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"Backup files contain API credentials, Resource Monitor agent tokens and embedded branding images. Store them securely. Legacy backups keep current Resource Monitor and branding files."}),(0,t.jsx)(x,{status:C})]}),(0,t.jsx)(g,{icon:"corporate_fare",title:"LDAP / Active Directory Login",desc:"Search users from a User Base DN, restrict login by group DN, and grant admin by group DN. The old Selected LDAP users list is kept as a manual admin list.",children:(0,t.jsxs)("form",{onSubmit:eP,className:"space-y-5",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:(0,t.jsx)("button",{type:"button",onClick:()=>eU("ldapEnabled",!M.ldapEnabled),className:`rounded-xl px-3 py-2 text-sm font-semibold ${M.ldapEnabled?"bg-primary text-white":"border border-border text-text-muted"}`,children:M.ldapEnabled?"Enabled":"Disabled"})}),(0,t.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,t.jsx)(b,{label:"LDAP URL",children:(0,t.jsx)(h,{value:M.ldapUrl,onChange:e=>eU("ldapUrl",e.target.value),placeholder:"ldap://dc01.company.local:389"})}),(0,t.jsx)(b,{label:"LDAP User Base DN",hint:"OU/container/domain where user objects are searched. Do not use a group DN here.",children:(0,t.jsx)(h,{value:M.ldapUserBaseDn,onChange:e=>eU("ldapUserBaseDn",e.target.value),placeholder:"OU=Users,OU=xxx,DC=xx,DC=vn"})}),(0,t.jsx)(b,{label:"LDAP Bind DN",children:(0,t.jsx)(h,{value:M.ldapBindDn,onChange:e=>eU("ldapBindDn",e.target.value),placeholder:"CN=svc-bluerouter,OU=Service Accounts,DC=company,DC=local"})}),(0,t.jsx)(b,{label:"LDAP Bind Password",children:(0,t.jsx)(h,{type:"password",value:M.ldapBindPassword,onChange:e=>eU("ldapBindPassword",e.target.value),placeholder:e.ldapHasBindPassword?"Saved — leave blank to keep":"Service account password"})}),(0,t.jsx)(b,{label:"LDAP Login Allowed Group DN",hint:"Only members of this group can log in. Leave blank to allow any valid LDAP user.",children:(0,t.jsx)(h,{value:M.ldapLoginAllowedGroupDn,onChange:e=>eU("ldapLoginAllowedGroupDn",e.target.value),placeholder:"CN=Apikeys_Groups,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,t.jsx)(b,{label:"LDAP Admin Group DN",hint:"Members of this group get full admin dashboard access.",children:(0,t.jsx)(h,{value:M.ldapAdminGroupDn,onChange:e=>eU("ldapAdminGroupDn",e.target.value),placeholder:"CN=BlueRouter_Admins,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,t.jsx)(b,{label:"LDAP Monitor Admin Group DN",hint:"Members can use only Endpoint, API Keys, Usage, Analytics, Quota Tracker and Prompt Logs with admin-like permissions inside those tabs.",children:(0,t.jsx)(h,{value:M.ldapMonitorAdminGroupDn,onChange:e=>eU("ldapMonitorAdminGroupDn",e.target.value),placeholder:"CN=BlueRouter_Monitor_Admins,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})}),(0,t.jsx)(b,{label:"LDAP AI Gateways Monitors Group DN",hint:"Members log in as regular users but the Analytics page aggregates statistics for every API key that has an owner, instead of only their own keys.",children:(0,t.jsx)(h,{value:M.ldapAiGatewaysMonitorsGroupDn,onChange:e=>eU("ldapAiGatewaysMonitorsGroupDn",e.target.value),placeholder:"CN=BlueRouter_AI_Gateways_Monitors,OU=AppGroups,OU=xxx,DC=xx,DC=vn"})})]}),(0,t.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,t.jsx)(b,{label:"User search filter",hint:"Use {{username}} placeholder.",children:(0,t.jsx)(h,{value:M.ldapUserSearchFilter,onChange:e=>eU("ldapUserSearchFilter",e.target.value)})}),(0,t.jsx)(b,{label:"Login group mode",hint:"Nested groups uses AD matching rule 1.2.840.113556.1.4.1941.",children:(0,t.jsx)(f,{title:"Nested group membership",desc:"Recommended for Active Directory nested groups.",checked:M.ldapNestedGroups,onChange:e=>eU("ldapNestedGroups",e)})}),(0,t.jsx)(b,{label:"Username attribute",children:(0,t.jsx)(h,{value:M.ldapUserNameAttribute,onChange:e=>eU("ldapUserNameAttribute",e.target.value)})}),(0,t.jsx)(b,{label:"Display attribute",children:(0,t.jsx)(h,{value:M.ldapUserDisplayAttribute,onChange:e=>eU("ldapUserDisplayAttribute",e.target.value)})}),(0,t.jsx)(b,{label:"Email attribute",children:(0,t.jsx)(h,{value:M.ldapUserEmailAttribute,onChange:e=>eU("ldapUserEmailAttribute",e.target.value)})}),(0,t.jsx)(b,{label:"Connect timeout ms",children:(0,t.jsx)(h,{type:"number",value:M.ldapConnectTimeoutMs,onChange:e=>eU("ldapConnectTimeoutMs",e.target.value)})})]}),(0,t.jsx)(f,{title:"Reject invalid TLS certificates",desc:"Disable only for test/self-signed LDAP TLS.",checked:M.ldapTlsRejectUnauthorized,onChange:e=>eU("ldapTlsRejectUnauthorized",e)}),(0,t.jsxs)("div",{className:"rounded-2xl border border-border bg-background p-4",children:[(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h3",{className:"font-semibold text-text-main",children:"Manual admin users / LDAP owner list"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Users loaded here come from Login Allowed Group DN when set. Selected users are also treated as manual admins for backward compatibility."})]}),(0,t.jsxs)("div",{className:"mb-3 flex gap-2",children:[(0,t.jsx)(h,{value:F,onChange:e=>$(e.target.value),placeholder:"Search users..."}),(0,t.jsx)("button",{type:"button",onClick:eR,disabled:z,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main disabled:opacity-50",children:z?"Loading...":"Load users"})]}),q.length>0&&(0,t.jsx)("div",{className:"max-h-72 overflow-auto rounded-xl border border-border",children:q.map(e=>{let a=M.ldapAllowedUsers.includes(e.username);return(0,t.jsxs)("button",{type:"button",onClick:()=>eB(e.username),className:`flex w-full items-center justify-between gap-3 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 ${a?"bg-primary/10":"bg-background hover:bg-surface"}`,children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-semibold text-text-main",children:e.displayName||e.username}),(0,t.jsxs)("span",{className:"ml-2 text-text-muted",children:[e.username,e.email?` \xb7 ${e.email}`:""]})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-primary",children:a?"check_circle":"radio_button_unchecked"})]},e.dn||e.username)})}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("div",{className:"mb-2 text-sm font-semibold text-text-main",children:["Selected manual admin users (",M.ldapAllowedUsers.length,")"]}),0===M.ldapAllowedUsers.length?(0,t.jsx)("div",{className:"text-sm text-text-muted",children:"No users selected."}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:M.ldapAllowedUsers.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>eB(e),className:"rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-xs text-primary",children:[e," \xd7"]},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:eM,disabled:O,className:"rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main disabled:opacity-50",children:O?"Testing...":"Save & test LDAP"}),(0,t.jsx)("button",{type:"submit",disabled:G,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:G?"Saving...":"Save LDAP settings"})]}),(0,t.jsx)(x,{status:B})]})}),(0,t.jsxs)(g,{icon:"lock_open",title:"OIDC Dashboard Login",desc:"oidc"===e.authMode?"OIDC active":"both"===e.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google",children:[(0,t.jsx)("button",{type:"button",onClick:()=>ea(e=>!e),className:"mb-4 rounded-xl border border-border px-4 py-2 text-sm font-semibold text-text-main",children:ee?"Hide OIDC settings":"Show OIDC settings"}),ee&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"grid gap-3 md:grid-cols-3",children:[{value:"password",title:"Password/LDAP",desc:"Keep local and LDAP login."},{value:"oidc",title:"OIDC only",desc:"Disable local/LDAP login when configured."},{value:"both",title:"Both",desc:"Allow either OIDC or local/LDAP."}].map(e=>{let a=H.authMode===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>Q(a=>({...a,authMode:e.value})),className:`rounded-xl border p-3 text-left ${a?"border-primary bg-primary/10":"border-border bg-background hover:border-primary/40"}`,children:[(0,t.jsx)("div",{className:"font-semibold text-text-main",children:e.title}),(0,t.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:e.desc})]},e.value)})}),(0,t.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,t.jsx)(b,{label:"Issuer URL",children:(0,t.jsx)(h,{value:H.oidcIssuerUrl,onChange:e=>Q({...H,oidcIssuerUrl:e.target.value})})}),(0,t.jsx)(b,{label:"Client ID",children:(0,t.jsx)(h,{value:H.oidcClientId,onChange:e=>Q({...H,oidcClientId:e.target.value})})}),(0,t.jsx)(b,{label:"Client Secret",children:(0,t.jsx)(h,{type:"password",value:V,onChange:e=>K(e.target.value),placeholder:e.oidcConfigured?"Saved — leave blank to keep":"Client secret"})}),(0,t.jsx)(b,{label:"Scopes",children:(0,t.jsx)(h,{value:H.oidcScopes,onChange:e=>Q({...H,oidcScopes:e.target.value})})}),(0,t.jsx)(b,{label:"Login label",children:(0,t.jsx)(h,{value:H.oidcLoginLabel,onChange:e=>Q({...H,oidcLoginLabel:e.target.value})})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>eE(),disabled:X,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:X?"Saving...":"Save OIDC settings"}),(0,t.jsx)(x,{status:W})]})]})]})}}},e=>{e.O(0,[2574,3862,9893,9959,1997,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=7973)),_N_E=e.O()}]);
|
|
File without changes
|
/package/app/.next-cli-build/static/{uE9OqSdLupGChu1y8DAlG → eRH2T2gxNi5BOBtumvC2Y}/_ssgManifest.js
RENAMED
|
File without changes
|