@rsalmn/extremerouter 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +2 -2
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +2 -2
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/1216.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/2701.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +8 -6
- package/app/.next-cli-build/server/chunks/3571.js +1 -0
- package/app/.next-cli-build/server/chunks/4040.js +2 -2
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/5961.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/7872.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8833.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9422.js +1 -1
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9903.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/1321-959c422643a40389.js +1 -0
- package/app/.next-cli-build/static/chunks/{1696-2558002db021b00d.js → 1696-bafe4b44a7a0439e.js} +1 -1
- package/app/.next-cli-build/static/chunks/1992-b492aa3235a8c259.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-2bcb49ea235529a8.js +7 -0
- package/app/.next-cli-build/static/chunks/705-b7d7b61f41806f0d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-783ab7461aca504e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-8a44865bda8d1138.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a21a13f1ec3bceb0.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-e71aac08cb013b28.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-5fc4c9e1400d741e.js → page-b1c9268d55538aba.js} +1 -1
- package/app/.next-cli-build/static/css/db2812b8f70181df.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.7.4-to-0.7.5-0.7.5-20260722-212802/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +3 -1
- package/app/public/providers/alibaba-cn.svg +11 -0
- package/app/public/providers/alibaba.svg +11 -0
- package/app/public/providers/forge.svg +9 -0
- package/app/public/providers/hcnsec.svg +10 -0
- package/app/public/providers/qwen-cloud-token-plan.svg +8 -0
- package/app/public/providers/qwen-cloud.svg +8 -0
- package/app/public/providers/tokenrouter.svg +15 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/8881.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-118ecb4341892b2c.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-d21171ba9c9fbb8d.js +0 -7
- package/app/.next-cli-build/static/chunks/705-197061b2f061280b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-70b66ef1b070a378.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-ba165a4326051b21.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1e4e44e8b9d5d986.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-0fb5e4d7aabfb5d2.js +0 -1
- package/app/.next-cli-build/static/css/f99fd82ccc97a1ed.css +0 -1
- /package/app/.next-cli-build/static/{3gc9MPTw0g8Wf0FjVPWJh → igzkl-70ERpcxe5WPUc63}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{3gc9MPTw0g8Wf0FjVPWJh → igzkl-70ERpcxe5WPUc63}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.8-to-0.6.9-0.6.9-20260713-141714 → upgrade-0.7.2-to-0.7.3-0.7.3-20260719-100408}/data.sqlite +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.9-to-0.7.0-0.7.0-20260715-111110 → upgrade-0.7.3-to-0.7.4-0.7.4-20260722-105125}/data.sqlite +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6763,exports.ids=[6763],exports.modules={26763:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>e,calculateCostFromTokens:()=>i,getPricingForModel:()=>h});let d={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{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},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.7":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.8":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-fable-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"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.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"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-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"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-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.3-codex-xhigh":{input:10,output:40,cached:5,reasoning:60,cache_creation:10},"gpt-5.3-codex-high":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.3-codex-low":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.3-codex-none":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.4-mini":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.4-nano":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.5":{input:7,output:28,cached:3.5,reasoning:42,cache_creation:7},"gpt-5.6-luna":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-sol":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-terra":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},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},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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},"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},"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},"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},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"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},"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},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{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},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},e={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}}},f=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"*-codex-none",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.3-*",pricing:{input:6,output:24,cached:3,reasoning:36,cache_creation:6}},{pattern:"gpt-5.2-*",pricing:{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5}},{pattern:"gpt-5.1-*",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"gpt-5-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-5*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
|
|
1
|
+
"use strict";exports.id=6763,exports.ids=[6763],exports.modules={26763:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>e,calculateCostFromTokens:()=>i,getPricingForModel:()=>h});let d={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{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},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.7":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.8":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-fable-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"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.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"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-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"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-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.3-codex-xhigh":{input:10,output:40,cached:5,reasoning:60,cache_creation:10},"gpt-5.3-codex-high":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.3-codex-low":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.3-codex-none":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.4-mini":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.4-nano":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.5":{input:7,output:28,cached:3.5,reasoning:42,cache_creation:7},"gpt-5.6-luna":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-sol":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-terra":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},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},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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},"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},"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},"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},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"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},"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},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{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},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},e={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},forge:{"gpt-5.6-sol":{input:5,output:30},"gpt-5.6-terra":{input:2.5,output:15},"gpt-5.6-luna":{input:1,output:6},"gpt-5.5":{input:5,output:40},"gpt-5.3-codex":{input:1.75,output:14},"claude-opus-4-5-20251101":{input:5,output:25},"claude-sonnet-4-5-20250929":{input:3,output:15},"claude-haiku-4-5-20251001":{input:1,output:5},"claude-sonnet-4-6":{input:3,output:15},"claude-sonnet-4-6-thinking":{input:3,output:15},"claude-sonnet-5":{input:2,output:10},"claude-fable-5":{input:10,output:50},"grok-4.5":{input:2,output:6},"grok-4.3":{input:1.25,output:2.5},"grok-build-0.1":{input:1,output:2},"deepseek-r1":{input:.401,output:1.605},"deepseek-v4-flash":{input:.098,output:.196},"deepseek-v4-pro":{input:.304,output:.609},"deepseek-v3.2":{input:.2,output:.301},"deepseek-v3.1":{input:.401,output:1.204},"deepseek-v3":{input:.2,output:.802},"kimi-k3":{input:3,output:15},"kimi-k2.7-code":{input:.625,output:2.599},"kimi-k2.6":{input:.625,output:2.599},"kimi-k2.5":{input:.401,output:2.107},"gemini-3-pro-preview":{input:2,output:12},"gemini-3.5-flash":{input:1.5,output:9},"tencent/hy3":{input:.2,output:.8},"mimo-v2.5":{input:.1,output:.2},"mimo-v2.5-pro":{input:.3,output:.6},"MiniMax-M3":{input:.21,output:.84},"MiniMax-M2.5":{input:.21,output:.84},"glm-5.2":{input:.77,output:2.695}}},f=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"*-codex-none",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.3-*",pricing:{input:6,output:24,cached:3,reasoning:36,cache_creation:6}},{pattern:"gpt-5.2-*",pricing:{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5}},{pattern:"gpt-5.1-*",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"gpt-5-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-5*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=6777,exports.ids=[6777],exports.modules={17660:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({children:a,title:b,subtitle:c,icon:g,action:h,padding:i="md",hover:j=!1,elev:k=!1,className:l,...m}){return(0,d.jsxs)("div",{className:(0,e.cn)("bg-panel border border-border-subtle text-text-main",k?"rounded-panel shadow-[var(--shadow-elev)]":"rounded-panel shadow-[var(--shadow-soft)]",j&&"hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)] transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-5",lg:"p-6"}[i],l),...m,children:[(b||h)&&(0,d.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[g&&(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g})}),(0,d.jsxs)("div",{className:"min-w-0",children:[b&&(0,d.jsx)("h3",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:b}),c&&(0,d.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:c})]})]}),h]}),a]})}f.Section=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("rounded-brand border border-border-subtle bg-surface-2 p-4",b),...c,children:a})},f.Row=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("-mx-3 border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",b),...c,children:a})},f.ListItem=function({children:a,actions:b,className:c,...f}){return(0,d.jsxs)("div",{className:(0,e.cn)("group -mx-3 flex items-center justify-between border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",c),...f,children:[(0,d.jsx)("div",{className:"min-w-0 flex-1",children:a}),b&&(0,d.jsx)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:b})]})}},18982:(a,b,c)=>{c.d(b,{BD:()=>j,PS:()=>h,ad:()=>i,gH:()=>g,uy:()=>k});let d={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{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},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.7":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.8":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-fable-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"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.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"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-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"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-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.3-codex-xhigh":{input:10,output:40,cached:5,reasoning:60,cache_creation:10},"gpt-5.3-codex-high":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.3-codex-low":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.3-codex-none":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.4-mini":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.4-nano":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.5":{input:7,output:28,cached:3.5,reasoning:42,cache_creation:7},"gpt-5.6-luna":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-sol":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-terra":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},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},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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},"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},"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},"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},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"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},"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},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{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},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},e={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}}},f=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"*-codex-none",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.3-*",pricing:{input:6,output:24,cached:3,reasoning:36,cache_creation:6}},{pattern:"gpt-5.2-*",pricing:{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5}},{pattern:"gpt-5.1-*",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"gpt-5-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-5*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(){return e}function j(a){return null==a||isNaN(a)?"$0.00":`$${a.toFixed(2)}`}function k(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}},71404:(a,b,c)=>{c.d(b,{cn:()=>d});function d(...a){return a.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}}};
|
|
1
|
+
"use strict";exports.id=6777,exports.ids=[6777],exports.modules={17660:(a,b,c)=>{c.d(b,{default:()=>f});var d=c(48249),e=c(71404);function f({children:a,title:b,subtitle:c,icon:g,action:h,padding:i="md",hover:j=!1,elev:k=!1,className:l,...m}){return(0,d.jsxs)("div",{className:(0,e.cn)("bg-panel border border-border-subtle text-text-main",k?"rounded-panel shadow-[var(--shadow-elev)]":"rounded-panel shadow-[var(--shadow-soft)]",j&&"hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)] transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-5",lg:"p-6"}[i],l),...m,children:[(b||h)&&(0,d.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[g&&(0,d.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g})}),(0,d.jsxs)("div",{className:"min-w-0",children:[b&&(0,d.jsx)("h3",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:b}),c&&(0,d.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:c})]})]}),h]}),a]})}f.Section=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("rounded-brand border border-border-subtle bg-surface-2 p-4",b),...c,children:a})},f.Row=function({children:a,className:b,...c}){return(0,d.jsx)("div",{className:(0,e.cn)("-mx-3 border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",b),...c,children:a})},f.ListItem=function({children:a,actions:b,className:c,...f}){return(0,d.jsxs)("div",{className:(0,e.cn)("group -mx-3 flex items-center justify-between border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",c),...f,children:[(0,d.jsx)("div",{className:"min-w-0 flex-1",children:a}),b&&(0,d.jsx)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:b})]})}},18982:(a,b,c)=>{c.d(b,{BD:()=>j,PS:()=>h,ad:()=>i,gH:()=>g,uy:()=>k});let d={"claude-opus-4-6":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-opus-4-5-20251101":{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75},"claude-haiku-4-5-20251001":{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25},"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:25,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"claude-opus-4.1":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.6":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-4":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-4.6":{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},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.7":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-4.8":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-sonnet-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-sonnet-5-thinking":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-fable-5":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"gpt-3.5-turbo":{input:.5,output:1.5,cached:.25,reasoning:2.25,cache_creation:.5},"gpt-4":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},"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.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"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-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"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-codex-mini-high":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.3-codex":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.3-codex-xhigh":{input:10,output:40,cached:5,reasoning:60,cache_creation:10},"gpt-5.3-codex-high":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.3-codex-low":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.3-codex-none":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.4":{input:6,output:24,cached:3,reasoning:36,cache_creation:6},"gpt-5.4-mini":{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"gpt-5.4-nano":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.5":{input:7,output:28,cached:3.5,reasoning:42,cache_creation:7},"gpt-5.6-luna":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-sol":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.6-terra":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},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},"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-pro-agent":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash-agent":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3.5-flash-extra-low":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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},"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},"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},"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},"kimi-k2.5":{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2},"kimi-k2.5-thinking":{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8},"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"deepseek-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-r1":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-chat":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v3.2-reasoner":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435},"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},"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},"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.8,cache_creation:.3},"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.5":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"MiniMax-M2.7":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"minimax-m2.5":{input:.6,output:2.4,cached:.3,reasoning:3.6,cache_creation:.6},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2},"oswe-vscode-prime":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"gpt-oss-120b-medium":{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},"coder-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},e={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},forge:{"gpt-5.6-sol":{input:5,output:30},"gpt-5.6-terra":{input:2.5,output:15},"gpt-5.6-luna":{input:1,output:6},"gpt-5.5":{input:5,output:40},"gpt-5.3-codex":{input:1.75,output:14},"claude-opus-4-5-20251101":{input:5,output:25},"claude-sonnet-4-5-20250929":{input:3,output:15},"claude-haiku-4-5-20251001":{input:1,output:5},"claude-sonnet-4-6":{input:3,output:15},"claude-sonnet-4-6-thinking":{input:3,output:15},"claude-sonnet-5":{input:2,output:10},"claude-fable-5":{input:10,output:50},"grok-4.5":{input:2,output:6},"grok-4.3":{input:1.25,output:2.5},"grok-build-0.1":{input:1,output:2},"deepseek-r1":{input:.401,output:1.605},"deepseek-v4-flash":{input:.098,output:.196},"deepseek-v4-pro":{input:.304,output:.609},"deepseek-v3.2":{input:.2,output:.301},"deepseek-v3.1":{input:.401,output:1.204},"deepseek-v3":{input:.2,output:.802},"kimi-k3":{input:3,output:15},"kimi-k2.7-code":{input:.625,output:2.599},"kimi-k2.6":{input:.625,output:2.599},"kimi-k2.5":{input:.401,output:2.107},"gemini-3-pro-preview":{input:2,output:12},"gemini-3.5-flash":{input:1.5,output:9},"tencent/hy3":{input:.2,output:.8},"mimo-v2.5":{input:.1,output:.2},"mimo-v2.5-pro":{input:.3,output:.6},"MiniMax-M3":{input:.21,output:.84},"MiniMax-M2.5":{input:.21,output:.84},"glm-5.2":{input:.77,output:2.695}}},f=[{pattern:"*-codex-xhigh",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"*-codex-high",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-max",pricing:{input:8,output:32,cached:4,reasoning:48,cache_creation:8}},{pattern:"*-codex-mini-*",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-mini",pricing:{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},{pattern:"*-codex-low",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"*-codex-none",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"*-codex",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"claude-opus-*",pricing:{input:5,output:25,cached:.5,reasoning:25,cache_creation:6.25}},{pattern:"claude-sonnet-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"claude-haiku-*",pricing:{input:1,output:5,cached:.1,reasoning:5,cache_creation:1.25}},{pattern:"claude-*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3.75}},{pattern:"gemini-*-flash-lite",pricing:{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},{pattern:"gemini-*-flash",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*-pro",pricing:{input:2,output:12,cached:.25,reasoning:18,cache_creation:2}},{pattern:"gemini-3-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gemini-2.5-*",pricing:{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3}},{pattern:"gemini-*",pricing:{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5}},{pattern:"gpt-5.3-*",pricing:{input:6,output:24,cached:3,reasoning:36,cache_creation:6}},{pattern:"gpt-5.2-*",pricing:{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5}},{pattern:"gpt-5.1-*",pricing:{input:4,output:16,cached:2,reasoning:24,cache_creation:4}},{pattern:"gpt-5-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-5*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"gpt-4o-*",pricing:{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15}},{pattern:"gpt-4o",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-4*",pricing:{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5}},{pattern:"o1-*",pricing:{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},{pattern:"o1",pricing:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15}},{pattern:"o3-*",pricing:{input:10,output:40,cached:5,reasoning:60,cache_creation:10}},{pattern:"o4-*",pricing:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},{pattern:"qwen3-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*-coder-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"qwen*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"kimi-*-thinking",pricing:{input:1.8,output:7.2,cached:.9,reasoning:10.8,cache_creation:1.8}},{pattern:"kimi-k2*",pricing:{input:1.2,output:4.8,cached:.6,reasoning:7.2,cache_creation:1.2}},{pattern:"kimi-*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"deepseek-*reasoner*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-r*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-v*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"deepseek-*",pricing:{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14}},{pattern:"glm-5*",pricing:{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},{pattern:"glm-4*",pricing:{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},{pattern:"glm-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"MiniMax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"minimax-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-code-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},{pattern:"grok-*",pricing:{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}}];function g(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function h(a,b){if(!b)return null;if(a&&e[a]?.[b])return e[a][b];let c=b.includes("/")?b.split("/").pop():b;if(d[c])return d[c];if(d[b])return d[b];for(let{pattern:a,pricing:d}of f)if(g(a,c)||g(a,b))return d;return null}function i(){return e}function j(a){return null==a||isNaN(a)?"$0.00":`$${a.toFixed(2)}`}function k(a,b){if(!a||!b)return 0;let c=0,d=a.prompt_tokens||a.input_tokens||0,e=a.cached_tokens||a.cache_read_input_tokens||0,f=a.cache_creation_input_tokens||0;c+=Math.max(0,d-e-f)*(b.input/1e6),e>0&&(c+=e*((b.cached||b.input)/1e6)),c+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let g=a.reasoning_tokens||0;return g>0&&(c+=g*((b.reasoning||b.output)/1e6)),f>0&&(c+=f*((b.cache_creation||b.input)/1e6)),c}},71404:(a,b,c)=>{c.d(b,{cn:()=>d});function d(...a){return a.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=7872,exports.ids=[7872],exports.modules={1133:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{O:()=>x,g:()=>w});var e=c(48895),f=c(89718),g=c(69788),h=c(6551),i=c(55330),j=c(74129),k=c(39609),l=c(39326),m=c(18271),n=c(30869),o=a([e,i,m]);[e,i,m]=o.then?(await o)():o;let y=n.oc,z={claude:{getUsage:g.g,sendPing:s},codex:{getUsage:h.Tl,sendPing:u}},A=global.__quotaAutoPing??={interval:null,running:!1,resetCache:{},failureCache:{}};function p(a){let b=new Date(a).getTime();return Number.isFinite(b)?new Date(6e4*Math.floor(b/6e4)).toISOString():a}function q(a,b=null){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function r(a){if(!a||!0===a.unlimited)return!1;let b=q(a.remaining);if(null!==b)return b<=0;let c=q(a.used),d=q(a.total);return null!==d&&d>0&&null!==c&&c>=d}async function s(a,b,c,d){return(await d.proxyAwareFetch("https://api.anthropic.com/v1/messages?beta=true",{method:"POST",headers:{...j.$B,Authorization:`Bearer ${a.accessToken}`,"content-type":"application/json"},body:JSON.stringify({model:b.pingModel,max_tokens:b.pingMaxTokens,messages:[{role:"user",content:b.pingText}]})},c)).ok}async function t(a){if("function"==typeof a?.text)return void await a.text();let b=a?.body?.getReader?.();if(b)try{for(;;){let{done:a}=await b.read();if(a)return}}finally{b.releaseLock?.()}}async function u(a,b,c,d){var e;let f=d.getExecutor("codex"),{response:g}=await f.execute({model:b.pingModel,stream:!0,credentials:{accessToken:a.accessToken,connectionId:a.id,providerSpecificData:a.providerSpecificData},proxyOptions:c,log:console,body:{model:b.pingModel,input:(e=b.pingText,[{type:"message",role:"user",content:[{type:"input_text",text:e}]}]),instructions:b.pingInstructions,reasoning:b.pingReasoningEffort?{effort:b.pingReasoningEffort,summary:"auto"}:void 0,store:!1,stream:!0}});if(!g.ok){try{await g.body?.cancel?.()}catch{}return!1}return await t(g),!0}async function v(a,b,c,d,e,f=A){var g,h,i;let j=(g=a.id,`${b}:${g}`),k=f.resetCache[j];if(!c.pingWhenResetAtSlides&&k&&Date.now()<new Date(k).getTime()-y.refreshAheadMs||function(a,b,c=Date.now()){let d=a.failureCache[b];return d&&c-d<y.failureCooldownMs}(f,j))return;let l=(h=await e.resolveConnectionProxyConfig(a.providerSpecificData),{connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1}),m=a;try{m=(await e.refreshAndUpdateCredentials(m,!1,l)).connection}catch(c){f.failureCache[j]=Date.now(),console.warn(`[AutoPing] ${b}:${a.id}: refresh failed: ${c.message}`);return}let n=await d.getUsage(m.accessToken,l),o=n?.quotas||{},q=o?.[c.quotaKey],s=q?.resetAt;if(!s||(f.resetCache[j]=s,c.skipWhenBlockingQuotaExhausted&&(i=c.quotaKey,Object.entries(o||{}).some(([a,b])=>a!==i&&!String(a).toLowerCase().includes("session")&&r(b)))||r(q)))return;let t=Date.now(),u=p(s),w=m.lastPingedResetKey||p(m.lastPingedResetAt);if(!(!function(a,b,c,d){if(a.pingWhenResetAtSlides){let d,e;return!!b&&(d=new Date(b).getTime(),e=new Date(c).getTime(),(Number.isFinite(d)&&Number.isFinite(e)?e-d:0)>=(a.resetAtDriftMs||0))}let e=new Date(c).getTime();return Number.isFinite(e)&&d>=e-y.pingLeadMs}(c,k,s,t)||function(a,b,c=Date.now()){if(!b)return!1;let d=new Date(a.lastPingAt).getTime();return Number.isFinite(d)&&c-d<b}(m,c.minPingIntervalMs,t))&&w!==u){if(!await d.sendPing(m,c,l,e)){f.failureCache[j]=Date.now(),console.warn(`[AutoPing] ${b}:${m.id}: ping failed (reset ${s})`);return}delete f.failureCache[j],await e.updateProviderConnection(m.id,{lastPingedResetAt:s,lastPingedResetKey:u,lastPingAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),console.log(`[AutoPing] ${b}:${m.id}: ping sent (reset ${s})`)}}async function w(a={getSettings:f.mt,getProviderConnections:f.getProviderConnections,updateProviderConnection:f.updateProviderConnection,resolveConnectionProxyConfig:l.B,refreshAndUpdateCredentials:m.refreshAndUpdateCredentials,proxyAwareFetch:k.proxyAwareFetch,getExecutor:i.SB},b=A){if(!b.running){b.running=!0;try{let d=await a.getSettings();for(let[e,f]of Object.entries(y.providers)){let g=z[e];if(!g)continue;let h=d?.[f.settingsKey]?.connections||{};if(0!==Object.keys(h).length)for(let d of(await a.getProviderConnections({provider:e,isActive:!0})).filter(a=>"oauth"===a.authType&&!0===h[a.id]))try{await v(d,e,f,g,a,b)}catch(a){var c;b.failureCache[c=d.id,`${e}:${c}`]=Date.now(),console.warn(`[AutoPing] ${e}:${d.id}: ${a.message}`)}}}catch(a){console.warn("[AutoPing] tick error:",a.message)}finally{b.running=!1}}}function x(){!A.interval&&(console.log("[AutoPing] scheduler started"),w().catch(()=>{}),A.interval=setInterval(()=>{w().catch(()=>{})},y.tickIntervalMs),A.interval.unref&&A.interval.unref())}d()}catch(a){d(a)}})},24467:(a,b,c)=>{c.d(b,{GK:()=>l,MX:()=>k,X6:()=>f,aS:()=>o,hy:()=>h,i5:()=>n,j8:()=>m});var d=c(78474);global._circuitBreakers||(global._circuitBreakers=new Map,global._breakerEmitter=new d.EventEmitter,global._breakerEmitter.setMaxListeners(50));let e=global._circuitBreakers,f=global._breakerEmitter,g={enabled:!0,failureThreshold:5,windowMs:6e4,cooldownMs:3e4,halfOpenMaxCalls:1};function h(a){let b=Number(a)||0;return 0===b||429===b||b>=500}function i(a){let b=e.get(a);return b||(b={provider:a,state:"closed",failures:[],openedAt:null,cooldownEndsAt:null,halfOpenCalls:0},e.set(a,b)),b}function j(a){let b=e.get(a);b&&f.emit("breaker:update",{provider:b.provider,state:b.state,failures:b.failures.length,openedAt:b.openedAt,cooldownEndsAt:b.cooldownEndsAt})}function k(a,b={}){let c={...g,...b?.circuitBreaker||{}};if(!c.enabled)return!1;let d=i(a),e=Date.now();if("open"===d.state)if(!d.cooldownEndsAt||!(e>=d.cooldownEndsAt))return!0;else d.state="halfOpen",d.halfOpenCalls=0,j(a);if("halfOpen"===d.state){if(d.halfOpenCalls>=c.halfOpenMaxCalls)return!0;d.halfOpenCalls++}return!1}function l(a,b={}){let c={...g,...b?.circuitBreaker||{}};if(!c.enabled)return!1;let d=e.get(a);if(!d)return!1;let f=Date.now();return"open"===d.state?!d.cooldownEndsAt||!(f>=d.cooldownEndsAt):"halfOpen"===d.state&&d.halfOpenCalls>=c.halfOpenMaxCalls}function m(a,b={}){if(!({...g,...b?.circuitBreaker||{}}).enabled)return;let c=i(a);("closed"!==c.state||c.failures.length>0)&&(c.state="closed",c.failures=[],c.openedAt=null,c.cooldownEndsAt=null,c.halfOpenCalls=0,j(a))}function n(a,b,c={}){let d={...g,...c?.circuitBreaker||{}};if(!d.enabled)return;let e=i(a),f=Date.now();if("halfOpen"===e.state){e.state="open",e.openedAt=f,e.cooldownEndsAt=f+d.cooldownMs,e.halfOpenCalls=0,e.failures=[{ts:f,status:b}],j(a);return}if("closed"===e.state){e.failures.push({ts:f,status:b});let c=f-d.windowMs;e.failures=e.failures.filter(a=>a.ts>=c),e.failures.length>=d.failureThreshold&&(e.state="open",e.openedAt=f,e.cooldownEndsAt=f+d.cooldownMs,j(a))}}function o(a){let b=e.get(a);b&&"halfOpen"===b.state&&b.halfOpenCalls>0&&b.halfOpenCalls--}},25334:(a,b,c)=>{function d(a){return null==a?"":String(a).trim()}c.d(b,{k:()=>f});let e=["http:","https:","socks5:","socks4:","socks5h:","socks4a:"];function f({outboundProxyEnabled:a,outboundProxyUrl:b,outboundNoProxy:c}={}){if("u"<typeof process||!process.env)return;let g=d(b),h=d(c);if(!a){"1"===process.env.NINE_ROUTER_PROXY_MANAGED&&(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,delete process.env.ALL_PROXY,delete process.env.NO_PROXY,delete process.env.NINE_ROUTER_PROXY_MANAGED,delete process.env.NINE_ROUTER_PROXY_URL,delete process.env.NINE_ROUTER_NO_PROXY);return}let i="1"===process.env.NINE_ROUTER_PROXY_MANAGED,j=!1;if(i&&(g||(delete process.env.HTTP_PROXY,delete process.env.HTTPS_PROXY,delete process.env.ALL_PROXY,delete process.env.NINE_ROUTER_PROXY_URL),h||(delete process.env.NO_PROXY,delete process.env.NINE_ROUTER_NO_PROXY)),g){let a=function(a){if(!a||/[\n\r`$]/.test(a))return null;try{let b=new URL(a);if(!e.includes(b.protocol))return null;return b.href}catch{return null}}(g);a&&(process.env.HTTP_PROXY=a,process.env.HTTPS_PROXY=a,process.env.ALL_PROXY=a,process.env.NINE_ROUTER_PROXY_URL=a,j=!0)}h&&(process.env.NO_PROXY=h,process.env.NINE_ROUTER_NO_PROXY=h,j=!0),j?process.env.NINE_ROUTER_PROXY_MANAGED="1":i&&delete process.env.NINE_ROUTER_PROXY_MANAGED}},30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rsalmn/extremerouter",installCmd:"npm i -g @rsalmn/extremerouter",installCmdLatest:"npm i -g @rsalmn/extremerouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(45699);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=8238,exports.ids=[615,5699,8238],exports.modules={30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rsalmn/extremerouter",installCmd:"npm i -g @rsalmn/extremerouter",installCmdLatest:"npm i -g @rsalmn/extremerouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},35024:(a,b,c)=>{c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(26070);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},38238:(a,b,c)=>{c.d(b,{P:()=>h});var d=c(89718),e=c(30869),f=c(54603);async function g(){let a=null;try{let b=await (0,d.PX)();a=b.find(a=>!1!==a.isActive)?.key||null}catch{}let b={"Content-Type":"application/json"};return a&&(b.Authorization=`Bearer ${a}`),b["x-9r-cli-token"]=await (0,f.Xj)("9r-cli-auth"),b}async function h(a,b,c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`){let d=await g(),f=Date.now();if("embedding"===b){let b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:d,body:JSON.stringify({model:a,input:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0&&Array.isArray(h.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:d,body:JSON.stringify({model:a,prompt:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.msg||h?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,e,g,h,i=new FormData,j=(g=new DataView(e=new ArrayBuffer(44+(b=2*Math.max(1,Math.floor(4e3))))),(h=(a,b)=>{for(let c=0;c<b.length;c+=1)g.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),g.setUint32(4,36+b,!0),h(8,"WAVE"),h(12,"fmt "),g.setUint32(16,16,!0),g.setUint16(20,1,!0),g.setUint16(22,1,!0),g.setUint32(24,16e3,!0),g.setUint32(28,32e3,!0),g.setUint16(32,2,!0),g.setUint16(34,16,!0),h(36,"data"),g.setUint32(40,b,!0),new Blob([e],{type:"audio/wav"}));i.append("file",j,"test.wav"),i.append("model",a);let k=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(d).filter(([a])=>"content-type"!==a.toLowerCase())),body:i,signal:AbortSignal.timeout(15e3)}),l=Date.now()-f,m=await k.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!k.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:`HTTP ${k.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:k.status}}return("string"==typeof n?.text?n.text:"").trim()?{ok:!0,latencyMs:l,error:null,status:k.status}:{ok:!1,latencyMs:l,status:k.status,error:"Provider returned no transcription text for this model"}}let i=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:d,body:JSON.stringify({model:a,max_tokens:16,stream:!1,messages:[{role:"user",content:"hi"}]}),signal:AbortSignal.timeout(15e3)}),j=Date.now()-f,k=await i.text().catch(()=>""),l=null;try{l=k?JSON.parse(k):null}catch{}if(!i.ok){let a=l?.error?.message||l?.msg||l?.message||l?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${i.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:i.status}}let m=l?.status,n=l?.msg||l?.message;if(null!=m&&"200"!==String(m)&&"0"!==String(m)&&n)return{ok:!1,latencyMs:j,status:i.status,error:`Provider status ${m}: ${String(n).slice(0,240)}`};if(l?.error){let a=l?.error?.message||l?.error||"Provider returned an error";return{ok:!1,latencyMs:j,status:i.status,error:String(a).slice(0,240)}}let o=Array.isArray(l?.choices)&&l.choices.length>0?l:l?.data&&"object"==typeof l.data?l.data:l;return Array.isArray(o?.choices)&&o.choices.length>0?{ok:!0,latencyMs:j,error:null,status:i.status}:{ok:!1,latencyMs:j,status:i.status,error:"Provider returned no completion choices for this model"}}},39006:a=>{a.exports={rE:"0.7.3"}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(91237);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.A.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.comingSoon?{comingSoon:!0}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},45699:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>q,ux:()=>k,OA:()=>l,kt:()=>m,KC:()=>p,SM:()=>i});var d=c(35024),e=c(91237),f=c(26070),g=c(99511);let h="-review";function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}function k(a,b){let c=f.vq[a];return c?(0,g.gr)(c.find(a=>a.id===b)):null}function l(a,b){let c=f.vq[a];if(!c)return null;let d=c.find(a=>a.id===b);return d?.kind||d?.type||null}function m(a,b){let c=f.vq[a],d=c?.find(a=>a.id===b);return d?.upstreamModelId?d.upstreamModelId:"cx"===a&&"string"==typeof b&&b.endsWith(h)?b.slice(0,-h.length):b}let n=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),o=Object.fromEntries(Object.keys(d.xq).map(a=>[a,n[a]||a]));function p(a){let b=o[a]||a;return f.vq[b]||[]}function q(a,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(58273);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(45699);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mY:()=>d.mY,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(39422)}};
|
|
1
|
+
"use strict";exports.id=8238,exports.ids=[615,5699,8238],exports.modules={30869:(a,b,c)=>{c.d(b,{UY:()=>h,eh:()=>f.eh,fg:()=>e.fg,h0:()=>g,oc:()=>i});var d=c(39006),e=c(40615),f=c(81329);d.rE;let g={npmPackageName:"@rsalmn/extremerouter",installCmd:"npm i -g @rsalmn/extremerouter",installCmdLatest:"npm i -g @rsalmn/extremerouter@latest --prefer-online",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},h={maxLines:200,pollIntervalMs:1e3},i={tickIntervalMs:6e4,pingLeadMs:5e3,refreshAheadMs:3e5,failureCooldownMs:9e5,providers:{claude:{settingsKey:"claudeAutoPing",quotaKey:"session (5h)",pingModel:"claude-haiku-4-5-20251001",pingText:"hi",pingMaxTokens:1},codex:{settingsKey:"codexAutoPing",quotaKey:"session",pingWhenResetAtSlides:!0,resetAtDriftMs:3e4,minPingIntervalMs:6e5,skipWhenBlockingQuotaExhausted:!0,pingModel:"gpt-5.5",pingText:"hi",pingInstructions:"Reply with OK.",pingReasoningEffort:"none"}}}},35024:(a,b,c)=>{c.d(b,{Ak:()=>e,Yg:()=>h,sr:()=>d.sr,xq:()=>d.xq});var d=c(26070);function e(a){return(a?.providerSpecificData?.baseUrl?.trim()||"http://localhost:11434").replace(/\/$/,"")}let f=d.xq["xiaomi-tokenplan"]?.regions||{},g=d.xq["xiaomi-tokenplan"]?.defaultRegion;function h(a){return f[a?.providerSpecificData?.region]||f[g]}},38238:(a,b,c)=>{c.d(b,{P:()=>h});var d=c(89718),e=c(30869),f=c(54603);async function g(){let a=null;try{let b=await (0,d.PX)();a=b.find(a=>!1!==a.isActive)?.key||null}catch{}let b={"Content-Type":"application/json"};return a&&(b.Authorization=`Bearer ${a}`),b["x-9r-cli-token"]=await (0,f.Xj)("9r-cli-auth"),b}async function h(a,b,c=`http://127.0.0.1:${process.env.PORT||e.h0.appPort}`){let d=await g(),f=Date.now();if("embedding"===b){let b=await fetch(`${c}/api/v1/embeddings`,{method:"POST",headers:d,body:JSON.stringify({model:a,input:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0&&Array.isArray(h.data[0]?.embedding)?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no embedding data"}}if("image"===b){let b=await fetch(`${c}/api/v1/images/generations`,{method:"POST",headers:d,body:JSON.stringify({model:a,prompt:"test"}),signal:AbortSignal.timeout(15e3)}),e=Date.now()-f,g=await b.text().catch(()=>""),h=null;try{h=g?JSON.parse(g):null}catch{}if(!b.ok){let a=h?.error?.message||h?.msg||h?.message||h?.error||g;return{ok:!1,latencyMs:e,error:`HTTP ${b.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:b.status}}return Array.isArray(h?.data)&&h.data.length>0?{ok:!0,latencyMs:e,error:null,status:b.status}:{ok:!1,latencyMs:e,status:b.status,error:"Provider returned no image data for this model"}}if("stt"===b){let b,e,g,h,i=new FormData,j=(g=new DataView(e=new ArrayBuffer(44+(b=2*Math.max(1,Math.floor(4e3))))),(h=(a,b)=>{for(let c=0;c<b.length;c+=1)g.setUint8(a+c,b.charCodeAt(c))})(0,"RIFF"),g.setUint32(4,36+b,!0),h(8,"WAVE"),h(12,"fmt "),g.setUint32(16,16,!0),g.setUint16(20,1,!0),g.setUint16(22,1,!0),g.setUint32(24,16e3,!0),g.setUint32(28,32e3,!0),g.setUint16(32,2,!0),g.setUint16(34,16,!0),h(36,"data"),g.setUint32(40,b,!0),new Blob([e],{type:"audio/wav"}));i.append("file",j,"test.wav"),i.append("model",a);let k=await fetch(`${c}/api/v1/audio/transcriptions`,{method:"POST",headers:Object.fromEntries(Object.entries(d).filter(([a])=>"content-type"!==a.toLowerCase())),body:i,signal:AbortSignal.timeout(15e3)}),l=Date.now()-f,m=await k.text().catch(()=>""),n=null;try{n=m?JSON.parse(m):null}catch{}if(!k.ok){let a=n?.error?.message||n?.msg||n?.message||n?.error||m;return{ok:!1,latencyMs:l,error:`HTTP ${k.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:k.status}}return("string"==typeof n?.text?n.text:"").trim()?{ok:!0,latencyMs:l,error:null,status:k.status}:{ok:!1,latencyMs:l,status:k.status,error:"Provider returned no transcription text for this model"}}let i=await fetch(`${c}/api/v1/chat/completions`,{method:"POST",headers:d,body:JSON.stringify({model:a,max_tokens:16,stream:!1,messages:[{role:"user",content:"hi"}]}),signal:AbortSignal.timeout(15e3)}),j=Date.now()-f,k=await i.text().catch(()=>""),l=null;try{l=k?JSON.parse(k):null}catch{}if(!i.ok){let a=l?.error?.message||l?.msg||l?.message||l?.error||k;return{ok:!1,latencyMs:j,error:`HTTP ${i.status}${a?`: ${String(a).slice(0,240)}`:""}`,status:i.status}}let m=l?.status,n=l?.msg||l?.message;if(null!=m&&"200"!==String(m)&&"0"!==String(m)&&n)return{ok:!1,latencyMs:j,status:i.status,error:`Provider status ${m}: ${String(n).slice(0,240)}`};if(l?.error){let a=l?.error?.message||l?.error||"Provider returned an error";return{ok:!1,latencyMs:j,status:i.status,error:String(a).slice(0,240)}}let o=Array.isArray(l?.choices)&&l.choices.length>0?l:l?.data&&"object"==typeof l.data?l.data:l;return Array.isArray(o?.choices)&&o.choices.length>0?{ok:!0,latencyMs:j,error:null,status:i.status}:{ok:!1,latencyMs:j,status:i.status,error:"Provider returned no completion choices for this model"}}},39006:a=>{a.exports={rE:"0.7.5"}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(64367);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.A.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.comingSoon?{comingSoon:!0}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},45699:(a,b,c)=>{c.d(b,{Xg:()=>o,PROVIDER_MODELS:()=>f.vq,fZ:()=>j,cY:()=>q,ux:()=>k,OA:()=>l,kt:()=>m,KC:()=>p,SM:()=>i});var d=c(35024),e=c(64367),f=c(26070),g=c(99511);let h="-review";function i(a){return f.vq[a]||[]}function j(a){let b=f.vq[a];return b?.[0]?.id||null}function k(a,b){let c=f.vq[a];return c?(0,g.gr)(c.find(a=>a.id===b)):null}function l(a,b){let c=f.vq[a];if(!c)return null;let d=c.find(a=>a.id===b);return d?.kind||d?.type||null}function m(a,b){let c=f.vq[a],d=c?.find(a=>a.id===b);return d?.upstreamModelId?d.upstreamModelId:"cx"===a&&"string"==typeof b&&b.endsWith(h)?b.slice(0,-h.length):b}let n=Object.fromEntries(e.A.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),o=Object.fromEntries(Object.keys(d.xq).map(a=>[a,n[a]||a]));function p(a){let b=o[a]||a;return f.vq[b]||[]}function q(a,b){return(0,g.g5)(f.vq[a]?.find(a=>a.id===b))}},54603:(a,b,c)=>{c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(58273);let l=h().join(k.n,"machine-id"),m=h().join(k.n,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.n,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},81329:(a,b,c)=>{c.d(b,{CP:()=>f,Xg:()=>d.Xg,eh:()=>e,vq:()=>d.PROVIDER_MODELS});var d=c(45699);Object.entries(c(40615).AI_PROVIDERS).filter(([,a])=>a.passthroughModels).map(([a])=>a);let e=Object.entries(d.PROVIDER_MODELS).flatMap(([a,b])=>b.map(b=>({provider:a,model:b.id,name:b.name}))),f=(a,b=null)=>a?.kind||a?.type||b},89718:(a,b,c)=>{c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,c:()=>d.c,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mY:()=>d.mY,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(39422)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=8271,exports.ids=[615,1477,1998,8271],exports.modules={1477:(a,b,c)=>{c.d(b,{getKiroUsage:()=>g});var d=c(39609),e=c(6382),f=c(24295);async function g(a,b,c=null){let h=b?.authMethod||"builder-id",i="api_key"===h,j=i?{tokentype:"API_KEY"}:{},k="external_idp"===h?{TokenType:"EXTERNAL_IDP"}:{},l=i?b?.profileArn||"":b?.profileArn||(0,e.We)(h),m=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),n=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${m.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...j,...k}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...j,...k},body:JSON.stringify({origin:"AI_EDITOR",...l?{profileArn:l}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...l?{profileArn:l}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...j,...k}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(n=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return n&&"idc"===h?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:n&&("google"===h||"github"===h)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:n?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}},6551:(a,b,c)=>{c.d(b,{RO:()=>m,Tl:()=>k,Yt:()=>l});var d=c(39609),e=c(24295);let f={usageUrl:(0,e.U)("codex").url,resetCreditsUrl:(0,e.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,e.U)("codex").resetCreditsConsumeUrl};function g(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function h(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function i(a){let b=Math.max(0,Math.min(100,(0,e.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,e.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function j(a,b,c){let d=h(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=i(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=i(f),g=!0),g}async function k(a,b=null){try{let c=await (0,d.proxyAwareFetch)(f.usageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let g=await c.json(),i=g.rate_limit||g.rate_limits||g.rate_limits_by_limit_id?.codex||{},k=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(g),l=Math.max(0,(0,e.IQ)(g.rate_limit_reset_credits?.available_count,0)),m={};return j(m,"",i),j(m,"review",k),{plan:g.plan_type||g.summary?.plan||"unknown",limitReached:h(i)?.limit_reached||!1,reviewLimitReached:h(k)?.limit_reached||!1,resetCredits:{availableCount:l},quotas:m}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function l(a,b=null,c=null){if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let h=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null,i={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"};h&&(i["ChatGPT-Account-ID"]=h);let j=await (0,d.proxyAwareFetch)(f.resetCreditsUrl,{method:"GET",headers:i},b),k=null;try{k=await j.json()}catch{k=null}if(!j.ok)throw Error(k?.message||k?.error||k?.detail||`Codex reset credits API unavailable (${j.status}).`);let m=Array.isArray(k?.credits)?k.credits:[];return{availableCount:Math.max(0,(0,e.IQ)(k?.available_count??k?.availableCount,0)),credits:m.map(a=>({status:String(a?.status||"unknown"),grantedAt:g(a?.granted_at??a?.grantedAt),expiresAt:g(a?.expires_at??a?.expiresAt)}))}}async function m(a,b,c=null){let g;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let h=null;try{g=await (0,d.proxyAwareFetch)(f.resetCreditsConsumeUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let e=await g.text();h=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let i=h?.code||null,j=(0,e.IQ)(h?.windows_reset,0);return{ok:g.ok&&("reset"===i||j>0),noCredit:g.ok&&"no_credit"===i,status:g.status,code:i,windowsReset:j,message:h?.message||null,raw:h}}},18271:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>m,refreshAndUpdateCredentials:()=>l});var e=c(48895),f=c(89718),g=c(33815),h=c(55330),i=c(39326),j=c(40615),k=a([e,h]);[e,h]=k.then?(await k)():k;let n=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}async function m(a,{params:b}){let c;try{let{connectionId:a}=await b;if(!(c=await (0,f.Mc)(a)))return Response.json({error:"Connection not found"},{status:404});let d="oauth"===c.authType,e=("apikey"===c.authType||"api_key"===c.authType)&&j.jO.includes(c.provider);if(!d&&!e)return Response.json({message:"Usage not available for this connection"});let h=await (0,i.B)(c.providerSpecificData),k={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1};if(d)try{c=(await l(c,!1,k)).connection}catch(a){return console.error("[Usage API] Credential refresh failed:",a),Response.json({error:`Credential refresh failed: ${a.message}`},{status:401})}let m=await (0,g.my)(c,k);if(d&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return n.some(a=>b.includes(a))}(m)&&c.refreshToken)try{c=(await l(c,!0,k)).connection,m=await (0,g.my)(c,k)}catch(a){console.warn(`[Usage] ${c.provider}: force refresh failed: ${a.message}`)}return Response.json(m)}catch(b){let a=c?.provider??"unknown";return console.warn(`[Usage] ${a}: ${b.message}`),Response.json({error:b.message},{status:500})}}d()}catch(a){d(a)}})},24295:(a,b,c)=>{c.d(b,{IQ:()=>h,U:()=>f,eZ:()=>g,gD:()=>i,u9:()=>j});var d=c(26070),e=c(39609);let f=a=>d.xq[a]?.usage||{};function g(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function h(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function i(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function j(a,b,c=1e4,d=null){let f=new AbortController,g=setTimeout(()=>f.abort(),c);try{return await (0,e.proxyAwareFetch)(a,{...b,signal:f.signal},d)}finally{clearTimeout(g)}}},33815:(a,b,c)=>{c.d(b,{RO:()=>r.RO,Yt:()=>r.Yt,my:()=>O});var d=c(39609),e=c(26070),f=c(24295);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(75924),k=c(74129);let l={...(0,f.U)("antigravity"),...k.XP,userAgent:(0,j.A9)()};async function m(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d=(0,f.gD)(b?.projectId),e="Free";if(!d){let b=await n(a,c);d=(0,f.gD)(b?.cloudaicompanionProject),e=b?.currentTier?.name||e}if(!d)return{plan:e,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let g=await (0,f.u9)((0,f.U)("gemini-cli").quotaUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:d})},1e4,c);if(!g.ok)return{plan:e,message:`Gemini CLI quota error (${g.status}).`};let h=await g.json(),i={};if(Array.isArray(h.buckets))for(let a of h.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);i[a.modelId]={used:d,total:1e3,resetAt:(0,f.eZ)(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:e,quotas:i}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}async function n(a,b=null){try{let c=await (0,f.u9)((0,f.U)("gemini-cli").loadCodeAssistUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:j.Cn})},1e4,b);if(!c.ok)return null;return await c.json()}catch{return null}}async function o(a,b,c=null){try{let b=await p(a,c),d=b?.cloudaicompanionProject||null,e=await (0,f.u9)(l.quotaApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":l.userAgent,"Content-Type":"application/json","X-Client-Name":"antigravity","X-Client-Version":"1.107.0","x-request-source":"local"},body:JSON.stringify({...d?{project:d}:{}})},1e4,c);if(403===e.status)return{message:"Antigravity quota API access forbidden. Chat may still work.",quotas:{}};if(401===e.status)return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}};if(!e.ok)throw Error(`Antigravity API error: ${e.status}`);let g=await e.json(),h={};if(g.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash","gemini-3.1-flash-image","gemini-3-pro-image"];for(let[b,c]of Object.entries(g.models)){if(!c.quotaInfo||c.isInternal||!a.includes(b))continue;let d=c.quotaInfo.remainingFraction||0,e=100*d,g=Math.round(1e3*d),i=1e3-g;h[b]={used:i,total:1e3,resetAt:(0,f.eZ)(c.quotaInfo.resetTime),remainingPercentage:e,unlimited:!1,displayName:c.displayName||b}}}return{plan:b?.currentTier?.name||"Unknown",quotas:h,subscriptionInfo:b}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function p(a,b=null){try{let c=await (0,f.u9)(l.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":l.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:j.Cn,mode:1})},1e4,b);if(!c.ok)return null;return await c.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}}var q=c(69788),r=c(6551),s=c(1477);let t={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function u(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function v(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function w(a){return Math.max(0,Number(u(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function x(a){return Math.max(0,Number(u(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function y(a){return!!(w(a)>0||x(a)>0)||null!==v(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==v(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function z(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=v(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(u(c,e,g))||0),o=l,p=n;l<=0&&(o=100,p=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,g){let h=Number(u(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(u(a,e,g))}(c,...j),k,m)}async function A(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=t[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(y);if(0===p.length)return{message:"MiniMax connected. No quota data was returned."};let q=Date.now(),r=g.includes("/coding_plan/remains"),s={};for(let a of p){let b=function(a){let b=String(u(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);z(s,`${b} (5h)`,a,w,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),z(s,`${b} (7d)`,a,x,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[q,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],r)}if(0===Object.keys(s).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:s}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}let B="codebuddy-cn";function C(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function D(a,b,c,g=null){let h=a||b;if(!h)return{message:"CodeBuddy CN credential not available."};try{let a=await (0,d.proxyAwareFetch)((0,f.U)(B).url,{method:"POST",headers:{...e.xq[B]?.headers||{},Authorization:`Bearer ${h}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},g);if(401===a.status||403===a.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!a.ok)return{message:`CodeBuddy CN quota API error (${a.status}).`};let b=await a.json();if(b?.code!==0)return{message:`CodeBuddy CN quota error: ${b?.msg||"unknown"}`};let c=b?.data?.Response?.Data||{},i=Array.isArray(c.Accounts)?c.Accounts:[];if(0===i.length)return{message:"CodeBuddy CN connected. No credit package found."};let j=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},k=a=>{let b=j(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},l=(a,b)=>j(a)-j(b),m=i.filter(k).sort(l),n=i.filter(a=>!k(a)).sort(l),o={},p={};m.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);p[b]=(p[b]||0)+1,o[p[b]>1?`${b} ${p[b]}`:b]={used:C(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:C(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0}}),n.forEach((a,b)=>{o[`Bonus Pack ${b+1}`]={used:C(a.CapacityUsedPrecise,a.CapacityUsed),total:C(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let q=m[0]||i[0]||{};return{plan:q.PackageName||q.SubProductName||"CodeBuddy CN",quotas:o}}catch(a){return{message:`CodeBuddy CN error: ${a.message}`}}}let E={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url},F=(0,f.U)("vercel-ai-gateway").url;async function G(a,b){try{if(!b?.resourceUrl)return{message:"Qwen connected. No resource URL available."};return{message:"Qwen connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch Qwen usage."}}}async function H(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function I(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function J(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=E["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}async function K(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(F,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function L(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,d.proxyAwareFetch)((0,f.U)("qoder").url,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let e=await c.json().catch(()=>null);if(!e)return{message:"Qoder connected. Usage response was not JSON."};let g=e.userQuota||{},h=e.orgResourcePackage||{},i=Number.isFinite(Number(e.expiresAt))&&Number(e.expiresAt)>0?Number(e.expiresAt):null,j=i?new Date(i).toISOString():null;return{quotas:{user:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:j},organization:{total:Number(h.total)||0,used:Number(h.used)||0,remaining:Number(h.remaining)||0,unit:h.unit||"credits",resetAt:j}},totalUsagePercentage:Number(e.totalUsagePercentage)||0,isQuotaExceeded:!!e.isQuotaExceeded,expiresAt:i}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function M(a,b=null){let c=a?.accessToken;if(!c)return null;let e=(0,f.U)("xai"),g={Authorization:`Bearer ${c}`,Accept:"application/json","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"},[h,i]=await Promise.allSettled([e.billingUrl?(0,d.proxyAwareFetch)(e.billingUrl,{method:"GET",headers:g},b):Promise.reject(Error("no billingUrl")),e.subscriptionUrl?(0,d.proxyAwareFetch)(e.subscriptionUrl,{method:"GET",headers:g},b):Promise.reject(Error("no subscriptionUrl"))]),j=null,k=null;if("fulfilled"===h.status&&h.value?.ok){let a=await h.value.json().catch(()=>null);if(a){let b=(0,f.IQ)(a.credits??a.remaining_credits),c=(0,f.IQ)(a.used_credits??a.used),d=(0,f.IQ)(a.total_credits??a.total);(b>0||d>0||c>0)&&(j={remaining:b,used:c,total:d||b+c,remainingPercentage:d>0?Math.round(b/d*100):null,resetAt:(0,f.eZ)(a.reset_at??a.reset_date)||null})}}if("fulfilled"===i.status&&i.value?.ok){let a=await i.value.json().catch(()=>null);if(a){let b=a.subscription||a;k=b.plan||b.tier||b.name||null}}let l={};return j&&(l.Credits={used:j.used,total:j.total,remaining:j.remaining,remainingPercentage:j.remainingPercentage,resetAt:j.resetAt}),0===Object.keys(l).length&&k&&(l[k]={used:0,total:0,unlimited:!0,remainingPercentage:null}),{quotas:l,plan:k,credits:j}}let N={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>m(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>o(a.accessToken,a.providerSpecificData,a.proxyOptions),claude:a=>(0,q.g)(a.accessToken,a.proxyOptions),codex:a=>(0,r.Tl)(a.accessToken,a.proxyOptions),kiro:a=>(0,s.getKiroUsage)(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:a=>L(a.accessToken,a.proxyOptions),qwen:a=>G(a.accessToken,a.providerSpecificData),iflow:a=>H(a.accessToken),ollama:a=>I(a.accessToken),glm:a=>J(a.apiKey,a.provider,a.proxyOptions),"glm-cn":a=>J(a.apiKey,a.provider,a.proxyOptions),minimax:a=>A(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>A(a.apiKey,a.provider,a.proxyOptions),"vercel-ai-gateway":a=>K(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>D(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),xai:a=>M(a,a.proxyOptions)};async function O(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}},i=N[c];return i?await i({provider:c,accessToken:d,apiKey:e,providerSpecificData:f,providerDataWithProjectId:h,proxyOptions:b}):{message:`Usage API not implemented for ${c}`}}},39326:(a,b,c)=>{c.d(b,{B:()=>f});var d=c(71998);function e(a){return null==a?"":String(a).trim()}async function f(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(91237);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.A.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.comingSoon?{comingSoon:!0}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},69788:(a,b,c)=>{c.d(b,{g:()=>i});var d=c(39609),e=c(74129),f=c(24295);let g={oauthUsageUrl:(0,f.U)("claude").oauthUrl,usageUrl:(0,f.U)("claude").orgUrl,settingsUrl:(0,f.U)("claude").settingsUrl,apiVersion:e.b8},h=new Map;async function i(a,b=null){try{let c=h.get(a);if(c&&Date.now()<c)return await j(a,b);let e=await (0,d.proxyAwareFetch)(g.oauthUsageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion}},b);if(e.ok){let a=await e.json(),b={},c=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,d=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:(0,f.eZ)(a.resets_at),unlimited:!1}};for(let[e,f]of(c(a.five_hour)&&(b["session (5h)"]=d(a.five_hour)),c(a.seven_day)&&(b["weekly (7d)"]=d(a.seven_day)),Object.entries(a)))if(e.startsWith("seven_day_")&&"seven_day"!==e&&c(f)){let a=e.replace("seven_day_","");b[`weekly ${a} (7d)`]=d(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return 429===e.status&&h.set(a,Date.now()+18e4),console.warn(`[Claude Usage] OAuth endpoint returned ${e.status}, falling back to legacy`),await j(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function j(a,b=null){try{let c=await (0,d.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)(g.usageUrl.replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)}};
|
|
1
|
+
"use strict";exports.id=8271,exports.ids=[615,1477,1998,8271],exports.modules={1477:(a,b,c)=>{c.d(b,{getKiroUsage:()=>g});var d=c(39609),e=c(6382),f=c(24295);async function g(a,b,c=null){let h=b?.authMethod||"builder-id",i="api_key"===h,j=i?{tokentype:"API_KEY"}:{},k="external_idp"===h?{TokenType:"EXTERNAL_IDP"}:{},l=i?b?.profileArn||"":b?.profileArn||(0,e.We)(h),m=new URLSearchParams({isEmailRequired:"true",origin:"AI_EDITOR",resourceType:"AGENTIC_REQUEST"}),n=!1,o=[];for(let b of[{name:"codewhisperer-get",run:async()=>(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").cwHost}${(0,f.U)("kiro").limitsPath}?${m.toString()}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","x-amz-user-agent":"aws-sdk-js/1.0.0 KiroIDE","user-agent":"aws-sdk-js/1.0.0 KiroIDE",...j,...k}},c)},{name:"codewhisperer-post",run:async()=>(0,d.proxyAwareFetch)((0,f.U)("kiro").cwHost,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/x-amz-json-1.0","x-amz-target":"AmazonCodeWhispererService.GetUsageLimits",Accept:"application/json",...j,...k},body:JSON.stringify({origin:"AI_EDITOR",...l?{profileArn:l}:{},resourceType:"AGENTIC_REQUEST"})},c)},{name:"q-get",run:async()=>{let b=new URLSearchParams({origin:"AI_EDITOR",...l?{profileArn:l}:{},resourceType:"AGENTIC_REQUEST"});return(0,d.proxyAwareFetch)(`${(0,f.U)("kiro").qHost}${(0,f.U)("kiro").limitsPath}?${b}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json",...j,...k}},c)}}])try{let a=await b.run();if(!a.ok){let c=await a.text().catch(()=>"");(401===a.status||403===a.status)&&(n=!0),o.push(`${b.name}:${a.status}${c?`:${c}`:""}`);continue}let c=await a.json();return function(a){let b=a.usageBreakdownList||[],c={},d=(0,f.eZ)(a.nextDateReset||a.resetDate);return b.forEach(a=>{let b=a.resourceType?.toLowerCase()||"unknown",e=a.currentUsageWithPrecision||0,g=a.usageLimitWithPrecision||0;if(c[b]={used:e,total:g,remaining:g-e,resetAt:d,unlimited:!1},a.freeTrialInfo){let e=a.freeTrialInfo.currentUsageWithPrecision||0,g=a.freeTrialInfo.usageLimitWithPrecision||0;c[`${b}_freetrial`]={used:e,total:g,remaining:g-e,resetAt:(0,f.eZ)(a.freeTrialInfo.freeTrialExpiry||d),unlimited:!1}}}),{plan:a.subscriptionInfo?.subscriptionTitle||"Kiro",quotas:c}}(c)}catch(a){o.push(`${b.name}:${a.message}`)}return n&&"idc"===h?{message:"Kiro quota API is unavailable for the current AWS IAM Identity Center session. Chat may still work. If this persists after renewing your session, reconnect Kiro.",quotas:{}}:n&&("google"===h||"github"===h)?{message:"Kiro quota API authentication expired. Chat may still work.",quotas:{}}:n?{message:"Kiro quota API rejected the current token. Chat may still work.",quotas:{}}:{message:o.length>0?`Unable to fetch Kiro usage right now. (${o[o.length-1]})`:"Unable to fetch Kiro usage right now.",quotas:{}}}},6551:(a,b,c)=>{c.d(b,{RO:()=>m,Tl:()=>k,Yt:()=>l});var d=c(39609),e=c(24295);let f={usageUrl:(0,e.U)("codex").url,resetCreditsUrl:(0,e.U)("codex").resetCreditsUrl,resetCreditsConsumeUrl:(0,e.U)("codex").resetCreditsConsumeUrl};function g(a){if(!a)return null;let b=a instanceof Date?a:new Date("number"==typeof a&&a<1e12?1e3*a:a);return Number.isFinite(b.getTime())?b.toISOString():null}function h(a){return!a||"object"!=typeof a||Array.isArray(a)?null:a.rate_limit&&"object"==typeof a.rate_limit?a.rate_limit:a}function i(a){let b=Math.max(0,Math.min(100,(0,e.IQ)(a?.used_percent??a?.percent_used,0)));return{used:b,total:100,remaining:Math.max(0,100-b),resetAt:(0,e.eZ)(a?.reset_at??a?.resets_at??a?.resetAt??null),unlimited:!1}}function j(a,b,c){let d=h(c);if(!d)return!1;let e=d.primary_window||d.primary||c.primary_window||c.primary,f=d.secondary_window||d.secondary||c.secondary_window||c.secondary,g=!1;return e&&(a[b?`${b}_session`:"session"]=i(e),g=!0),f&&(a[b?`${b}_weekly`:"weekly"]=i(f),g=!0),g}async function k(a,b=null){try{let c=await (0,d.proxyAwareFetch)(f.usageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Codex connected. Usage API temporarily unavailable (${c.status}).`};let g=await c.json(),i=g.rate_limit||g.rate_limits||g.rate_limits_by_limit_id?.codex||{},k=function(a){if(a.code_review_rate_limit||a.review_rate_limit)return a.code_review_rate_limit||a.review_rate_limit;let b=a.rate_limits_by_limit_id;return b&&"object"==typeof b&&!Array.isArray(b)?b.code_review||b.codex_review||b.review||null:(Array.isArray(a.additional_rate_limits)?a.additional_rate_limits:[]).find(a=>{let b=String(a?.limit_name||a?.metered_feature||a?.id||"").toLowerCase();return"code_review"===b||"codex_review"===b||"review"===b||b.includes("review")})||null}(g),l=Math.max(0,(0,e.IQ)(g.rate_limit_reset_credits?.available_count,0)),m={};return j(m,"",i),j(m,"review",k),{plan:g.plan_type||g.summary?.plan||"unknown",limitReached:h(i)?.limit_reached||!1,reviewLimitReached:h(k)?.limit_reached||!1,resetCredits:{availableCount:l},quotas:m}}catch(a){throw Error(`Failed to fetch Codex usage: ${a.message}`)}}async function l(a,b=null,c=null){if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");let h=c?.workspaceId||c?.accountId||c?.chatgptAccountId||null,i={Authorization:`Bearer ${a}`,Accept:"application/json","OpenAI-Beta":"codex-1",originator:"codex_cli_rs"};h&&(i["ChatGPT-Account-ID"]=h);let j=await (0,d.proxyAwareFetch)(f.resetCreditsUrl,{method:"GET",headers:i},b),k=null;try{k=await j.json()}catch{k=null}if(!j.ok)throw Error(k?.message||k?.error||k?.detail||`Codex reset credits API unavailable (${j.status}).`);let m=Array.isArray(k?.credits)?k.credits:[];return{availableCount:Math.max(0,(0,e.IQ)(k?.available_count??k?.availableCount,0)),credits:m.map(a=>({status:String(a?.status||"unknown"),grantedAt:g(a?.granted_at??a?.grantedAt),expiresAt:g(a?.expires_at??a?.expiresAt)}))}}async function m(a,b,c=null){let g;if(!a)throw Error("No Codex access token available. Please re-authorize the connection.");if(!b||"string"!=typeof b)throw Error("A redeem request id is required to consume a Codex reset credit.");let h=null;try{g=await (0,d.proxyAwareFetch)(f.resetCreditsConsumeUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({redeem_request_id:b})},c);let e=await g.text();h=e?JSON.parse(e):null}catch(a){throw Error(`Failed to consume Codex reset credit: ${a.message}`)}let i=h?.code||null,j=(0,e.IQ)(h?.windows_reset,0);return{ok:g.ok&&("reset"===i||j>0),noCredit:g.ok&&"no_credit"===i,status:g.status,code:i,windowsReset:j,message:h?.message||null,raw:h}}},18271:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>m,refreshAndUpdateCredentials:()=>l});var e=c(48895),f=c(89718),g=c(84026),h=c(55330),i=c(39326),j=c(40615),k=a([e,h]);[e,h]=k.then?(await k)():k;let n=["expired","authentication","unauthorized","401","re-authorize"];async function l(a,b=!1,c=null){let d=(0,h.SB)(a.provider),e={accessToken:a.accessToken,refreshToken:a.refreshToken,idToken:a.idToken,expiresAt:a.expiresAt||a.tokenExpiresAt,lastRefreshAt:a.lastRefreshAt,connectionId:a.id,providerSpecificData:a.providerSpecificData,copilotToken:a.providerSpecificData?.copilotToken,copilotTokenExpiresAt:a.providerSpecificData?.copilotTokenExpiresAt};if(!(b||d.needsRefresh(e)))return{connection:a,refreshed:!1};let g=await d.refreshCredentials(e,console,c);if(!g){if(a.accessToken)return{connection:a,refreshed:!1};throw Error("Failed to refresh credentials. Please re-authorize the connection.")}let i={updatedAt:new Date().toISOString()};g.accessToken&&(i.accessToken=g.accessToken),g.refreshToken&&(i.refreshToken=g.refreshToken),g.idToken&&(i.idToken=g.idToken),g.lastRefreshAt&&(i.lastRefreshAt=g.lastRefreshAt),g.expiresIn?(i.expiresAt=new Date(Date.now()+1e3*g.expiresIn).toISOString(),i.expiresIn=g.expiresIn):g.expiresAt&&(i.expiresAt=g.expiresAt);let j={...g.providerSpecificData||{},...g.copilotToken?{copilotToken:g.copilotToken}:{},...g.copilotTokenExpiresAt?{copilotTokenExpiresAt:g.copilotTokenExpiresAt}:{}};return Object.keys(j).length>0&&(i.providerSpecificData={...a.providerSpecificData||{},...j}),await (0,f.updateProviderConnection)(a.id,i),{connection:{...a,...i,providerSpecificData:i.providerSpecificData||a.providerSpecificData},refreshed:!0}}async function m(a,{params:b}){let c;try{let{connectionId:a}=await b;if(!(c=await (0,f.Mc)(a)))return Response.json({error:"Connection not found"},{status:404});let d="oauth"===c.authType,e=("apikey"===c.authType||"api_key"===c.authType)&&j.jO.includes(c.provider);if(!d&&!e)return Response.json({message:"Usage not available for this connection"});let h=await (0,i.B)(c.providerSpecificData),k={connectionProxyEnabled:!0===h.connectionProxyEnabled,connectionProxyUrl:h.connectionProxyUrl||"",connectionNoProxy:h.connectionNoProxy||"",vercelRelayUrl:h.vercelRelayUrl||"",strictProxy:!1};if(d)try{c=(await l(c,!1,k)).connection}catch(a){return console.error("[Usage API] Credential refresh failed:",a),Response.json({error:`Credential refresh failed: ${a.message}`},{status:401})}let m=await (0,g.my)(c,k);if(d&&function(a){if(!a?.message)return!1;let b=a.message.toLowerCase();return n.some(a=>b.includes(a))}(m)&&c.refreshToken)try{c=(await l(c,!0,k)).connection,m=await (0,g.my)(c,k)}catch(a){console.warn(`[Usage] ${c.provider}: force refresh failed: ${a.message}`)}return Response.json(m)}catch(b){let a=c?.provider??"unknown";return console.warn(`[Usage] ${a}: ${b.message}`),Response.json({error:b.message},{status:500})}}d()}catch(a){d(a)}})},24295:(a,b,c)=>{c.d(b,{IQ:()=>h,U:()=>f,eZ:()=>g,gD:()=>i,u9:()=>j});var d=c(26070),e=c(39609);let f=a=>d.xq[a]?.usage||{};function g(a){if(!a)return null;try{if(a instanceof Date)return a.toISOString();if("number"==typeof a)return new Date(a<1e12?1e3*a:a).toISOString();if("string"==typeof a){if(/^\d+$/.test(a)){let b=Number(a);return new Date(b<1e12?1e3*b:b).toISOString()}return new Date(a).toISOString()}return null}catch(b){return console.warn(`Failed to parse reset time: ${a}`,b),null}}function h(a,b=0){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return b}function i(a){return"string"==typeof a?a.trim()||null:a&&"object"==typeof a&&"string"==typeof a.id&&a.id.trim()||null}async function j(a,b,c=1e4,d=null){let f=new AbortController,g=setTimeout(()=>f.abort(),c);try{return await (0,e.proxyAwareFetch)(a,{...b,signal:f.signal},d)}finally{clearTimeout(g)}}},39326:(a,b,c)=>{c.d(b,{B:()=>f});var d=c(71998);function e(a){return null==a?"":String(a).trim()}async function f(a={}){try{let b=e(a?.proxyPoolId),c="__none__"===b?"":b,f=function(a={}){let b=a?.connectionProxyEnabled===!0,c=e(a?.connectionProxyUrl);return{connectionProxyEnabled:b,connectionProxyUrl:c,connectionNoProxy:e(a?.connectionNoProxy)}}(a);if(c){let a=await (0,d.hr)(c),b=e(a?.proxyUrl),f=e(a?.noProxy);if(a&&!0===a.isActive&&b){if("vercel"===a.type||"cloudflare"===a.type||"deno"===a.type)return{source:a.type,proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:f,strictProxy:!0===a.strictProxy,vercelRelayUrl:b};return{source:"pool",proxyPoolId:c,proxyPool:a,connectionProxyEnabled:!0,connectionProxyUrl:b,connectionNoProxy:f,strictProxy:!0===a.strictProxy}}}if(f.connectionProxyEnabled&&f.connectionProxyUrl)return{source:"legacy",proxyPoolId:c||null,proxyPool:null,...f};return{source:"none",proxyPoolId:c||null,proxyPool:null,...f}}catch(a){return console.error("[resolveConnectionProxyConfig] Failed to resolve proxy config:",a),{source:"error",proxyPoolId:null,proxyPool:null,connectionProxyEnabled:!1,connectionProxyUrl:"",connectionNoProxy:"",strictProxy:!1}}}},40615:(a,b,c)=>{c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(64367);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.A.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.A.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{},...a.comingSoon?{comingSoon:!0}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.A.filter(a=>a.features?.usage).map(a=>a.id),y=d.A.filter(a=>a.features?.usageApikey).map(a=>a.id)},69788:(a,b,c)=>{c.d(b,{g:()=>i});var d=c(39609),e=c(74129),f=c(24295);let g={oauthUsageUrl:(0,f.U)("claude").oauthUrl,usageUrl:(0,f.U)("claude").orgUrl,settingsUrl:(0,f.U)("claude").settingsUrl,apiVersion:e.b8},h=new Map;async function i(a,b=null){try{let c=h.get(a);if(c&&Date.now()<c)return await j(a,b);let e=await (0,d.proxyAwareFetch)(g.oauthUsageUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-beta":"oauth-2025-04-20","anthropic-version":g.apiVersion}},b);if(e.ok){let a=await e.json(),b={},c=a=>a&&"object"==typeof a&&"number"==typeof a.utilization,d=a=>{let b=a.utilization,c=Math.max(0,100-b);return{used:b,total:100,remaining:c,remainingPercentage:c,resetAt:(0,f.eZ)(a.resets_at),unlimited:!1}};for(let[e,f]of(c(a.five_hour)&&(b["session (5h)"]=d(a.five_hour)),c(a.seven_day)&&(b["weekly (7d)"]=d(a.seven_day)),Object.entries(a)))if(e.startsWith("seven_day_")&&"seven_day"!==e&&c(f)){let a=e.replace("seven_day_","");b[`weekly ${a} (7d)`]=d(f)}return{plan:"Claude Code",extraUsage:a.extra_usage??null,quotas:b}}return 429===e.status&&h.set(a,Date.now()+18e4),console.warn(`[Claude Usage] OAuth endpoint returned ${e.status}, falling back to legacy`),await j(a,b)}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}async function j(a,b=null){try{let c=await (0,d.proxyAwareFetch)(g.settingsUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let e=await c.json();if(e.organization_id){let c=await (0,d.proxyAwareFetch)(g.usageUrl.replace("{org_id}",e.organization_id),{method:"GET",headers:{Authorization:`Bearer ${a}`,"anthropic-version":g.apiVersion}},b);if(c.ok){let a=await c.json();return{plan:e.plan||"Unknown",organization:e.organization_name,quotas:a}}}return{plan:e.plan||"Unknown",organization:e.organization_name,message:"Claude connected. Usage details require admin access."}}return{message:"Claude connected. Usage API requires admin permissions."}}catch(a){return{message:`Claude connected. Unable to fetch usage: ${a.message}`}}}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,P:()=>d.getProviderConnections,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,rj:()=>d.updateProviderConnection,uL:()=>d.uL,ui:()=>d.ui,uv:()=>d.uv});var d=c(89718)},84026:(a,b,c)=>{c.d(b,{RO:()=>r.RO,Yt:()=>r.Yt,my:()=>R});var d=c(39609),e=c(26070),f=c(24295);let g={apiVersion:e.sr.github?.apiVersion,userAgent:e.sr.github?.userAgent};async function h(a,b,c=null){try{if(!a)throw Error("No GitHub access token available. Please re-authorize the connection.");let b=await (0,d.proxyAwareFetch)((0,f.U)("github").url,{headers:{Authorization:`token ${a}`,Accept:"application/json","X-GitHub-Api-Version":g.apiVersion,"User-Agent":g.userAgent,"Editor-Version":"vscode/1.100.0","Editor-Plugin-Version":"copilot-chat/0.26.7"}},c);if(!b.ok){let a=await b.text();throw Error(`GitHub API error: ${a}`)}let e=await b.json();if(e.quota_snapshots){let a=e.quota_snapshots,b=(0,f.eZ)(e.quota_reset_date);return{plan:e.copilot_plan,resetDate:e.quota_reset_date,quotas:{chat:{...i(a.chat),resetAt:b},completions:{...i(a.completions),resetAt:b},premium_interactions:{...i(a.premium_interactions),resetAt:b}}}}if(e.monthly_quotas||e.limited_user_quotas){let a=e.monthly_quotas||{},b=e.limited_user_quotas||{},c=(0,f.eZ)(e.limited_user_reset_date);return{plan:e.copilot_plan||e.access_type_sku,resetDate:e.limited_user_reset_date,quotas:{chat:{used:b.chat||0,total:a.chat||0,unlimited:!1,resetAt:c},completions:{used:b.completions||0,total:a.completions||0,unlimited:!1,resetAt:c}}}}return{message:"GitHub Copilot connected. Unable to parse quota data."}}catch(a){throw Error(`Failed to fetch GitHub usage: ${a.message}`)}}function i(a){return a?{used:a.entitlement-a.remaining,total:a.entitlement,remaining:a.remaining,unlimited:a.unlimited||!1}:{used:0,total:0,unlimited:!0}}var j=c(75924),k=c(74129);let l={...(0,f.U)("antigravity"),...k.XP,userAgent:(0,j.A9)()};async function m(a,b,c=null){if(!a)return{plan:"Free",message:"Gemini CLI access token not available."};try{let d=(0,f.gD)(b?.projectId),e="Free";if(!d){let b=await n(a,c);d=(0,f.gD)(b?.cloudaicompanionProject),e=b?.currentTier?.name||e}if(!d)return{plan:e,message:"Gemini CLI project ID not available. Reconnect Gemini CLI, or configure a Google Cloud project with Gemini Code Assist access before checking quota."};let g=await (0,f.u9)((0,f.U)("gemini-cli").quotaUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({project:d})},1e4,c);if(!g.ok)return{plan:e,message:`Gemini CLI quota error (${g.status}).`};let h=await g.json(),i={};if(Array.isArray(h.buckets))for(let a of h.buckets){if(!a.modelId||null==a.remainingFraction)continue;let b=Number(a.remainingFraction)||0,c=Math.round(1e3*b),d=Math.max(0,1e3-c);i[a.modelId]={used:d,total:1e3,resetAt:(0,f.eZ)(a.resetTime),remainingPercentage:100*b,unlimited:!1}}return{plan:e,quotas:i}}catch(a){return{message:`Gemini CLI error: ${a.message}`}}}async function n(a,b=null){try{let c=await (0,f.u9)((0,f.U)("gemini-cli").loadCodeAssistUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({metadata:j.Cn})},1e4,b);if(!c.ok)return null;return await c.json()}catch{return null}}async function o(a,b,c=null){try{let b=await p(a,c),d=b?.cloudaicompanionProject||null,e=await (0,f.u9)(l.quotaApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":l.userAgent,"Content-Type":"application/json","X-Client-Name":"antigravity","X-Client-Version":"1.107.0","x-request-source":"local"},body:JSON.stringify({...d?{project:d}:{}})},1e4,c);if(403===e.status)return{message:"Antigravity quota API access forbidden. Chat may still work.",quotas:{}};if(401===e.status)return{message:"Antigravity quota API authentication expired. Chat may still work.",quotas:{}};if(!e.ok)throw Error(`Antigravity API error: ${e.status}`);let g=await e.json(),h={};if(g.models){let a=["gemini-3-flash-agent","gemini-3.5-flash-low","gemini-3.5-flash-extra-low","gemini-pro-agent","gemini-3.1-pro-low","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash","gemini-3.1-flash-image","gemini-3-pro-image"];for(let[b,c]of Object.entries(g.models)){if(!c.quotaInfo||c.isInternal||!a.includes(b))continue;let d=c.quotaInfo.remainingFraction||0,e=100*d,g=Math.round(1e3*d),i=1e3-g;h[b]={used:i,total:1e3,resetAt:(0,f.eZ)(c.quotaInfo.resetTime),remainingPercentage:e,unlimited:!1,displayName:c.displayName||b}}}return{plan:b?.currentTier?.name||"Unknown",quotas:h,subscriptionInfo:b}}catch(a){return console.error("[Antigravity Usage] Error:",a.message,a.cause),{message:`Antigravity error: ${a.message}`}}}async function p(a,b=null){try{let c=await (0,f.u9)(l.loadProjectApiUrl,{method:"POST",headers:{Authorization:`Bearer ${a}`,"User-Agent":l.userAgent,"Content-Type":"application/json","x-request-source":"local"},body:JSON.stringify({metadata:j.Cn,mode:1})},1e4,b);if(!c.ok)return null;return await c.json()}catch(a){return console.error("[Antigravity Subscription] Error:",a.message),null}}var q=c(69788),r=c(6551),s=c(1477);let t={minimax:(0,f.U)("minimax").urls,"minimax-cn":(0,f.U)("minimax-cn").urls};function u(a,b,c){return a&&"object"==typeof a?a[b]??a[c]??null:null}function v(a,b,c){if(!a||"object"!=typeof a)return null;let d=a[b]??a[c];if(null==d)return null;let e=Number(d);return Number.isFinite(e)?Math.max(0,Math.min(100,e)):null}function w(a){return Math.max(0,Number(u(a,"current_interval_total_count","currentIntervalTotalCount"))||0)}function x(a){return Math.max(0,Number(u(a,"current_weekly_total_count","currentWeeklyTotalCount"))||0)}function y(a){return!!(w(a)>0||x(a)>0)||null!==v(a,"current_interval_remaining_percent","currentIntervalRemainingPercent")||null!==v(a,"current_weekly_remaining_percent","currentWeeklyRemainingPercent")}function z(a,b,c,d,e,g,h,i,j,k){let l=d(c),m=v(c,h,i);if(l<=0&&null===m)return;let n=Math.max(0,Number(u(c,e,g))||0),o=l,p=n;l<=0&&(o=100,p=k?Math.round(m/100*o):Math.round(o*(1-m/100))),a[b]=function(a,b,c,d,e=null){var f,g,h;let i=Math.max(0,a),j=d?Math.max(i-b,0):Math.min(Math.max(0,b),i),k=Math.max(i-j,0),l=(f=e,g=k,h=i,null!=f&&Number.isFinite(f)?Math.max(0,Math.min(100,f)):h>0?Math.max(0,Math.min(100,g/h*100)):0);return{used:j,total:i,remaining:k,remainingPercentage:l,resetAt:c,unlimited:!1}}(o,p,function(a,b,c,d,e,g){let h=Number(u(a,c,d))||0;return h>0?new Date(b+h).toISOString():(0,f.eZ)(u(a,e,g))}(c,...j),k,m)}async function A(a,b,c=null){if(!a)return{message:"MiniMax API key not available."};let e=t[b]||[],f="";for(let b=0;b<e.length;b+=1){let g=e[b],h=b<e.length-1;try{let b=await (0,d.proxyAwareFetch)(g,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"}},c),e=await b.text(),i={};if(e)try{i=JSON.parse(e)}catch{i={}}let j=(i?.base_resp??i?.baseResp)||{},k=Number(j.status_code??j.statusCode)||0,l=String(j.status_msg??j.statusMsg??"").trim(),m=`${l} ${e}`.trim(),n=/token plan|coding plan|invalid api key|invalid key|unauthorized|inactive/i;if(401===b.status||403===b.status||1004===k||n.test(m))return{message:"MiniMax API key invalid or inactive. Use an active Token/Coding Plan key."};if(!b.ok){if(f=`MiniMax usage endpoint error (${b.status})`,(404===b.status||405===b.status||b.status>=500)&&h)continue;return{message:`MiniMax connected. ${f}`}}if(0!==k)return{message:`MiniMax connected. ${l||"Upstream quota API error"}`};let o=i?.model_remains??i?.modelRemains,p=(Array.isArray(o)?o:[]).filter(y);if(0===p.length)return{message:"MiniMax connected. No quota data was returned."};let q=Date.now(),r=g.includes("/coding_plan/remains"),s={};for(let a of p){let b=function(a){let b=String(u(a,"model_name","modelName")||"").trim();return b?"MiniMax-M*"===b||"general"===b?"M-series":b.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,a=>a.toUpperCase()).replace(/\bTo\b/g,"to").replace(/\bTts\b/g,"TTS").replace(/\bHd\b/g,"HD"):"MiniMax"}(a);z(s,`${b} (5h)`,a,w,"current_interval_usage_count","currentIntervalUsageCount","current_interval_remaining_percent","currentIntervalRemainingPercent",[q,"remains_time","remainsTime","end_time","endTime"],r),z(s,`${b} (7d)`,a,x,"current_weekly_usage_count","currentWeeklyUsageCount","current_weekly_remaining_percent","currentWeeklyRemainingPercent",[q,"weekly_remains_time","weeklyRemainsTime","weekly_end_time","weeklyEndTime"],r)}if(0===Object.keys(s).length)return{message:"MiniMax connected. Unable to extract quota usage."};return{quotas:s}}catch(a){if(f=a.message,!h)break}}return{message:f?`MiniMax connected. Unable to fetch usage: ${f}`:"MiniMax connected. Unable to fetch usage."}}let B="codebuddy-cn";function C(a,b){let c=Number(a??b);return Number.isFinite(c)?c:0}async function D(a,b,c,g=null){let h=a||b;if(!h)return{message:"CodeBuddy CN credential not available."};try{let a=await (0,d.proxyAwareFetch)((0,f.U)(B).url,{method:"POST",headers:{...e.xq[B]?.headers||{},Authorization:`Bearer ${h}`,"Content-Type":"application/json",Accept:"application/json"},body:"{}"},g);if(401===a.status||403===a.status)return{message:"CodeBuddy CN credential invalid or expired."};if(!a.ok)return{message:`CodeBuddy CN quota API error (${a.status}).`};let b=await a.json();if(b?.code!==0)return{message:`CodeBuddy CN quota error: ${b?.msg||"unknown"}`};let c=b?.data?.Response?.Data||{},i=Array.isArray(c.Accounts)?c.Accounts:[];if(0===i.length)return{message:"CodeBuddy CN connected. No credit package found."};let j=a=>{let b=(0,f.eZ)(a.CycleEndTime);return b?new Date(b).getTime():1/0},k=a=>{let b=j(a),c=Number(a.DeductionEndTime);return Number.isFinite(b)&&Number.isFinite(c)&&c-b>1728e5},l=(a,b)=>j(a)-j(b),m=i.filter(k).sort(l),n=i.filter(a=>!k(a)).sort(l),o={},p={};m.forEach(a=>{let b=function(a){let b=(0,f.eZ)(a.CycleStartTime),c=(0,f.eZ)(a.CycleEndTime);if(b&&c){let a=(new Date(c).getTime()-new Date(b).getTime())/864e5;if(a<=1.5)return"Daily";if(a<=10)return"Weekly"}return"Monthly"}(a);p[b]=(p[b]||0)+1,o[p[b]>1?`${b} ${p[b]}`:b]={used:C(a.CycleCapacityUsedPrecise,a.CycleCapacityUsed),total:C(a.CycleCapacitySizePrecise,a.CycleCapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!0}}),n.forEach((a,b)=>{o[`Bonus Pack ${b+1}`]={used:C(a.CapacityUsedPrecise,a.CapacityUsed),total:C(a.CapacitySizePrecise,a.CapacitySize),resetAt:(0,f.eZ)(a.CycleEndTime),unlimited:!1,recurring:!1}});let q=m[0]||i[0]||{};return{plan:q.PackageName||q.SubProductName||"CodeBuddy CN",quotas:o}}catch(a){return{message:`CodeBuddy CN error: ${a.message}`}}}let E={international:(0,f.U)("glm").url,china:(0,f.U)("glm-cn").url},F=(0,f.U)("vercel-ai-gateway").url;async function G(a,b){try{if(!b?.resourceUrl)return{message:"Qwen connected. No resource URL available."};return{message:"Qwen connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch Qwen usage."}}}async function H(a){try{return{message:"iFlow connected. Usage tracked per request."}}catch(a){return{message:"Unable to fetch iFlow usage."}}}async function I(a,b){try{return{plan:b?.plan||"Free",message:"Ollama Cloud uses a free tier with light usage limits (resets every 5h & 7d). For detailed usage tracking, visit ollama.com/settings/keys.",quotas:[]}}catch(a){return{message:"Unable to fetch Ollama Cloud usage."}}}async function J(a,b,c=null){if(!a)return{message:"GLM API key not available."};let e=E["glm-cn"===b?"china":"international"];try{let b=await (0,d.proxyAwareFetch)(e,{headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},c);if(!b.ok){if(401===b.status)return{message:"GLM API key invalid or expired."};return{message:`GLM quota API error (${b.status}).`}}let f=await b.json(),g=f?.data&&"object"==typeof f.data?f.data:{},h=Array.isArray(g.limits)?g.limits:[],i={};for(let a of h){if(!a||"TOKENS_LIMIT"!==a.type)continue;let b=Number(a.percentage)||0,c=Number(a.nextResetTime)||0,d=Math.max(0,100-b);i.session={used:b,total:100,remaining:d,remainingPercentage:d,resetAt:c>0?new Date(c).toISOString():null,unlimited:!1}}let j="string"==typeof g.level?g.level:"";return{plan:j?j.charAt(0).toUpperCase()+j.slice(1).toLowerCase():"Unknown",quotas:i}}catch(a){return{message:`GLM error: ${a.message}`}}}async function K(a,b=null){if(!a)return{message:"Vercel AI Gateway API key not available."};try{let c=await (0,d.proxyAwareFetch)(F,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(401===c.status||403===c.status)return{message:"Vercel AI Gateway API key invalid or expired."};if(!c.ok){let a=await c.text().catch(()=>""),b=a?`: ${a.slice(0,200)}`:"";return{message:`Vercel AI Gateway credits API error (${c.status})${b}`}}let e=await c.json(),f=Number(e?.balance)||0,g=Number(e?.total_used)||0;if(f<=0&&g<=0)return{plan:"Pay-as-you-go",message:"Vercel AI Gateway connected. No credit allocation found (BYOK or unfunded account).",quotas:{}};return{plan:"Pay-as-you-go",quotas:{"Used (USD)":{used:g,total:0,remaining:0,remainingPercentage:100,unlimited:!0},"Remaining (USD)":{used:f,total:5,remaining:f,remainingPercentage:f/5*100,unlimited:!1}}}}catch(a){return{message:`Vercel AI Gateway error: ${a.message}`}}}async function L(a,b=null){if(!a)return{message:"Qoder usage unavailable: no access token"};try{let c=await (0,d.proxyAwareFetch)((0,f.U)("qoder").url,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json"}},b);if(!c.ok)return{message:`Qoder connected. Usage fetch returned ${c.status}.`};let e=await c.json().catch(()=>null);if(!e)return{message:"Qoder connected. Usage response was not JSON."};let g=e.userQuota||{},h=e.orgResourcePackage||{},i=Number.isFinite(Number(e.expiresAt))&&Number(e.expiresAt)>0?Number(e.expiresAt):null,j=i?new Date(i).toISOString():null;return{quotas:{user:{total:Number(g.total)||0,used:Number(g.used)||0,remaining:Number(g.remaining)||0,unit:g.unit||"credits",resetAt:j},organization:{total:Number(h.total)||0,used:Number(h.used)||0,remaining:Number(h.remaining)||0,unit:h.unit||"credits",resetAt:j}},totalUsagePercentage:Number(e.totalUsagePercentage)||0,isQuotaExceeded:!!e.isQuotaExceeded,expiresAt:i}}catch(a){return{message:`Qoder connected. Unable to fetch usage: ${a.message}`}}}async function M(a,b=null){return a?.providerSpecificData?.mgmtKey||a?.providerDataWithProjectId?.mgmtKey?{quotas:{},plan:null,credits:null,message:"xAI Management API key detected, but the billing endpoint is not yet implemented. Usage tracking for xAI is pending upstream documentation."}:{quotas:{},plan:null,credits:null,message:"xAI removed the public billing API. Usage tracking is only available in the xAI Console at console.x.ai → Billing."}}async function N(a,b={},c=null){let e,g=b?.mgmtKey||a?.providerSpecificData?.mgmtKey;if(!g)return{quotas:{},plan:null,message:"No management key set. Edit the connection and add your TokenRouter management key (separate from the chat API key) to enable wallet tracking."};let h=(0,f.U)("tokenrouter").walletUrl;if(!h)return null;let i={Authorization:`Bearer ${g}`,Accept:"application/json","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"};try{e=await (0,d.proxyAwareFetch)(h,{method:"GET",headers:i},c)}catch{return{quotas:{},plan:null,message:"Could not reach TokenRouter wallet API (network error)."}}if(!e?.ok){let a=e?.status??0;return{quotas:{},plan:null,message:401===a||403===a?"Authentication failed — check that your management key is correct and hasn't expired.":`Wallet API returned HTTP ${a}.`}}let j=await e.json().catch(()=>null);if(!j?.success||!j.data)return{quotas:{},plan:null,message:"Wallet API returned an unexpected response shape."};let k=j.data,l=(0,f.IQ)(k.topUpBalance),m=(0,f.IQ)(k.voucherEfficientAmount),n=(0,f.IQ)(k.toppedUpSpent),o=(0,f.IQ)(k.voucherSpent),p=l+m,q=n+o,r=p+q,s={Wallet:{used:q,total:r,remaining:p,remainingPercentage:r>0?Math.round(p/r*100):null,resetAt:null}};if(l>0||n>0){let a=l+n;s["Top-up"]={used:n,total:a,remaining:l,remainingPercentage:a>0?Math.round(l/a*100):null,resetAt:null}}if(m>0||o>0){let a=m+o;s.Voucher={used:o,total:a,remaining:m,remainingPercentage:a>0?Math.round(m/a*100):null,resetAt:null}}return{quotas:s,plan:null,credits:{remaining:p,used:q,total:r}}}let O={five_hour:"5-Hour",weekly:"Weekly",monthly:"Monthly"};async function P(a,b=null){let c=a?.accessToken||a?.apiKey;if(!c)return null;let e=(0,f.U)("cline").url||"https://api.cline.bot/api/v1/users/me/plan/usage-limits",g=await (0,d.proxyAwareFetch)(e,{method:"GET",headers:{Authorization:`Bearer ${c}`,Accept:"application/json","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"}},b);if(!g?.ok)return{quotas:{},plan:null,message:`Cline usage request failed (${g?.status||"no response"})`};let h=await g.json().catch(()=>null),i=Array.isArray(h?.data?.limits)?h.data.limits:[],j={};for(let a of i){let b=O[a?.type]||a?.type||"Unknown",c=Math.max(0,Math.min(100,(0,f.IQ)(a?.percentUsed,0)));j[b]={used:c,total:100,remainingPercentage:100-c,resetAt:(0,f.eZ)(a?.resetsAt)||null}}return 0===Object.keys(j).length?{quotas:{},plan:null,message:"Cline returned no usage limits for this account."}:{quotas:j,plan:null}}let Q={github:a=>h(a.accessToken,a.providerSpecificData,a.proxyOptions),"gemini-cli":a=>m(a.accessToken,a.providerDataWithProjectId,a.proxyOptions),antigravity:a=>o(a.accessToken,a.providerSpecificData,a.proxyOptions),claude:a=>(0,q.g)(a.accessToken,a.proxyOptions),codex:a=>(0,r.Tl)(a.accessToken,a.proxyOptions),kiro:a=>(0,s.getKiroUsage)(a.accessToken,a.providerSpecificData,a.proxyOptions),qoder:a=>L(a.accessToken,a.proxyOptions),qwen:a=>G(a.accessToken,a.providerSpecificData),iflow:a=>H(a.accessToken),ollama:a=>I(a.accessToken),glm:a=>J(a.apiKey,a.provider,a.proxyOptions),"glm-cn":a=>J(a.apiKey,a.provider,a.proxyOptions),minimax:a=>A(a.apiKey,a.provider,a.proxyOptions),"minimax-cn":a=>A(a.apiKey,a.provider,a.proxyOptions),"vercel-ai-gateway":a=>K(a.apiKey,a.proxyOptions),"codebuddy-cn":a=>D(a.accessToken,a.apiKey,a.providerSpecificData,a.proxyOptions),xai:a=>M(a,a.proxyOptions),tokenrouter:a=>N(a,a.providerSpecificData,a.proxyOptions),cline:a=>P({accessToken:a.accessToken,apiKey:a.apiKey},a.proxyOptions),clinepass:a=>P({accessToken:a.accessToken,apiKey:a.apiKey},a.proxyOptions)};async function R(a,b=null){let{provider:c,accessToken:d,apiKey:e,providerSpecificData:f,projectId:g}=a,h={...f||{},...g?{projectId:g}:{}},i=Q[c];return i?await i({provider:c,accessToken:d,apiKey:e,providerSpecificData:f,providerDataWithProjectId:h,proxyOptions:b}):{message:`Usage API not implemented for ${c}`}}}};
|