omniroute 2.8.1 → 2.8.2
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/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +1 -0
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/routes-manifest.json +6 -0
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page.js +1 -1
- package/app/.next/server/app/400/page.js.nft.json +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page.js +1 -1
- package/app/.next/server/app/401/page.js.nft.json +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page.js +1 -1
- package/app/.next/server/app/403/page.js.nft.json +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page.js +1 -1
- package/app/.next/server/app/408/page.js.nft.json +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page.js +1 -1
- package/app/.next/server/app/429/page.js.nft.json +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page.js +1 -1
- package/app/.next/server/app/500/page.js.nft.json +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page.js +1 -1
- package/app/.next/server/app/502/page.js.nft.json +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page.js +1 -1
- package/app/.next/server/app/503/page.js.nft.json +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +1 -1
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/acp/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cache/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/fallback/chains/route.js.nft.json +1 -1
- package/app/.next/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next/server/app/api/logs/console/route.js.nft.json +1 -1
- package/app/.next/server/app/api/logs/detail/route.js.nft.json +1 -1
- package/app/.next/server/app/api/logs/export/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/logs/export/route/build-manifest.json +11 -0
- package/app/.next/server/app/api/logs/export/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/logs/export/route.js +7 -0
- package/app/.next/server/app/api/logs/export/route.js.map +5 -0
- package/app/.next/server/app/api/logs/export/route.js.nft.json +1 -0
- package/app/.next/server/app/api/logs/export/route_client-reference-manifest.js +2 -0
- package/app/.next/server/app/api/mcp/sse/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/stream/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/openrouter-catalog/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next/server/app/api/policies/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/sync/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-metrics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/refresh/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/rate-limits/route.js.nft.json +1 -1
- package/app/.next/server/app/api/resilience/reset/route.js.nft.json +1 -1
- package/app/.next/server/app/api/resilience/route.js.nft.json +1 -1
- package/app/.next/server/app/api/search/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/search/stats/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/codex-service-tier/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxies/assignments/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxies/bulk-assign/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxies/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxies/migrate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxies/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/proxy/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/task-routing/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route.js.nft.json +1 -1
- package/app/.next/server/app/api/storage/health/route.js +1 -1
- package/app/.next/server/app/api/storage/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sync/initialize/route.js.nft.json +1 -1
- package/app/.next/server/app/api/system/version/route.js.nft.json +1 -1
- package/app/.next/server/app/api/token-health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/budget/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/quota/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/management/proxies/assignments/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/management/proxies/bulk-assign/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/management/proxies/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/management/proxies/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/music/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page.js +1 -1
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.js +1 -1
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page.js +1 -1
- package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +1 -1
- package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page.js +1 -1
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page.js +1 -1
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page.js +1 -1
- package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page.js +1 -1
- package/app/.next/server/app/offline/page.js.nft.json +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +1 -1
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +1 -1
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page.js +1 -1
- package/app/.next/server/app/status/page.js.nft.json +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page.js +1 -1
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +1 -0
- package/app/.next/server/chunks/[root-of-the-server]__09c944b3._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__52346ca4._.js → [root-of-the-server]__561d1987._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__7d9b23e7._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__80e3bfc3._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__84e445b2._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__85096f79._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__9230ee98._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__92cb0def._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__a4403ad8._.js +3 -0
- package/app/.next/server/chunks/{[root-of-the-server]__87186578._.js → [root-of-the-server]__d142dcb5._.js} +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__dc47ee64._.js → [root-of-the-server]__d4563e10._.js} +3 -3
- package/app/.next/server/chunks/{[root-of-the-server]__43a4e384._.js → [root-of-the-server]__d780e24b._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__db2f9fe0._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__167585da._.js → [root-of-the-server]__e27a89bd._.js} +3 -3
- package/app/.next/server/chunks/_05c48915._.js +1 -1
- package/app/.next/server/chunks/_1244636c._.js +3 -3
- package/app/.next/server/chunks/_2115d8de._.js +1 -1
- package/app/.next/server/chunks/_3ac953eb._.js +1 -1
- package/app/.next/server/chunks/_4b8fd853._.js +1 -1
- package/app/.next/server/chunks/_68683848._.js +1 -1
- package/app/.next/server/chunks/_ee9b677b._.js +1 -1
- package/app/.next/server/chunks/_next-internal_server_app_api_logs_export_route_actions_659d16c3.js +3 -0
- package/app/.next/server/chunks/src_shared_constants_pricing_ts_0fddbb51._.js +1 -1
- package/app/.next/server/chunks/src_shared_constants_pricing_ts_4245a86e._.js +1 -1
- package/app/.next/server/chunks/src_shared_constants_pricing_ts_65de0558._.js +1 -1
- package/app/.next/server/chunks/ssr/{[root-of-the-server]__efdd7f81._.js → [root-of-the-server]__7ae68a0e._.js} +2 -2
- package/app/.next/server/chunks/ssr/[root-of-the-server]__9affb65e._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__a6942102._.js +1 -1
- package/app/.next/server/chunks/ssr/{[root-of-the-server]__788f5583._.js → [root-of-the-server]__b6544c47._.js} +2 -2
- package/app/.next/server/chunks/ssr/src_5dd5869e._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_(dashboard)_dashboard_settings_pricing_page_tsx_5aff4262._.js +1 -1
- package/app/.next/server/chunks/ssr/src_shared_constants_pricing_ts_a704230a._.js +1 -1
- package/app/.next/server/middleware.js +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{b5cc103e16794392.js → 18934c9ed2a28555.js} +1 -1
- package/app/.next/static/chunks/374fe2b2c612c189.js +1 -0
- package/app/.next/static/chunks/{1ef9ea85406a01d6.js → 8ec4e086bf58dca6.js} +1 -1
- package/app/.next/static/chunks/af071ff826ecff1b.css +1 -0
- package/app/CHANGELOG.md +20 -0
- package/app/docs/openapi.yaml +1 -1
- package/app/open-sse/handlers/chatCore.ts +14 -8
- package/app/open-sse/utils/stream.ts +27 -0
- package/app/package-lock.json +2 -2
- package/app/package.json +1 -1
- package/app/src/app/(dashboard)/dashboard/logs/page.tsx +119 -11
- package/app/src/app/api/logs/export/route.ts +58 -0
- package/app/src/shared/constants/pricing.ts +71 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__4308f91a._.js +0 -3
- package/app/.next/static/chunks/02afac1b585d8219.css +0 -1
- package/app/.next/static/chunks/b36fd5a7c702d808.js +0 -1
- /package/app/.next/static/{JoLoKHY_9DVANe7Qs4D0K → sRyjByTPg8ioL4UQ1sX-q}/_buildManifest.js +0 -0
- /package/app/.next/static/{JoLoKHY_9DVANe7Qs4D0K → sRyjByTPg8ioL4UQ1sX-q}/_clientMiddlewareManifest.json +0 -0
- /package/app/.next/static/{JoLoKHY_9DVANe7Qs4D0K → sRyjByTPg8ioL4UQ1sX-q}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[645197,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944),e=a.i(436595);let f={cc:{"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:25,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-next":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-3.1":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"deepseek-3.2":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-haiku-4.5":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-sonnet-4-6-20251031":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-6-20251031":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5}},gemini:{"gemini-3.1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},deepseek:{"deepseek-chat":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-r1":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6},"moonshot-kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6}},minimax:{"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3},"MiniMax-M2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"nvidia/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},xai:{"grok-3":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"grok-3-mini":{input:.3,output:.5,cached:.15,reasoning:.75,cache_creation:.3},"grok-4-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-1-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-1-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-0709":{input:.2,output:1.5,cached:.1,reasoning:2.25,cache_creation:.2}},zai:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5},"claude-sonnet-4":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4.6":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"deepseek-v3.2":{input:.27,output:1.1,cached:.07,reasoning:1.1,cache_creation:.27},"minimax-m2.1":{input:.4,output:1.6,cached:.1,reasoning:1.6,cache_creation:.4},"qwen3-coder-next":{input:2,output:8,cached:.5,reasoning:8,cache_creation:2},auto:{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}}};function g({isOpen:a,onClose:d,onSave:e}){let[g,h]=(0,c.useState)({}),[i,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&m()},[a]);let m=async()=>{j(!0);try{let a=await fetch("/api/pricing");if(a.ok){let b=await a.json();h(b)}else h(f)}catch(a){console.error("Failed to load pricing:",a),h(f)}finally{j(!1)}},n=async()=>{l(!0);try{let a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)});if(a.ok)e?.(),d();else{let b=await a.json();alert(`Failed to save pricing: ${b.error}`)}}catch(a){console.error("Failed to save pricing:",a),alert("Failed to save pricing")}finally{l(!1)}},o=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&h(f)}catch(a){console.error("Failed to reset pricing:",a),alert("Failed to reset pricing")}};if(!a)return null;let p=Object.keys(g).sort(),q=["input","output","cached","reasoning","cache_creation"];return(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,b.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,b.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,b.jsx)("button",{onClick:d,className:"text-text-muted hover:text-text text-2xl leading-none",children:"×"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto p-4",children:i?(0,b.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,b.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,b.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,b.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),p.map(a=>{let c=Object.keys(g[a]).sort();return(0,b.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:a.toUpperCase()}),(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border",children:c.map(c=>(0,b.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,b.jsx)("td",{className:"px-3 py-2 font-medium",children:c}),q.map(d=>(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)("input",{type:"number",step:"0.01",min:"0",value:g[a][c][d]||0,onChange:b=>{let e;!isNaN(e=parseFloat(b.target.value))&&!(e<0)&&h(b=>{let f={...b};return f[a]||(f[a]={}),f[a][c]||(f[a][c]={}),f[a][c][d]=e,f})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},d))]},c))})]})})]},a)}),0===p.length&&(0,b.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,b.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,b.jsx)("button",{onClick:o,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:k,children:"Reset to Defaults"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:k,children:"Cancel"}),(0,b.jsx)("button",{onClick:n,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:k,children:k?"Saving...":"Save Changes"})]})]})]})})}var h=a.i(415925);function i(){(0,d.useRouter)();let[a,f]=(0,c.useState)(!1),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!0),m=(0,h.useTranslations)("settings");(0,c.useEffect)(()=>{n()},[]);let n=async()=>{l(!0);try{let a=await fetch("/api/pricing");if(a.ok){let b=await a.json();j(b)}}catch(a){console.error("Failed to load pricing:",a)}finally{l(!1)}};return(0,b.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-bold",children:m("pricingSettingsTitle")}),(0,b.jsx)("p",{className:"text-text-muted mt-1",children:m("modelPricingDesc")})]}),(0,b.jsx)("button",{onClick:()=>f(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:m("editPricing")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("totalModels")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1",children:k?"...":(()=>{if(!i)return 0;let a=0;for(let b in i)a+=Object.keys(i[b]).length;return a})()})]}),(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("providers")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1",children:k?"...":(!i?[]:Object.keys(i).sort()).length})]}),(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("status")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:k?"...":m("active")})]})]}),(0,b.jsxs)(e.default,{className:"p-6",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold mb-4",children:m("howPricingWorks")}),(0,b.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,b.jsxs)("p",{children:[(0,b.jsxs)("strong",{children:[m("costCalculation"),":"]})," ",m("costCalculationDesc")]}),(0,b.jsxs)("p",{children:[(0,b.jsxs)("strong",{children:[m("pricingFormat"),":"]})," ",m("pricingFormatDesc")]}),(0,b.jsx)("p",{children:(0,b.jsxs)("strong",{children:[m("tokenTypes"),":"]})}),(0,b.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("input"),":"]})," ",m("inputTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("output"),":"]})," ",m("outputTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("cached"),":"]})," ",m("cachedTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("reasoning"),":"]})," ",m("reasoningTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("cacheCreation"),":"]})," ",m("cacheCreationTokenDesc")]})]}),(0,b.jsx)("p",{children:m("customPricingNote")})]})]}),(0,b.jsxs)(e.default,{className:"p-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold",children:m("currentPricing")}),(0,b.jsx)("button",{onClick:()=>f(!0),className:"text-primary hover:underline text-sm",children:m("viewFullDetails")})]}),k?(0,b.jsx)("div",{className:"text-center py-4 text-text-muted",children:m("loadingPricing")}):i?(0,b.jsxs)("div",{className:"space-y-3",children:[Object.keys(i).slice(0,5).map(a=>(0,b.jsxs)("div",{className:"text-sm",children:[(0,b.jsxs)("span",{className:"font-semibold",children:[a.toUpperCase(),":"]})," ",(0,b.jsxs)("span",{className:"text-text-muted",children:[Object.keys(i[a]).length," ",m("models")]})]},a)),Object.keys(i).length>5&&(0,b.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",m("moreProviders",{count:Object.keys(i).length-5})]})]}):(0,b.jsx)("div",{className:"text-text-muted",children:m("noPricing")})]}),a&&(0,b.jsx)(g,{isOpen:a,onClose:()=>f(!1),onSave:()=>{n()}})]})}a.s(["default",()=>i],645197)}];
|
|
1
|
+
module.exports=[645197,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944),e=a.i(436595);let f={input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},g={input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},h={input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},i={cc:{"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:25,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt-5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":f,"gpt-5.3-codex-xhigh":f,"gpt-5.3-codex-high":f,"gpt-5.3-codex-low":f,"gpt-5.3-codex-none":f,"gpt-5.1-codex-mini-high":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-next":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-3.1":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"deepseek-3.2":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-haiku-4.5":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-sonnet-4-6-20251031":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-6-20251031":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-5-20251101":g,"claude-sonnet-4-5-20250929":h,"claude-sonnet-4":h,"claude-opus-4":g},gemini:{"gemini-3.1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},deepseek:{"deepseek-chat":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-r1":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6},"moonshot-kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6}},minimax:{"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3},"MiniMax-M2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"nvidia/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},xai:{"grok-3":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"grok-3-mini":{input:.3,output:.5,cached:.15,reasoning:.75,cache_creation:.3},"grok-4-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-1-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-1-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-0709":{input:.2,output:1.5,cached:.1,reasoning:2.25,cache_creation:.2}},zai:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5},"claude-sonnet-4":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4.6":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"deepseek-v3.2":{input:.27,output:1.1,cached:.07,reasoning:1.1,cache_creation:.27},"minimax-m2.1":{input:.4,output:1.6,cached:.1,reasoning:1.6,cache_creation:.4},"qwen3-coder-next":{input:2,output:8,cached:.5,reasoning:8,cache_creation:2},auto:{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}}};function j({isOpen:a,onClose:d,onSave:e}){let[f,g]=(0,c.useState)({}),[h,j]=(0,c.useState)(!0),[k,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&m()},[a]);let m=async()=>{j(!0);try{let a=await fetch("/api/pricing");if(a.ok){let b=await a.json();g(b)}else g(i)}catch(a){console.error("Failed to load pricing:",a),g(i)}finally{j(!1)}},n=async()=>{l(!0);try{let a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(a.ok)e?.(),d();else{let b=await a.json();alert(`Failed to save pricing: ${b.error}`)}}catch(a){console.error("Failed to save pricing:",a),alert("Failed to save pricing")}finally{l(!1)}},o=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&g(i)}catch(a){console.error("Failed to reset pricing:",a),alert("Failed to reset pricing")}};if(!a)return null;let p=Object.keys(f).sort(),q=["input","output","cached","reasoning","cache_creation"];return(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,b.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,b.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,b.jsx)("button",{onClick:d,className:"text-text-muted hover:text-text text-2xl leading-none",children:"×"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto p-4",children:h?(0,b.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,b.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,b.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,b.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),p.map(a=>{let c=Object.keys(f[a]).sort();return(0,b.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,b.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:a.toUpperCase()}),(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsxs)("table",{className:"w-full text-sm",children:[(0,b.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,b.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,b.jsx)("tbody",{className:"divide-y divide-border",children:c.map(c=>(0,b.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,b.jsx)("td",{className:"px-3 py-2 font-medium",children:c}),q.map(d=>(0,b.jsx)("td",{className:"px-3 py-2",children:(0,b.jsx)("input",{type:"number",step:"0.01",min:"0",value:f[a][c][d]||0,onChange:b=>{let e;!isNaN(e=parseFloat(b.target.value))&&!(e<0)&&g(b=>{let f={...b};return f[a]||(f[a]={}),f[a][c]||(f[a][c]={}),f[a][c][d]=e,f})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},d))]},c))})]})})]},a)}),0===p.length&&(0,b.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,b.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,b.jsx)("button",{onClick:o,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:k,children:"Reset to Defaults"}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{onClick:d,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:k,children:"Cancel"}),(0,b.jsx)("button",{onClick:n,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:k,children:k?"Saving...":"Save Changes"})]})]})]})})}var k=a.i(415925);function l(){(0,d.useRouter)();let[a,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),[i,l]=(0,c.useState)(!0),m=(0,k.useTranslations)("settings");(0,c.useEffect)(()=>{n()},[]);let n=async()=>{l(!0);try{let a=await fetch("/api/pricing");if(a.ok){let b=await a.json();h(b)}}catch(a){console.error("Failed to load pricing:",a)}finally{l(!1)}};return(0,b.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-bold",children:m("pricingSettingsTitle")}),(0,b.jsx)("p",{className:"text-text-muted mt-1",children:m("modelPricingDesc")})]}),(0,b.jsx)("button",{onClick:()=>f(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:m("editPricing")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("totalModels")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1",children:i?"...":(()=>{if(!g)return 0;let a=0;for(let b in g)a+=Object.keys(g[b]).length;return a})()})]}),(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("providers")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1",children:i?"...":(!g?[]:Object.keys(g).sort()).length})]}),(0,b.jsxs)(e.default,{className:"p-4",children:[(0,b.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:m("status")}),(0,b.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:i?"...":m("active")})]})]}),(0,b.jsxs)(e.default,{className:"p-6",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold mb-4",children:m("howPricingWorks")}),(0,b.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,b.jsxs)("p",{children:[(0,b.jsxs)("strong",{children:[m("costCalculation"),":"]})," ",m("costCalculationDesc")]}),(0,b.jsxs)("p",{children:[(0,b.jsxs)("strong",{children:[m("pricingFormat"),":"]})," ",m("pricingFormatDesc")]}),(0,b.jsx)("p",{children:(0,b.jsxs)("strong",{children:[m("tokenTypes"),":"]})}),(0,b.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("input"),":"]})," ",m("inputTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("output"),":"]})," ",m("outputTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("cached"),":"]})," ",m("cachedTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("reasoning"),":"]})," ",m("reasoningTokenDesc")]}),(0,b.jsxs)("li",{children:[(0,b.jsxs)("strong",{children:[m("cacheCreation"),":"]})," ",m("cacheCreationTokenDesc")]})]}),(0,b.jsx)("p",{children:m("customPricingNote")})]})]}),(0,b.jsxs)(e.default,{className:"p-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsx)("h2",{className:"text-xl font-semibold",children:m("currentPricing")}),(0,b.jsx)("button",{onClick:()=>f(!0),className:"text-primary hover:underline text-sm",children:m("viewFullDetails")})]}),i?(0,b.jsx)("div",{className:"text-center py-4 text-text-muted",children:m("loadingPricing")}):g?(0,b.jsxs)("div",{className:"space-y-3",children:[Object.keys(g).slice(0,5).map(a=>(0,b.jsxs)("div",{className:"text-sm",children:[(0,b.jsxs)("span",{className:"font-semibold",children:[a.toUpperCase(),":"]})," ",(0,b.jsxs)("span",{className:"text-text-muted",children:[Object.keys(g[a]).length," ",m("models")]})]},a)),Object.keys(g).length>5&&(0,b.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",m("moreProviders",{count:Object.keys(g).length-5})]})]}):(0,b.jsx)("div",{className:"text-text-muted",children:m("noPricing")})]}),a&&(0,b.jsx)(j,{isOpen:a,onClose:()=>f(!1),onSave:()=>{n()}})]})}a.s(["default",()=>l],645197)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_app_%28dashboard%29_dashboard_settings_pricing_page_tsx_5aff4262._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[455480,a=>{"use strict";let b={cc:{"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:25,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-next":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-3.1":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"deepseek-3.2":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-haiku-4.5":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-sonnet-4-6-20251031":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-6-20251031":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5}},gemini:{"gemini-3.1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},deepseek:{"deepseek-chat":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-r1":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6},"moonshot-kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6}},minimax:{"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3},"MiniMax-M2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"nvidia/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},xai:{"grok-3":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"grok-3-mini":{input:.3,output:.5,cached:.15,reasoning:.75,cache_creation:.3},"grok-4-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-1-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-1-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-0709":{input:.2,output:1.5,cached:.1,reasoning:2.25,cache_creation:.2}},zai:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5},"claude-sonnet-4":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4.6":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"deepseek-v3.2":{input:.27,output:1.1,cached:.07,reasoning:1.1,cache_creation:.27},"minimax-m2.1":{input:.4,output:1.6,cached:.1,reasoning:1.6,cache_creation:.4},"qwen3-coder-next":{input:2,output:8,cached:.5,reasoning:8,cache_creation:2},auto:{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}}};function c(a,c){if(!a||!c)return null;let d=b[a];if(!d)return null;let e=d[c];return e&&"object"==typeof e?e:null}function d(){return b}function e(a){return null==a||isNaN(a)?"$0.00":`$${a.toFixed(2)}`}function f(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0;c+=Math.max(0,d-e)*(b.input/1e6),e>0&&(c+=(b.cached||b.input)/1e6*e),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let f=a.reasoning_tokens||0;f>0&&(c+=(b.reasoning||b.output)/1e6*f);let g=a.cache_creation_input_tokens||0;return g>0&&(c+=(b.cache_creation||b.input)/1e6*g),c}a.s(["DEFAULT_PRICING",0,b,"calculateCostFromTokens",()=>f,"formatCost",()=>e,"getDefaultPricing",()=>d,"getPricingForModel",()=>c])}];
|
|
1
|
+
module.exports=[455480,a=>{"use strict";let b={input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},c={input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},d={input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},e={cc:{"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:25,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt-5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":b,"gpt-5.3-codex-xhigh":b,"gpt-5.3-codex-high":b,"gpt-5.3-codex-low":b,"gpt-5.3-codex-none":b,"gpt-5.1-codex-mini-high":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-next":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-3.1":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"deepseek-3.2":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-haiku-4.5":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-sonnet-4-6-20251031":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-6-20251031":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-5-20251101":c,"claude-sonnet-4-5-20250929":d,"claude-sonnet-4":d,"claude-opus-4":c},gemini:{"gemini-3.1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},deepseek:{"deepseek-chat":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-r1":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6},"moonshot-kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6}},minimax:{"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3},"MiniMax-M2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"nvidia/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},xai:{"grok-3":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"grok-3-mini":{input:.3,output:.5,cached:.15,reasoning:.75,cache_creation:.3},"grok-4-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-1-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-1-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-0709":{input:.2,output:1.5,cached:.1,reasoning:2.25,cache_creation:.2}},zai:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5},"claude-sonnet-4":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4.6":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"deepseek-v3.2":{input:.27,output:1.1,cached:.07,reasoning:1.1,cache_creation:.27},"minimax-m2.1":{input:.4,output:1.6,cached:.1,reasoning:1.6,cache_creation:.4},"qwen3-coder-next":{input:2,output:8,cached:.5,reasoning:8,cache_creation:2},auto:{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}}};function f(a,b){if(!a||!b)return null;let c=e[a];if(!c)return null;let d=c[b];return d&&"object"==typeof d?d:null}function g(){return e}function h(a){return null==a||isNaN(a)?"$0.00":`$${a.toFixed(2)}`}function i(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0;c+=Math.max(0,d-e)*(b.input/1e6),e>0&&(c+=(b.cached||b.input)/1e6*e),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let f=a.reasoning_tokens||0;f>0&&(c+=(b.reasoning||b.output)/1e6*f);let g=a.cache_creation_input_tokens||0;return g>0&&(c+=(b.cache_creation||b.input)/1e6*g),c}a.s(["DEFAULT_PRICING",0,e,"calculateCostFromTokens",()=>i,"formatCost",()=>h,"getDefaultPricing",()=>g,"getPricingForModel",()=>f])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_shared_constants_pricing_ts_a704230a._.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var R=require("./chunks/[turbopack]_runtime.js")("server/middleware.js")
|
|
2
|
-
R.c("server/chunks/[root-of-the-server]
|
|
2
|
+
R.c("server/chunks/[root-of-the-server]__561d1987._.js")
|
|
3
3
|
R.c("server/chunks/src_lib_db_settings_ts_37e24b4e._.js")
|
|
4
4
|
R.c("server/chunks/src_lib_db_core_ts_3ce27db5._.js")
|
|
5
5
|
R.c("server/chunks/[root-of-the-server]__bfaa196f._.js")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/e22b90cf374c3818.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--sRyjByTPg8ioL4UQ1sX_q--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/e22b90cf374c3818.js"/><script src="/_next/static/chunks/3dd6d23a48e5d078.js" async=""></script><script src="/_next/static/chunks/726579f2940c2a2f.js" async=""></script><script src="/_next/static/chunks/b133d1854532ff8c.js" async=""></script><script src="/_next/static/chunks/c88fcc5f8b21ff92.js" async=""></script><script src="/_next/static/chunks/turbopack-858efc89e955ca00.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/16ea27c3b926bc31.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/e22b90cf374c3818.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/16ea27c3b926bc31.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"sRyjByTPg8ioL4UQ1sX-q\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/d96012bcfc98706a.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/16ea27c3b926bc31.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"qG4vKxt25fb9WduPdTS9omIZkWa1cRwZHdH2wO64Fqs=\"\n}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,804730,t=>{t.v({name:"omniroute",version:"2.8.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,804730,t=>{t.v({name:"omniroute",version:"2.8.2",description:"Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.",type:"module",bin:{omniroute:"bin/omniroute.mjs","omniroute-reset-password":"bin/reset-password.mjs"},files:["bin/","app/","open-sse/mcp-server/","src/shared/contracts/","scripts/postinstall.mjs","scripts/native-binary-compat.mjs","README.md","LICENSE"],workspaces:["open-sse"],engines:{node:">=18.0.0 <24.0.0"},keywords:["ai","router","proxy","openai","claude","anthropic","gemini","fallback","cursor","cline","codex","llm","auto-fallback"],license:"MIT",author:"diegosouzapw",repository:{type:"git",url:"https://github.com/diegosouzapw/OmniRoute"},homepage:"https://omniroute.online",scripts:{dev:"node scripts/run-next.mjs dev",build:"next build","build:cli":"node scripts/prepublish.mjs",start:"node scripts/run-next.mjs start",lint:"eslint .","electron:dev":'concurrently "npm run dev" "wait-on http://localhost:20128 && cd electron && npm run dev"',"electron:build":"npm run build && cd electron && npm run build","electron:build:win":"npm run build && cd electron && npm run build:win","electron:build:mac":"npm run build && cd electron && npm run build:mac","electron:build:linux":"npm run build && cd electron && npm run build:linux",test:"node --import tsx/esm --test tests/unit/*.test.mjs","test:unit":"node --import tsx/esm --test tests/unit/*.test.mjs","test:plan3":"node --import tsx/esm --test tests/unit/plan3-p0.test.mjs","test:fixes":"node --import tsx/esm --test tests/unit/fixes-p1.test.mjs","test:security":"node --import tsx/esm --test tests/unit/security-fase01.test.mjs","check:cycles":"node scripts/check-cycles.mjs","check:route-validation:t06":"node scripts/check-route-validation.mjs","check:any-budget:t11":"node scripts/check-t11-any-budget.mjs","check:docs-sync":"node scripts/check-docs-sync.mjs","typecheck:core":"tsc --pretty false -p tsconfig.typecheck-core.json","typecheck:noimplicit:core":"tsc --pretty false -p tsconfig.typecheck-noimplicit-core.json","test:integration":"node --import tsx/esm --test tests/integration/*.test.mjs","test:e2e":"node scripts/run-playwright-tests.mjs test tests/e2e/*.spec.ts","test:protocols:e2e":"node scripts/run-protocol-clients-tests.mjs","test:vitest":"vitest run open-sse/mcp-server/__tests__/*.test.ts open-sse/services/autoCombo/__tests__/*.test.ts","test:ecosystem":"node scripts/run-ecosystem-tests.mjs","test:coverage":"npx c8 --exclude=open-sse --check-coverage --lines 50 --functions 50 --branches 50 node --import tsx/esm --test tests/unit/*.test.mjs","test:all":"npm run test:unit && npm run test:vitest && npm run test:ecosystem && npm run test:e2e",check:"npm run lint && npm run test",prepublishOnly:"npm run build:cli",postinstall:"node scripts/postinstall.mjs",prepare:"husky","system-info":"node scripts/system-info.mjs"},dependencies:{"@modelcontextprotocol/sdk":"^1.27.1","@monaco-editor/react":"^4.7.0",bcryptjs:"^3.0.3","better-sqlite3":"^12.6.2",bottleneck:"^2.19.5",dompurify:"^3.3.2",express:"^5.2.1","fetch-socks":"^1.3.2","http-proxy-middleware":"^3.0.5","https-proxy-agent":"^8.0.0",jose:"^6.1.3",lowdb:"^7.0.1","monaco-editor":"^0.55.1",next:"^16.1.6","next-intl":"^4.8.3","node-machine-id":"^1.1.12",open:"^11.0.0",ora:"^9.1.0",pino:"^10.3.1","pino-pretty":"^13.1.3",react:"19.2.4","react-dom":"19.2.4",recharts:"^3.7.0",selfsigned:"^5.5.0",tsx:"^4.21.0",undici:"^7.19.2",uuid:"^13.0.0","wreq-js":"^2.0.1",zod:"^4.3.6",zustand:"^5.0.10","@swc/helpers":"0.5.19"},devDependencies:{"@playwright/test":"^1.58.2","@tailwindcss/postcss":"^4.1.18","@types/bcryptjs":"^3.0.0","@types/better-sqlite3":"^7.6.13","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3",concurrently:"^9.2.1","cross-env":"^10.1.0",eslint:"^9.39.2","eslint-config-next":"16.1.6",husky:"^9.1.7","lint-staged":"^16.2.7",prettier:"^3.8.1",tailwindcss:"^4",typescript:"^5.9.3","typescript-eslint":"^8.56.0",vitest:"^4.0.18","wait-on":"^9.0.4"},"lint-staged":{"*.{js,jsx,ts,tsx,mjs}":["prettier --write","eslint --fix --no-error-on-unmatched-pattern"],"*.{json,md,yml,yaml,css}":["prettier --write"]},pnpm:{onlyBuiltDependencies:["@parcel/watcher","@swc/core","better-sqlite3","esbuild","omniroute","sharp"]}})},175696,t=>{"use strict";var e=t.i(861745),s=t.i(843476);function n({locale:t,...n}){if(!t)throw Error(void 0);return(0,s.jsx)(e.IntlProvider,{locale:t,...n})}t.s(["default",()=>n])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,422127,e=>{"use strict";var t=e.i(843476),c=e.i(271645),a=e.i(618566),n=e.i(393718);let i={input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},o={input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},r={input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},s={cc:{"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:25,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt-5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt5.4":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":i,"gpt-5.3-codex-xhigh":i,"gpt-5.3-codex-high":i,"gpt-5.3-codex-low":i,"gpt-5.3-codex-none":i,"gpt-5.1-codex-mini-high":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-next":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.63,cache_creation:.28},"deepseek-v3.2-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-3.1":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"deepseek-3.2":{input:.27,output:1.1,cached:.07,reasoning:2.2,cache_creation:.27},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-haiku-4.5":{input:1,output:5,cached:.5,reasoning:7.5,cache_creation:1},"claude-sonnet-4-6-20251031":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-6-20251031":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-opus-4-6":{input:5,output:25,cached:2.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4-6":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"claude-opus-4-5-20251101":o,"claude-sonnet-4-5-20250929":r,"claude-sonnet-4":r,"claude-opus-4":o},gemini:{"gemini-3.1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-1-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.1,output:.4,cached:.025,reasoning:.6,cache_creation:.1}},deepseek:{"deepseek-chat":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-v3.2":{input:.28,output:.42,cached:.014,reasoning:.42,cache_creation:.28},"deepseek-reasoner":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55},"deepseek-r1":{input:.55,output:2.19,cached:.14,reasoning:2.19,cache_creation:.55}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6},"moonshot-kimi-k2.5":{input:.6,output:3,cached:.3,reasoning:4.5,cache_creation:.6}},minimax:{"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3},"MiniMax-M2.5":{input:.3,output:1.2,cached:.15,reasoning:1.8,cache_creation:.3}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"nvidia/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},xai:{"grok-3":{input:3,output:15,cached:1.5,reasoning:22.5,cache_creation:3},"grok-3-mini":{input:.3,output:.5,cached:.15,reasoning:.75,cache_creation:.3},"grok-4-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-1-fast-non-reasoning":{input:.2,output:.5,cached:.1,reasoning:0,cache_creation:.2},"grok-4-1-fast-reasoning":{input:.2,output:.5,cached:.1,reasoning:.75,cache_creation:.2},"grok-4-0709":{input:.2,output:1.5,cached:.1,reasoning:2.25,cache_creation:.2}},zai:{"glm-5":{input:1,output:3.2,cached:.5,reasoning:4.8,cache_creation:1},"glm-5-turbo":{input:1.2,output:4,cached:.6,reasoning:6,cache_creation:1.2}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5},"claude-sonnet-4":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4.6":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"deepseek-v3.2":{input:.27,output:1.1,cached:.07,reasoning:1.1,cache_creation:.27},"minimax-m2.1":{input:.4,output:1.6,cached:.1,reasoning:1.6,cache_creation:.4},"qwen3-coder-next":{input:2,output:8,cached:.5,reasoning:8,cache_creation:2},auto:{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}}};function u({isOpen:e,onClose:a,onSave:n}){let[i,o]=(0,c.useState)({}),[r,u]=(0,c.useState)(!0),[p,h]=(0,c.useState)(!1);(0,c.useEffect)(()=>{e&&d()},[e]);let d=async()=>{u(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();o(t)}else o(s)}catch(e){console.error("Failed to load pricing:",e),o(s)}finally{u(!1)}},l=async()=>{h(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)n?.(),a();else{let t=await e.json();alert(`Failed to save pricing: ${t.error}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{h(!1)}},g=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&o(s)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let m=Object.keys(i).sort(),x=["input","output","cached","reasoning","cache_creation"];return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,t.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,t.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,t.jsx)("button",{onClick:a,className:"text-text-muted hover:text-text text-2xl leading-none",children:"×"})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:r?(0,t.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,t.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,t.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,t.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),m.map(e=>{let c=Object.keys(i[e]).sort();return(0,t.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border",children:c.map(c=>(0,t.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,t.jsx)("td",{className:"px-3 py-2 font-medium",children:c}),x.map(a=>(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][c][a]||0,onChange:t=>{let n;!isNaN(n=parseFloat(t.target.value))&&!(n<0)&&o(t=>{let i={...t};return i[e]||(i[e]={}),i[e][c]||(i[e][c]={}),i[e][c][a]=n,i})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},a))]},c))})]})})]},e)}),0===m.length&&(0,t.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,t.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,t.jsx)("button",{onClick:g,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:p,children:"Reset to Defaults"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:a,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:p,children:"Cancel"}),(0,t.jsx)("button",{onClick:l,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:p,children:p?"Saving...":"Save Changes"})]})]})]})})}var p=e.i(948148);function h(){(0,a.useRouter)();let[e,i]=(0,c.useState)(!1),[o,r]=(0,c.useState)(null),[s,h]=(0,c.useState)(!0),d=(0,p.useTranslations)("settings");(0,c.useEffect)(()=>{l()},[]);let l=async()=>{h(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();r(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{h(!1)}};return(0,t.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-3xl font-bold",children:d("pricingSettingsTitle")}),(0,t.jsx)("p",{className:"text-text-muted mt-1",children:d("modelPricingDesc")})]}),(0,t.jsx)("button",{onClick:()=>i(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:d("editPricing")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)(n.default,{className:"p-4",children:[(0,t.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:d("totalModels")}),(0,t.jsx)("div",{className:"text-2xl font-bold mt-1",children:s?"...":(()=>{if(!o)return 0;let e=0;for(let t in o)e+=Object.keys(o[t]).length;return e})()})]}),(0,t.jsxs)(n.default,{className:"p-4",children:[(0,t.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:d("providers")}),(0,t.jsx)("div",{className:"text-2xl font-bold mt-1",children:s?"...":(!o?[]:Object.keys(o).sort()).length})]}),(0,t.jsxs)(n.default,{className:"p-4",children:[(0,t.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:d("status")}),(0,t.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:s?"...":d("active")})]})]}),(0,t.jsxs)(n.default,{className:"p-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold mb-4",children:d("howPricingWorks")}),(0,t.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,t.jsxs)("p",{children:[(0,t.jsxs)("strong",{children:[d("costCalculation"),":"]})," ",d("costCalculationDesc")]}),(0,t.jsxs)("p",{children:[(0,t.jsxs)("strong",{children:[d("pricingFormat"),":"]})," ",d("pricingFormatDesc")]}),(0,t.jsx)("p",{children:(0,t.jsxs)("strong",{children:[d("tokenTypes"),":"]})}),(0,t.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,t.jsxs)("li",{children:[(0,t.jsxs)("strong",{children:[d("input"),":"]})," ",d("inputTokenDesc")]}),(0,t.jsxs)("li",{children:[(0,t.jsxs)("strong",{children:[d("output"),":"]})," ",d("outputTokenDesc")]}),(0,t.jsxs)("li",{children:[(0,t.jsxs)("strong",{children:[d("cached"),":"]})," ",d("cachedTokenDesc")]}),(0,t.jsxs)("li",{children:[(0,t.jsxs)("strong",{children:[d("reasoning"),":"]})," ",d("reasoningTokenDesc")]}),(0,t.jsxs)("li",{children:[(0,t.jsxs)("strong",{children:[d("cacheCreation"),":"]})," ",d("cacheCreationTokenDesc")]})]}),(0,t.jsx)("p",{children:d("customPricingNote")})]})]}),(0,t.jsxs)(n.default,{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:d("currentPricing")}),(0,t.jsx)("button",{onClick:()=>i(!0),className:"text-primary hover:underline text-sm",children:d("viewFullDetails")})]}),s?(0,t.jsx)("div",{className:"text-center py-4 text-text-muted",children:d("loadingPricing")}):o?(0,t.jsxs)("div",{className:"space-y-3",children:[Object.keys(o).slice(0,5).map(e=>(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,t.jsxs)("span",{className:"text-text-muted",children:[Object.keys(o[e]).length," ",d("models")]})]},e)),Object.keys(o).length>5&&(0,t.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",d("moreProviders",{count:Object.keys(o).length-5})]})]}):(0,t.jsx)("div",{className:"text-text-muted",children:d("noPricing")})]}),e&&(0,t.jsx)(u,{isOpen:e,onClose:()=>i(!1),onSave:()=>{l()}})]})}e.s(["default",()=>h],422127)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565650,e=>{"use strict";e.i(342923),e.i(80173),e.i(907714),e.i(393718),e.i(703166),e.i(454149),e.i(822124),e.i(969353),e.i(635055),e.i(897844),e.i(450222),e.i(647829),e.i(6998),e.i(982131),e.i(116016),e.i(279743),e.i(193464),e.i(548036),e.i(566770),e.i(953789),e.i(8839),e.i(227404),e.i(621745),e.i(567955),e.i(17517),e.i(419947),e.i(323060),e.i(642440),e.i(629342),e.i(816062),e.i(690777),e.i(563201),e.i(115243),e.i(165149),e.i(359505),e.s([],565650)},643953,e=>{"use strict";var t=e.i(323060);e.s(["SegmentedControl",()=>t.default])},101208,426277,e=>{"use strict";var t=e.i(953789);e.s(["RequestLoggerV2",()=>t.default],101208);var r=e.i(227404);e.s(["ProxyLogger",()=>r.default],426277)},837626,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.i(565650);var l=e.i(101208),a=e.i(426277),o=e.i(643953),s=e.i(948148),i=e.i(950914);let n={debug:"text-gray-400",trace:"text-gray-500",info:"text-cyan-400",warn:"text-yellow-400",error:"text-red-400",fatal:"text-fuchsia-400"},c={debug:"bg-gray-500/10 border-gray-500/20",trace:"bg-gray-500/10 border-gray-500/20",info:"bg-cyan-500/10 border-cyan-500/20",warn:"bg-yellow-500/10 border-yellow-500/20",error:"bg-red-500/10 border-red-500/20",fatal:"bg-fuchsia-500/10 border-fuchsia-500/20"};function d(){let e=(0,s.useTranslations)("loggers"),[l,a]=(0,r.useState)([]),[o,d]=(0,r.useState)(!0),[x,u]=(0,r.useState)(null),[m,p]=(0,r.useState)("all"),[b,g]=(0,r.useState)(""),[h,v]=(0,r.useState)(!0),[f,y]=(0,r.useState)(null),[j,N]=(0,r.useState)(null),w=(0,r.useRef)(null),S=(0,r.useCallback)(async()=>{try{let e=new URLSearchParams;"all"!==m&&e.set("level",m),e.set("limit","500");let t=await fetch(`/api/logs/console?${e.toString()}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();a(r),y(new Date),u(null)}catch(e){u(e.message||"Failed to fetch logs")}finally{d(!1)}},[m]);(0,r.useEffect)(()=>{S();let e=setInterval(S,5e3);return()=>clearInterval(e)},[S]),(0,r.useEffect)(()=>{h&&w.current&&(w.current.scrollTop=w.current.scrollHeight)},[l,h]);let L=async(e,t)=>{let r=JSON.stringify(e,null,2);await (0,i.copyToClipboard)(r)?(u(null),N(t),setTimeout(()=>N(null),2e3)):u("Failed to copy log entry")},k=b?l.filter(e=>JSON.stringify(e).toLowerCase().includes(b.toLowerCase())):l;return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",children:[(0,t.jsxs)("select",{value:m,onChange:e=>p(e.target.value),"aria-label":"Filter by log level",className:"px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] focus:outline-2 focus:outline-[var(--color-accent)]",children:[(0,t.jsx)("option",{value:"all",children:e("allLevels")}),(0,t.jsx)("option",{value:"debug",children:"Debug+"}),(0,t.jsx)("option",{value:"info",children:"Info+"}),(0,t.jsx)("option",{value:"warn",children:"Warn+"}),(0,t.jsx)("option",{value:"error",children:"Error+"})]}),(0,t.jsx)("input",{type:"text",placeholder:"Search logs...",value:b,onChange:e=>g(e.target.value),"aria-label":"Search log entries",className:"flex-1 min-w-[200px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsxs)("button",{onClick:()=>v(!h),title:h?"Disable auto-scroll":"Enable auto-scroll",className:`px-3 py-2 rounded-lg text-sm font-medium border transition-colors ${h?"bg-cyan-500/15 text-cyan-400 border-cyan-500/30":"bg-[var(--color-bg)] text-[var(--color-text-muted)] border-[var(--color-border)]"}`,children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-1",children:h?"vertical_align_bottom":"lock"}),"Auto-scroll"]}),(0,t.jsx)("button",{onClick:S,disabled:o,className:"px-3 py-2 rounded-lg text-sm font-medium bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-50 transition-colors",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle",children:"refresh"})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto text-xs text-[var(--color-text-muted)]",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,t.jsxs)("span",{children:[k.length," entries"]}),(0,t.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,t.jsx)("span",{children:"Last 1h"}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,t.jsxs)("span",{children:["Updated ",f.toLocaleTimeString()]})]})]})]}),x&&(0,t.jsxs)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-2",children:"error"}),x,(0,t.jsx)("span",{className:"text-xs ml-2 opacity-70",children:"— Make sure the application is writing logs to file (LOG_TO_FILE=true)"})]}),(0,t.jsxs)("div",{ref:w,className:"rounded-xl border border-[var(--color-border)] bg-[#0d1117] overflow-auto font-mono text-xs leading-relaxed",style:{maxHeight:"calc(100vh - 340px)",minHeight:"400px"},role:"log","aria-label":"Application console logs","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"sticky top-0 z-10 px-4 py-2 bg-[#161b22] border-b border-[#30363d] flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"}),(0,t.jsx)("span",{className:"ml-3 text-[#8b949e] text-[11px]",children:"OmniRoute — Application Console"})]}),(0,t.jsxs)("div",{className:"p-3 space-y-px",children:[0!==k.length||o?k.map((e,r)=>{let l=(e.level||"info").toLowerCase(),a=n[l]||n.info,o=c[l]||"",s=e.component||e.module||"",i=e.msg||e.message||"";return(0,t.jsxs)("div",{className:`group flex items-start gap-2 px-2 py-1 rounded hover:bg-white/5 transition-colors ${"error"===l||"fatal"===l?"bg-red-500/5":""}`,children:[(0,t.jsx)("span",{className:"text-[#484f58] whitespace-nowrap shrink-0 select-none",children:(e=>{try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return e}})(e.timestamp)}),(0,t.jsx)("span",{className:`inline-block px-1.5 py-0 rounded text-[10px] font-semibold uppercase border shrink-0 ${a} ${o}`,children:l.padEnd(5)}),s&&(0,t.jsxs)("span",{className:"text-purple-400/80 shrink-0",children:["[",s,"]"]}),(0,t.jsxs)("span",{className:"text-[#c9d1d9] flex-1 break-all",children:[i,e.correlationId&&(0,t.jsxs)("span",{className:"text-[#484f58] ml-2",children:["cid:",e.correlationId.slice(0,8)]})]}),(0,t.jsx)("button",{onClick:()=>L(e,r),title:"Copy log entry",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 text-[#8b949e] hover:text-white",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:j===r?"check":"content_copy"})})]},r)}):(0,t.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[40px] block mb-2 opacity-30",children:"terminal"}),(0,t.jsx)("p",{children:e("noLogEntries")}),(0,t.jsx)("p",{className:"text-[10px] mt-1 opacity-60",children:"Ensure LOG_TO_FILE=true is set in your .env file"})]}),o&&0===k.length&&(0,t.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[24px] animate-spin block mb-2",children:"progress_activity"}),"Loading logs..."]})]})]})]})}function x(){let[e,l]=(0,r.useState)([]),[a,o]=(0,r.useState)(!0),[i,n]=(0,r.useState)(null),[c,d]=(0,r.useState)(""),[x,u]=(0,r.useState)(""),[m,p]=(0,r.useState)(0),[b,g]=(0,r.useState)(!1),h=(0,s.useTranslations)("logs"),v=(0,r.useCallback)(async()=>{o(!0),n(null);try{let e=new URLSearchParams;c&&e.set("action",c),x&&e.set("actor",x),e.set("limit",String(26)),e.set("offset",String(m));let t=await fetch(`/api/compliance/audit-log?${e.toString()}`);if(!t.ok)throw Error(h("failedFetchAuditLog"));let r=await t.json();g(r.length>25),l(r.slice(0,25))}catch(e){n(e.message||h("failedFetchAuditLog"))}finally{o(!1)}},[c,x,m,h]);(0,r.useEffect)(()=>{v()},[v]);let f=()=>{p(0),v()};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-[var(--color-text-main)]",children:h("auditLog")}),(0,t.jsx)("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h("auditLogDesc")})]}),(0,t.jsx)("button",{onClick:v,disabled:a,"aria-label":h("refreshAuditLogAria"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] transition-colors disabled:opacity-50",children:a?h("loading"):h("refresh")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",role:"search","aria-label":h("filterEntriesAria"),children:[(0,t.jsx)("input",{type:"text",placeholder:h("filterByAction"),value:c,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActionTypeAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsx)("input",{type:"text",placeholder:h("filterByActor"),value:x,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActorAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsx)("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] transition-colors focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:h("search")})]}),i&&(0,t.jsx)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:i}),(0,t.jsx)("div",{className:"overflow-x-auto rounded-xl border border-[var(--color-border)]",children:(0,t.jsxs)("table",{className:"w-full text-sm",role:"table","aria-label":h("tableAria"),children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"bg-[var(--color-bg-alt)] border-b border-[var(--color-border)]",children:[(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("timestamp")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("action")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("actor")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("target")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("details")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("ipAddress")})]})}),(0,t.jsx)("tbody",{children:0!==e.length||a?e.map(e=>{var r;return(0,t.jsxs)("tr",{className:"border-b border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3 whitespace-nowrap text-[var(--color-text-muted)] font-mono text-xs",children:(e=>{try{return new Date(e).toLocaleString()}catch{return e}})(e.timestamp)}),(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${(r=e.action).includes("delete")||r.includes("remove")?"bg-red-500/15 text-red-400 border-red-500/20":r.includes("create")||r.includes("add")?"bg-green-500/15 text-green-400 border-green-500/20":r.includes("update")||r.includes("change")?"bg-blue-500/15 text-blue-400 border-blue-500/20":r.includes("login")||r.includes("auth")?"bg-purple-500/15 text-purple-400 border-purple-500/20":"bg-gray-500/15 text-gray-400 border-gray-500/20"}`,children:e.action})}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-main)]",children:e.actor}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[200px] truncate",children:e.target||h("notAvailable")}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[300px] truncate font-mono text-xs",children:e.details?JSON.stringify(e.details):h("notAvailable")}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] font-mono text-xs whitespace-nowrap",children:e.ip_address||h("notAvailable")})]},e.id)}):(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-text-muted)]",children:h("noEntries")})})})]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-xs text-[var(--color-text-muted)]",children:h("showing",{count:e.length,offset:m})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{onClick:()=>p(Math.max(0,m-25)),disabled:0===m,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:["← ",h("previous")]}),(0,t.jsxs)("button",{onClick:()=>p(m+25),disabled:!b,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:[h("next")," →"]})]})]})]})}function u(){let[e,i]=(0,r.useState)("request-logs"),n=(0,s.useTranslations)("logs");return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)(o.SegmentedControl,{options:[{value:"request-logs",label:n("requestLogs")},{value:"proxy-logs",label:n("proxyLogs")},{value:"audit-logs",label:n("auditLog")},{value:"console",label:n("console")}],value:e,onChange:i}),"request-logs"===e&&(0,t.jsx)(l.RequestLoggerV2,{}),"proxy-logs"===e&&(0,t.jsx)(a.ProxyLogger,{}),"audit-logs"===e&&(0,t.jsx)(x,{}),"console"===e&&(0,t.jsx)(d,{})]})}e.s(["default",()=>u],837626)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565650,e=>{"use strict";e.i(342923),e.i(80173),e.i(907714),e.i(393718),e.i(703166),e.i(454149),e.i(822124),e.i(969353),e.i(635055),e.i(897844),e.i(450222),e.i(647829),e.i(6998),e.i(982131),e.i(116016),e.i(279743),e.i(193464),e.i(548036),e.i(566770),e.i(953789),e.i(8839),e.i(227404),e.i(621745),e.i(567955),e.i(17517),e.i(419947),e.i(323060),e.i(642440),e.i(629342),e.i(816062),e.i(690777),e.i(563201),e.i(115243),e.i(165149),e.i(359505),e.s([],565650)},643953,e=>{"use strict";var t=e.i(323060);e.s(["SegmentedControl",()=>t.default])},101208,426277,e=>{"use strict";var t=e.i(953789);e.s(["RequestLoggerV2",()=>t.default],101208);var r=e.i(227404);e.s(["ProxyLogger",()=>r.default],426277)},837626,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.i(565650);var l=e.i(101208),a=e.i(426277),o=e.i(643953),s=e.i(948148),i=e.i(950914);let n={debug:"text-gray-400",trace:"text-gray-500",info:"text-cyan-400",warn:"text-yellow-400",error:"text-red-400",fatal:"text-fuchsia-400"},c={debug:"bg-gray-500/10 border-gray-500/20",trace:"bg-gray-500/10 border-gray-500/20",info:"bg-cyan-500/10 border-cyan-500/20",warn:"bg-yellow-500/10 border-yellow-500/20",error:"bg-red-500/10 border-red-500/20",fatal:"bg-fuchsia-500/10 border-fuchsia-500/20"};function d(){let e=(0,s.useTranslations)("loggers"),[l,a]=(0,r.useState)([]),[o,d]=(0,r.useState)(!0),[x,u]=(0,r.useState)(null),[m,b]=(0,r.useState)("all"),[p,g]=(0,r.useState)(""),[h,v]=(0,r.useState)(!0),[f,y]=(0,r.useState)(null),[j,N]=(0,r.useState)(null),w=(0,r.useRef)(null),S=(0,r.useCallback)(async()=>{try{let e=new URLSearchParams;"all"!==m&&e.set("level",m),e.set("limit","500");let t=await fetch(`/api/logs/console?${e.toString()}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();a(r),y(new Date),u(null)}catch(e){u(e.message||"Failed to fetch logs")}finally{d(!1)}},[m]);(0,r.useEffect)(()=>{S();let e=setInterval(S,5e3);return()=>clearInterval(e)},[S]),(0,r.useEffect)(()=>{h&&w.current&&(w.current.scrollTop=w.current.scrollHeight)},[l,h]);let L=async(e,t)=>{let r=JSON.stringify(e,null,2);await (0,i.copyToClipboard)(r)?(u(null),N(t),setTimeout(()=>N(null),2e3)):u("Failed to copy log entry")},k=p?l.filter(e=>JSON.stringify(e).toLowerCase().includes(p.toLowerCase())):l;return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",children:[(0,t.jsxs)("select",{value:m,onChange:e=>b(e.target.value),"aria-label":"Filter by log level",className:"px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] focus:outline-2 focus:outline-[var(--color-accent)]",children:[(0,t.jsx)("option",{value:"all",children:e("allLevels")}),(0,t.jsx)("option",{value:"debug",children:"Debug+"}),(0,t.jsx)("option",{value:"info",children:"Info+"}),(0,t.jsx)("option",{value:"warn",children:"Warn+"}),(0,t.jsx)("option",{value:"error",children:"Error+"})]}),(0,t.jsx)("input",{type:"text",placeholder:"Search logs...",value:p,onChange:e=>g(e.target.value),"aria-label":"Search log entries",className:"flex-1 min-w-[200px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsxs)("button",{onClick:()=>v(!h),title:h?"Disable auto-scroll":"Enable auto-scroll",className:`px-3 py-2 rounded-lg text-sm font-medium border transition-colors ${h?"bg-cyan-500/15 text-cyan-400 border-cyan-500/30":"bg-[var(--color-bg)] text-[var(--color-text-muted)] border-[var(--color-border)]"}`,children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-1",children:h?"vertical_align_bottom":"lock"}),"Auto-scroll"]}),(0,t.jsx)("button",{onClick:S,disabled:o,className:"px-3 py-2 rounded-lg text-sm font-medium bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-50 transition-colors",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle",children:"refresh"})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto text-xs text-[var(--color-text-muted)]",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,t.jsxs)("span",{children:[k.length," entries"]}),(0,t.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,t.jsx)("span",{children:"Last 1h"}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,t.jsxs)("span",{children:["Updated ",f.toLocaleTimeString()]})]})]})]}),x&&(0,t.jsxs)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-2",children:"error"}),x,(0,t.jsx)("span",{className:"text-xs ml-2 opacity-70",children:"— Make sure the application is writing logs to file (LOG_TO_FILE=true)"})]}),(0,t.jsxs)("div",{ref:w,className:"rounded-xl border border-[var(--color-border)] bg-[#0d1117] overflow-auto font-mono text-xs leading-relaxed",style:{maxHeight:"calc(100vh - 340px)",minHeight:"400px"},role:"log","aria-label":"Application console logs","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"sticky top-0 z-10 px-4 py-2 bg-[#161b22] border-b border-[#30363d] flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,t.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"}),(0,t.jsx)("span",{className:"ml-3 text-[#8b949e] text-[11px]",children:"OmniRoute — Application Console"})]}),(0,t.jsxs)("div",{className:"p-3 space-y-px",children:[0!==k.length||o?k.map((e,r)=>{let l=(e.level||"info").toLowerCase(),a=n[l]||n.info,o=c[l]||"",s=e.component||e.module||"",i=e.msg||e.message||"";return(0,t.jsxs)("div",{className:`group flex items-start gap-2 px-2 py-1 rounded hover:bg-white/5 transition-colors ${"error"===l||"fatal"===l?"bg-red-500/5":""}`,children:[(0,t.jsx)("span",{className:"text-[#484f58] whitespace-nowrap shrink-0 select-none",children:(e=>{try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return e}})(e.timestamp)}),(0,t.jsx)("span",{className:`inline-block px-1.5 py-0 rounded text-[10px] font-semibold uppercase border shrink-0 ${a} ${o}`,children:l.padEnd(5)}),s&&(0,t.jsxs)("span",{className:"text-purple-400/80 shrink-0",children:["[",s,"]"]}),(0,t.jsxs)("span",{className:"text-[#c9d1d9] flex-1 break-all",children:[i,e.correlationId&&(0,t.jsxs)("span",{className:"text-[#484f58] ml-2",children:["cid:",e.correlationId.slice(0,8)]})]}),(0,t.jsx)("button",{onClick:()=>L(e,r),title:"Copy log entry",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 text-[#8b949e] hover:text-white",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:j===r?"check":"content_copy"})})]},r)}):(0,t.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[40px] block mb-2 opacity-30",children:"terminal"}),(0,t.jsx)("p",{children:e("noLogEntries")}),(0,t.jsx)("p",{className:"text-[10px] mt-1 opacity-60",children:"Ensure LOG_TO_FILE=true is set in your .env file"})]}),o&&0===k.length&&(0,t.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[24px] animate-spin block mb-2",children:"progress_activity"}),"Loading logs..."]})]})]})]})}function x(){let[e,l]=(0,r.useState)([]),[a,o]=(0,r.useState)(!0),[i,n]=(0,r.useState)(null),[c,d]=(0,r.useState)(""),[x,u]=(0,r.useState)(""),[m,b]=(0,r.useState)(0),[p,g]=(0,r.useState)(!1),h=(0,s.useTranslations)("logs"),v=(0,r.useCallback)(async()=>{o(!0),n(null);try{let e=new URLSearchParams;c&&e.set("action",c),x&&e.set("actor",x),e.set("limit",String(26)),e.set("offset",String(m));let t=await fetch(`/api/compliance/audit-log?${e.toString()}`);if(!t.ok)throw Error(h("failedFetchAuditLog"));let r=await t.json();g(r.length>25),l(r.slice(0,25))}catch(e){n(e.message||h("failedFetchAuditLog"))}finally{o(!1)}},[c,x,m,h]);(0,r.useEffect)(()=>{v()},[v]);let f=()=>{b(0),v()};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-[var(--color-text-main)]",children:h("auditLog")}),(0,t.jsx)("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h("auditLogDesc")})]}),(0,t.jsx)("button",{onClick:v,disabled:a,"aria-label":h("refreshAuditLogAria"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] transition-colors disabled:opacity-50",children:a?h("loading"):h("refresh")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",role:"search","aria-label":h("filterEntriesAria"),children:[(0,t.jsx)("input",{type:"text",placeholder:h("filterByAction"),value:c,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActionTypeAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsx)("input",{type:"text",placeholder:h("filterByActor"),value:x,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActorAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,t.jsx)("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] transition-colors focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:h("search")})]}),i&&(0,t.jsx)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:i}),(0,t.jsx)("div",{className:"overflow-x-auto rounded-xl border border-[var(--color-border)]",children:(0,t.jsxs)("table",{className:"w-full text-sm",role:"table","aria-label":h("tableAria"),children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"bg-[var(--color-bg-alt)] border-b border-[var(--color-border)]",children:[(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("timestamp")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("action")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("actor")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("target")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("details")}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("ipAddress")})]})}),(0,t.jsx)("tbody",{children:0!==e.length||a?e.map(e=>{var r;return(0,t.jsxs)("tr",{className:"border-b border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] transition-colors",children:[(0,t.jsx)("td",{className:"px-4 py-3 whitespace-nowrap text-[var(--color-text-muted)] font-mono text-xs",children:(e=>{try{return new Date(e).toLocaleString()}catch{return e}})(e.timestamp)}),(0,t.jsx)("td",{className:"px-4 py-3",children:(0,t.jsx)("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${(r=e.action).includes("delete")||r.includes("remove")?"bg-red-500/15 text-red-400 border-red-500/20":r.includes("create")||r.includes("add")?"bg-green-500/15 text-green-400 border-green-500/20":r.includes("update")||r.includes("change")?"bg-blue-500/15 text-blue-400 border-blue-500/20":r.includes("login")||r.includes("auth")?"bg-purple-500/15 text-purple-400 border-purple-500/20":"bg-gray-500/15 text-gray-400 border-gray-500/20"}`,children:e.action})}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-main)]",children:e.actor}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[200px] truncate",children:e.target||h("notAvailable")}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[300px] truncate font-mono text-xs",children:e.details?JSON.stringify(e.details):h("notAvailable")}),(0,t.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] font-mono text-xs whitespace-nowrap",children:e.ip_address||h("notAvailable")})]},e.id)}):(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-text-muted)]",children:h("noEntries")})})})]})}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-xs text-[var(--color-text-muted)]",children:h("showing",{count:e.length,offset:m})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{onClick:()=>b(Math.max(0,m-25)),disabled:0===m,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:["← ",h("previous")]}),(0,t.jsxs)("button",{onClick:()=>b(m+25),disabled:!p,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:[h("next")," →"]})]})]})]})}let u=[{label:"1h",hours:1},{label:"6h",hours:6},{label:"12h",hours:12},{label:"24h",hours:24}],m={"request-logs":"request-logs","proxy-logs":"proxy-logs","audit-logs":"call-logs",console:"call-logs"};function b(){let[e,i]=(0,r.useState)("request-logs"),[n,c]=(0,r.useState)(!1),[b,p]=(0,r.useState)(!1),g=(0,r.useRef)(null),h=(0,s.useTranslations)("logs");async function v(t){p(!0),c(!1);try{let r=m[e]||"call-logs",l=await fetch(`/api/logs/export?hours=${t}&type=${r}`);if(!l.ok)throw Error("Export failed");let a=await l.blob(),o=URL.createObjectURL(a),s=document.createElement("a");s.href=o,s.download=`omniroute-${r}-${t}h-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)}catch(e){console.error("Export failed:",e)}finally{p(!1)}}return(0,r.useEffect)(()=>{function e(e){g.current&&!g.current.contains(e.target)&&c(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[(0,t.jsx)(o.SegmentedControl,{options:[{value:"request-logs",label:h("requestLogs")},{value:"proxy-logs",label:h("proxyLogs")},{value:"audit-logs",label:h("auditLog")},{value:"console",label:h("console")}],value:e,onChange:i}),(0,t.jsxs)("div",{className:"relative",ref:g,children:[(0,t.jsxs)("button",{id:"export-logs-btn",onClick:()=>c(!n),disabled:b,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-[var(--card-bg,#1e1e2e)] border border-[var(--border,#333)] text-[var(--text-secondary,#aaa)] hover:text-[var(--text-primary,#fff)] hover:border-[var(--accent,#7c3aed)] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",strokeLinecap:"round",strokeLinejoin:"round"})}),b?"Exporting...":"Export"]}),n&&(0,t.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-lg bg-[var(--card-bg,#1e1e2e)] border border-[var(--border,#333)] shadow-xl overflow-hidden animate-in fade-in",children:[(0,t.jsx)("div",{className:"px-3 py-2 text-xs text-[var(--text-muted,#666)] border-b border-[var(--border,#333)] font-medium",children:"Time Range"}),u.map(e=>(0,t.jsxs)("button",{id:`export-${e.hours}h-btn`,onClick:()=>v(e.hours),className:"w-full px-3 py-2 text-sm text-left hover:bg-[var(--hover-bg,#2a2a3e)] text-[var(--text-secondary,#aaa)] hover:text-[var(--text-primary,#fff)] transition-colors flex items-center justify-between",children:[(0,t.jsxs)("span",{children:["Last ",e.label]}),(0,t.jsx)("span",{className:"text-xs text-[var(--text-muted,#666)]",children:24===e.hours?"default":""})]},e.hours))]})]})]}),"request-logs"===e&&(0,t.jsx)(l.RequestLoggerV2,{}),"proxy-logs"===e&&(0,t.jsx)(a.ProxyLogger,{}),"audit-logs"===e&&(0,t.jsx)(x,{}),"console"===e&&(0,t.jsx)(d,{})]})}e.s(["default",()=>b],837626)}]);
|