9router 0.2.78 → 0.2.80
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 +40 -40
- package/app/.next/build-manifest.json +3 -3
- 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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +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/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +3 -3
- package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +2 -2
- package/app/.next/server/app/callback.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +2 -2
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +2 -2
- package/app/.next/server/app/landing.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +3 -3
- package/app/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +40 -40
- package/app/.next/server/chunks/3110.js +2 -2
- package/app/.next/server/chunks/3990.js +3 -3
- package/app/.next/server/chunks/412.js +3 -11
- package/app/.next/server/chunks/5330.js +11 -3
- package/app/.next/server/chunks/7341.js +1 -1
- package/app/.next/server/chunks/7647.js +1 -1
- package/app/.next/server/chunks/8031.js +1 -1
- package/app/.next/server/chunks/8152.js +1 -1
- package/app/.next/server/chunks/8954.js +1 -1
- package/app/.next/server/chunks/9718.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/pages/404.html +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/{5497-ad7fb90ac4a481cb.js → 5497-22ff80798e3ea482.js} +2 -2
- package/app/.next/static/chunks/8729-357c4b76a239bd75.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-7b546958559f0a9d.js +1 -0
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-fb47ee60e862be6a.js +1 -0
- package/app/.next/static/chunks/{webpack-34add7e75711617f.js → webpack-79a9aedf42a631d8.js} +1 -1
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next/static/chunks/8729-fc0f92ed5e5d2411.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-738071ba2546b274.js +0 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-9d8903890389d598.js +0 -1
- /package/app/.next/static/{jfmN0W_9Gk1asYjgWltrV → aAu7AvTHT43IAQeElfaSV}/_buildManifest.js +0 -0
- /package/app/.next/static/{jfmN0W_9Gk1asYjgWltrV → aAu7AvTHT43IAQeElfaSV}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{4561:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var a=t(5155),r=t(2115),i=t(5497),l=t(1620),n=t(1474),d=t(620);function c(){let{theme:e,setTheme:s,isDark:t}=(0,l.D)(),[c,o]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[h,p]=(0,r.useState)({current:"",new:"",confirm:""}),[u,b]=(0,r.useState)({type:"",message:""}),[j,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{o(e),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]);let g=async e=>{if(e.preventDefault(),h.new!==h.confirm)return void b({type:"error",message:"Passwords do not match"});f(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:h.current,newPassword:h.new})}),s=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),p({current:"",new:"",confirm:""})):b({type:"error",message:s.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{f(!1)}},y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&o(s=>({...s,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},N=async e=>{let s=parseInt(e);if(!isNaN(s)&&!(s<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:s})})).ok&&o(e=>({...e,stickyRoundRobinLimit:s}))}catch(e){console.error("Failed to update sticky limit:",e)}},v=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&o(s=>({...s,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},w=async(e,s)=>{let t=parseInt(s);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})})).ok&&o(s=>({...s,[e]:t}))}catch(s){console.error(`Failed to update ${e}:`,s)}},k=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({observabilityEnabled:e})})).ok&&o(s=>({...s,observabilityEnabled:e}))}catch(e){console.error("Failed to update observabilityEnabled:",e)}},C=!1!==c.observabilityEnabled;return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["All data is stored locally in the ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"~/.9router/db.json"})," file."]})})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===c.requireLogin,onChange:()=>v(!c.requireLogin),disabled:m})]}),!0===c.requireLogin&&(0,a.jsxs)("form",{onSubmit:g,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[c.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:h.current,onChange:e=>p({...h,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:h.new,onChange:e=>p({...h,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:h.confirm,onChange:e=>p({...h,confirm:e.target.value}),required:!0})]})]}),u.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===u.type?"text-red-500":"text-green-500"}`,children:u.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:j,children:c.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===c.fallbackStrategy,onChange:()=>y("round-robin"===c.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===c.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:c.stickyRoundRobinLimit||3,onChange:e=>N(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"round-robin"===c.fallbackStrategy?`Currently distributing requests across all available accounts with ${c.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First)."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"palette"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Appearance"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Dark Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Switch between light and dark themes"})]}),(0,a.jsx)(i.lM,{checked:t,onChange:()=>s(t?"light":"dark")})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(t=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),className:(0,n.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all",e===t?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"light"===t?"light_mode":"dark"===t?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize",children:t})]},t))})})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"database"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Data"})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(0,a.jsx)("div",{className:"flex items-center justify-between p-4 rounded-lg bg-bg border border-border",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Database Location"}),(0,a.jsx)("p",{className:"text-sm text-text-muted font-mono",children:"~/.9router/db.json"})]})})})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Turn request detail recording on/off globally"})]}),(0,a.jsx)(i.lM,{checked:C,onChange:k,disabled:m})]}),(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-4",!C&&"opacity-60"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max Records"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum request detail records to keep (older records are auto-deleted)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10000",step:"100",value:c.observabilityMaxRecords||1e3,onChange:e=>w("observabilityMaxRecords",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Batch Size"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Number of items to accumulate before writing to database (higher = better performance)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"5",max:"100",step:"5",value:c.observabilityBatchSize||20,onChange:e=>w("observabilityBatchSize",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Flush Interval (ms)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum time to wait before flushing buffer (prevents data loss during low traffic)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1000",max:"30000",step:"1000",value:c.observabilityFlushIntervalMs||5e3,onChange:e=>w("observabilityFlushIntervalMs",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max JSON Size (KB)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum size for each JSON field (request/response) before truncation"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10240",step:"100",value:c.observabilityMaxJsonSize||1024,onChange:e=>w("observabilityMaxJsonSize",parseInt(e.target.value)),disabled:m||!C,className:"w-28 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["Current: Keeps ",c.observabilityMaxRecords||1e3," records, batches every ",c.observabilityBatchSize||20," requests, max ",c.observabilityMaxJsonSize||1024,"KB per field"]})]})]})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[d.vQ.name," v",d.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},6086:(e,s,t)=>{Promise.resolve().then(t.bind(t,4561))}},e=>{e.O(0,[600,3624,8729,5497,8441,3794,7358],()=>e(e.s=6086)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7370],{1474:(e,t,a)=>{"use strict";function c(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}a.d(t,{cn:()=>c})},2977:(e,t,a)=>{Promise.resolve().then(a.bind(a,4923))},3321:(e,t,a)=>{"use strict";var c=a(4645);a.o(c,"useParams")&&a.d(t,{useParams:function(){return c.useParams}}),a.o(c,"usePathname")&&a.d(t,{usePathname:function(){return c.usePathname}}),a.o(c,"useRouter")&&a.d(t,{useRouter:function(){return c.useRouter}}),a.o(c,"useSearchParams")&&a.d(t,{useSearchParams:function(){return c.useSearchParams}})},4588:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var c=a(5155),n=a(1474);function i({children:e,title:t,subtitle:a,icon:i,action:s,padding:r="md",hover:o=!1,className:d,...l}){return(0,c.jsxs)("div",{className:(0,n.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",o&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[r],d),...l,children:[(t||s)&&(0,c.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,c.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,c.jsxs)("div",{children:[t&&(0,c.jsx)("h3",{className:"text-text-main font-semibold",children:t}),a&&(0,c.jsx)("p",{className:"text-sm text-text-muted",children:a})]})]}),s]}),e]})}i.Section=function({children:e,className:t,...a}){return(0,c.jsx)("div",{className:(0,n.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...a,children:e})},i.Row=function({children:e,className:t,...a}){return(0,c.jsx)("div",{className:(0,n.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...a,children:e})},i.ListItem=function({children:e,actions:t,className:a,...i}){return(0,c.jsxs)("div",{className:(0,n.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",a),...i,children:[(0,c.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,c.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},4923:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d});var c=a(5155),n=a(2115),i=a(3321),s=a(4588);let r={cc:{"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.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-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:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"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:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"deepseek-v3.2-reasoner":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"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},"glm-5":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},ag:{"gemini-3-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-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},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"claude-sonnet-4-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,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}},gemini:{"gemini-3-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:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"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}},minimax:{"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}};function o({isOpen:e,onClose:t,onSave:a}){let[i,s]=(0,n.useState)({}),[o,d]=(0,n.useState)(!0),[l,u]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&p()},[e]);let p=async()=>{d(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();s(t)}else s(r)}catch(e){console.error("Failed to load pricing:",e),s(r)}finally{d(!1)}},h=async()=>{u(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)a?.(),t();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{u(!1)}},x=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&s(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let m=Object.keys(i).sort(),g=["input","output","cached","reasoning","cache_creation"];return(0,c.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,c.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,c.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,c.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,c.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,c.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,c.jsxs)("div",{className:"space-y-6",children:[(0,c.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,c.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,c.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,c.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 t=Object.keys(i[e]).sort();return(0,c.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,c.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,c.jsx)("div",{className:"overflow-x-auto",children:(0,c.jsxs)("table",{className:"w-full text-sm",children:[(0,c.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,c.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,c.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),g.map(a=>(0,c.jsx)("td",{className:"px-3 py-2",children:(0,c.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][t][a]||0,onChange:c=>{let n;!isNaN(n=parseFloat(c.target.value))&&!(n<0)&&s(c=>{let i={...c};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={}),i[e][t][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))]},t))})]})})]},e)}),0===m.length&&(0,c.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,c.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,c.jsx)("button",{onClick:x,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:l,children:"Reset to Defaults"}),(0,c.jsxs)("div",{className:"flex gap-2",children:[(0,c.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:l,children:"Cancel"}),(0,c.jsx)("button",{onClick:h,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:l,children:l?"Saving...":"Save Changes"})]})]})]})})}function d(){(0,i.useRouter)();let[e,t]=(0,n.useState)(!1),[a,r]=(0,n.useState)(null),[d,l]=(0,n.useState)(!0);(0,n.useEffect)(()=>{u()},[]);let u=async()=>{l(!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{l(!1)}};return(0,c.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,c.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,c.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!a)return 0;let e=0;for(let t in a)e+=Object.keys(a[t]).length;return e})()})]}),(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!a?[]:Object.keys(a).sort()).length})]}),(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":"Active"})]})]}),(0,c.jsxs)(s.default,{className:"p-6",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,c.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Cost Calculation:"})," Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,c.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,c.jsx)("p",{children:(0,c.jsx)("strong",{children:"Token Types:"})}),(0,c.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,c.jsxs)(s.default,{className:"p-6",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,c.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),d?(0,c.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):a?(0,c.jsxs)("div",{className:"space-y-3",children:[Object.keys(a).slice(0,5).map(e=>(0,c.jsxs)("div",{className:"text-sm",children:[(0,c.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,c.jsxs)("span",{className:"text-text-muted",children:[Object.keys(a[e]).length," models"]})]},e)),Object.keys(a).length>5&&(0,c.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(a).length-5," more providers"]})]}):(0,c.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,c.jsx)(o,{isOpen:e,onClose:()=>t(!1),onSave:()=>{u()}})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=2977)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e](r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>"static/chunks/"+e+".0e16c9f0f8b261d7.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},s.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var i,a,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="_N_E:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack","_N_E:"+r),i.src=s.tu(e)),o[e]=[t];var
|
|
1
|
+
(()=>{"use strict";var e,t,r,o,n,i,a,u,l={},c={};function s(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}},o=!0;try{l[e](r,r.exports,s),o=!1}finally{o&&delete c[e]}return r.exports}s.m=l,e=[],s.O=(t,r,o,n)=>{if(r){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[r,o,n];return}for(var a=1/0,i=0;i<e.length;i++){for(var[r,o,n]=e[i],u=!0,l=0;l<r.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](r[l]))?r.splice(l--,1):(u=!1,n<a&&(a=n));if(u){e.splice(i--,1);var c=o();void 0!==c&&(t=c)}}return t},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,o){if(1&o&&(e=this(e)),8&o||"object"==typeof e&&e&&(4&o&&e.__esModule||16&o&&"function"==typeof e.then))return e;var n=Object.create(null);s.r(n);var i={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,s.d(n,i),n},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,r)=>(s.f[r](e,t),t),[])),s.u=e=>"static/chunks/"+e+".0e16c9f0f8b261d7.js",s.miniCssF=e=>{},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},s.l=(e,t,r,n)=>{if(o[e])return void o[e].push(t);if(void 0!==r)for(var i,a,u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var c=u[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="_N_E:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack","_N_E:"+r),i.src=s.tu(e)),o[e]=[t];var f=(t,r)=>{i.onerror=i.onload=null,clearTimeout(d);var n=o[e];if(delete o[e],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(r)),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),a&&document.head.appendChild(i)},s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.tt=()=>(void 0===n&&(n={createScriptURL:e=>e},"u">typeof trustedTypes&&trustedTypes.createPolicy&&(n=trustedTypes.createPolicy("nextjs#bundler",n))),n),s.tu=e=>s.tt().createScriptURL(e),s.p="/_next/",i={8068:0,6930:0},s.f.j=(e,t)=>{var r=s.o(i,e)?i[e]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(6930|8068)$/.test(e))i[e]=0;else{var o=new Promise((t,o)=>r=i[e]=[t,o]);t.push(r[2]=o);var n=s.p+s.u(e),a=Error();s.l(n,t=>{if(s.o(i,e)&&(0!==(r=i[e])&&(i[e]=void 0),r)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,r[1](a)}},"chunk-"+e,e)}},s.O.j=e=>0===i[e],a=(e,t)=>{var r,o,[n,a,u]=t,l=0;if(n.some(e=>0!==i[e])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(u)var c=u(s)}for(e&&e(t);l<n.length;l++)o=n[l],s.o(i,o)&&i[o]&&i[o][0](),i[o]=0;return s.O(c)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u))})();
|
package/app/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8729],{85:(i,e,n)=>{n.d(e,{A:()=>t});var a=n(1934),o=n(9311),d=n(620);function m(i){let e=document.documentElement,n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";"dark"===("system"===i?n:i)?e.classList.add("dark"):e.classList.remove("dark")}let t=(0,a.v)((0,o.Zr)((i,e)=>({theme:d.B2.defaultTheme,setTheme:e=>{i({theme:e}),m(e)},toggleTheme:()=>{let n="dark"===e().theme?"light":"dark";i({theme:n}),m(n)},initTheme:()=>{m(e().theme)}}),{name:d.B2.storageKey}))},620:(i,e,n)=>{n.d(e,{Q2:()=>a.Q2,fg:()=>a.fg,vQ:()=>o,MA:()=>a.MA,zN:()=>a.zN,B2:()=>d});var a=n(2679);n(8777);let o={name:"Endpoint Proxy",description:"AI Infrastructure Management",version:"0.2.78"},d={storageKey:"theme",defaultTheme:"system"}},1110:(i,e,n)=>{n.d(e,{ThemeProvider:()=>m});var a=n(5155),o=n(2115),d=n(85);function m({children:i}){let{initTheme:e}=(0,d.A)();return(0,o.useEffect)(()=>{e()},[e]),(0,a.jsx)(a.Fragment,{children:i})}},2679:(i,e,n)=>{n.d(e,{DI:()=>t,IS:()=>a,JH:()=>m,MA:()=>u,Q2:()=>r,fg:()=>d,gb:()=>c,mq:()=>l,wG:()=>s,wb:()=>p,zN:()=>o,zt:()=>g});let a={iflow:{id:"iflow",alias:"if",name:"iFlow AI",icon:"water_drop",color:"#6366F1"},qwen:{id:"qwen",alias:"qw",name:"Qwen Code",icon:"psychology",color:"#10B981"}},o={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757"},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B"},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6"},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4"},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333"},kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35"},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA"}},d={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#6366F1",textIcon:"OR",passthroughModels:!0},glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL"},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM Coding (China)",icon:"code",color:"#DC2626",textIcon:"GC"},kimi:{id:"kimi",alias:"kimi",name:"Kimi Coding",icon:"psychology",color:"#1E3A8A",textIcon:"KM"},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM"},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC"},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA"},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN"},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE"}},m="openai-compatible-",t="anthropic-compatible-";function l(i){return"string"==typeof i&&i.startsWith(m)}function c(i){return"string"==typeof i&&i.startsWith(t)}let r={...a,...o,...d},u={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"}};function g(i){for(let e of Object.values(r))if(e.alias===i||e.id===i)return e;return null}function s(i){let e=r[i];return e?.alias||i}Object.values(r).reduce((i,e)=>(i[e.alias]=e.id,i),{}),Object.values(r).reduce((i,e)=>(i[e.id]=e.alias,i),{});let p=["antigravity","kiro","github"]},3097:(i,e,n)=>{n.d(e,{KC:()=>d,Xg:()=>o,vq:()=>a});let a={cc:[{id:"claude-opus-4-6",name:"Claude Opus 4.6"},{id:"claude-opus-4-5-20251101",name:"Claude 4.5 Opus"},{id:"claude-sonnet-4-5-20250929",name:"Claude 4.5 Sonnet"},{id:"claude-haiku-4-5-20251001",name:"Claude 4.5 Haiku"}],cx:[{id:"gpt-5.3-codex",name:"GPT 5.3 Codex"},{id:"gpt-5.3-codex-xhigh",name:"GPT 5.3 Codex (xHigh)"},{id:"gpt-5.3-codex-high",name:"GPT 5.3 Codex (High)"},{id:"gpt-5.3-codex-low",name:"GPT 5.3 Codex (Low)"},{id:"gpt-5.3-codex-none",name:"GPT 5.3 Codex (None)"},{id:"gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini"},{id:"gpt-5.1-codex-mini-high",name:"GPT 5.1 Codex Mini (High)"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"},{id:"gpt-5.2",name:"GPT 5.2"},{id:"gpt-5.1-codex-max",name:"GPT 5.1 Codex Max"},{id:"gpt-5.1-codex",name:"GPT 5.1 Codex"},{id:"gpt-5.1",name:"GPT 5.1"},{id:"gpt-5-codex",name:"GPT 5 Codex"},{id:"gpt-5-codex-mini",name:"GPT 5 Codex Mini"}],gc:[{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"}],qw:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"qwen3-coder-flash",name:"Qwen3 Coder Flash"},{id:"vision-model",name:"Qwen3 Vision Model"}],if:[{id:"qwen3-coder-plus",name:"Qwen3 Coder Plus"},{id:"kimi-k2",name:"Kimi K2"},{id:"deepseek-r1",name:"DeepSeek R1"},{id:"glm-4.6",name:"GLM 4.6"}],ag:[{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking"},{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High"},{id:"gemini-3-pro-low",name:"Gemini 3 Pro Low"},{id:"gemini-3-flash",name:"Gemini 3 Flash"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"}],gh:[{id:"gpt-4.1",name:"GPT-4.1"},{id:"gpt-5",name:"GPT-5"},{id:"gpt-5-mini",name:"GPT-5 Mini"},{id:"gpt-5-codex",name:"GPT-5 Codex"},{id:"gpt-5.1",name:"GPT-5.1"},{id:"gpt-5.1-codex",name:"GPT-5.1 Codex"},{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini"},{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max"},{id:"gpt-5.2",name:"GPT-5.2"},{id:"gpt-5.2-codex",name:"GPT-5.2 Codex"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"},{id:"claude-opus-4.1",name:"Claude Opus 4.1"},{id:"claude-opus-4.5",name:"Claude Opus 4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-3-flash-preview",name:"Gemini 3 Flash"},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro"},{id:"grok-code-fast-1",name:"Grok Code Fast 1"},{id:"raptor-mini",name:"Raptor Mini"}],kr:[{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5"}],cu:[{id:"default",name:"Auto (Server Picks)"},{id:"claude-4.5-opus-high-thinking",name:"Claude 4.5 Opus High Thinking"},{id:"claude-4.5-opus-high",name:"Claude 4.5 Opus High"},{id:"claude-4.5-sonnet-thinking",name:"Claude 4.5 Sonnet Thinking"},{id:"claude-4.5-sonnet",name:"Claude 4.5 Sonnet"},{id:"claude-4.5-haiku",name:"Claude 4.5 Haiku"},{id:"claude-4.5-opus",name:"Claude 4.5 Opus"},{id:"gpt-5.2-codex",name:"GPT 5.2 Codex"}],openai:[{id:"gpt-4o",name:"GPT-4o"},{id:"gpt-4o-mini",name:"GPT-4o Mini"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"o1",name:"O1"},{id:"o1-mini",name:"O1 Mini"}],anthropic:[{id:"claude-sonnet-4-20250514",name:"Claude Sonnet 4"},{id:"claude-opus-4-20250514",name:"Claude Opus 4"},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet"}],gemini:[{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview"},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro"},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash"},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite"}],openrouter:[{id:"auto",name:"Auto (Best Available)"}],glm:[{id:"glm-4.7",name:"GLM 4.7"},{id:"glm-4.6v",name:"GLM 4.6V (Vision)"}],"glm-cn":[{id:"glm-4.7",name:"GLM-4.7"},{id:"glm-4.6",name:"GLM-4.6"},{id:"glm-4.5",name:"GLM-4.5"},{id:"glm-4.5-air",name:"GLM-4.5-Air"}],kimi:[{id:"kimi-k2.5",name:"Kimi K2.5"},{id:"kimi-k2.5-thinking",name:"Kimi K2.5 Thinking"},{id:"kimi-latest",name:"Kimi Latest"}],minimax:[{id:"MiniMax-M2.1",name:"MiniMax M2.1"}]},o={claude:"cc",codex:"cx","gemini-cli":"gc",qwen:"qw",iflow:"if",antigravity:"ag",github:"gh",kiro:"kr",cursor:"cu",openai:"openai",anthropic:"anthropic",gemini:"gemini",openrouter:"openrouter",glm:"glm","glm-cn":"glm-cn",kimi:"kimi",minimax:"minimax","minimax-cn":"minimax"};function d(i){return a[o[i]||i]||[]}},8777:(i,e,n)=>{n.d(e,{KC:()=>a.KC,Xg:()=>a.Xg});var a=n(3097);Object.entries(n(2679).Q2).filter(([,i])=>i.passthroughModels).map(([i])=>i),Object.entries(a.vq).flatMap(([i,e])=>e.map(e=>({provider:i,model:e.id,name:e.name})))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{4561:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>c});var a=t(5155),r=t(2115),i=t(5497),l=t(1620),n=t(1474),d=t(620);function c(){let{theme:e,setTheme:s,isDark:t}=(0,l.D)(),[c,o]=(0,r.useState)({fallbackStrategy:"fill-first"}),[m,x]=(0,r.useState)(!0),[h,p]=(0,r.useState)({current:"",new:"",confirm:""}),[u,b]=(0,r.useState)({type:"",message:""}),[j,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{o(e),x(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),x(!1)})},[]);let g=async e=>{if(e.preventDefault(),h.new!==h.confirm)return void b({type:"error",message:"Passwords do not match"});f(!0),b({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:h.current,newPassword:h.new})}),s=await e.json();e.ok?(b({type:"success",message:"Password updated successfully"}),p({current:"",new:"",confirm:""})):b({type:"error",message:s.error||"Failed to update password"})}catch(e){b({type:"error",message:"An error occurred"})}finally{f(!1)}},N=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&o(s=>({...s,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},y=async e=>{let s=parseInt(e);if(!isNaN(s)&&!(s<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:s})})).ok&&o(e=>({...e,stickyRoundRobinLimit:s}))}catch(e){console.error("Failed to update sticky limit:",e)}},v=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&o(s=>({...s,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},w=async(e,s)=>{let t=parseInt(s);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})})).ok&&o(s=>({...s,[e]:t}))}catch(s){console.error(`Failed to update ${e}:`,s)}};return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["All data is stored locally in the ",(0,a.jsx)("code",{className:"bg-sidebar px-1 rounded",children:"~/.9router/db.json"})," file."]})})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===c.requireLogin,onChange:()=>v(!c.requireLogin),disabled:m})]}),!0===c.requireLogin&&(0,a.jsxs)("form",{onSubmit:g,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[c.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:h.current,onChange:e=>p({...h,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:h.new,onChange:e=>p({...h,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:h.confirm,onChange:e=>p({...h,confirm:e.target.value}),required:!0})]})]}),u.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===u.type?"text-red-500":"text-green-500"}`,children:u.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:j,children:c.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===c.fallbackStrategy,onChange:()=>N("round-robin"===c.fallbackStrategy?"fill-first":"round-robin"),disabled:m})]}),"round-robin"===c.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:c.stickyRoundRobinLimit||3,onChange:e=>y(e.target.value),disabled:m,className:"w-20 text-center"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:"round-robin"===c.fallbackStrategy?`Currently distributing requests across all available accounts with ${c.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First)."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"palette"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Appearance"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Dark Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Switch between light and dark themes"})]}),(0,a.jsx)(i.lM,{checked:t,onChange:()=>s(t?"light":"dark")})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(t=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),className:(0,n.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all",e===t?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"light"===t?"light_mode":"dark"===t?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize",children:t})]},t))})})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"database"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Data"})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(0,a.jsx)("div",{className:"flex items-center justify-between p-4 rounded-lg bg-bg border border-border",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Database Location"}),(0,a.jsx)("p",{className:"text-sm text-text-muted font-mono",children:"~/.9router/db.json"})]})})})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max Records"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum request detail records to keep (older records are auto-deleted)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10000",step:"100",value:c.observabilityMaxRecords||1e3,onChange:e=>w("observabilityMaxRecords",parseInt(e.target.value)),disabled:m,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Batch Size"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Number of items to accumulate before writing to database (higher = better performance)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"5",max:"100",step:"5",value:c.observabilityBatchSize||20,onChange:e=>w("observabilityBatchSize",parseInt(e.target.value)),disabled:m,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Flush Interval (ms)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum time to wait before flushing buffer (prevents data loss during low traffic)"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1000",max:"30000",step:"1000",value:c.observabilityFlushIntervalMs||5e3,onChange:e=>w("observabilityFlushIntervalMs",parseInt(e.target.value)),disabled:m,className:"w-28 text-center"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Max JSON Size (KB)"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Maximum size for each JSON field (request/response) before truncation"})]}),(0,a.jsx)(i.pd,{type:"number",min:"100",max:"10240",step:"100",value:c.observabilityMaxJsonSize||1024,onChange:e=>w("observabilityMaxJsonSize",parseInt(e.target.value)),disabled:m,className:"w-28 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["Current: Keeps ",c.observabilityMaxRecords||1e3," records, batches every ",c.observabilityBatchSize||20," requests, max ",c.observabilityMaxJsonSize||1024,"KB per field"]})]})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[d.vQ.name," v",d.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]})})}},6086:(e,s,t)=>{Promise.resolve().then(t.bind(t,4561))}},e=>{e.O(0,[600,3624,8729,5497,8441,3794,7358],()=>e(e.s=6086)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7370],{1474:(e,t,a)=>{"use strict";function c(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}a.d(t,{cn:()=>c})},2977:(e,t,a)=>{Promise.resolve().then(a.bind(a,4923))},3321:(e,t,a)=>{"use strict";var c=a(4645);a.o(c,"useParams")&&a.d(t,{useParams:function(){return c.useParams}}),a.o(c,"usePathname")&&a.d(t,{usePathname:function(){return c.usePathname}}),a.o(c,"useRouter")&&a.d(t,{useRouter:function(){return c.useRouter}}),a.o(c,"useSearchParams")&&a.d(t,{useSearchParams:function(){return c.useSearchParams}})},4588:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var c=a(5155),n=a(1474);function i({children:e,title:t,subtitle:a,icon:i,action:s,padding:r="md",hover:o=!1,className:d,...l}){return(0,c.jsxs)("div",{className:(0,n.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",o&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[r],d),...l,children:[(t||s)&&(0,c.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,c.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,c.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,c.jsxs)("div",{children:[t&&(0,c.jsx)("h3",{className:"text-text-main font-semibold",children:t}),a&&(0,c.jsx)("p",{className:"text-sm text-text-muted",children:a})]})]}),s]}),e]})}i.Section=function({children:e,className:t,...a}){return(0,c.jsx)("div",{className:(0,n.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...a,children:e})},i.Row=function({children:e,className:t,...a}){return(0,c.jsx)("div",{className:(0,n.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...a,children:e})},i.ListItem=function({children:e,actions:t,className:a,...i}){return(0,c.jsxs)("div",{className:(0,n.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",a),...i,children:[(0,c.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,c.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},4923:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d});var c=a(5155),n=a(2115),i=a(3321),s=a(4588);let r={cc:{"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.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-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:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"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:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"deepseek-v3.2-reasoner":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"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-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-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},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"claude-sonnet-4-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-5-thinking":{input:5,output:25,cached:.5,reasoning:37.5,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}},gemini:{"gemini-3-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:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"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}},minimax:{"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}};function o({isOpen:e,onClose:t,onSave:a}){let[i,s]=(0,n.useState)({}),[o,d]=(0,n.useState)(!0),[l,u]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&p()},[e]);let p=async()=>{d(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();s(t)}else s(r)}catch(e){console.error("Failed to load pricing:",e),s(r)}finally{d(!1)}},h=async()=>{u(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)a?.(),t();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{u(!1)}},x=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&s(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let m=Object.keys(i).sort(),g=["input","output","cached","reasoning","cache_creation"];return(0,c.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,c.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,c.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,c.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,c.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,c.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,c.jsxs)("div",{className:"space-y-6",children:[(0,c.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,c.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,c.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,c.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 t=Object.keys(i[e]).sort();return(0,c.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,c.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,c.jsx)("div",{className:"overflow-x-auto",children:(0,c.jsxs)("table",{className:"w-full text-sm",children:[(0,c.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,c.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,c.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,c.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),g.map(a=>(0,c.jsx)("td",{className:"px-3 py-2",children:(0,c.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][t][a]||0,onChange:c=>{let n;!isNaN(n=parseFloat(c.target.value))&&!(n<0)&&s(c=>{let i={...c};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={}),i[e][t][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))]},t))})]})})]},e)}),0===m.length&&(0,c.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,c.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,c.jsx)("button",{onClick:x,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:l,children:"Reset to Defaults"}),(0,c.jsxs)("div",{className:"flex gap-2",children:[(0,c.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:l,children:"Cancel"}),(0,c.jsx)("button",{onClick:h,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:l,children:l?"Saving...":"Save Changes"})]})]})]})})}function d(){(0,i.useRouter)();let[e,t]=(0,n.useState)(!1),[a,r]=(0,n.useState)(null),[d,l]=(0,n.useState)(!0);(0,n.useEffect)(()=>{u()},[]);let u=async()=>{l(!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{l(!1)}};return(0,c.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h1",{className:"text-3xl font-bold",children:"Pricing Settings"}),(0,c.jsx)("p",{className:"text-text-muted mt-1",children:"Configure pricing rates for cost tracking and calculations"})]}),(0,c.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:"Edit Pricing"})]}),(0,c.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Models"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!a)return 0;let e=0;for(let t in a)e+=Object.keys(a[t]).length;return e})()})]}),(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Providers"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!a?[]:Object.keys(a).sort()).length})]}),(0,c.jsxs)(s.default,{className:"p-4",children:[(0,c.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:"Status"}),(0,c.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":"Active"})]})]}),(0,c.jsxs)(s.default,{className:"p-6",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"How Pricing Works"}),(0,c.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Cost Calculation:"})," Costs are calculated based on token usage and pricing rates. Each request's cost is determined by: (input_tokens \xd7 input_rate) + (output_tokens \xd7 output_rate) + (cached_tokens \xd7 cached_rate)"]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Pricing Format:"})," All rates are in ",(0,c.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: An input rate of 2.50 means $2.50 per 1,000,000 input tokens."]}),(0,c.jsx)("p",{children:(0,c.jsx)("strong",{children:"Token Types:"})}),(0,c.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Input:"})," Standard prompt tokens"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Output:"})," Completion/response tokens"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Cached:"})," Cached input tokens (typically 50% of input rate)"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Reasoning:"})," Special reasoning/thinking tokens (fallback to output rate)"]}),(0,c.jsxs)("li",{children:[(0,c.jsx)("strong",{children:"Cache Creation:"})," Tokens used to create cache entries (fallback to input rate)"]})]}),(0,c.jsxs)("p",{children:[(0,c.jsx)("strong",{children:"Custom Pricing:"})," You can override default pricing for specific models. Reset to defaults anytime to restore standard rates."]})]})]}),(0,c.jsxs)(s.default,{className:"p-6",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,c.jsx)("h2",{className:"text-xl font-semibold",children:"Current Pricing Overview"}),(0,c.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:"View Full Details"})]}),d?(0,c.jsx)("div",{className:"text-center py-4 text-text-muted",children:"Loading pricing data..."}):a?(0,c.jsxs)("div",{className:"space-y-3",children:[Object.keys(a).slice(0,5).map(e=>(0,c.jsxs)("div",{className:"text-sm",children:[(0,c.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,c.jsxs)("span",{className:"text-text-muted",children:[Object.keys(a[e]).length," models"]})]},e)),Object.keys(a).length>5&&(0,c.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",Object.keys(a).length-5," more providers"]})]}):(0,c.jsx)("div",{className:"text-text-muted",children:"No pricing data available"})]}),e&&(0,c.jsx)(o,{isOpen:e,onClose:()=>t(!1),onSave:()=>{u()}})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=2977)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|