@hilbras/omnihilbras 2.0.0 → 2.2.0
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/README.md +14 -14
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +18 -18
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +17 -17
- package/app/.next-cli-build/react-loadable-manifest.json +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/media-providers/[kind]/[id]/page.js +12 -12
- 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 +2 -2
- 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/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/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 +1 -1
- 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/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/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/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/_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 +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +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 +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 +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 +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 +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 +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/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +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/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 +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 +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/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/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 +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 +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +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/devin-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/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/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/omp-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-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 +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/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-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/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/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/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +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 +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/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 +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 +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 +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 +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 +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +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 +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/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +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 +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 +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/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +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 +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.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/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +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 +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 +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]/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]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +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/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 +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 +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 +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 +2 -2
- 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 +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/netlify-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +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 +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/health/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/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +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/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +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 +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/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 +1 -1
- 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 +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 +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 +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 +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 +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 +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 +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]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/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 +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 +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 +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/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 +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 +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +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 +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.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/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +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/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/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.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 +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +23 -21
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +23 -21
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +29 -27
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +29 -27
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +29 -27
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +24 -22
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +24 -22
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +23 -21
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +25 -23
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +23 -21
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +28 -26
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +26 -24
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +29 -27
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +27 -25
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +24 -22
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +24 -22
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +24 -22
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- 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 +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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 +18 -18
- package/app/.next-cli-build/server/chunks/1019.js +1 -1
- package/app/.next-cli-build/server/chunks/2132.js +1 -1
- package/app/.next-cli-build/server/chunks/3276.js +3 -3
- package/app/.next-cli-build/server/chunks/3799.js +1 -1
- package/app/.next-cli-build/server/chunks/4043.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4199.js +1 -1
- package/app/.next-cli-build/server/chunks/436.js +1 -1
- package/app/.next-cli-build/server/chunks/4663.js +1 -1
- package/app/.next-cli-build/server/chunks/4785.js +25 -0
- package/app/.next-cli-build/server/chunks/5036.js +1 -0
- package/app/.next-cli-build/server/chunks/5245.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +2 -2
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7525.js +1 -1
- package/app/.next-cli-build/server/chunks/7557.js +1 -1
- package/app/.next-cli-build/server/chunks/7811.js +1 -1
- package/app/.next-cli-build/server/chunks/827.js +1 -1
- package/app/.next-cli-build/server/chunks/8416.js +1 -1
- package/app/.next-cli-build/server/chunks/8499.js +2 -2
- package/app/.next-cli-build/server/chunks/8895.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/915.js +2 -2
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js.nft.json +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/{761-2556f561563ff774.js → 761-7590878484e89ed1.js} +1 -1
- package/app/.next-cli-build/static/chunks/7958-b44b343c4ee9f7e0.js +5 -0
- package/app/.next-cli-build/static/chunks/{85-614327c9c3f40a7d.js → 85-abdd4f18753cba17.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4cf42b10bafdba52.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-82a7e01a2e463ba2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-c23142e5f5729b5c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7451e45c01e9f365.js → page-de738056c6c3f5e2.js} +12 -12
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-e32ad708ff93ccbb.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-1e8ce4fa24e2def5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-61bfa3b2f16b0c6d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-e478c2c7c2491d20.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-5b432879d2c3afc9.js → page-5bc45ce6d914f906.js} +1 -1
- package/app/.next-cli-build/static/chunks/{webpack-13acc920e6f6a68b.js → webpack-bdd19f62aea907f6.js} +1 -1
- package/app/.next-cli-build/static/css/c478309e956d6de4.css +1 -0
- package/app/cli/.build-home/.omnihilbras/db/data.sqlite +0 -0
- package/app/custom-server.js +7 -0
- package/app/package.json +1 -1
- package/app/public/i18n/literals/fa.json +2 -2
- package/app/public/i18n/literals/id.json +2 -2
- package/app/public/i18n/literals/km.json +2 -2
- package/app/public/i18n/literals/th.json +2 -2
- package/app/public/i18n/literals/zh-CN.json +2 -2
- package/app/src/mitm/server.js +29 -29
- package/cli.js +12 -7
- package/hooks/postinstall.js +1 -1
- package/package.json +1 -1
- package/src/cli/api/client.js +1 -1
- package/src/cli/commands/connect.js +6 -6
- package/src/cli/terminalUI.js +1 -1
- package/src/cli/utils/endpoint.js +2 -2
- package/app/.next-cli-build/server/chunks/7960.js +0 -1
- package/app/.next-cli-build/server/chunks/9100.js +0 -21
- package/app/.next-cli-build/static/chunks/7958-7e4ad761a83f2a9e.js +0 -5
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-31316583ab546200.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-decadb6df9e9b417.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-a1700bfc6ebb2aac.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-71f0c81cddbab903.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e925ebcef32004ab.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-2422a9a60e84a259.js +0 -1
- package/app/.next-cli-build/static/css/cf553f425046a901.css +0 -1
- /package/app/.next-cli-build/static/{fAJh8_GCT173XCQuAE5si → 2lzaQ8Vt54PR86aQkWaou}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{fAJh8_GCT173XCQuAE5si → 2lzaQ8Vt54PR86aQkWaou}/_ssgManifest.js +0 -0
|
@@ -52,14 +52,14 @@ REMEMBER: When in doubt, write LESS per operation. Multiple small operations > o
|
|
|
52
52
|
\`\`\`json
|
|
53
53
|
${b}
|
|
54
54
|
\`\`\`
|
|
55
|
-
Respond ONLY with the JSON object, no other text.`)}else"json_object"===a.type&&o.push("You must respond with valid JSON. Respond ONLY with a JSON object, no other text.")}let p={type:k.R4.TEXT,text:f.Co};if(o.length>0){let a=o.join("\n");m.system=[p,{type:k.R4.TEXT,text:a,cache_control:{type:"ephemeral",ttl:"1h"}}]}else m.system=[p];if(b.tools&&Array.isArray(b.tools)){for(let a of(m.tools=[],b.tools)){let b=a.type;if(b&&b!==k.x4.FUNCTION){m.tools.push(a);continue}let c=a.function??a,e=c.name,f=""+e;d.set(f,e),m.tools.push({name:f,description:c.description||"",input_schema:c.parameters||c.input_schema||{type:"object",properties:{},required:[]}})}m.tools.length>0&&(m.tools[m.tools.length-1].cache_control={type:"ephemeral",ttl:"1h"})}return b.tool_choice&&(m.tool_choice=function(a){if(!a)return{type:"auto"};if("string"==typeof a)return"required"===a?{type:"any"}:{type:"auto"};if("object"==typeof a){if(a.function?.name)return{type:"tool",name:a.function.name};if(n.has(a.type))return a}return{type:"auto"}}(b.tool_choice)),d.size>0&&(m._toolNameMap=d),m}let n=new Set(["auto","any","tool","none"]);function o(a,b,c){let d=m(a,b,c);return d.system&&Array.isArray(d.system)&&(d.system=d.system.filter(a=>!a.text||!a.text.includes("You are Claude Code")),0===d.system.length&&delete d.system),d.tools&&Array.isArray(d.tools)&&(d.tools=d.tools.map(a=>a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a)),d.messages&&Array.isArray(d.messages)&&(d.messages=d.messages.map(a=>{if(!a.content||!Array.isArray(a.content))return a;let b=a.content.map(a=>a.type===k.R4.TOOL_USE&&a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a);return{...a,content:b}})),d}(0,d.kz)(e.h.OPENAI,e.h.CLAUDE,m,null)},29463:(a,b,c)=>{c.d(b,{$q:()=>g,W$:()=>i,ni:()=>k});var d=c(71553),e=c(47774),f=c(76924);function g(a,b){return`data:${a};base64,${b}`}let h=/^data:([^;]+);base64,([\s\S]+)$/;function i(a){if("string"!=typeof a)return null;let b=a.match(h);return b?{mimeType:b[1],base64:b[2]}:null}async function j(a){if(!a||f.Xc.has(a.toLowerCase()))return null;try{let b=await (0,d.lookup)(a,{all:!0});if(!b.length||b.some(a=>(function(a){if(!a||"::1"===a||a.startsWith("fc")||a.startsWith("fd")||a.startsWith("fe80"))return!0;let b=(a.includes(".")?a.split(":").pop():a).split(".").map(a=>Number.parseInt(a,10));if(4!==b.length||b.some(a=>Number.isNaN(a)))return!a.includes(":");let[c,d]=b;return 10===c||127===c||0===c||172===c&&d>=16&&d<=31||192===c&&168===d||169===c&&254===d||100===c&&d>=64&&d<=127||!1})(a.address)))return null;return b}catch{return null}}async function k(a,b={}){let c,{signal:d,timeoutMs:g=f.MT,maxBytes:h=f.J5}=b;if(!a||!a.startsWith("http://")&&!a.startsWith("https://"))return null;try{c=new URL(a)}catch{return null}let i=await j(c.hostname);if(!i)return null;let l=new AbortController,m=d?null:setTimeout(()=>l.abort(),g),n=d||l.signal,o=new e.Agent({connect:{lookup:(a,b,c)=>c(null,[{address:i[0].address,family:i[0].family}])}});try{let b=await fetch(a,{signal:n,redirect:"manual",dispatcher:o});if(!b.ok||!b.body)return null;let c=b.body.getReader(),d=[],e=0;for(;;){let{done:a,value:b}=await c.read();if(a)break;if((e+=b.length)>h){try{await c.cancel()}catch{}return null}d.push(b)}let g=Buffer.concat(d.map(a=>Buffer.from(a))),i=function(a){for(let{sig:b,offset:c,mime:d,verifyWebp:e}of f.Yv){if(a.length<c+b.length)continue;let f=!0;for(let d=0;d<b.length;d++)if(a[c+d]!==b[d]){f=!1;break}if(f&&(!e||a.length>=12&&87===a[8]&&69===a[9]&&66===a[10]&&80===a[11]))return d}return null}(g);if(!i)return null;return{url:`data:${i};base64,${g.toString("base64")}`,mimeType:i}}catch{return null}finally{m&&clearTimeout(m),o.close().catch(()=>{})}}},29675:(a,b,c)=>{c.d(b,{P:()=>l});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(44236);function k(a,b,c=null){return(0,g.k)({id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model},b,c)}function l(a,b){if(!a)return null;let c=[];switch(a.type){case"message_start":{b.messageId=a.message?.id||`msg_${Date.now()}`,b.model=a.message?.model,b.toolCallIndex=0;let d=a.message?.usage;if(d&&"object"==typeof d){let a="number"==typeof d.input_tokens?d.input_tokens:0,c="number"==typeof d.cache_read_input_tokens?d.cache_read_input_tokens:0,e="number"==typeof d.cache_creation_input_tokens?d.cache_creation_input_tokens:0,f=a+c+e;b.usage={prompt_tokens:f,completion_tokens:0,total_tokens:f,input_tokens:a,output_tokens:0},c>0&&(b.usage.cache_read_input_tokens=c),e>0&&(b.usage.cache_creation_input_tokens=e)}c.push(k(b,{role:f.z7.ASSISTANT}));break}case"content_block_start":{let d=a.content_block;if(d?.type==="server_tool_use"){b.serverToolBlockIndex=a.index;break}if(d?.type===f.R4.TEXT)b.textBlockStarted=!0;else if(d?.type===f.R4.TOOL_USE){let e=b.toolCallIndex++,g=b.toolNameMap?.get(d.name)||d.name,h={index:e,id:d.id,type:f.x4.FUNCTION,function:{name:g,arguments:""}};b.toolCalls.set(a.index,h),c.push(k(b,{tool_calls:[h]}))}break}case"content_block_delta":{if(a.index===b.serverToolBlockIndex)break;let d=a.delta;if(d?.type==="text_delta"&&d.text)c.push(k(b,{content:d.text}));else if(d?.type==="thinking_delta"&&d.thinking)c.push(k(b,(0,i.B)(d.thinking)));else if(d?.type==="input_json_delta"&&d.partial_json){let e=b.toolCalls.get(a.index);e&&(e.function.arguments+=d.partial_json,c.push(k(b,{tool_calls:[{index:e.index,id:e.id,function:{arguments:d.partial_json}}]})))}break}case"content_block_stop":if(a.index===b.serverToolBlockIndex){b.serverToolBlockIndex=-1;break}b.textBlockStarted=!1,b.thinkingBlockStarted=!1;break;case"message_delta":if(a.usage&&"object"==typeof a.usage){let c=b.usage||{},d="number"==typeof a.usage.input_tokens?a.usage.input_tokens:c.input_tokens||0,e="number"==typeof a.usage.output_tokens?a.usage.output_tokens:0,f="number"==typeof a.usage.cache_read_input_tokens?a.usage.cache_read_input_tokens:c.cache_read_input_tokens||0,g="number"==typeof a.usage.cache_creation_input_tokens?a.usage.cache_creation_input_tokens:c.cache_creation_input_tokens||0,h=d+f+g;b.usage={prompt_tokens:h,completion_tokens:e,total_tokens:h+e,input_tokens:d,output_tokens:e},f>0&&(b.usage.cache_read_input_tokens=f),g>0&&(b.usage.cache_creation_input_tokens=g)}if(a.delta?.stop_reason){b.finishReason=m(a.delta.stop_reason);let d="refusal"===a.delta.stop_reason&&a.delta.stop_details?.explanation;d&&c.push(k(b,{content:d}));let e=k(b,{},b.finishReason);b.usage&&(e.usage=(0,h.B)({input_tokens:b.usage.input_tokens||0,output_tokens:b.usage.output_tokens||0,cache_read_input_tokens:b.usage.cache_read_input_tokens,cache_creation_input_tokens:b.usage.cache_creation_input_tokens},"claude")),c.push(e),b.finishReasonSent=!0}break;case"message_stop":if(!b.finishReasonSent){let a=b.finishReason||(b.toolCalls?.size>0?f.bC.TOOL_CALLS:f.bC.STOP),d=b.usage&&"object"==typeof b.usage?{usage:{prompt_tokens:b.usage.input_tokens||0,completion_tokens:b.usage.output_tokens||0,total_tokens:(b.usage.input_tokens||0)+(b.usage.output_tokens||0)}}:{};c.push({...k(b,{},a),...d}),b.finishReasonSent=!0}}return c.length>0?c:null}let m=a=>(0,j.F)(a,"claude");(0,d.kz)(e.h.CLAUDE,e.h.OPENAI,null,l)},32271:(a,b,c)=>{c.d(b,{k:()=>d});function d({id:a,created:b,model:c},e,f=null){return{id:a,object:"chat.completion.chunk",created:b,model:c,choices:[{index:0,delta:e,finish_reason:f}]}}},32546:(a,b,c)=>{c.d(b,{o:()=>o});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(29463),k=c(44236),l=c(71782);function m(a){return{id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model}}function n(a,b,c=null){let d=a.name,e=b.toolNameMap?.get(d)||d,h=a.args||{},i=b.functionIndex++,j=a.id||`${e}-${Date.now()}-${i}`;c&&(0,l.Sk)(j,c,b.sessionId,b.model);let k={id:j,index:i,type:f.x4.FUNCTION,function:{name:e,arguments:JSON.stringify(h)}};return b.geminiToolCallCount=(b.geminiToolCallCount||0)+1,(0,g.k)(m(b),{tool_calls:[k]},null)}function o(a,b){if(!a)return null;let c=a.response||a;if(!c||!c.candidates?.[0])return null;let d=[],e=c.candidates[0],l=e.content;if(b.messageId||(b.messageId=c.responseId||`msg_${Date.now()}`,b.model=c.modelVersion||b.model||"gemini",b.functionIndex=0,b.geminiToolCallCount=0,d.push((0,g.k)(m(b),{role:f.z7.ASSISTANT},null))),l?.parts)for(let a of l.parts){let c=a.thoughtSignature||a.thought_signature;c&&"string"==typeof c&&(b.pendingThoughtSignature=c);let e=!0===a.thought;if(c){let f=void 0!==a.text&&""!==a.text,h=!!a.functionCall;if(!f&&!h)continue;f&&d.push((0,g.k)(m(b),e?(0,i.B)(a.text):{content:a.text},null)),h&&(d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null);continue}if(void 0!==a.text&&""!==a.text&&d.push((0,g.k)(m(b),e?(0,i.B)(a.text):{content:a.text},null)),a.functionCall){let c=b.pendingThoughtSignature||null;d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null}let h=a.inlineData||a.inline_data;if(h?.data){let a=h.mimeType||h.mime_type||f.BY;d.push((0,g.k)(m(b),{images:[{type:f.x4.IMAGE_URL,image_url:{url:(0,j.$q)(a,h.data)}}]},null))}}let o=c.usageMetadata||a.usageMetadata,p=(0,h.B)(o,"gemini");if(p&&(b.usage=p),e.finishReason){let a=(0,k.F)(e.finishReason,"gemini");a===f.bC.STOP&&b.geminiToolCallCount>0&&(a=f.bC.TOOL_CALLS);let c=(0,g.k)(m(b),{},a);b.usage&&(c.usage=b.usage),d.push(c),b.finishReason=a}return d.length>0?d:null}(0,d.kz)(e.h.GEMINI,e.h.OPENAI,null,o),(0,d.kz)(e.h.GEMINI_CLI,e.h.OPENAI,null,o),(0,d.kz)(e.h.ANTIGRAVITY,e.h.OPENAI,null,o),(0,d.kz)(e.h.VERTEX,e.h.OPENAI,null,o)},34097:(a,b,c)=>{function d({promptTokens:a,completionTokens:b,totalTokens:c,cachedTokens:e=0,cacheCreationTokens:f=0,reasoningTokens:g=0}){let h={prompt_tokens:a,completion_tokens:b,total_tokens:c};return(e>0||f>0)&&(h.prompt_tokens_details={},e>0&&(h.prompt_tokens_details.cached_tokens=e),f>0&&(h.prompt_tokens_details.cache_creation_tokens=f)),g>0&&(h.completion_tokens_details={reasoning_tokens:g}),h}c.d(b,{B:()=>g,c:()=>d});let e=a=>"number"==typeof a?a:0,f={claude(a){let b=e(a.input_tokens),c=e(a.output_tokens),d=e(a.cache_read_input_tokens),f=e(a.cache_creation_input_tokens),g=b+d+f;return{promptTokens:g,completionTokens:c,totalTokens:g+c,cachedTokens:d,cacheCreationTokens:f}},gemini(a){let b=e(a.cachedContentTokenCount),c=e(a.promptTokenCount),d=e(a.thoughtsTokenCount),f=e(a.totalTokenCount),g=e(a.candidatesTokenCount);return 0===g&&f>0&&(g=f-c-d)<0&&(g=0),{promptTokens:c,completionTokens:g+d,totalTokens:f,cachedTokens:b,reasoningTokens:d}},kiro(a){let b=e(a.inputTokens),c=e(a.outputTokens),d=e(a.cache_read_input_tokens)||e(a.cachedTokens)||e(a.cached_tokens),f=e(a.cache_creation_input_tokens),g={promptTokens:b,completionTokens:c,totalTokens:b+c};return d>0&&(g.cachedTokens=d),f>0&&(g.cacheCreationTokens=f),g},ollama(a){let b=e(a.prompt_eval_count),c=e(a.eval_count);return{promptTokens:b,completionTokens:c,totalTokens:b+c,cachedTokens:e(a.prompt_eval_cached_count)}},commandcode(a){let b=e(a.inputTokens),c=e(a.outputTokens),d="number"==typeof a.totalTokens?a.totalTokens:b+c;return{promptTokens:b,completionTokens:c,totalTokens:d}}};function g(a,b){let c=f[b];return c&&a&&"object"==typeof a?d(c(a)):null}},39536:(a,b,c)=>{c.d(b,{c:()=>x});var d=c(55511),e=c.n(d),f=c(74957),g=c(35024),h=c(75924),i=c(41004),j=c(80662),k=c(39609),l=c(26922),m=c(96281),n=c(71782);let o=/^agent\/[^/]+\/\d+\/[^/]+\/\d+$/,p=[/high\s+traffic/i,/agent\s+(execution\s+)?terminated\s+due\s+to\s+error/i,/capacity/i,/temporarily\s+unavailable/i,/timeout/i,/stream\s+(ended|closed|terminated|interrupted)/i,/empty\s+response/i],q=new Set([i.gx.SERVER_ERROR,i.gx.BAD_GATEWAY,i.gx.SERVICE_UNAVAILABLE,i.gx.GATEWAY_TIMEOUT]),r=["output_config","thinking","reasoning_effort","reasoning","enable_thinking","thinking_budget","thinkingConfig"],s=a=>{for(let b of r)delete a[b]},t=[/image/i,/imagen/i,/image-generation/i];function u(a){return!!a&&t.some(b=>b.test(a))}function v(a){let b=e().createHash("sha256").update(String(a||"antigravity")).digest().subarray(0,16);b[6]=15&b[6]|80,b[8]=63&b[8]|128;let c=b.toString("hex");return`${c.slice(0,8)}-${c.slice(8,12)}-${c.slice(12,16)}-${c.slice(16,20)}-${c.slice(20)}`}function w({body:a,request:b,credentials:c,model:d,requestType:e}){if(o.test(a?.requestId||""))return a.requestId;let f=b?.sessionId||a?.request?.sessionId||c?._clientSessionId||c?.connectionId||c?.email||"anonymous",g=v(`antigravity:conversation:${f}`),h=v(`antigravity:trajectory:${f}:${d}:${e}`),i=Math.max(1,2*(Array.isArray(b?.contents)?b.contents.length:1)-1);return`agent/${g}/${Date.now()}/${h}/${i}`}class x extends f.H{constructor(){super("antigravity",g.xq.antigravity)}parseError(a,b){if((429===a.status||409===a.status)&&b)try{let c=JSON.parse(b),d=c?.error,e=null;for(let a of Array.isArray(d?.details)?d.details:[]){if(a?.metadata?.quotaResetTimeStamp){let b=new Date(a.metadata.quotaResetTimeStamp).getTime();if(!isNaN(b)&&b>Date.now()){e=b;break}}if("string"==typeof a?.retryDelay){let b=parseFloat(a.retryDelay);if(!isNaN(b)&&b>0){let a=Date.now()+Math.round(1e3*b);if(a>Date.now()){e=a;break}}}}if(e)return{status:a.status,message:d?.message||b,resetsAtMs:e}}catch{}return super.parseError(a,b)}buildUrl(a,b,c=0){let d=this.getBaseUrls(),e=d[c]||d[0],f=u(a);return`${e}/v1internal:${b&&!f?"streamGenerateContent?alt=sse":"generateContent"}`}buildHeaders(a,b=!0,c=null){return{"Content-Type":"application/json",Authorization:`Bearer ${a.accessToken}`,"User-Agent":this.config.headers?.["User-Agent"]||h.K["User-Agent"]}}transformRequest(a,b,c,d){let e=d?.projectId||this.generateProjectId();if(!0!==c&&delete b.stream_options,u(a)){let c=function(a){let b={aspectRatio:"1:1"},c=a.match(/(\d+)x(\d+)$/);if(c){let a=parseInt(c[1]),d=parseInt(c[2]);if(a<=16&&d<=16)b.aspectRatio=`${a}:${d}`;else{let c=(a,b)=>b?c(b,a%b):a,e=c(a,d);b.aspectRatio=`${a/e}:${d/e}`}}return b}(a),f=a.replace(/-(\d+)x(\d+)$/,""),g=[];for(let a of b.request?.contents||b.contents||[]){let b=(a.parts||[]).filter(a=>void 0!==a.text).map(a=>({text:a.text}));b.length>0&&g.push({role:a.role||"user",parts:b})}let h=(0,j.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.email||d?.connectionId,scope:"antigravity"});this._lastSessionId=h;let i={contents:g,generationConfig:{temperature:1,topP:.95,topK:40,maxOutputTokens:8192,imageConfig:c},sessionId:h};return{project:e,model:f,userAgent:"antigravity",requestType:"image_gen",requestId:w({body:b,request:i,credentials:d,model:f,requestType:"image_gen"}),request:i}}let f=b.request?.sessionId||(0,j.oV)({headers:d?.rawHeaders,body:b,connectionId:d?.email||d?.connectionId,scope:"antigravity"}),g=(0,j.E9)(f)||f,i=(b.request?.contents||[]).map(c=>{let d=c.role;c.parts?.some(a=>a.functionResponse)&&(d="user");let e=c.parts?.filter(a=>(!a.thought||!!a.functionCall)&&(!a.thoughtSignature||!!a.functionCall||!!a.text)),f=!1,h=e?.map(c=>{if(!c.functionCall)return c;let d=c.functionCall.id,e=d?(0,n.el)(d,g,b.model||a):null,h=c.thoughtSignature||e||(f?void 0:m.bf);if(f=!0,h)return{...c,thoughtSignature:h};if(c.thoughtSignature&&!e){let{thoughtSignature:a,...b}=c;return b}return c});return{...c,role:d,parts:h||e||[]}}),k=(0,l.$J)(i,a),o=b.request?.tools;if(o&&o.length>0){let a=new Set,b=[];for(let c of o)for(let d of c.functionDeclarations||[]){let c=function(a){if(!a)return"_unknown";let b=a.replace(/[^a-zA-Z0-9_.:\-]/g,"_");return/^[a-zA-Z_]/.test(b)||(b="_"+b),b.substring(0,64)}(d.name);a.has(c)||(a.add(c),b.push({...d,name:c,parameters:d.parameters?(0,l.Yr)(structuredClone(d.parameters)):{type:"object",properties:{reason:{type:"string",description:"Brief explanation"}},required:["reason"]}}))}o=b.length>0?[{functionDeclarations:b}]:[]}let{tools:p,toolConfig:q,...r}=b.request||{};if(s(r),r.systemInstruction?.parts){for(let a of r.systemInstruction.parts)if("string"==typeof a.text)for(let{from:b,to:c}of h.iO)a.text=a.text.replaceAll(b,c)}let t={...r.generationConfig||{}};t.maxOutputTokens>64e3&&(t.maxOutputTokens=64e3);let v={...r,generationConfig:t,...k&&{contents:k},...o&&{tools:o},sessionId:g,safetySettings:void 0,...o?.length>0&&{toolConfig:{functionCallingConfig:{mode:"VALIDATED"}}}};return s(b),this._lastSessionId=v.sessionId,delete b.requestType,{...b,project:e,model:b.model||a,userAgent:"antigravity",requestId:w({body:b,request:v,credentials:d,model:a,requestType:"agent"}),request:v}}async refreshCredentials(a,b,c=null){if(!a.refreshToken)return null;try{let d=await (0,k.proxyAwareFetch)(h.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a.refreshToken,client_id:this.config.clientId,client_secret:this.config.clientSecret})},c);if(!d.ok)return null;let e=await d.json();return b?.info?.("TOKEN","Antigravity refreshed"),{accessToken:e.access_token,refreshToken:e.refresh_token||a.refreshToken,expiresIn:e.expires_in,projectId:a.projectId}}catch(a){return b?.error?.("TOKEN",`Antigravity refresh error: ${a.message}`),null}}generateProjectId(){let a=["useful","bright","swift","calm","bold"][Math.floor(5*Math.random())],b=["fuze","wave","spark","flow","core"][Math.floor(5*Math.random())];return`${a}-${b}-${e().randomUUID().slice(0,5)}`}generateSessionId(){return e().randomUUID()+Date.now().toString()}parseRetryHeaders(a){if(!a?.get)return null;let b=a.get("retry-after");if(b){let a=parseInt(b,10);if(!isNaN(a)&&a>0)return 1e3*a;let c=new Date(b);if(!isNaN(c.getTime())){let a=c.getTime()-Date.now();return a>0?a:null}}let c=a.get("x-ratelimit-reset-after");if(c){let a=parseInt(c,10);if(!isNaN(a)&&a>0)return 1e3*a}let d=a.get("x-ratelimit-reset");if(d){let a=1e3*parseInt(d,10)-Date.now();return a>0?a:null}return null}parseRetryFromErrorMessage(a){if(!a||"string"!=typeof a)return null;let b=a.match(/reset after (\d+h)?(\d+m)?(\d+s)?/i);if(!b)return null;let c=0;return b[1]&&(c+=3600*parseInt(b[1])*1e3),b[2]&&(c+=60*parseInt(b[2])*1e3),b[3]&&(c+=1e3*parseInt(b[3])),c>0?c:null}extractErrorMessage(a,b=""){return[a?.error?.message,a?.message,a?.error,b].filter(Boolean).map(a=>"string"==typeof a?a:JSON.stringify(a)).join("\n")}isTransientAntigravityError(a,b){return!!(a===i.gx.RATE_LIMITED||q.has(a))||p.some(a=>a.test(b||""))}async computeRetryDelay(a,b){let c="",d=null,e=this.parseRetryHeaders(a.headers);try{d=(c=await a.clone().text())?JSON.parse(c):null}catch{}let f=this.extractErrorMessage(d,c);return(e||(e=this.parseRetryFromErrorMessage(f)),e)?e<=1e4&&e:!!this.isTransientAntigravityError(a.status,f)&&Math.min(1e3*2**b,a.status===i.gx.RATE_LIMITED?1e4:15e3)}static cloakTools(a,b=null){let c=a.request?.tools;if(!c||0===c.length)return{cloakedBody:a,toolNameMap:null};let d="github-copilot"===b,e=new Map,f=[],g=new Set(y.map(a=>a.name));for(let a of c)if(a.functionDeclarations)for(let b of a.functionDeclarations){if(d&&h.J5.has(b.name)||d&&g.has(b.name))continue;if(h.J5.has(b.name)){f.push(b);continue}let a=`${b.name}${h.QH}`;e.set(a,b.name),f.push({...b,name:a})}let i=[],j=new Set;for(let a of[...f,...y])!a?.name||j.has(a.name)||(j.add(a.name),i.push(a));let k=a.request?.contents?.map(a=>{if(!a.parts)return a;let b=a.parts.map(a=>a.functionCall&&!h.J5.has(a.functionCall.name)?{...a,functionCall:{...a.functionCall,name:`${a.functionCall.name}${h.QH}`}}:a.functionResponse&&!h.J5.has(a.functionResponse.name)?{...a,functionResponse:{...a.functionResponse,name:`${a.functionResponse.name}${h.QH}`}}:a);return{...a,parts:b}});return{cloakedBody:{...a,request:{...a.request,tools:[{functionDeclarations:i}],contents:k||a.request.contents}},toolNameMap:e}}}let y=[{name:"browser_subagent",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"command_status",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"find_by_name",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"generate_image",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"grep_search",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"list_dir",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"list_resources",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"mcp_sequential-thinking_sequentialthinking",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"multi_replace_file_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"notify_user",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_resource",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_terminal",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"read_url_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"replace_file_content",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"run_command",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"search_web",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"send_command_input",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"task_boundary",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"view_content_chunk",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"view_file",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}},{name:"write_to_file",description:"This tool is currently unavailable.",parameters:{type:"OBJECT",properties:{},required:[]}}]},39551:(a,b,c)=>{c.d(b,{_:()=>m});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(17242),j=c(44236);function k(a){return(0,h.B)(a,"ollama")}function l(a){return a.map((a,b)=>({index:a.function?.index??b,id:a.id||(0,i.eG)(b),type:f.x4.FUNCTION,function:{name:a.function?.name||"",arguments:"string"==typeof a.function?.arguments?a.function.arguments:JSON.stringify(a.function?.arguments||{})}}))}function m(a){let b=a.message||{},c=b.content||"",d=b.thinking||"",e=Array.isArray(b.tool_calls)?b.tool_calls:[],g={role:f.z7.ASSISTANT};c&&(g.content=c),d&&(g.reasoning_content=d),e.length>0&&(g.tool_calls=l(e)),g.content||g.tool_calls||(g.content="");let h=(0,j.F)(a.done_reason,"ollama");return e.length>0&&(h=f.bC.TOOL_CALLS),{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:a.model||"ollama",choices:[{index:0,message:g,finish_reason:h}],usage:k(a)}}(0,d.kz)(e.h.OLLAMA,e.h.OPENAI,null,function(a,b){if(!a||"object"!=typeof a)return null;b.ollama||(b.ollama={id:`chatcmpl-${Date.now()}`,created:Math.floor(Date.now()/1e3),model:a.model||b.model});let{id:c,created:d,model:e}=b.ollama;if(a.done){let h=k(a),i=(0,j.F)(a.done_reason,"ollama");(a.done_reason===f.bC.TOOL_CALLS||b.hadToolCalls)&&(i=f.bC.TOOL_CALLS);let l=(0,g.k)({id:c,created:d,model:e},{},i);return l.usage=h,l}let h=a.message;if(!h)return null;let i="string"==typeof h.content?h.content:"",m="string"==typeof h.thinking?h.thinking:"",n=Array.isArray(h.tool_calls)?h.tool_calls:null;if(!i&&!m&&!n)return null;i&&(b.accumulatedContent=(b.accumulatedContent||"")+i),m&&(b.accumulatedThinking=(b.accumulatedThinking||"")+m);let o={};return i&&(o.content=i),m&&(o.reasoning_content=m),n&&(b.hadToolCalls=!0,o.tool_calls=l(n)),(0,g.k)({id:c,created:d,model:e},o,null)})},44090:(a,b,c)=>{c.d(b,{B:()=>e,V:()=>f});var d=c(43698);function e(a,b=!1){return b?{role:d.z7.ASSISTANT,reasoning_content:a}:{reasoning_content:a}}function f(a){if(!a||"object"!=typeof a)return"";if("string"==typeof a.reasoning_content&&a.reasoning_content)return a.reasoning_content;if("string"==typeof a.reasoning&&a.reasoning)return a.reasoning;let b=a.reasoning_details;return Array.isArray(b)?b.map(a=>"string"==typeof a?a:a?.text||a?.content||"").join(""):""}},44236:(a,b,c)=>{c.d(b,{F:()=>e,Q:()=>f});var d=c(69320);function e(a,b){switch(b){case"claude":switch(a){case d.Ut.END_TURN:return d.bC.STOP;case d.Ut.MAX_TOKENS:return d.bC.LENGTH;case d.Ut.TOOL_USE:return d.bC.TOOL_CALLS;case d.Ut.STOP_SEQUENCE:return d.bC.STOP;case d.Ut.REFUSAL:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"commandcode":switch(a){case"stop":case"error":return d.bC.STOP;case"length":return d.bC.LENGTH;case"tool-calls":case"tool_use":return d.bC.TOOL_CALLS;case"content-filter":return d.bC.CONTENT_FILTER;default:return a||d.bC.STOP}case"gemini":switch(String(a).toUpperCase()){case d.a_.STOP:return d.bC.STOP;case d.a_.MAX_TOKENS:return d.bC.LENGTH;case d.a_.SAFETY:case d.a_.RECITATION:case d.a_.BLOCKLIST:case d.a_.PROHIBITED_CONTENT:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"kiro":case"ollama":switch(a){case"tool_calls":case"tool_use":return d.bC.TOOL_CALLS;case"length":case"max_tokens":return d.bC.LENGTH;default:return d.bC.STOP}default:return a||d.bC.STOP}}function f(a,b){if("claude"!==b)return a;switch(a){case d.bC.STOP:return d.Ut.END_TURN;case d.bC.LENGTH:return d.Ut.MAX_TOKENS;case d.bC.TOOL_CALLS:return d.Ut.TOOL_USE;case d.bC.CONTENT_FILTER:return d.Ut.REFUSAL;default:return d.Ut.END_TURN}}},47723:(a,b,c)=>{c.d(b,{H:()=>n});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(17242),k=c(44236);function l(a,b,c=null){return(0,g.k)({id:a.responseId,created:a.created,model:a.model},b,c)}let m=a=>(0,k.F)(a,"commandcode");function n(a,b){var c;if(!a)return null;if(a&&"object"==typeof a&&"chat.completion.chunk"===a.object)return a;let d=a;if("string"==typeof a){let b=a.trim();if(!b)return null;let c=b.startsWith("data:")?b.slice(5).trim():b;if(!c||"[DONE]"===c)return null;try{d=JSON.parse(c)}catch{return null}}if(!d||"object"!=typeof d||!d.type)return null;c=d.model,b.responseId||(b.responseId=`chatcmpl-${Date.now()}`,b.created=Math.floor(Date.now()/1e3),b.model=b.model||c||"commandcode",b.chunkIndex=0,b.toolIndex=0,b.toolIndexById=new Map,b.openTools=new Set,b.openText=!1,b.finishReason=null,b.usage=null);let e=[];switch(d.type){case"text-delta":{let a=d.text||d.delta||"";if(!a)break;let c=0===b.chunkIndex?{role:f.z7.ASSISTANT,content:a}:{content:a};b.chunkIndex++,b.openText=!0,e.push(l(b,c));break}case"reasoning-delta":{let a=d.text||"";if(!a)break;let c=(0,i.B)(a,0===b.chunkIndex);b.chunkIndex++,e.push(l(b,c));break}case"tool-input-start":{let a=d.id||d.toolCallId||(0,j.eG)(b.toolIndex),c=b.toolIndexById.get(a);null==c&&(c=b.toolIndex++,b.toolIndexById.set(a,c)),b.openTools.add(a);let g={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:""}}]};b.chunkIndex++,e.push(l(b,g));break}case"tool-input-delta":{let a=d.id||d.toolCallId,c=b.toolIndexById.get(a);if(null==c)break;let f={tool_calls:[{index:c,function:{arguments:d.delta||d.inputTextDelta||""}}]};e.push(l(b,f));break}case"tool-call":{let a=d.toolCallId;if(b.toolIndexById.has(a))break;let c=b.toolIndex++;b.toolIndexById.set(a,c);let g="string"==typeof d.input?d.input:JSON.stringify(d.input??{}),h={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:g}}]};b.chunkIndex++,e.push(l(b,h));break}case"finish-step":b.finishReason=m(d.finishReason),d.usage&&(b.usage=d.usage);break;case"finish":{let a=b.finishReason||m(d.finishReason||"stop"),c=l(b,{},a),f=d.totalUsage||b.usage,g=(0,h.B)(f,"commandcode");g&&(c.usage=g),e.push(c);break}case"error":{let a=d.error??d.message??"unknown",b="string"==typeof a?a:JSON.stringify(a);throw Error(`[CommandCode error: ${b}]`)}}return e.length?e:null}(0,d.kz)(e.h.COMMANDCODE,e.h.OPENAI,null,n)},52136:(a,b,c)=>{c.d(b,{NU:()=>l,kD:()=>i,nF:()=>j,sS:()=>k,z:()=>v});var d=c(24),e=c(72239),f=c(26070),g=c(58028);let h={openai:"openai","openai-responses":"openai","openai-response":"openai",codex:"openai",claude:"claude-budget",gemini:"gemini-budget","gemini-cli":"gemini-budget",vertex:"gemini-budget",antigravity:"gemini-budget",kiro:"kiro",commandcode:"commandcode"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if("string"!=typeof a)return{cleanModel:a,override:null};let b=a.match(/^(.*)\(([^()]+)\)\s*$/);if(!b)return{cleanModel:a,override:null};let c=b[1].trim(),d=b[2].trim().toLowerCase();return"none"===d||"off"===d?{cleanModel:c,override:{mode:"none"}}:"auto"===d?{cleanModel:c,override:{mode:"auto"}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:d}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}function k(a){if(!a||"object"!=typeof a)return null;let b=a.output_config?.effort;if("string"==typeof b&&b){let a=b.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let c=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);if("string"==typeof c&&c){let a=c.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let d=a.thinking;if(d&&"object"==typeof d){if("disabled"===d.type)return{mode:"none"};if("adaptive"===d.type||"enabled"===d.type){let a=Number(d.budget_tokens);return Number.isFinite(a)&&a>0?{mode:"budget",budget:a}:{mode:"auto"}}}let e=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(e&&"object"==typeof e){if("string"==typeof e.thinkingLevel)return{mode:"level",level:e.thinkingLevel.toLowerCase()};let a=Number(e.thinkingBudget);if(Number.isFinite(a))return 0===a?{mode:"none"}:a<0?{mode:"auto"}:{mode:"budget",budget:a}}if(!1===a.enable_thinking)return{mode:"none"};if(!0===a.enable_thinking){let b=Number(a.thinking_budget);return Number.isFinite(b)&&b>0?{mode:"budget",budget:b}:{mode:"auto"}}return null}function l(a){let b=k(a);if(!b||"none"===b.mode)return b;let c=function(a){if(a.reasoning&&"object"==typeof a.reasoning){let b=a.reasoning.summary;return"string"==typeof b&&b&&"none"!==b?"summarized":void 0}if("string"==typeof a.reasoning_effort)return"summarized"}(a);return c?{...b,display:c}:b}let m=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function n(a,b){let c;if("budget"===a.mode)c=a.budget;else if("level"===a.mode)c=(0,g.nE)(a.level);else if("auto"===a.mode)return -1;if(Number.isFinite(c))return b&&(null!=b.min&&c<b.min&&(c=b.min),null!=b.max&&c>b.max&&(c=b.max)),c}function o(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}function p(a,b){return"max"!==a&&"ultra"!==a||b?.includes(a)?a:"ultra"===a&&b?.includes("max")?"max":"xhigh"}let q={minimal:4096,low:8192,medium:16384,high:65535};function r(a){return a.request&&"object"==typeof a.request?(a.request.generationConfig&&"object"==typeof a.request.generationConfig||(a.request.generationConfig={}),a.request.generationConfig):(a.generationConfig&&"object"==typeof a.generationConfig||(a.generationConfig={}),a.generationConfig)}function s(a,b){r(a).thinkingConfig=b}function t(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=r(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function u(a){delete a.thinking,delete a.reasoning_effort,delete a.reasoning,delete a.thinkingConfig,delete a.enable_thinking,delete a.thinking_budget,delete a.output_config,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig,a.params&&"object"==typeof a.params&&(delete a.params.reasoning_effort,delete a.params.thinking)}function v(a,b,c,i=null,l){if(!c||"object"!=typeof c)return c;let{cleanModel:r,override:w}=j(b),x=w||l||k(c),y=(0,d.getCapabilitiesForModel)(i,r);if(!y.reasoning)return u(c),c;if(!x)return c;let z=function(a,b,c){if("commandcode"===a)return"commandcode";let e=c?f.xq[c]?.thinkingFormat:null;if(e)return e;let g=(0,d.getCapabilitiesForModel)(c,b);return g.thinkingFormat&&!(("openai"===a||"openai-responses"===a)&&m.has(g.thinkingFormat))?"muse"===c&&"openai-responses"===a?"openai-responses":g.thinkingFormat:h[a]||"openai"}(a,r,i),A=(0,e.k)(i,r),B="string"==typeof c.thinking?.display?c.thinking.display:l?.display;return u(c),!function(a,b,c,d,e,f){var h;let i="none"===c.mode,j=!1!==d.thinkingCanDisable,k=i&&!j?{mode:"level",level:"minimal"}:c;switch(a){case"openai":{if(i&&j){b.reasoning_effort="none";break}let a=o(k);a&&(b.reasoning_effort=p(a,e));break}case"openai-responses":{if(i&&j){delete b.reasoning;break}let a=o(k);if(a){let c=b.reasoning&&"object"==typeof b.reasoning&&!Array.isArray(b.reasoning)?b.reasoning:{};b.reasoning={...c,effort:p(a,e)},b.reasoning.summary||(b.reasoning.summary="auto")}delete b.reasoning_effort;break}case"claude-adaptive":{if(i&&j){b.thinking={type:"disabled"};break}j?b.thinking={type:"adaptive",...f?{display:f}:{}}:delete b.thinking;let a=o(k);b.output_config={effort:"auto"===a?"high":"minimal"===a?"low":"xhigh"!==a||e?.includes("xhigh")?a:"high"};break}case"claude-budget":{if(i&&j){b.thinking={type:"disabled"};break}let a=n(k,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...f?{display:f}:{}}:{type:"enabled",budget_tokens:a||8192,...f?{display:f}:{}};break}case"gemini-level":{let a,c=i?"minimal":(a="auto"===k.mode?"high":o(k)||"high",(0,g.wd)(a)),f=e?.find(a=>"none"!==a);e?.length&&f&&!e.includes(c)&&(c=f),s(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),t(b,q[c]||q.high,d);break}case"gemini-budget":{if(i&&j){s(b,{thinkingBudget:0,includeThoughts:!1});break}let a=n(k,d.thinkingRange);s(b,{thinkingBudget:a??-1,includeThoughts:!0}),t(b,-1!==(h=a??-1)&&Number.isFinite(h)?h<=1024?8192:h<=8192?16384:h<=24576?32768:65535:32768,d);break}case"zai":if(i&&j){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=o(k);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(i&&j){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=n(k,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(i&&j){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=o(k),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"===c&&e&&!e.includes("max")?"high":c;break}case"kimi":{let a;if(i&&j){b.thinking={type:"disabled"};break}let c="auto"===(a=o(k))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"minimax":b.thinking={type:i&&j?"disabled":"adaptive"};break;case"hunyuan":{if(i&&j){b.thinking={type:"disabled"};break}let a=n(k,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(i&&j)break;let a=o(k);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(i&&j)break;let a="auto"===k.mode?"medium":o(k);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"tokenrouter":{if(i||"auto"===k.mode)break;let a=o(k);a&&(b.reasoning_effort=a);break}case"kiro":break;case"commandcode":{if(b.params&&"object"==typeof b.params||(b.params={}),i&&j){delete b.params.reasoning_effort;break}let a=o(k);a&&(b.params.reasoning_effort=a)}}}(z,c,x,y,A,B),c}},58028:(a,b,c)=>{c.d(b,{Dl:()=>d,Vp:()=>h,nE:()=>e,vz:()=>g,wd:()=>f});let d={none:0,minimal:512,low:1024,medium:8192,high:24576,xhigh:32768,max:128e3};function e(a){if(a)return d[String(a).toLowerCase()]}function f(a){let b=String(a).toLowerCase().trim();return"none"===b||"off"===b?"minimal":"xhigh"===b||"max"===b?"high":b}function g(a){let b=Number(a);return!b||b<=0?null:b<=768?"minimal":b<=4096?"low":b<=16384?"medium":b<=28672?"high":b<=80384?"xhigh":"max"}function h(a){return!a||a<=0?null:a<=2048?"low":a<=16384?"medium":"high"}},60210:(a,b,c)=>{c.d(b,{HR:()=>function a(b,c){if(!c?.size||!b)return b;if(Array.isArray(b))return b.map(b=>a(b,c));if("object"!=typeof b)return b;let d=b,e=(a,c)=>{d===b&&(d={...b}),d[a]=c};if("content_block_start"===b.type){let a=b.content_block;a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)&&e("content_block",{...a,name:c.get(a.name)})}Array.isArray(b.content)&&e("content",b.content.map(a=>a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(b.choices)&&e("choices",b.choices.map(a=>{let b=!1,d={...a};for(let e of["delta","message"]){let f=a?.[e];if(!f||!Array.isArray(f.tool_calls)||0===f.tool_calls.length)continue;let g=f.tool_calls.map(a=>{let d=a?.function?.name;return"string"==typeof d&&c.has(d)?(b=!0,{...a,function:{...a.function,name:c.get(d)}}):a});d[e]={...f,tool_calls:g}}return b?d:a})),Array.isArray(b.output)&&e("output",b.output.map(a=>a?.type==="function_call"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a));let f=b.item;return f?.type==="function_call"&&"string"==typeof f.name&&c.has(f.name)&&e("item",{...f,name:c.get(f.name)}),d},Ke:()=>k,g4:()=>l});let d=["read","shell"],e={read:{description:"Read the contents of a file or directory. Supports text files, images, and PDFs. Images and PDFs are presented directly to the model. Each text line is prefixed by its 1-based line number as <line>: <content>. The prefix is for reference and is not part of the file content. Directory entries are returned one per line. Use offset and limit to read large files or directories in sections. Prefer one larger read over many small slices, and use grep to find specific content in large files.",parameters:{type:"object",properties:{path:{type:"string",description:"File or directory to read"},offset:{type:"integer",minimum:0,description:"The line or directory entry to start reading from (1-based)"},limit:{type:"integer",minimum:0,description:"The maximum number of lines or directory entries to read (defaults to and capped at 2000)"}},required:["path"],additionalProperties:!1}},shell:{description:"Execute a shell command and return its output. Commands run on Linux using bash. Quote file paths containing spaces or special characters. Prefer dedicated tools over shell commands when possible. When output is large, the full result is saved to a file and a truncated preview is returned. Rely on automatic truncation unless filtering the output is more useful. Commands accept an optional timeout, background commands have no timeout by default. Background commands return immediately, and you will be notified when they complete.",parameters:{type:"object",properties:{command:{type:"string",description:"Shell command string to execute"},workdir:{type:"string",description:"Working directory to execute the command in. Defaults to the current working directory. When possible, avoid changing directories in the command and set the working directory here instead."},timeout:{type:"integer",minimum:0,description:"Timeout in milliseconds. Set to 0 to disable the timeout. Defaults to 120000 for foreground commands. Background commands have no timeout by default."},background:{type:"boolean",description:"Run the command in the background and return immediately (useful for dev servers and long-running builds). You do not need to use '&' at the end of the command when using this parameter. You will be notified when it completes. DO NOT poll for completion."}},required:["command"],additionalProperties:!1}}},f=new WeakMap;function g(a){let b=String(a??"").trim();return d.includes(b)?b:""}function h(a){if(!a||"object"!=typeof a||Array.isArray(a))return"";if("string"==typeof a.name&&a.name.trim())return a.name.trim();let b=a.function;return b&&"object"==typeof b&&!Array.isArray(b)&&"string"==typeof b.name?b.name.trim():""}function i(a){let b=a?.function;return b&&"object"==typeof b&&!Array.isArray(b)?b:null}function j(a){return new Map([...a].map(([a,b])=>[b,a]))}function k(a,b){var c,k;if(!a||"object"!=typeof a)return new Map;let{tools:l,map:m}=function(a){let b=new Map;if(!Array.isArray(a)||0===a.length)return{tools:a,map:b};let c=new Set(a.map(h)),d=new Set,f=[];for(let j of a){if(!j||"object"!=typeof j||Array.isArray(j)){f.push(j);continue}let a=g(h(j));if(!a){f.push(j);continue}if(d.has(a))continue;if(d.add(a),function(a,b){let c=a&&(i(a)||a),d=e[b];return!!c&&c.description===d.description&&JSON.stringify(c.parameters)===JSON.stringify(d.parameters)}(j,a)){f.push(j);continue}let k=`${a}_client`;for(let b=2;c.has(k);b++)k=`${a}_client${b}`;c.add(k),b.set(k,a),f.push(function(a,b){let c=i(a);return c?{...a,function:{...c,name:b}}:{...a,name:b}}(j,k))}return{tools:f,map:b}}(a.tools);a.tools=Array.isArray(l)?l:[];let n=function(a,b){let c=[];if(!Array.isArray(a))return c;for(let f of d){if(a.some(a=>g(h(a))===f))continue;let{description:d,parameters:i}=e[f];a.push(b?{type:"function",name:f,description:d,parameters:i,strict:!1}:{type:"function",function:{name:f,description:d,parameters:i}}),c.push(f)}return c}(a.tools,b);return!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=a.tool_choice;if(!c||"object"!=typeof c||Array.isArray(c))return;let d=j(b);if("string"==typeof c.name){let b=d.get(c.name.trim());b&&(a.tool_choice={...c,name:b});return}let e=c.function;if(e&&"object"==typeof e&&!Array.isArray(e)&&"string"==typeof e.name){let b=d.get(e.name.trim());b&&(a.tool_choice={...c,function:{...e,name:b}})}}(a,m),!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=j(b);Array.isArray(a.input)&&(a.input=a.input.map(a=>a?.type==="function_call"&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(a.messages)&&(a.messages=a.messages.map(a=>Array.isArray(a?.tool_calls)?{...a,tool_calls:a.tool_calls.map(a=>c.has(a?.function?.name)?{...a,function:{...a.function,name:c.get(a.function.name)}}:a)}:a))}(a,m),n.length&&function(a,b,c){let d=c.map(a=>`\`${a}\``).join(" or "),e=c.length>1?`Do not call the ${d} tools; they are placeholders that do nothing. Use the other tools you have been given instead.`:`Do not call the ${d} tool; it is a placeholder that does nothing. Use the other tools you have been given instead.`;if(b){a.instructions="string"==typeof a.instructions&&a.instructions.trim()?`${a.instructions}
|
|
55
|
+
Respond ONLY with the JSON object, no other text.`)}else"json_object"===a.type&&o.push("You must respond with valid JSON. Respond ONLY with a JSON object, no other text.")}let p={type:k.R4.TEXT,text:f.Co};if(o.length>0){let a=o.join("\n");m.system=[p,{type:k.R4.TEXT,text:a,cache_control:{type:"ephemeral",ttl:"1h"}}]}else m.system=[p];if(b.tools&&Array.isArray(b.tools)){for(let a of(m.tools=[],b.tools)){let b=a.type;if(b&&b!==k.x4.FUNCTION){m.tools.push(a);continue}let c=a.function??a,e=c.name,f=""+e;d.set(f,e),m.tools.push({name:f,description:c.description||"",input_schema:c.parameters||c.input_schema||{type:"object",properties:{},required:[]}})}m.tools.length>0&&(m.tools[m.tools.length-1].cache_control={type:"ephemeral",ttl:"1h"})}return b.tool_choice&&(m.tool_choice=function(a){if(!a)return{type:"auto"};if("string"==typeof a)return"required"===a?{type:"any"}:{type:"auto"};if("object"==typeof a){if(a.function?.name)return{type:"tool",name:a.function.name};if(n.has(a.type))return a}return{type:"auto"}}(b.tool_choice)),d.size>0&&(m._toolNameMap=d),m}let n=new Set(["auto","any","tool","none"]);function o(a,b,c){let d=m(a,b,c);return d.system&&Array.isArray(d.system)&&(d.system=d.system.filter(a=>!a.text||!a.text.includes("You are Claude Code")),0===d.system.length&&delete d.system),d.tools&&Array.isArray(d.tools)&&(d.tools=d.tools.map(a=>a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a)),d.messages&&Array.isArray(d.messages)&&(d.messages=d.messages.map(a=>{if(!a.content||!Array.isArray(a.content))return a;let b=a.content.map(a=>a.type===k.R4.TOOL_USE&&a.name&&a.name.startsWith("")?{...a,name:a.name.slice(0)}:a);return{...a,content:b}})),d}(0,d.kz)(e.h.OPENAI,e.h.CLAUDE,m,null)},29463:(a,b,c)=>{c.d(b,{$q:()=>g,W$:()=>i,ni:()=>k});var d=c(71553),e=c(47774),f=c(76924);function g(a,b){return`data:${a};base64,${b}`}let h=/^data:([^;]+);base64,([\s\S]+)$/;function i(a){if("string"!=typeof a)return null;let b=a.match(h);return b?{mimeType:b[1],base64:b[2]}:null}async function j(a){if(!a||f.Xc.has(a.toLowerCase()))return null;try{let b=await (0,d.lookup)(a,{all:!0});if(!b.length||b.some(a=>(function(a){if(!a||"::1"===a||a.startsWith("fc")||a.startsWith("fd")||a.startsWith("fe80"))return!0;let b=(a.includes(".")?a.split(":").pop():a).split(".").map(a=>Number.parseInt(a,10));if(4!==b.length||b.some(a=>Number.isNaN(a)))return!a.includes(":");let[c,d]=b;return 10===c||127===c||0===c||172===c&&d>=16&&d<=31||192===c&&168===d||169===c&&254===d||100===c&&d>=64&&d<=127||!1})(a.address)))return null;return b}catch{return null}}async function k(a,b={}){let c,{signal:d,timeoutMs:g=f.MT,maxBytes:h=f.J5}=b;if(!a||!a.startsWith("http://")&&!a.startsWith("https://"))return null;try{c=new URL(a)}catch{return null}let i=await j(c.hostname);if(!i)return null;let l=new AbortController,m=d?null:setTimeout(()=>l.abort(),g),n=d||l.signal,o=new e.Agent({connect:{lookup:(a,b,c)=>c(null,[{address:i[0].address,family:i[0].family}])}});try{let b=await fetch(a,{signal:n,redirect:"manual",dispatcher:o});if(!b.ok||!b.body)return null;let c=b.body.getReader(),d=[],e=0;for(;;){let{done:a,value:b}=await c.read();if(a)break;if((e+=b.length)>h){try{await c.cancel()}catch{}return null}d.push(b)}let g=Buffer.concat(d.map(a=>Buffer.from(a))),i=function(a){for(let{sig:b,offset:c,mime:d,verifyWebp:e}of f.Yv){if(a.length<c+b.length)continue;let f=!0;for(let d=0;d<b.length;d++)if(a[c+d]!==b[d]){f=!1;break}if(f&&(!e||a.length>=12&&87===a[8]&&69===a[9]&&66===a[10]&&80===a[11]))return d}return null}(g);if(!i)return null;return{url:`data:${i};base64,${g.toString("base64")}`,mimeType:i}}catch{return null}finally{m&&clearTimeout(m),o.close().catch(()=>{})}}},29675:(a,b,c)=>{c.d(b,{P:()=>l});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(44236);function k(a,b,c=null){return(0,g.k)({id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model},b,c)}function l(a,b){if(!a)return null;let c=[];switch(a.type){case"message_start":{b.messageId=a.message?.id||`msg_${Date.now()}`,b.model=a.message?.model,b.toolCallIndex=0;let d=a.message?.usage;if(d&&"object"==typeof d){let a="number"==typeof d.input_tokens?d.input_tokens:0,c="number"==typeof d.cache_read_input_tokens?d.cache_read_input_tokens:0,e="number"==typeof d.cache_creation_input_tokens?d.cache_creation_input_tokens:0,f=a+c+e;b.usage={prompt_tokens:f,completion_tokens:0,total_tokens:f,input_tokens:a,output_tokens:0},c>0&&(b.usage.cache_read_input_tokens=c),e>0&&(b.usage.cache_creation_input_tokens=e)}c.push(k(b,{role:f.z7.ASSISTANT}));break}case"content_block_start":{let d=a.content_block;if(d?.type==="server_tool_use"){b.serverToolBlockIndex=a.index;break}if(d?.type===f.R4.TEXT)b.textBlockStarted=!0;else if(d?.type===f.R4.TOOL_USE){let e=b.toolCallIndex++,g=b.toolNameMap?.get(d.name)||d.name,h={index:e,id:d.id,type:f.x4.FUNCTION,function:{name:g,arguments:""}};b.toolCalls.set(a.index,h),c.push(k(b,{tool_calls:[h]}))}break}case"content_block_delta":{if(a.index===b.serverToolBlockIndex)break;let d=a.delta;if(d?.type==="text_delta"&&d.text)c.push(k(b,{content:d.text}));else if(d?.type==="thinking_delta"&&d.thinking)c.push(k(b,(0,i.B)(d.thinking)));else if(d?.type==="input_json_delta"&&d.partial_json){let e=b.toolCalls.get(a.index);e&&(e.function.arguments+=d.partial_json,c.push(k(b,{tool_calls:[{index:e.index,id:e.id,function:{arguments:d.partial_json}}]})))}break}case"content_block_stop":if(a.index===b.serverToolBlockIndex){b.serverToolBlockIndex=-1;break}b.textBlockStarted=!1,b.thinkingBlockStarted=!1;break;case"message_delta":if(a.usage&&"object"==typeof a.usage){let c=b.usage||{},d="number"==typeof a.usage.input_tokens?a.usage.input_tokens:c.input_tokens||0,e="number"==typeof a.usage.output_tokens?a.usage.output_tokens:0,f="number"==typeof a.usage.cache_read_input_tokens?a.usage.cache_read_input_tokens:c.cache_read_input_tokens||0,g="number"==typeof a.usage.cache_creation_input_tokens?a.usage.cache_creation_input_tokens:c.cache_creation_input_tokens||0,h=d+f+g;b.usage={prompt_tokens:h,completion_tokens:e,total_tokens:h+e,input_tokens:d,output_tokens:e},f>0&&(b.usage.cache_read_input_tokens=f),g>0&&(b.usage.cache_creation_input_tokens=g)}if(a.delta?.stop_reason){b.finishReason=m(a.delta.stop_reason);let d="refusal"===a.delta.stop_reason&&a.delta.stop_details?.explanation;d&&c.push(k(b,{content:d}));let e=k(b,{},b.finishReason);b.usage&&(e.usage=(0,h.B)({input_tokens:b.usage.input_tokens||0,output_tokens:b.usage.output_tokens||0,cache_read_input_tokens:b.usage.cache_read_input_tokens,cache_creation_input_tokens:b.usage.cache_creation_input_tokens},"claude")),c.push(e),b.finishReasonSent=!0}break;case"message_stop":if(!b.finishReasonSent){let a=b.finishReason||(b.toolCalls?.size>0?f.bC.TOOL_CALLS:f.bC.STOP),d=b.usage&&"object"==typeof b.usage?{usage:{prompt_tokens:b.usage.input_tokens||0,completion_tokens:b.usage.output_tokens||0,total_tokens:(b.usage.input_tokens||0)+(b.usage.output_tokens||0)}}:{};c.push({...k(b,{},a),...d}),b.finishReasonSent=!0}}return c.length>0?c:null}let m=a=>(0,j.F)(a,"claude");(0,d.kz)(e.h.CLAUDE,e.h.OPENAI,null,l)},32271:(a,b,c)=>{c.d(b,{k:()=>d});function d({id:a,created:b,model:c},e,f=null){return{id:a,object:"chat.completion.chunk",created:b,model:c,choices:[{index:0,delta:e,finish_reason:f}]}}},32546:(a,b,c)=>{c.d(b,{o:()=>o});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(29463),k=c(44236),l=c(71782);function m(a){return{id:`chatcmpl-${a.messageId}`,created:Math.floor(Date.now()/1e3),model:a.model}}function n(a,b,c=null){let d=a.name,e=b.toolNameMap?.get(d)||d,h=a.args||{},i=b.functionIndex++,j=a.id||`${e}-${Date.now()}-${i}`;c&&(0,l.Sk)(j,c,b.sessionId,b.model);let k={id:j,index:i,type:f.x4.FUNCTION,function:{name:e,arguments:JSON.stringify(h)}};return b.geminiToolCallCount=(b.geminiToolCallCount||0)+1,(0,g.k)(m(b),{tool_calls:[k]},null)}function o(a,b){if(!a)return null;let c=a.response||a;if(!c||!c.candidates?.[0])return null;let d=[],e=c.candidates[0],l=e.content;if(b.messageId||(b.messageId=c.responseId||`msg_${Date.now()}`,b.model=c.modelVersion||b.model||"gemini",b.functionIndex=0,b.geminiToolCallCount=0,d.push((0,g.k)(m(b),{role:f.z7.ASSISTANT},null))),l?.parts)for(let a of l.parts){let c=a.thoughtSignature||a.thought_signature;c&&"string"==typeof c&&(b.pendingThoughtSignature=c);let e=!0===a.thought;if(c){let f=void 0!==a.text&&""!==a.text,h=!!a.functionCall;if(!f&&!h)continue;f&&d.push((0,g.k)(m(b),e?(0,i.B)(a.text):{content:a.text},null)),h&&(d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null);continue}if(void 0!==a.text&&""!==a.text&&d.push((0,g.k)(m(b),e?(0,i.B)(a.text):{content:a.text},null)),a.functionCall){let c=b.pendingThoughtSignature||null;d.push(n(a.functionCall,b,c)),b.pendingThoughtSignature=null}let h=a.inlineData||a.inline_data;if(h?.data){let a=h.mimeType||h.mime_type||f.BY;d.push((0,g.k)(m(b),{images:[{type:f.x4.IMAGE_URL,image_url:{url:(0,j.$q)(a,h.data)}}]},null))}}let o=c.usageMetadata||a.usageMetadata,p=(0,h.B)(o,"gemini");if(p&&(b.usage=p),e.finishReason){let a=(0,k.F)(e.finishReason,"gemini");a===f.bC.STOP&&b.geminiToolCallCount>0&&(a=f.bC.TOOL_CALLS);let c=(0,g.k)(m(b),{},a);b.usage&&(c.usage=b.usage),d.push(c),b.finishReason=a}return d.length>0?d:null}(0,d.kz)(e.h.GEMINI,e.h.OPENAI,null,o),(0,d.kz)(e.h.GEMINI_CLI,e.h.OPENAI,null,o),(0,d.kz)(e.h.ANTIGRAVITY,e.h.OPENAI,null,o),(0,d.kz)(e.h.VERTEX,e.h.OPENAI,null,o)},34097:(a,b,c)=>{function d({promptTokens:a,completionTokens:b,totalTokens:c,cachedTokens:e=0,cacheCreationTokens:f=0,reasoningTokens:g=0}){let h={prompt_tokens:a,completion_tokens:b,total_tokens:c};return(e>0||f>0)&&(h.prompt_tokens_details={},e>0&&(h.prompt_tokens_details.cached_tokens=e),f>0&&(h.prompt_tokens_details.cache_creation_tokens=f)),g>0&&(h.completion_tokens_details={reasoning_tokens:g}),h}c.d(b,{B:()=>g,c:()=>d});let e=a=>"number"==typeof a?a:0,f={claude(a){let b=e(a.input_tokens),c=e(a.output_tokens),d=e(a.cache_read_input_tokens),f=e(a.cache_creation_input_tokens),g=b+d+f;return{promptTokens:g,completionTokens:c,totalTokens:g+c,cachedTokens:d,cacheCreationTokens:f}},gemini(a){let b=e(a.cachedContentTokenCount),c=e(a.promptTokenCount),d=e(a.thoughtsTokenCount),f=e(a.totalTokenCount),g=e(a.candidatesTokenCount);return 0===g&&f>0&&(g=f-c-d)<0&&(g=0),{promptTokens:c,completionTokens:g+d,totalTokens:f,cachedTokens:b,reasoningTokens:d}},kiro(a){let b=e(a.inputTokens),c=e(a.outputTokens),d=e(a.cache_read_input_tokens)||e(a.cachedTokens)||e(a.cached_tokens),f=e(a.cache_creation_input_tokens),g={promptTokens:b,completionTokens:c,totalTokens:b+c};return d>0&&(g.cachedTokens=d),f>0&&(g.cacheCreationTokens=f),g},ollama(a){let b=e(a.prompt_eval_count),c=e(a.eval_count);return{promptTokens:b,completionTokens:c,totalTokens:b+c,cachedTokens:e(a.prompt_eval_cached_count)}},commandcode(a){let b=e(a.inputTokens),c=e(a.outputTokens),d="number"==typeof a.totalTokens?a.totalTokens:b+c;return{promptTokens:b,completionTokens:c,totalTokens:d}}};function g(a,b){let c=f[b];return c&&a&&"object"==typeof a?d(c(a)):null}},39551:(a,b,c)=>{c.d(b,{_:()=>m});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(17242),j=c(44236);function k(a){return(0,h.B)(a,"ollama")}function l(a){return a.map((a,b)=>({index:a.function?.index??b,id:a.id||(0,i.eG)(b),type:f.x4.FUNCTION,function:{name:a.function?.name||"",arguments:"string"==typeof a.function?.arguments?a.function.arguments:JSON.stringify(a.function?.arguments||{})}}))}function m(a){let b=a.message||{},c=b.content||"",d=b.thinking||"",e=Array.isArray(b.tool_calls)?b.tool_calls:[],g={role:f.z7.ASSISTANT};c&&(g.content=c),d&&(g.reasoning_content=d),e.length>0&&(g.tool_calls=l(e)),g.content||g.tool_calls||(g.content="");let h=(0,j.F)(a.done_reason,"ollama");return e.length>0&&(h=f.bC.TOOL_CALLS),{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:a.model||"ollama",choices:[{index:0,message:g,finish_reason:h}],usage:k(a)}}(0,d.kz)(e.h.OLLAMA,e.h.OPENAI,null,function(a,b){if(!a||"object"!=typeof a)return null;b.ollama||(b.ollama={id:`chatcmpl-${Date.now()}`,created:Math.floor(Date.now()/1e3),model:a.model||b.model});let{id:c,created:d,model:e}=b.ollama;if(a.done){let h=k(a),i=(0,j.F)(a.done_reason,"ollama");(a.done_reason===f.bC.TOOL_CALLS||b.hadToolCalls)&&(i=f.bC.TOOL_CALLS);let l=(0,g.k)({id:c,created:d,model:e},{},i);return l.usage=h,l}let h=a.message;if(!h)return null;let i="string"==typeof h.content?h.content:"",m="string"==typeof h.thinking?h.thinking:"",n=Array.isArray(h.tool_calls)?h.tool_calls:null;if(!i&&!m&&!n)return null;i&&(b.accumulatedContent=(b.accumulatedContent||"")+i),m&&(b.accumulatedThinking=(b.accumulatedThinking||"")+m);let o={};return i&&(o.content=i),m&&(o.reasoning_content=m),n&&(b.hadToolCalls=!0,o.tool_calls=l(n)),(0,g.k)({id:c,created:d,model:e},o,null)})},44090:(a,b,c)=>{c.d(b,{B:()=>e,V:()=>f});var d=c(43698);function e(a,b=!1){return b?{role:d.z7.ASSISTANT,reasoning_content:a}:{reasoning_content:a}}function f(a){if(!a||"object"!=typeof a)return"";if("string"==typeof a.reasoning_content&&a.reasoning_content)return a.reasoning_content;if("string"==typeof a.reasoning&&a.reasoning)return a.reasoning;let b=a.reasoning_details;return Array.isArray(b)?b.map(a=>"string"==typeof a?a:a?.text||a?.content||"").join(""):""}},44236:(a,b,c)=>{c.d(b,{F:()=>e,Q:()=>f});var d=c(69320);function e(a,b){switch(b){case"claude":switch(a){case d.Ut.END_TURN:return d.bC.STOP;case d.Ut.MAX_TOKENS:return d.bC.LENGTH;case d.Ut.TOOL_USE:return d.bC.TOOL_CALLS;case d.Ut.STOP_SEQUENCE:return d.bC.STOP;case d.Ut.REFUSAL:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"commandcode":switch(a){case"stop":case"error":return d.bC.STOP;case"length":return d.bC.LENGTH;case"tool-calls":case"tool_use":return d.bC.TOOL_CALLS;case"content-filter":return d.bC.CONTENT_FILTER;default:return a||d.bC.STOP}case"gemini":switch(String(a).toUpperCase()){case d.a_.STOP:return d.bC.STOP;case d.a_.MAX_TOKENS:return d.bC.LENGTH;case d.a_.SAFETY:case d.a_.RECITATION:case d.a_.BLOCKLIST:case d.a_.PROHIBITED_CONTENT:return d.bC.CONTENT_FILTER;default:return d.bC.STOP}case"kiro":case"ollama":switch(a){case"tool_calls":case"tool_use":return d.bC.TOOL_CALLS;case"length":case"max_tokens":return d.bC.LENGTH;default:return d.bC.STOP}default:return a||d.bC.STOP}}function f(a,b){if("claude"!==b)return a;switch(a){case d.bC.STOP:return d.Ut.END_TURN;case d.bC.LENGTH:return d.Ut.MAX_TOKENS;case d.bC.TOOL_CALLS:return d.Ut.TOOL_USE;case d.bC.CONTENT_FILTER:return d.Ut.REFUSAL;default:return d.Ut.END_TURN}}},47723:(a,b,c)=>{c.d(b,{H:()=>n});var d=c(88499),e=c(14170),f=c(43698),g=c(32271),h=c(34097),i=c(44090),j=c(17242),k=c(44236);function l(a,b,c=null){return(0,g.k)({id:a.responseId,created:a.created,model:a.model},b,c)}let m=a=>(0,k.F)(a,"commandcode");function n(a,b){var c;if(!a)return null;if(a&&"object"==typeof a&&"chat.completion.chunk"===a.object)return a;let d=a;if("string"==typeof a){let b=a.trim();if(!b)return null;let c=b.startsWith("data:")?b.slice(5).trim():b;if(!c||"[DONE]"===c)return null;try{d=JSON.parse(c)}catch{return null}}if(!d||"object"!=typeof d||!d.type)return null;c=d.model,b.responseId||(b.responseId=`chatcmpl-${Date.now()}`,b.created=Math.floor(Date.now()/1e3),b.model=b.model||c||"commandcode",b.chunkIndex=0,b.toolIndex=0,b.toolIndexById=new Map,b.openTools=new Set,b.openText=!1,b.finishReason=null,b.usage=null);let e=[];switch(d.type){case"text-delta":{let a=d.text||d.delta||"";if(!a)break;let c=0===b.chunkIndex?{role:f.z7.ASSISTANT,content:a}:{content:a};b.chunkIndex++,b.openText=!0,e.push(l(b,c));break}case"reasoning-delta":{let a=d.text||"";if(!a)break;let c=(0,i.B)(a,0===b.chunkIndex);b.chunkIndex++,e.push(l(b,c));break}case"tool-input-start":{let a=d.id||d.toolCallId||(0,j.eG)(b.toolIndex),c=b.toolIndexById.get(a);null==c&&(c=b.toolIndex++,b.toolIndexById.set(a,c)),b.openTools.add(a);let g={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:""}}]};b.chunkIndex++,e.push(l(b,g));break}case"tool-input-delta":{let a=d.id||d.toolCallId,c=b.toolIndexById.get(a);if(null==c)break;let f={tool_calls:[{index:c,function:{arguments:d.delta||d.inputTextDelta||""}}]};e.push(l(b,f));break}case"tool-call":{let a=d.toolCallId;if(b.toolIndexById.has(a))break;let c=b.toolIndex++;b.toolIndexById.set(a,c);let g="string"==typeof d.input?d.input:JSON.stringify(d.input??{}),h={...0===b.chunkIndex?{role:f.z7.ASSISTANT}:{},tool_calls:[{index:c,id:a,type:f.x4.FUNCTION,function:{name:d.toolName||"",arguments:g}}]};b.chunkIndex++,e.push(l(b,h));break}case"finish-step":b.finishReason=m(d.finishReason),d.usage&&(b.usage=d.usage);break;case"finish":{let a=b.finishReason||m(d.finishReason||"stop"),c=l(b,{},a),f=d.totalUsage||b.usage,g=(0,h.B)(f,"commandcode");g&&(c.usage=g),e.push(c);break}case"error":{let a=d.error??d.message??"unknown",b="string"==typeof a?a:JSON.stringify(a);throw Error(`[CommandCode error: ${b}]`)}}return e.length?e:null}(0,d.kz)(e.h.COMMANDCODE,e.h.OPENAI,null,n)},52136:(a,b,c)=>{c.d(b,{NU:()=>l,kD:()=>i,nF:()=>j,sS:()=>k,z:()=>v});var d=c(24),e=c(72239),f=c(26070),g=c(58028);let h={openai:"openai","openai-responses":"openai","openai-response":"openai",codex:"openai",claude:"claude-budget",gemini:"gemini-budget","gemini-cli":"gemini-budget",vertex:"gemini-budget",antigravity:"gemini-budget",kiro:"kiro",commandcode:"commandcode"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if("string"!=typeof a)return{cleanModel:a,override:null};let b=a.match(/^(.*)\(([^()]+)\)\s*$/);if(!b)return{cleanModel:a,override:null};let c=b[1].trim(),d=b[2].trim().toLowerCase();return"none"===d||"off"===d?{cleanModel:c,override:{mode:"none"}}:"auto"===d?{cleanModel:c,override:{mode:"auto"}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:d}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}function k(a){if(!a||"object"!=typeof a)return null;let b=a.output_config?.effort;if("string"==typeof b&&b){let a=b.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let c=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);if("string"==typeof c&&c){let a=c.toLowerCase();return"none"===a||"off"===a?{mode:"none"}:"auto"===a?{mode:"auto"}:{mode:"level",level:a}}let d=a.thinking;if(d&&"object"==typeof d){if("disabled"===d.type)return{mode:"none"};if("adaptive"===d.type||"enabled"===d.type){let a=Number(d.budget_tokens);return Number.isFinite(a)&&a>0?{mode:"budget",budget:a}:{mode:"auto"}}}let e=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(e&&"object"==typeof e){if("string"==typeof e.thinkingLevel)return{mode:"level",level:e.thinkingLevel.toLowerCase()};let a=Number(e.thinkingBudget);if(Number.isFinite(a))return 0===a?{mode:"none"}:a<0?{mode:"auto"}:{mode:"budget",budget:a}}if(!1===a.enable_thinking)return{mode:"none"};if(!0===a.enable_thinking){let b=Number(a.thinking_budget);return Number.isFinite(b)&&b>0?{mode:"budget",budget:b}:{mode:"auto"}}return null}function l(a){let b=k(a);if(!b||"none"===b.mode)return b;let c=function(a){if(a.reasoning&&"object"==typeof a.reasoning){let b=a.reasoning.summary;return"string"==typeof b&&b&&"none"!==b?"summarized":void 0}if("string"==typeof a.reasoning_effort)return"summarized"}(a);return c?{...b,display:c}:b}let m=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function n(a,b){let c;if("budget"===a.mode)c=a.budget;else if("level"===a.mode)c=(0,g.nE)(a.level);else if("auto"===a.mode)return -1;if(Number.isFinite(c))return b&&(null!=b.min&&c<b.min&&(c=b.min),null!=b.max&&c>b.max&&(c=b.max)),c}function o(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}function p(a,b){return"max"!==a&&"ultra"!==a||b?.includes(a)?a:"ultra"===a&&b?.includes("max")?"max":"xhigh"}let q={minimal:4096,low:8192,medium:16384,high:65535};function r(a){return a.request&&"object"==typeof a.request?(a.request.generationConfig&&"object"==typeof a.request.generationConfig||(a.request.generationConfig={}),a.request.generationConfig):(a.generationConfig&&"object"==typeof a.generationConfig||(a.generationConfig={}),a.generationConfig)}function s(a,b){r(a).thinkingConfig=b}function t(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=r(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function u(a){delete a.thinking,delete a.reasoning_effort,delete a.reasoning,delete a.thinkingConfig,delete a.enable_thinking,delete a.thinking_budget,delete a.output_config,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig,a.params&&"object"==typeof a.params&&(delete a.params.reasoning_effort,delete a.params.thinking)}function v(a,b,c,i=null,l){if(!c||"object"!=typeof c)return c;let{cleanModel:r,override:w}=j(b),x=w||l||k(c),y=(0,d.getCapabilitiesForModel)(i,r);if(!y.reasoning)return u(c),c;if(!x)return c;let z=function(a,b,c){if("commandcode"===a)return"commandcode";let e=c?f.xq[c]?.thinkingFormat:null;if(e)return e;let g=(0,d.getCapabilitiesForModel)(c,b);return g.thinkingFormat&&!(("openai"===a||"openai-responses"===a)&&m.has(g.thinkingFormat))?"muse"===c&&"openai-responses"===a?"openai-responses":g.thinkingFormat:h[a]||"openai"}(a,r,i),A=(0,e.k)(i,r),B="string"==typeof c.thinking?.display?c.thinking.display:l?.display;return u(c),!function(a,b,c,d,e,f){var h;let i="none"===c.mode,j=!1!==d.thinkingCanDisable,k=i&&!j?{mode:"level",level:"minimal"}:c;switch(a){case"openai":{if(i&&j){b.reasoning_effort="none";break}let a=o(k);a&&(b.reasoning_effort=p(a,e));break}case"openai-responses":{if(i&&j){delete b.reasoning;break}let a=o(k);if(a){let c=b.reasoning&&"object"==typeof b.reasoning&&!Array.isArray(b.reasoning)?b.reasoning:{};b.reasoning={...c,effort:p(a,e)},b.reasoning.summary||(b.reasoning.summary="auto")}delete b.reasoning_effort;break}case"claude-adaptive":{if(i&&j){b.thinking={type:"disabled"};break}j?b.thinking={type:"adaptive",...f?{display:f}:{}}:delete b.thinking;let a=o(k);b.output_config={effort:"auto"===a?"high":"minimal"===a?"low":"xhigh"!==a||e?.includes("xhigh")?a:"high"};break}case"claude-budget":{if(i&&j){b.thinking={type:"disabled"};break}let a=n(k,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...f?{display:f}:{}}:{type:"enabled",budget_tokens:a||8192,...f?{display:f}:{}};break}case"gemini-level":{let a,c=i?"minimal":(a="auto"===k.mode?"high":o(k)||"high",(0,g.wd)(a)),f=e?.find(a=>"none"!==a);e?.length&&f&&!e.includes(c)&&(c=f),s(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),t(b,q[c]||q.high,d);break}case"gemini-budget":{if(i&&j){s(b,{thinkingBudget:0,includeThoughts:!1});break}let a=n(k,d.thinkingRange);s(b,{thinkingBudget:a??-1,includeThoughts:!0}),t(b,-1!==(h=a??-1)&&Number.isFinite(h)?h<=1024?8192:h<=8192?16384:h<=24576?32768:65535:32768,d);break}case"zai":if(i&&j){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=o(k);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(i&&j){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=n(k,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(i&&j){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=o(k),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"===c&&e&&!e.includes("max")?"high":c;break}case"kimi":{let a;if(i&&j){b.thinking={type:"disabled"};break}let c="auto"===(a=o(k))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"minimax":b.thinking={type:i&&j?"disabled":"adaptive"};break;case"hunyuan":{if(i&&j){b.thinking={type:"disabled"};break}let a=n(k,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(i&&j)break;let a=o(k);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(i&&j)break;let a="auto"===k.mode?"medium":o(k);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"tokenrouter":{if(i||"auto"===k.mode)break;let a=o(k);a&&(b.reasoning_effort=a);break}case"kiro":break;case"commandcode":{if(b.params&&"object"==typeof b.params||(b.params={}),i&&j){delete b.params.reasoning_effort;break}let a=o(k);a&&(b.params.reasoning_effort=a)}}}(z,c,x,y,A,B),c}},58028:(a,b,c)=>{c.d(b,{Dl:()=>d,Vp:()=>h,nE:()=>e,vz:()=>g,wd:()=>f});let d={none:0,minimal:512,low:1024,medium:8192,high:24576,xhigh:32768,max:128e3};function e(a){if(a)return d[String(a).toLowerCase()]}function f(a){let b=String(a).toLowerCase().trim();return"none"===b||"off"===b?"minimal":"xhigh"===b||"max"===b?"high":b}function g(a){let b=Number(a);return!b||b<=0?null:b<=768?"minimal":b<=4096?"low":b<=16384?"medium":b<=28672?"high":b<=80384?"xhigh":"max"}function h(a){return!a||a<=0?null:a<=2048?"low":a<=16384?"medium":"high"}},60210:(a,b,c)=>{c.d(b,{HR:()=>function a(b,c){if(!c?.size||!b)return b;if(Array.isArray(b))return b.map(b=>a(b,c));if("object"!=typeof b)return b;let d=b,e=(a,c)=>{d===b&&(d={...b}),d[a]=c};if("content_block_start"===b.type){let a=b.content_block;a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)&&e("content_block",{...a,name:c.get(a.name)})}Array.isArray(b.content)&&e("content",b.content.map(a=>a?.type==="tool_use"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(b.choices)&&e("choices",b.choices.map(a=>{let b=!1,d={...a};for(let e of["delta","message"]){let f=a?.[e];if(!f||!Array.isArray(f.tool_calls)||0===f.tool_calls.length)continue;let g=f.tool_calls.map(a=>{let d=a?.function?.name;return"string"==typeof d&&c.has(d)?(b=!0,{...a,function:{...a.function,name:c.get(d)}}):a});d[e]={...f,tool_calls:g}}return b?d:a})),Array.isArray(b.output)&&e("output",b.output.map(a=>a?.type==="function_call"&&"string"==typeof a.name&&c.has(a.name)?{...a,name:c.get(a.name)}:a));let f=b.item;return f?.type==="function_call"&&"string"==typeof f.name&&c.has(f.name)&&e("item",{...f,name:c.get(f.name)}),d},Ke:()=>k,g4:()=>l});let d=["read","shell"],e={read:{description:"Read the contents of a file or directory. Supports text files, images, and PDFs. Images and PDFs are presented directly to the model. Each text line is prefixed by its 1-based line number as <line>: <content>. The prefix is for reference and is not part of the file content. Directory entries are returned one per line. Use offset and limit to read large files or directories in sections. Prefer one larger read over many small slices, and use grep to find specific content in large files.",parameters:{type:"object",properties:{path:{type:"string",description:"File or directory to read"},offset:{type:"integer",minimum:0,description:"The line or directory entry to start reading from (1-based)"},limit:{type:"integer",minimum:0,description:"The maximum number of lines or directory entries to read (defaults to and capped at 2000)"}},required:["path"],additionalProperties:!1}},shell:{description:"Execute a shell command and return its output. Commands run on Linux using bash. Quote file paths containing spaces or special characters. Prefer dedicated tools over shell commands when possible. When output is large, the full result is saved to a file and a truncated preview is returned. Rely on automatic truncation unless filtering the output is more useful. Commands accept an optional timeout, background commands have no timeout by default. Background commands return immediately, and you will be notified when they complete.",parameters:{type:"object",properties:{command:{type:"string",description:"Shell command string to execute"},workdir:{type:"string",description:"Working directory to execute the command in. Defaults to the current working directory. When possible, avoid changing directories in the command and set the working directory here instead."},timeout:{type:"integer",minimum:0,description:"Timeout in milliseconds. Set to 0 to disable the timeout. Defaults to 120000 for foreground commands. Background commands have no timeout by default."},background:{type:"boolean",description:"Run the command in the background and return immediately (useful for dev servers and long-running builds). You do not need to use '&' at the end of the command when using this parameter. You will be notified when it completes. DO NOT poll for completion."}},required:["command"],additionalProperties:!1}}},f=new WeakMap;function g(a){let b=String(a??"").trim();return d.includes(b)?b:""}function h(a){if(!a||"object"!=typeof a||Array.isArray(a))return"";if("string"==typeof a.name&&a.name.trim())return a.name.trim();let b=a.function;return b&&"object"==typeof b&&!Array.isArray(b)&&"string"==typeof b.name?b.name.trim():""}function i(a){let b=a?.function;return b&&"object"==typeof b&&!Array.isArray(b)?b:null}function j(a){return new Map([...a].map(([a,b])=>[b,a]))}function k(a,b){var c,k;if(!a||"object"!=typeof a)return new Map;let{tools:l,map:m}=function(a){let b=new Map;if(!Array.isArray(a)||0===a.length)return{tools:a,map:b};let c=new Set(a.map(h)),d=new Set,f=[];for(let j of a){if(!j||"object"!=typeof j||Array.isArray(j)){f.push(j);continue}let a=g(h(j));if(!a){f.push(j);continue}if(d.has(a))continue;if(d.add(a),function(a,b){let c=a&&(i(a)||a),d=e[b];return!!c&&c.description===d.description&&JSON.stringify(c.parameters)===JSON.stringify(d.parameters)}(j,a)){f.push(j);continue}let k=`${a}_client`;for(let b=2;c.has(k);b++)k=`${a}_client${b}`;c.add(k),b.set(k,a),f.push(function(a,b){let c=i(a);return c?{...a,function:{...c,name:b}}:{...a,name:b}}(j,k))}return{tools:f,map:b}}(a.tools);a.tools=Array.isArray(l)?l:[];let n=function(a,b){let c=[];if(!Array.isArray(a))return c;for(let f of d){if(a.some(a=>g(h(a))===f))continue;let{description:d,parameters:i}=e[f];a.push(b?{type:"function",name:f,description:d,parameters:i,strict:!1}:{type:"function",function:{name:f,description:d,parameters:i}}),c.push(f)}return c}(a.tools,b);return!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=a.tool_choice;if(!c||"object"!=typeof c||Array.isArray(c))return;let d=j(b);if("string"==typeof c.name){let b=d.get(c.name.trim());b&&(a.tool_choice={...c,name:b});return}let e=c.function;if(e&&"object"==typeof e&&!Array.isArray(e)&&"string"==typeof e.name){let b=d.get(e.name.trim());b&&(a.tool_choice={...c,function:{...e,name:b}})}}(a,m),!function(a,b){if(!a||"object"!=typeof a||!b?.size)return;let c=j(b);Array.isArray(a.input)&&(a.input=a.input.map(a=>a?.type==="function_call"&&c.has(a.name)?{...a,name:c.get(a.name)}:a)),Array.isArray(a.messages)&&(a.messages=a.messages.map(a=>Array.isArray(a?.tool_calls)?{...a,tool_calls:a.tool_calls.map(a=>c.has(a?.function?.name)?{...a,function:{...a.function,name:c.get(a.function.name)}}:a)}:a))}(a,m),n.length&&function(a,b,c){let d=c.map(a=>`\`${a}\``).join(" or "),e=c.length>1?`Do not call the ${d} tools; they are placeholders that do nothing. Use the other tools you have been given instead.`:`Do not call the ${d} tool; it is a placeholder that does nothing. Use the other tools you have been given instead.`;if(b){a.instructions="string"==typeof a.instructions&&a.instructions.trim()?`${a.instructions}
|
|
56
56
|
|
|
57
57
|
${e}`:e;return}if(!Array.isArray(a.messages)||void 0!==a.system)return;let f=a.messages[0];f?.role==="system"&&"string"==typeof f.content?a.messages=[{...f,content:`${f.content}
|
|
58
58
|
|
|
59
59
|
${e}`},...a.messages.slice(1)]:a.messages=[{role:"system",content:e},...a.messages]}(a,b,n),!a.tool_choice&&b&&(a.tool_choice="auto"),c=a,k=m,c&&"object"==typeof c&&k?.size&&f.set(c,k),m}function l(a){return a&&"object"==typeof a&&f.get(a)||null}},60983:(a,b,c)=>{c.d(b,{t:()=>k});var d=c(88499),e=c(14170),f=c(74525),g=c(29463),h=c(43698),i=c(97721);function j(a){return"string"!=typeof a?"":a.replace(/^x-anthropic-billing-header:[^\n]*(?:\r?\n)?/i,"")}function k(a,b,c){let d={model:a,messages:[],stream:c};if(b.max_tokens&&(d.max_tokens=(0,f.M)(b)),void 0!==b.temperature&&(d.temperature=b.temperature),b.system){let a=Array.isArray(b.system)?b.system.map(a=>j(a.text||"")).filter(Boolean).join("\n"):j(b.system);a&&d.messages.push({role:h.z7.SYSTEM,content:a})}if(b.messages&&Array.isArray(b.messages))for(let a=0;a<b.messages.length;a++){let c=function(a){if(a.content&&"object"==typeof a.content&&!Array.isArray(a.content)&&(a.content=[a.content]),a.role===h.z7.SYSTEM){var b;let c,d=(c=(Array.isArray(b=a.content)?b.filter(a=>a?.type===h.R4.TEXT).map(a=>a.text||""):["string"==typeof b?b:""]).filter(Boolean).join("\n")).trim()?`<instructions>
|
|
60
60
|
${c}
|
|
61
61
|
</instructions>`:"";return d?{role:h.z7.USER,content:d}:null}let c=a.role===h.z7.USER||a.role===h.z7.TOOL?h.z7.USER:h.z7.ASSISTANT;if("string"==typeof a.content)return{role:c,content:a.content};if(Array.isArray(a.content)){let b=[],d=[],e=[];for(let c of a.content)switch(c.type){case h.R4.TEXT:b.push({type:h.x4.TEXT,text:c.text});break;case h.R4.IMAGE:c.source?.type==="base64"&&b.push({type:h.x4.IMAGE_URL,image_url:{url:(0,g.$q)(c.source.media_type,c.source.data)}});break;case h.R4.TOOL_USE:d.push({id:c.id,type:h.x4.FUNCTION,function:{name:c.name,arguments:JSON.stringify(c.input||{})}});break;case h.R4.TOOL_RESULT:{let a="",d=[];if("string"==typeof c.content)a=c.content;else if(Array.isArray(c.content)){for(let a of c.content)a?.type===h.R4.IMAGE&&a.source?.type==="base64"&&d.push({type:h.x4.IMAGE_URL,image_url:{url:(0,g.$q)(a.source.media_type,a.source.data)}});a=c.content.filter(a=>a?.type===h.R4.TEXT).map(a=>a.text).join("\n")||(d.length?"":JSON.stringify(c.content))}else c.content&&(a=JSON.stringify(c.content));e.push({role:h.z7.TOOL,tool_call_id:c.tool_use_id,content:a}),d.length&&(b.push({type:h.x4.TEXT,text:`[Image from tool result ${c.tool_use_id}]`}),b.push(...d))}}if(e.length>0)return b.length>0?[...e,{role:h.z7.USER,content:(0,i.z)(b)}]:e;if(d.length>0){let a={role:h.z7.ASSISTANT};return b.length>0&&(a.content=(0,i.z)(b)),a.tool_calls=d,a}if(b.length>0)return{role:c,content:(0,i.z)(b)};if(0===a.content.length)return{role:c,content:""}}return null}(b.messages[a]);c&&(Array.isArray(c)?d.messages.push(...c):d.messages.push(c))}return function(a){for(let b=0;b<a.length;b++){let c=a[b];if(c.role===h.z7.ASSISTANT&&c.tool_calls&&c.tool_calls.length>0){let d=c.tool_calls.map(a=>a.id),e=new Set,f=b+1;for(let c=b+1;c<a.length;c++){let b=a[c];if(b.role===h.z7.TOOL&&b.tool_call_id)e.add(b.tool_call_id),f=c+1;else break}let g=d.filter(a=>!e.has(a));if(g.length>0){let c=g.map(a=>({role:h.z7.TOOL,tool_call_id:a,content:"[No response received]"}));a.splice(f,0,...c),b=f+c.length-1}}}}(d.messages),b.tools&&Array.isArray(b.tools)&&(d.tools=b.tools.map(a=>({type:h.x4.FUNCTION,function:{name:a.name,description:String(a.description||""),parameters:a.input_schema||{type:"object",properties:{}}}}))),b.tool_choice&&(d.tool_choice=function(a){if(!a)return"auto";if("string"==typeof a)return a;switch(a.type){case"auto":default:return"auto";case"any":return"required";case"tool":return{type:h.x4.FUNCTION,function:{name:a.name}}}}(b.tool_choice)),void 0!==b.reasoning_effort?d.reasoning_effort=b.reasoning_effort:b.reasoning?.effort!==void 0&&(d.reasoning_effort=b.reasoning.effort),void 0!==b.reasoning&&(d.reasoning=b.reasoning),d}(0,d.kz)(e.h.CLAUDE,e.h.OPENAI,k,null)},65377:(a,b,c)=>{c.d(b,{Z:()=>h,h:()=>j});var d=c(88499),e=c(14170),f=c(37981),g=c(43698);function h(a,b,c,d){if(!b.input)return b;let e={...b};e.messages=[],b.instructions&&e.messages.push({role:g.z7.SYSTEM,content:b.instructions});let h=null,j=[],k="",l="",m=[],n=new Set,o=(0,f.me)(b.input);if(!o)return b;let p=a=>{if(Array.isArray(a.summary)){let b=a.summary.map(a=>a?.text||"").filter(Boolean).join("\n");if(b)return b}if(Array.isArray(a.content)){let b=a.content.map(a=>a?.text||"").filter(Boolean).join("\n");if(b)return b}return""},q=a=>{k&&(a.reasoning_content=k),l&&(a.encrypted_content=l),k="",l=""};for(let a of o){let b=a.type||(a.role?g.Du.MESSAGE:null);if(b===g.Du.MESSAGE){if(h&&(e.messages.push(h),h=null),j.length>0){for(let a of j)e.messages.push(a);j=[]}let b=Array.isArray(a.content)?a.content.map(a=>{if(a.type===g.Du.INPUT_TEXT||a.type===g.Du.OUTPUT_TEXT)return{type:g.x4.TEXT,text:a.text};if(a.type===g.Du.INPUT_IMAGE){let b=a.image_url||a.file_id||"";return{type:g.x4.IMAGE_URL,image_url:{url:b,detail:a.detail||"auto"}}}return a}):a.content,c={role:a.role,content:b};a.role===g.z7.ASSISTANT?q(c):(k="",l=""),e.messages.push(c)}else if(b===g.Du.FUNCTION_CALL||b===g.Du.CUSTOM_TOOL_CALL){if(h||q(h={role:g.z7.ASSISTANT,content:null,tool_calls:[]}),!a.name||"string"!=typeof a.name||""===a.name.trim())continue;b===g.Du.CUSTOM_TOOL_CALL&&n.add(a.name);let c=b===g.Du.CUSTOM_TOOL_CALL?{input:"string"==typeof a.input?a.input:JSON.stringify(a.input??"")}:a.arguments;h.tool_calls.push({id:a.call_id,type:g.x4.FUNCTION,function:{name:a.name,arguments:"string"==typeof c?c:JSON.stringify(c??{})}})}else if(b===g.Du.FUNCTION_CALL_OUTPUT||b===g.Du.CUSTOM_TOOL_CALL_OUTPUT){if(h&&(e.messages.push(h),h=null),j.length>0){for(let a of j)e.messages.push(a);j=[]}e.messages.push({role:g.z7.TOOL,tool_call_id:a.call_id,content:"string"==typeof a.output?a.output:JSON.stringify(a.output)})}else if(b===g.Du.ADDITIONAL_TOOLS)Array.isArray(a.tools)&&m.push(...a.tools);else if(b===g.Du.REASONING){let b=p(a);b&&(k=k?`${k}
|
|
62
|
-
${b}`:b),"string"==typeof a.encrypted_content&&a.encrypted_content&&(l=a.encrypted_content);continue}}if(h&&e.messages.push(h),j.length>0)for(let a of j)e.messages.push(a);let r=[...Array.isArray(b.tools)?b.tools:[],...m];return r.length>0&&(e.tools=r.map(a=>{if(a.function)return a;let b=a.name;if(!b||"string"!=typeof b||""===b.trim())return null;if("custom"===a.type){n.add(b);let c=[a.format?.syntax,a.format?.definition].filter(Boolean).join("\n");return{type:g.x4.FUNCTION,function:{name:b,description:[String(a.description||""),c].filter(Boolean).join("\n\n"),parameters:{type:"object",properties:{input:{type:"string",description:"Raw freeform input for this custom tool"}},required:["input"],additionalProperties:!1}}}}return{type:g.x4.FUNCTION,function:{name:b,description:String(a.description||""),parameters:i(a.parameters),strict:a.strict}}}).filter(Boolean)),n.size>0&&(e._customToolNames=[...n]),void 0!==e.max_output_tokens&&(void 0===e.max_tokens&&(e.max_tokens=e.max_output_tokens),delete e.max_output_tokens),delete e.input,delete e.instructions,delete e.include,delete e.prompt_cache_key,delete e.store,"string"==typeof e.reasoning?.effort&&(e.reasoning_effort=e.reasoning.effort),delete e.reasoning,delete e.client_metadata,e}function i(a){return a?"object"!==a.type||a.properties?a:{...a,properties:{}}:{type:"object",properties:{}}}function j(a,b,c,d){if(b.input){let c={...b,model:a,stream:!0};return void 0===c.max_output_tokens&&(void 0!==c.max_completion_tokens?c.max_output_tokens=c.max_completion_tokens:void 0!==c.max_tokens&&(c.max_output_tokens=c.max_tokens)),delete c.max_tokens,delete c.max_completion_tokens,c}let e={model:a,input:[],stream:!0,store:!1},h=!1;for(let a of b.messages||[]){if(a.role===g.z7.SYSTEM||a.role===g.z7.DEVELOPER){if(!h){var j;e.instructions="string"==typeof(j=a.content)?j:Array.isArray(j)?j.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n"):"",h=!0}continue}if(a.role===g.z7.USER||a.role===g.z7.ASSISTANT){if(a.role===g.z7.ASSISTANT){let b=function(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.encrypted_content&&a.encrypted_content||"string"==typeof a.reasoning_encrypted_content&&a.reasoning_encrypted_content||"string"==typeof a.reasoning?.encrypted_content&&a.reasoning.encrypted_content||"",c="";if("string"==typeof a.reasoning_content&&a.reasoning_content.trim()?c=a.reasoning_content:"string"==typeof a.reasoning&&a.reasoning.trim()?c=a.reasoning:Array.isArray(a.reasoning_details)&&(c=a.reasoning_details.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n")),!b&&!c)return null;let d={type:g.Du.REASONING};return c&&(d.summary=[{type:g.Du.SUMMARY_TEXT,text:c}]),b&&(d.encrypted_content=b),d}(a);b&&e.input.push(b)}let b=a.role===g.z7.USER?g.Du.INPUT_TEXT:g.Du.OUTPUT_TEXT,c="string"==typeof a.content?[{type:b,text:a.content}]:Array.isArray(a.content)?a.content.map(a=>{if(a.type===g.x4.TEXT)return{type:b,text:a.text};if(a.type===g.x4.IMAGE_URL){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url;return{type:g.Du.INPUT_IMAGE,image_url:b,detail:a.image_url?.detail||"auto"}}if(a.type===g.Du.INPUT_IMAGE)return a;let c=a.text||a.content||JSON.stringify(a);return{type:b,text:"string"==typeof c?c:JSON.stringify(c)}}):[];c.length>0&&e.input.push({type:g.Du.MESSAGE,role:a.role,content:c})}if(a.role===g.z7.ASSISTANT&&a.tool_calls)for(let b of a.tool_calls){let a="string"==typeof b.function?.name?b.function.name.trim():"";a&&e.input.push({type:g.Du.FUNCTION_CALL,call_id:(0,f.N8)(b.id),name:a.slice(0,128),arguments:(0,f.We)(b.function?.arguments)})}a.role===g.z7.TOOL&&e.input.push({type:g.Du.FUNCTION_CALL_OUTPUT,call_id:(0,f.N8)(a.tool_call_id),output:(0,f.DP)(a.content)})}return h||(e.instructions=""),b.tools&&Array.isArray(b.tools)&&(e.tools=b.tools.map(a=>{if(a.type===g.x4.FUNCTION){let b="string"==typeof a.function?.name?a.function.name.trim():"";return b?{type:g.x4.FUNCTION,name:b.slice(0,128),description:String(a.function.description||""),parameters:i(a.function.parameters),strict:a.function.strict}:null}return a}).filter(Boolean)),void 0!==b.temperature&&(e.temperature=b.temperature),void 0!==b.max_output_tokens?e.max_output_tokens=b.max_output_tokens:void 0!==b.max_completion_tokens?e.max_output_tokens=b.max_completion_tokens:void 0!==b.max_tokens&&(e.max_output_tokens=b.max_tokens),void 0!==b.top_p&&(e.top_p=b.top_p),void 0!==b.reasoning&&(e.reasoning=b.reasoning),void 0!==b.reasoning_effort&&(e.reasoning={effort:b.reasoning_effort,summary:"auto"}),void 0!==b.service_tier&&(e.service_tier=b.service_tier),void 0!==b.prompt_cache_key&&(e.prompt_cache_key=b.prompt_cache_key),e}(0,d.kz)(e.h.OPENAI_RESPONSES,e.h.OPENAI,h,null),(0,d.kz)(e.h.OPENAI,e.h.OPENAI_RESPONSES,j,null)},71782:(a,b,c)=>{c.d(b,{Sk:()=>k,el:()=>l});let d=(0,c(22846).U)("gemini_thought_signatures"),e=new Map,f=0;function g(a){let b="string"==typeof a?a.toLowerCase():"";return b?b.includes("claude")?"claude":b.includes("gemini")?"gemini":b:null}function h(a,b){return!a.family||!b||a.family===b}function i(){let a=Date.now();for(let[b,c]of e.entries())c.expiresAt<=a&&e.delete(b);for(;e.size>2e3;){let a=e.keys().next().value;if(!a)break;e.delete(a)}}async function j(){if(++f%100==0)try{let a=await d.getAll(),b=Object.keys(a),c=Date.now(),e=[],f=[];for(let d of b){let b=a[d];!b||"string"!=typeof b.signature||b.expiresAt&&b.expiresAt<=c?e.push(d):f.push({key:d,createdAt:b.createdAt||0})}for(let a of e)await d.remove(a).catch(()=>{});if(f.length>1e4)for(let a of(f.sort((a,b)=>b.createdAt-a.createdAt),f.slice(1e4)))await d.remove(a.key).catch(()=>{})}catch{}}function k(a,b,c=null,f=null){if("string"!=typeof a||!a||"string"!=typeof b||!b)return;let h=Date.now(),l=g(f);i();let m=[];for(let f of(c&&"string"==typeof c&&m.push(`${c}:${a}`),m.push(a),m))e.set(f,{signature:b,family:l,expiresAt:h+36e5}),d.set(f,{signature:b,family:l,createdAt:h,expiresAt:h+6048e5}).catch(()=>{});j().catch(()=>{})}function l(a,b=null,c=null){if("string"!=typeof a||!a)return null;let d=g(c);if(i(),b&&"string"==typeof b){let c=`${b}:${a}`,f=e.get(c);if(f&&f.expiresAt>Date.now()&&h(f,d))return f.signature}let f=e.get(a);return f&&f.expiresAt>Date.now()&&h(f,d)?f.signature:null}},72239:(a,b,c)=>{c.d(b,{k:()=>o});var d=c(24),e=c(58920),f=c(6382),g=c(57247);let h=["none","low","medium","high"],i=["none","thinking"],j=["none","low","medium","high","xhigh","max"],k={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":j,"claude-budget":j,"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:i,qwen:h,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:i,hunyuan:h,step:h,nous:h},l=["none","minimal","low","medium","high","xhigh","max"],m=["none","low","medium","high","max"],n=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:m},{pattern:"*claude*4-6*",levels:m},{provider:"codex",pattern:"*gpt-6*",levels:l},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...l,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...l,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:l},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function o(a,b){if("kiro"===a&&null===(0,f.pA)(b))return null;let c=(0,d.getCapabilitiesForModel)(a,b);if(!c.reasoning)return null;let i=String(b||"").replace(/\([^()]+\)\s*$/,""),j="codex"===a?(0,g.SM)("cx").find(a=>a.id===i)?.thinkingLevels:null,l=n.find(c=>(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),m=j||l?.levels||k[c.thinkingFormat]||h;return!1===c.thinkingCanDisable&&(m=m.filter(a=>"none"!==a)),m}},74525:(a,b,c)=>{c.d(b,{M:()=>e});var d=c(41004);function e(a,b=d.Uc){let c=a.max_tokens||d.Uc;return a.tools&&Array.isArray(a.tools)&&a.tools.length>0&&c<d.eo&&(c=d.eo),a.thinking?.budget_tokens&&c<=a.thinking.budget_tokens&&(c=a.thinking.budget_tokens+1024),c>b&&(c=b),c}},76924:(a,b,c)=>{c.d(b,{J5:()=>d,MT:()=>e,Xc:()=>g,Yv:()=>f});let d=0xa00000,e=1e4,f=[{sig:[137,80,78,71],offset:0,mime:"image/png"},{sig:[255,216,255],offset:0,mime:"image/jpeg"},{sig:[71,73,70,56],offset:0,mime:"image/gif"},{sig:[82,73,70,70],offset:0,mime:"image/webp",verifyWebp:!0},{sig:[66,77],offset:0,mime:"image/bmp"}],g=new Set(["localhost","127.0.0.1","0.0.0.0","::1","169.254.169.254","metadata.google.internal"])},88499:(a,b,c)=>{c.d(b,{Ws:()=>as,Ai:()=>at,nZ:()=>ar,kz:()=>ao,GH:()=>ap,Y8:()=>aq});var d,e,f=c(14170),g=c(17242),h=c(95189),i=c(55399),j=c(60210),k=c(43698),l=c(57647),m=c(52136),n=c(80662);c(39536);var o=c(26070),p=c(33077);c(60983),c(19979);var q=c(74525),r=c(29463),s=c(97721);function t(a,b,c){let d={model:a,messages:[],stream:c};if(b.generationConfig){let a=b.generationConfig;if(a.maxOutputTokens){let c={max_tokens:a.maxOutputTokens,tools:b.tools};d.max_tokens=(0,q.M)(c)}void 0!==a.temperature&&(d.temperature=a.temperature),void 0!==a.topP&&(d.top_p=a.topP)}if(b.systemInstruction){var e;let a="string"==typeof(e=b.systemInstruction)?e:e.parts&&Array.isArray(e.parts)?e.parts.map(a=>a.text||"").join(""):"";a&&d.messages.push({role:k.z7.SYSTEM,content:a})}if(b.contents&&Array.isArray(b.contents))for(let a of b.contents){let b=function(a){let b=a.role===k.RV.USER?k.z7.USER:k.z7.ASSISTANT;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[];for(let b of a.parts)if(void 0!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,r.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse)return{role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})};if(d.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=1===c.length?c[0].text:c),a.tool_calls=d,a}return c.length>0?{role:b,content:(0,s.z)(c)}:null}(a);b&&d.messages.push(b)}if(b.tools&&Array.isArray(b.tools)){for(let a of(d.tools=[],b.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)d.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:b.parameters||{type:"object",properties:{}}}})}return d}ao(f.h.GEMINI,f.h.OPENAI,t,null),ao(f.h.GEMINI_CLI,f.h.OPENAI,t,null);var u=c(97102),v=c(96281);ao(f.h.OPENAI,f.h.VERTEX,function(a,b,c,d){var e=(0,u.m$)(a,b,c,d);if(!e?.contents)return e;for(let a of e.contents)if(Array.isArray(a.parts))for(let b of a.parts)void 0!==b.thoughtSignature&&(b.thoughtSignature=v.n6),b.functionCall&&"id"in b.functionCall&&delete b.functionCall.id,b.functionResponse&&"id"in b.functionResponse&&delete b.functionResponse.id;return e},null);var w=c(58028);ao(f.h.ANTIGRAVITY,f.h.OPENAI,function(a,b,c){let d=b.request||b,e={model:a,messages:[],stream:c};if(d.generationConfig){let a=d.generationConfig;if(a.maxOutputTokens){let b={max_tokens:a.maxOutputTokens,tools:d.tools};e.max_tokens=(0,q.M)(b)}if(void 0!==a.temperature&&(e.temperature=a.temperature),void 0!==a.topP&&(e.top_p=a.topP),void 0!==a.topK&&(e.top_k=a.topK),a.thinkingConfig){let b=(0,w.Vp)(a.thinkingConfig.thinkingBudget||0);b&&(e.reasoning_effort=b)}}if(d.systemInstruction){var f;let a="string"==typeof(f=d.systemInstruction)?f:f.parts&&Array.isArray(f.parts)?f.parts.map(a=>a.text||"").join(""):"";a&&e.messages.push({role:k.z7.SYSTEM,content:a})}if(d.contents&&Array.isArray(d.contents))for(let a of d.contents){let b=function(a){let b=a.role===k.RV.MODEL?k.z7.ASSISTANT:a.role===k.RV.USER?k.z7.USER:a.role;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[],e=[],f="";for(let b of a.parts){if(!0===b.thought&&b.text){f+=b.text;continue}if(b.thoughtSignature&&void 0!==b.text){b.text&&c.push({type:k.x4.TEXT,text:b.text});continue}void 0!==b.text&&""!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,r.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse&&e.push({role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})})}if(e.length>0){if(d.length>0||c.length>0||f){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),d.length>0&&(a.tool_calls=d),[...e,a]}return e}if(d.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),a.tool_calls=d,a}if(c.length>0||f){let a={role:b};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),a}return null}(a);b&&(Array.isArray(b)?e.messages.push(...b):e.messages.push(b))}if(d.tools&&Array.isArray(d.tools)){for(let a of(e.tools=[],d.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)e.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:function a(b){if(!b||"object"!=typeof b)return b;let c=Array.isArray(b)?[...b]:{...b};if("string"==typeof c.type&&(c.type=c.type.toLowerCase()),delete c.enumDescriptions,c.properties){let b={};for(let[d,e]of Object.entries(c.properties))b[d]=a(e);c.properties=b}return c.items&&(c.items=a(c.items)),c}(b.parameters)||{type:"object",properties:{}}}})}return e},null),c(65377);var x=c(94755),y=c(41004);let z=new Map;function A(a){return null==a?a:JSON.parse(JSON.stringify(a))}function B(a,b){return a?.userInputMessage&&!a.userInputMessage.modelId&&b&&(a.userInputMessage.modelId=b),a}function C(a,b){for(let c of a||[])B(c,b);return a}function D(a,b,c){let d=A(a)||{userInputMessage:{content:""}};if(d.userInputMessage||(d.userInputMessage={content:""}),B(d,c),b){let a=d.userInputMessage.content||"";d.userInputMessage.content=a?`${b}
|
|
62
|
+
${b}`:b),"string"==typeof a.encrypted_content&&a.encrypted_content&&(l=a.encrypted_content);continue}}if(h&&e.messages.push(h),j.length>0)for(let a of j)e.messages.push(a);let r=[...Array.isArray(b.tools)?b.tools:[],...m];return r.length>0&&(e.tools=r.map(a=>{if(a.function)return a;let b=a.name;if(!b||"string"!=typeof b||""===b.trim())return null;if("custom"===a.type){n.add(b);let c=[a.format?.syntax,a.format?.definition].filter(Boolean).join("\n");return{type:g.x4.FUNCTION,function:{name:b,description:[String(a.description||""),c].filter(Boolean).join("\n\n"),parameters:{type:"object",properties:{input:{type:"string",description:"Raw freeform input for this custom tool"}},required:["input"],additionalProperties:!1}}}}return{type:g.x4.FUNCTION,function:{name:b,description:String(a.description||""),parameters:i(a.parameters),strict:a.strict}}}).filter(Boolean)),n.size>0&&(e._customToolNames=[...n]),void 0!==e.max_output_tokens&&(void 0===e.max_tokens&&(e.max_tokens=e.max_output_tokens),delete e.max_output_tokens),delete e.input,delete e.instructions,delete e.include,delete e.prompt_cache_key,delete e.store,"string"==typeof e.reasoning?.effort&&(e.reasoning_effort=e.reasoning.effort),delete e.reasoning,delete e.client_metadata,e}function i(a){return a?"object"!==a.type||a.properties?a:{...a,properties:{}}:{type:"object",properties:{}}}function j(a,b,c,d){if(b.input){let c={...b,model:a,stream:!0};return void 0===c.max_output_tokens&&(void 0!==c.max_completion_tokens?c.max_output_tokens=c.max_completion_tokens:void 0!==c.max_tokens&&(c.max_output_tokens=c.max_tokens)),delete c.max_tokens,delete c.max_completion_tokens,c}let e={model:a,input:[],stream:!0,store:!1},h=!1;for(let a of b.messages||[]){if(a.role===g.z7.SYSTEM||a.role===g.z7.DEVELOPER){if(!h){var j;e.instructions="string"==typeof(j=a.content)?j:Array.isArray(j)?j.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n"):"",h=!0}continue}if(a.role===g.z7.USER||a.role===g.z7.ASSISTANT){if(a.role===g.z7.ASSISTANT){let b=function(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.encrypted_content&&a.encrypted_content||"string"==typeof a.reasoning_encrypted_content&&a.reasoning_encrypted_content||"string"==typeof a.reasoning?.encrypted_content&&a.reasoning.encrypted_content||"",c="";if("string"==typeof a.reasoning_content&&a.reasoning_content.trim()?c=a.reasoning_content:"string"==typeof a.reasoning&&a.reasoning.trim()?c=a.reasoning:Array.isArray(a.reasoning_details)&&(c=a.reasoning_details.map(a=>"string"==typeof a?.text?a.text:"string"==typeof a?.content?a.content:"").filter(Boolean).join("\n")),!b&&!c)return null;let d={type:g.Du.REASONING};return c&&(d.summary=[{type:g.Du.SUMMARY_TEXT,text:c}]),b&&(d.encrypted_content=b),d}(a);b&&e.input.push(b)}let b=a.role===g.z7.USER?g.Du.INPUT_TEXT:g.Du.OUTPUT_TEXT,c="string"==typeof a.content?[{type:b,text:a.content}]:Array.isArray(a.content)?a.content.map(a=>{if(a.type===g.x4.TEXT)return{type:b,text:a.text};if(a.type===g.x4.IMAGE_URL){let b="string"==typeof a.image_url?a.image_url:a.image_url?.url;return{type:g.Du.INPUT_IMAGE,image_url:b,detail:a.image_url?.detail||"auto"}}if(a.type===g.Du.INPUT_IMAGE)return a;let c=a.text||a.content||JSON.stringify(a);return{type:b,text:"string"==typeof c?c:JSON.stringify(c)}}):[];c.length>0&&e.input.push({type:g.Du.MESSAGE,role:a.role,content:c})}if(a.role===g.z7.ASSISTANT&&a.tool_calls)for(let b of a.tool_calls){let a="string"==typeof b.function?.name?b.function.name.trim():"";a&&e.input.push({type:g.Du.FUNCTION_CALL,call_id:(0,f.N8)(b.id),name:a.slice(0,128),arguments:(0,f.We)(b.function?.arguments)})}a.role===g.z7.TOOL&&e.input.push({type:g.Du.FUNCTION_CALL_OUTPUT,call_id:(0,f.N8)(a.tool_call_id),output:(0,f.DP)(a.content)})}return h||(e.instructions=""),b.tools&&Array.isArray(b.tools)&&(e.tools=b.tools.map(a=>{if(a.type===g.x4.FUNCTION){let b="string"==typeof a.function?.name?a.function.name.trim():"";return b?{type:g.x4.FUNCTION,name:b.slice(0,128),description:String(a.function.description||""),parameters:i(a.function.parameters),strict:a.function.strict}:null}return a}).filter(Boolean)),void 0!==b.temperature&&(e.temperature=b.temperature),void 0!==b.max_output_tokens?e.max_output_tokens=b.max_output_tokens:void 0!==b.max_completion_tokens?e.max_output_tokens=b.max_completion_tokens:void 0!==b.max_tokens&&(e.max_output_tokens=b.max_tokens),void 0!==b.top_p&&(e.top_p=b.top_p),void 0!==b.reasoning&&(e.reasoning=b.reasoning),void 0!==b.reasoning_effort&&(e.reasoning={effort:b.reasoning_effort,summary:"auto"}),void 0!==b.service_tier&&(e.service_tier=b.service_tier),void 0!==b.prompt_cache_key&&(e.prompt_cache_key=b.prompt_cache_key),e}(0,d.kz)(e.h.OPENAI_RESPONSES,e.h.OPENAI,h,null),(0,d.kz)(e.h.OPENAI,e.h.OPENAI_RESPONSES,j,null)},71782:(a,b,c)=>{c.d(b,{Sk:()=>k,el:()=>l});let d=(0,c(22846).U)("gemini_thought_signatures"),e=new Map,f=0;function g(a){let b="string"==typeof a?a.toLowerCase():"";return b?b.includes("claude")?"claude":b.includes("gemini")?"gemini":b:null}function h(a,b){return!a.family||!b||a.family===b}function i(){let a=Date.now();for(let[b,c]of e.entries())c.expiresAt<=a&&e.delete(b);for(;e.size>2e3;){let a=e.keys().next().value;if(!a)break;e.delete(a)}}async function j(){if(++f%100==0)try{let a=await d.getAll(),b=Object.keys(a),c=Date.now(),e=[],f=[];for(let d of b){let b=a[d];!b||"string"!=typeof b.signature||b.expiresAt&&b.expiresAt<=c?e.push(d):f.push({key:d,createdAt:b.createdAt||0})}for(let a of e)await d.remove(a).catch(()=>{});if(f.length>1e4)for(let a of(f.sort((a,b)=>b.createdAt-a.createdAt),f.slice(1e4)))await d.remove(a.key).catch(()=>{})}catch{}}function k(a,b,c=null,f=null){if("string"!=typeof a||!a||"string"!=typeof b||!b)return;let h=Date.now(),l=g(f);i();let m=[];for(let f of(c&&"string"==typeof c&&m.push(`${c}:${a}`),m.push(a),m))e.set(f,{signature:b,family:l,expiresAt:h+36e5}),d.set(f,{signature:b,family:l,createdAt:h,expiresAt:h+6048e5}).catch(()=>{});j().catch(()=>{})}function l(a,b=null,c=null){if("string"!=typeof a||!a)return null;let d=g(c);if(i(),b&&"string"==typeof b){let c=`${b}:${a}`,f=e.get(c);if(f&&f.expiresAt>Date.now()&&h(f,d))return f.signature}let f=e.get(a);return f&&f.expiresAt>Date.now()&&h(f,d)?f.signature:null}},72239:(a,b,c)=>{c.d(b,{k:()=>o});var d=c(24),e=c(58920),f=c(6382),g=c(57247);let h=["none","low","medium","high"],i=["none","thinking"],j=["none","low","medium","high","xhigh","max"],k={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":j,"claude-budget":j,"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:i,qwen:h,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:i,hunyuan:h,step:h,nous:h},l=["none","minimal","low","medium","high","xhigh","max"],m=["none","low","medium","high","max"],n=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:m},{pattern:"*claude*4-6*",levels:m},{provider:"codex",pattern:"*gpt-6*",levels:l},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...l,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...l,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:l},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function o(a,b){if("kiro"===a&&null===(0,f.pA)(b))return null;let c=(0,d.getCapabilitiesForModel)(a,b);if(!c.reasoning)return null;let i=String(b||"").replace(/\([^()]+\)\s*$/,""),j="codex"===a?(0,g.SM)("cx").find(a=>a.id===i)?.thinkingLevels:null,l=n.find(c=>(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),m=j||l?.levels||k[c.thinkingFormat]||h;return!1===c.thinkingCanDisable&&(m=m.filter(a=>"none"!==a)),m}},74525:(a,b,c)=>{c.d(b,{M:()=>e});var d=c(41004);function e(a,b=d.Uc){let c=a.max_tokens||d.Uc;return a.tools&&Array.isArray(a.tools)&&a.tools.length>0&&c<d.eo&&(c=d.eo),a.thinking?.budget_tokens&&c<=a.thinking.budget_tokens&&(c=a.thinking.budget_tokens+1024),c>b&&(c=b),c}},76924:(a,b,c)=>{c.d(b,{J5:()=>d,MT:()=>e,Xc:()=>g,Yv:()=>f});let d=0xa00000,e=1e4,f=[{sig:[137,80,78,71],offset:0,mime:"image/png"},{sig:[255,216,255],offset:0,mime:"image/jpeg"},{sig:[71,73,70,56],offset:0,mime:"image/gif"},{sig:[82,73,70,70],offset:0,mime:"image/webp",verifyWebp:!0},{sig:[66,77],offset:0,mime:"image/bmp"}],g=new Set(["localhost","127.0.0.1","0.0.0.0","::1","169.254.169.254","metadata.google.internal"])},88499:(a,b,c)=>{c.d(b,{Ws:()=>as,Ai:()=>at,nZ:()=>ar,kz:()=>ao,GH:()=>ap,Y8:()=>aq});var d,e,f=c(14170),g=c(17242),h=c(95189),i=c(55399),j=c(60210),k=c(43698),l=c(57647),m=c(52136),n=c(80662),o=c(26070),p=c(33077);c(60983),c(19979);var q=c(74525),r=c(29463),s=c(97721);function t(a,b,c){let d={model:a,messages:[],stream:c};if(b.generationConfig){let a=b.generationConfig;if(a.maxOutputTokens){let c={max_tokens:a.maxOutputTokens,tools:b.tools};d.max_tokens=(0,q.M)(c)}void 0!==a.temperature&&(d.temperature=a.temperature),void 0!==a.topP&&(d.top_p=a.topP)}if(b.systemInstruction){var e;let a="string"==typeof(e=b.systemInstruction)?e:e.parts&&Array.isArray(e.parts)?e.parts.map(a=>a.text||"").join(""):"";a&&d.messages.push({role:k.z7.SYSTEM,content:a})}if(b.contents&&Array.isArray(b.contents))for(let a of b.contents){let b=function(a){let b=a.role===k.RV.USER?k.z7.USER:k.z7.ASSISTANT;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[];for(let b of a.parts)if(void 0!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,r.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse)return{role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})};if(d.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=1===c.length?c[0].text:c),a.tool_calls=d,a}return c.length>0?{role:b,content:(0,s.z)(c)}:null}(a);b&&d.messages.push(b)}if(b.tools&&Array.isArray(b.tools)){for(let a of(d.tools=[],b.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)d.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:b.parameters||{type:"object",properties:{}}}})}return d}ao(f.h.GEMINI,f.h.OPENAI,t,null),ao(f.h.GEMINI_CLI,f.h.OPENAI,t,null);var u=c(97102),v=c(96281);ao(f.h.OPENAI,f.h.VERTEX,function(a,b,c,d){var e=(0,u.m$)(a,b,c,d);if(!e?.contents)return e;for(let a of e.contents)if(Array.isArray(a.parts))for(let b of a.parts)void 0!==b.thoughtSignature&&(b.thoughtSignature=v.n6),b.functionCall&&"id"in b.functionCall&&delete b.functionCall.id,b.functionResponse&&"id"in b.functionResponse&&delete b.functionResponse.id;return e},null);var w=c(58028);ao(f.h.ANTIGRAVITY,f.h.OPENAI,function(a,b,c){let d=b.request||b,e={model:a,messages:[],stream:c};if(d.generationConfig){let a=d.generationConfig;if(a.maxOutputTokens){let b={max_tokens:a.maxOutputTokens,tools:d.tools};e.max_tokens=(0,q.M)(b)}if(void 0!==a.temperature&&(e.temperature=a.temperature),void 0!==a.topP&&(e.top_p=a.topP),void 0!==a.topK&&(e.top_k=a.topK),a.thinkingConfig){let b=(0,w.Vp)(a.thinkingConfig.thinkingBudget||0);b&&(e.reasoning_effort=b)}}if(d.systemInstruction){var f;let a="string"==typeof(f=d.systemInstruction)?f:f.parts&&Array.isArray(f.parts)?f.parts.map(a=>a.text||"").join(""):"";a&&e.messages.push({role:k.z7.SYSTEM,content:a})}if(d.contents&&Array.isArray(d.contents))for(let a of d.contents){let b=function(a){let b=a.role===k.RV.MODEL?k.z7.ASSISTANT:a.role===k.RV.USER?k.z7.USER:a.role;if(!a.parts||!Array.isArray(a.parts))return null;let c=[],d=[],e=[],f="";for(let b of a.parts){if(!0===b.thought&&b.text){f+=b.text;continue}if(b.thoughtSignature&&void 0!==b.text){b.text&&c.push({type:k.x4.TEXT,text:b.text});continue}void 0!==b.text&&""!==b.text&&c.push({type:k.x4.TEXT,text:b.text}),b.inlineData&&c.push({type:k.x4.IMAGE_URL,image_url:{url:(0,r.$q)(b.inlineData.mimeType,b.inlineData.data)}}),b.functionCall&&d.push({id:b.functionCall.id||`call_${b.functionCall.name}`,type:k.x4.FUNCTION,function:{name:b.functionCall.name,arguments:JSON.stringify(b.functionCall.args||{})}}),b.functionResponse&&e.push({role:k.z7.TOOL,tool_call_id:b.functionResponse.id||`call_${b.functionResponse.name}`,content:JSON.stringify(b.functionResponse.response?.result||b.functionResponse.response||{})})}if(e.length>0){if(d.length>0||c.length>0||f){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),d.length>0&&(a.tool_calls=d),[...e,a]}return e}if(d.length>0){let a={role:k.z7.ASSISTANT};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),a.tool_calls=d,a}if(c.length>0||f){let a={role:b};return c.length>0&&(a.content=(0,s.z)(c)),f&&(a.reasoning_content=f),a}return null}(a);b&&(Array.isArray(b)?e.messages.push(...b):e.messages.push(b))}if(d.tools&&Array.isArray(d.tools)){for(let a of(e.tools=[],d.tools))if(a.functionDeclarations)for(let b of a.functionDeclarations)e.tools.push({type:k.x4.FUNCTION,function:{name:b.name,description:b.description||"",parameters:function a(b){if(!b||"object"!=typeof b)return b;let c=Array.isArray(b)?[...b]:{...b};if("string"==typeof c.type&&(c.type=c.type.toLowerCase()),delete c.enumDescriptions,c.properties){let b={};for(let[d,e]of Object.entries(c.properties))b[d]=a(e);c.properties=b}return c.items&&(c.items=a(c.items)),c}(b.parameters)||{type:"object",properties:{}}}})}return e},null),c(65377);var x=c(94755),y=c(41004);let z=new Map;function A(a){return null==a?a:JSON.parse(JSON.stringify(a))}function B(a,b){return a?.userInputMessage&&!a.userInputMessage.modelId&&b&&(a.userInputMessage.modelId=b),a}function C(a,b){for(let c of a||[])B(c,b);return a}function D(a,b,c){let d=A(a)||{userInputMessage:{content:""}};if(d.userInputMessage||(d.userInputMessage={content:""}),B(d,c),b){let a=d.userInputMessage.content||"";d.userInputMessage.content=a?`${b}
|
|
63
63
|
|
|
64
64
|
${a}`:b}return d}function E(a){return a.findIndex(a=>a?.userInputMessage)}function F(a,b){var c;return 0===b&&(c=a[b],!c?.userInputMessage?.userInputMessageContext?.toolResults?.length)}function G({conversationId:a,connectionId:b,modelId:c,systemPrompt:d="",contentPrefix:e="",currentContentPrefix:f="",history:g=[],currentMessage:h}={}){var i;let j,k=`${b||""}:${a||""}`,l=a?z.get(k):null,m=A(g)||[],n=A(h)||{userInputMessage:{content:""}};if(l&&l.modelId===c&&l.systemPrompt===d){l.lastUsed=Date.now();let a=E(m),b=B(A(l.sessionStart),c);return F(m,a)?m[a]=b:(m.unshift(b),1===m.length&&m.push({assistantResponseMessage:{content:"..."}})),{history:C(m,c),currentMessage:D(n,f,c),replayed:!0}}let o=E(m),p=B(n,c);return F(m,o)?(j=D(m[o],e,c),m[o]=A(j),p=D(n,f,c)):o>=0?(j=D({userInputMessage:{content:"",modelId:c}},e,c),m.unshift(A(j)),p=D(n,f,c)):p=A(j=D(n,e,c)),a&&(i={sessionStart:A(j),modelId:c,systemPrompt:d},z.size>=5e3&&z.delete(z.keys().next().value),z.set(k,{...i,lastUsed:Date.now()})),{history:C(m,c),currentMessage:p,replayed:!1}}let H=setInterval(()=>{let a=Date.now();for(let[b,c]of z)a-c.lastUsed>y.v1.sessionTtlMs&&z.delete(b)},y.v1.sessionCleanupIntervalMs);H.unref&&H.unref();var I=c(6382);let J=/^[a-zA-Z0-9_-]+$/;function K(a){return a?"Tool results provided.":"continue"}let L=/[^a-zA-Z0-9_-]/g;function M(a){return null==a?a:JSON.parse(JSON.stringify(a))}function N(a){if("string"==typeof a)return a;if(null==a)return"";try{return JSON.stringify(a)}catch{return String(a)}}function O(a,b){b&&(a.content=a.content?`${a.content}
|
|
65
65
|
|
|
@@ -9,7 +9,7 @@ ${b}`:b;try{a.instructions=d}catch(a){}}catch(a){}}(a,c);if(Array.isArray(a.mess
|
|
|
9
9
|
|
|
10
10
|
${b}`:b}},27349:(a,b,c)=>{c.d(b,{c:()=>i});var d=c(57647),e=c(88499),f=c(14170),g=c(41004),h=c(71857);function i(a,b,c="",e=!1){if(!c.includes("claude-cli")||!a.messages?.length)return null;let f=a.messages,h=a=>"string"==typeof a?a:Array.isArray(a)?a.filter(a=>"text"===a.type).map(a=>a.text).join(" "):"",j=!1,m=!1,n=f[f.length-1];if(n?.role==="assistant"&&n.content?.[0]?.text==="{"&&(j=!0),j||"Warmup"===h(f[0]?.content)&&(j=!0),j||1!==f.length||f[0]?.role!=="user"||"count"===h(f[0]?.content)&&(j=!0),!j&&g.C8?.length){let a=f.filter(a=>"user"===a.role).map(a=>h(a.content)).join(" ");g.C8.some(b=>a.includes(b))&&(j=!0)}if(!j&&e){let b=f.find(a=>"system"===a.role),c=h(b?.content),d=Array.isArray(a.system)?a.system.filter(a=>"text"===a.type).map(a=>a.text).join(" "):"string"==typeof a.system?a.system:"";(c||d).includes("isNewTopic")&&(j=!0,m=!0)}if(!j)return null;let o=(0,d.Tz)(a),p=!1!==a.stream;if(m){let a=f.find(a=>"user"===a.role),c=JSON.stringify({isNewTopic:!0,title:h(a?.content).trim().split(/\s+/).slice(0,3).join(" ")});return p?l(o,b,c):k(o,b,c)}return p?l(o,b):k(o,b)}function j(a,b="CLI Command Execution: Clear Terminal"){return{id:`chatcmpl-${Date.now()}`,object:"chat.completion",created:Math.floor(Date.now()/1e3),model:a,choices:[{index:0,message:{role:"assistant",content:b},finish_reason:"stop"}],usage:{prompt_tokens:1,completion_tokens:1,total_tokens:2}}}function k(a,b,c){let d=j(b,c);if(a===f.h.OPENAI)return{success:!0,response:new Response(JSON.stringify(d),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})};let g=(0,e.Ws)(a);g.model=b;let h=m(d),i=[];for(let b of h){let c=(0,e.Y8)(f.h.OPENAI,a,b,g);c?.length>0&&i.push(...c)}let k=(0,e.Y8)(f.h.OPENAI,a,null,g);return k?.length>0&&i.push(...k),{success:!0,response:new Response(JSON.stringify(function(a,b){if(!a||0===a.length)return j("unknown");let c=a[a.length-1];if(b===f.h.CLAUDE&&a.find(a=>"message_stop"===a.type)){a.find(a=>"content_block_delta"===a.type);let b=a.find(a=>"message_delta"===a.type),d=a.find(a=>"message_start"===a.type);if(d?.message){c=d.message;let a=d.message.usage,e=b?.usage;(a||e)&&(c.usage={...a||{},...e||{},...a?.cache_read_input_tokens!==void 0?{cache_read_input_tokens:a.cache_read_input_tokens}:{},...a?.cache_creation_input_tokens!==void 0?{cache_creation_input_tokens:a.cache_creation_input_tokens}:{},...a?.input_tokens!==void 0?{input_tokens:a.input_tokens}:{}})}}return c}(i,a)),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}function l(a,b,c){let d=j(b,c),g=(0,e.Ws)(a);g.model=b;let i=m(d),k=[];for(let b of i){let c=(0,e.Y8)(f.h.OPENAI,a,b,g);if(c?.length>0)for(let b of c)k.push((0,h.v8)(b,a))}let l=(0,e.Y8)(f.h.OPENAI,a,null,g);if(l?.length>0)for(let b of l)k.push((0,h.v8)(b,a));return k.push("data: [DONE]\n\n"),{success:!0,response:new Response(k.join(""),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}})}}function m(a){let{id:b,created:c,model:d,choices:e}=a;return[{id:b,object:"chat.completion.chunk",created:c,model:d,choices:[{index:0,delta:{role:"assistant",content:e[0].message.content},finish_reason:null}]},{id:b,object:"chat.completion.chunk",created:c,model:d,choices:[{index:0,delta:{},finish_reason:"stop"}],usage:a.usage}]}},30320:(a,b,c)=>{c.d(b,{Hr:()=>j,nu:()=>h,u9:()=>k,yx:()=>g});var d=c(14170),e=c(9024);let f=new Set(["response.completed","response.done","response.failed","error"]);function g(a,b){return a||(b&&"string"==typeof b.type?b.type:null)}function h(a,b){let c=g(a,b);if(f.has(c))return!0;let d=b?.response?.status;return"completed"===d||"failed"===d}let i=new TextEncoder;function j(){return i.encode(`${k()}data: [DONE]
|
|
11
11
|
|
|
12
|
-
`)}function k(){return(0,e.v8)({event:"response.failed",data:{type:"response.failed",response:{id:`resp_${Date.now()}`,status:"failed",error:{type:"stream_error",code:"stream_disconnected",message:"stream closed before response.completed"}}}},d.h.OPENAI_RESPONSES)}},35719:(a,b,c)=>{c.d(b,{F:()=>g});var d=c(14170),e=c(44236),f=c(43698);function g(a){if(!a?.choices?.[0])return a;let b=a.choices[0],c=b.message||{},g=[],h=c.reasoning_content||c.provider_specific_fields?.reasoning_content||"";for(let a of(h&&g.push({type:f.R4.THINKING,thinking:h}),"string"==typeof c.content&&c.content.length>0&&g.push({type:f.R4.TEXT,text:c.content}),c.tool_calls||[])){let b=a.function||{};g.push({type:f.R4.TOOL_USE,id:a.id||`toolu_${Date.now()}_${g.length}`,name:b.name||a.name||"",input:function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(b.arguments||a.arguments)})}0===g.length&&g.push({type:f.R4.TEXT,text:""});let i=a.usage||{};return{id:String(a.id||`msg_${Date.now()}`).replace(/^chatcmpl-/,""),type:f.Du.MESSAGE,role:f.z7.ASSISTANT,model:a.model||f.rP,content:g,stop_reason:(0,e.Q)(b.finish_reason,d.h.CLAUDE),stop_sequence:null,usage:{input_tokens:i.prompt_tokens||i.input_tokens||0,output_tokens:i.completion_tokens||i.output_tokens||0}}}},47370:(a,b,c)=>{c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(
|
|
12
|
+
`)}function k(){return(0,e.v8)({event:"response.failed",data:{type:"response.failed",response:{id:`resp_${Date.now()}`,status:"failed",error:{type:"stream_error",code:"stream_disconnected",message:"stream closed before response.completed"}}}},d.h.OPENAI_RESPONSES)}},35719:(a,b,c)=>{c.d(b,{F:()=>g});var d=c(14170),e=c(44236),f=c(43698);function g(a){if(!a?.choices?.[0])return a;let b=a.choices[0],c=b.message||{},g=[],h=c.reasoning_content||c.provider_specific_fields?.reasoning_content||"";for(let a of(h&&g.push({type:f.R4.THINKING,thinking:h}),"string"==typeof c.content&&c.content.length>0&&g.push({type:f.R4.TEXT,text:c.content}),c.tool_calls||[])){let b=a.function||{};g.push({type:f.R4.TOOL_USE,id:a.id||`toolu_${Date.now()}_${g.length}`,name:b.name||a.name||"",input:function(a){if(!a)return{};if("object"==typeof a)return a;try{return JSON.parse(a)}catch{return{}}}(b.arguments||a.arguments)})}0===g.length&&g.push({type:f.R4.TEXT,text:""});let i=a.usage||{};return{id:String(a.id||`msg_${Date.now()}`).replace(/^chatcmpl-/,""),type:f.Du.MESSAGE,role:f.z7.ASSISTANT,model:a.model||f.rP,content:g,stop_reason:(0,e.Q)(b.finish_reason,d.h.CLAUDE),stop_sequence:null,usage:{input_tokens:i.prompt_tokens||i.input_tokens||0,output_tokens:i.completion_tokens||i.output_tokens||0}}}},47370:(a,b,c)=>{c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47765)},48136:(a,b,c)=>{c.d(b,{d:()=>e});let d=new Set(["retry-after","x-should-retry"]);function e(a){let b={};return"function"!=typeof a?.forEach||a.forEach((a,c)=>{let e=c.toLowerCase();(d.has(e)||e.startsWith("anthropic-ratelimit-"))&&(b[e]=a)}),b}},48895:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{SB:()=>f.SB}),c(39609),c(35024),c(75924),c(41004),c(57247),c(14170),c(88499),c(57647),c(40669),c(12557),c(8521),c(93943);var e=c(92500);c(59657);var f=c(55330);c(43659),c(71857);var g=a([e,f]);[e,f]=g.then?(await g)():g,d()}catch(a){d(a)}})},54098:(a,b,c)=>{c.d(b,{x:()=>e});var d=c(26070);function e(a,b){if(!b||!d.xq[b]?.quirks?.clineEnvelope)return a;let{success:c,data:e}=a||{};return!0!==c||!e||"object"!=typeof e||Array.isArray(e)?a:e}},59657:(a,b,c)=>{c.d(b,{Jb:()=>g,jd:()=>f});var d=c(41004),e=c(92306);function f({onDisconnect:a,onError:b,log:c,provider:d,model:g,reqTag:h=""}={}){let i=new AbortController,j=Date.now(),k=!1,l=null,m=(a,b,e=!1)=>{let f=Date.now()-j,i=e?c?.errorLine:c?.line;i?i(h,a,`${b} \xb7 ${d}/${g} \xb7 ${f}ms`):console.log(`[${new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}] ${a} ${d}/${g} \xb7 ${b} \xb7 ${f}ms`)};return{signal:i.signal,startTime:j,isConnected:()=>!k,handleDisconnect:(b="client_closed")=>{k||(k=!0,(0,e.s)("CTRL",`${d}/${g} | disconnect=${b} | dur=${Date.now()-j}ms`),l=setTimeout(()=>{i.abort()},500),a?.({reason:b,duration:Date.now()-j}))},handleComplete:()=>{!k&&(k=!0,l&&(clearTimeout(l),l=null))},handleError:a=>{if(!k){if(k=!0,l&&(clearTimeout(l),l=null),"AbortError"===a.name)return void m("⚡","ABORTED");m("✗",`ERROR: ${a.message}${a.stack?`
|
|
13
13
|
${a.stack}`:""}`,!0),b?.(a)}},abort:()=>i.abort()}}function g(a,b,c,f=null,h=d.xM){let i=null,j=0,k=0,l=Date.now(),m="upstream connection lost",n=Date.now(),o="STREAM",p=()=>{i&&(clearTimeout(i),i=null)},q=()=>{p(),i=setTimeout(()=>{i=null,m="stream stall timeout",(0,e.s)(o,`STALL TIMEOUT ${h}ms | chunks=${j} | bytes=${k} | sinceLast=${Date.now()-l}ms`),c.handleError?.(Error("stream stall timeout")),c.abort?.()},h)},r={signal:c.signal,startTime:c.startTime,isConnected:()=>c.isConnected(),handleComplete:()=>{(0,e.s)(o,`complete | chunks=${j} | bytes=${k} | dur=${Date.now()-n}ms`),p(),c.handleComplete()},handleError:a=>{(0,e.s)(o,`error: ${a?.message} | chunks=${j} | bytes=${k} | dur=${Date.now()-n}ms`),p(),c.handleError(a)},handleDisconnect:a=>{(0,e.s)(o,`disconnect: ${a} | chunks=${j} | bytes=${k} | dur=${Date.now()-n}ms`),p(),c.handleDisconnect(a)},abort:()=>{p(),c.abort()}};q(),(0,e.s)(o,`pipe start | stallTimeout=${h}ms`);let s=new TransformStream({transform(a,b){j++;let c=a?.byteLength||a?.length||0;k+=c;let d=Date.now(),f=d-l;l=d,e.T&&(j<=5||j%20==0||f>5e3)&&(0,e.s)(o,`chunk #${j} | size=${c}B | gap=${f}ms | total=${k}B`),q(),b.enqueue(a)},flush(){(0,e.s)(o,`upstream EOF | chunks=${j} | bytes=${k} | dur=${Date.now()-n}ms`),p()}});return function(a,b,c=null){let d=a.readable.getReader(),e=a.writable.getWriter(),f=!1,g=a=>{if(!f&&c){f=!0;try{let b=c();b&&a.enqueue(b)}catch{}}};return new ReadableStream({async pull(a){if(!b.isConnected()){g(a),a.close();return}try{let{done:c,value:e}=await d.read();if(c){b.handleComplete(),a.close();return}a.enqueue(e)}catch(l){let f=b.isConnected(),h=l?.message||"";h.includes("already closed")||h.includes("Invalid state")||b.handleError(l),d.cancel().catch(()=>{}),e.abort().catch(()=>{});let i=l?.message||"",j=l?.code||l?.cause?.code||"",k="AbortError"===l.name||i.includes("aborted")||i.includes("socket hang up")||i.includes("ECONNRESET")||i.includes("ETIMEDOUT")||i.includes("EPIPE")||"ECONNRESET"===j||"ETIMEDOUT"===j||"EPIPE"===j||"UND_ERR_SOCKET"===j;try{!f||k||c?(g(a),a.close()):a.error(l)}catch(a){}}},cancel(a){b.handleDisconnect(a||"cancelled"),d.cancel(),e.abort()}})}({readable:a.body.pipeThrough(s).pipeThrough(b),writable:{getWriter:()=>({abort:()=>Promise.resolve()})}},r,f?()=>f(m):null)}},60125:(a,b,c)=>{c.d(b,{p:()=>n});var d=c(24643);let e="Code blocks, file paths, commands, errors, URLs: keep exact. Security warnings, irreversible action confirmations, multi-step ordered sequences: write normal. Resume terse style after.",f='Not: "Sure! I\'d be happy to help you with that. The issue you\'re experiencing is likely caused by..." Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"',g="Auto-Clarity: drop caveman for security warnings, irreversible actions, multi-step sequences where fragment ambiguity risks misread, or when user repeats a question. Resume after the clear part.",h="ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure.",i="No invented abbreviations. Standard well-known tech acronyms (DB, API, HTTP, URL, JSON, ID, OS, CPU) OK. Names of code symbols, function names, API names, error strings: keep verbatim.",j="Preserve the user's dominant language. User wrote Vietnamese, reply Vietnamese. User wrote English, reply English. Wenyan/classical-Chinese levels override this language-preservation rule. Code identifiers, error strings, file paths, commands: keep in their original form regardless of language.",k='No self-reference. Do not name or announce the style (no "caveman mode", no "me caveman think", no "compressed mode active"). Just respond.',l='No decorative emoji. No narrating tool calls ("I will now search", "I used X to find Y"). No status phrases ("Sure!", "Of course!", "I\'d be happy to"). No causal arrow shorthand ("A -> B -> fails"). State the thing, the action, the reason. Then next step.',m={lite:["Respond tersely. Keep grammar and full sentences but drop filler, hedging and pleasantries (just/really/basically/sure/of course/I'd be happy to). Pattern: state the thing, the action, the reason. Then next step.",f,e,g,h,i,j,k,l].join(" "),full:["Respond like terse caveman. All technical substance stay exact, only fluff die. Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries, hedging. Fragments OK. Short synonyms (big not extensive, fix not implement a solution for). Pattern: [thing] [action] [reason]. [next step].",f,e,g,h,i,j,k,l].join(" "),ultra:["Respond ultra-terse. Maximum compression. Telegraphic. Strip conjunctions. One word when one word enough. Pattern: [thing] [action] [reason]. [next step].",f,e,g,h,i,j,k,l].join(" "),"wenyan-lite":["Respond semi-classical. Drop filler/hedging but keep grammar structure, classical register. Use classical Chinese sentence patterns where natural. Keep English for technical terms.",f,e,g,h,i,j,k,l].join(" "),wenyan:["Respond classical Chinese (文言文). Maximum classical terseness. 80-90% character reduction. Classical sentence patterns, verbs precede objects, subjects often omitted, classical particles (之/乃/為/其). Keep English for code, commands, function names, API names, error strings.",f,e,g,h,i,j,k,l].join(" "),"wenyan-ultra":["Respond extreme classical compression (文言文 ultra). Maximum compression, ultra terse. Same classical rules as wenyan-full but even more compressed. One classical particle per clause.",f,e,g,h,i,j,k,l].join(" ")};function n(a,b,c){(0,d.J)(a,b,m[c])}},60475:(a,b,c)=>{c.d(b,{U:()=>l});var d=c(24643);let e="You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.",f="Before writing code, stop at the first rung that holds: 1) Does this need to exist at all? (YAGNI) 2) Stdlib does it? Use it. 3) Native platform feature covers it? Use it (CSS over JS, DB constraint over app code). 4) Already-installed dependency solves it? Use it; never add a new one for what a few lines can do. 5) Can it be one line? One line. 6) Only then: the minimum code that works.",g='No unrequested abstractions (no interface with one implementation, no factory for one product, no config for a value that never changes). No boilerplate or scaffolding "for later". Deletion over addition. Boring over clever. Fewest files possible; shortest working diff wins. Two stdlib options the same size: take the edge-case-correct one. Mark deliberate simplifications with a `ponytail:` comment naming the ceiling and upgrade path.',h="Code first. Then at most three short lines: what was skipped, when to add it. No essays or design notes. Pattern: `[code] → skipped: [X], add when [Y].`",i="Never simplify away: input validation at trust boundaries, error handling that prevents data loss, security, accessibility, anything explicitly requested. Non-trivial logic leaves ONE runnable check behind (an assert-based self-check or one small test file; no frameworks). Trivial one-liners need no test.",j="ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if unsure.",k={lite:[e,"Lite: build what's asked, but name the lazier alternative in one line. User picks.",f,g,h,i,j].join(" "),full:[e,"Full: the ladder enforced. Stdlib and native first. Shortest diff, shortest explanation.",f,g,h,i,j].join(" "),ultra:[e,"Ultra: YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same response.",f,g,h,i,j].join(" ")};function l(a,b,c){(0,d.J)(a,b,k[c])}},70190:(a,b,c)=>{c.d(b,{Nv:()=>m,O2:()=>n,SI:()=>l,cB:()=>o});var d=c(60983),e=c(19979),f=c(65377);function g(a){try{return new TextEncoder().encode(JSON.stringify(a)||"").length}catch{return 0}}function h(a){let b=function(a){if(Array.isArray(a?.messages))return a.messages;if(Array.isArray(a?.input))return a.input;let b=j(a);return b?b.messages:null}(a),c=b?.filter(a=>a?.role==="tool"||a?.role==="function"||a?.tool_calls?.length||a?.content?.some?.(a=>a?.type==="tool_use"||a?.type==="tool_result"))||[];return{bodyBytes:g(a),messageBytes:b?g(b):0,toolSchemaBytes:g(a?.tools||[]),toolHistoryBytes:g(c)}}function i(a,b){a&&!a.reason&&(a.reason=b)}function j(a){let b=a?.conversationState;if(!b||"object"!=typeof b)return null;let c=[],d=[],e=(a,b,e,f={})=>{"string"==typeof b&&(c.push({role:a,content:b,...f}),d.push(e))},f=a=>{let b=a?.userInputMessage;if(b){e("system",b.systemInstruction,{object:b,key:"systemInstruction"}),e("user",b.content,{object:b,key:"content"});let a=b.userInputMessageContext?.toolResults;if(Array.isArray(a))for(let b of a){let a=b?.content;if(Array.isArray(a))for(let c of a)e("tool",c?.text,{object:c,key:"text"},b?.toolUseId?{tool_call_id:b.toolUseId}:{})}return}let c=a?.assistantResponseMessage;if(c){let a=(a=>{if(!Array.isArray(a)||0===a.length)return;let b=a.map(a=>({id:a?.toolUseId,type:"function",function:{name:a?.name||"",arguments:JSON.stringify(a?.input||{})}})).filter(a=>a.id||a.function.name);return b.length>0?b:void 0})(c.toolUses);e("assistant",c.content,{object:c,key:"content"},a?{tool_calls:a}:{})}};if(Array.isArray(b.history))for(let a of b.history)f(a);return b.currentMessage&&f(b.currentMessage),c.length>0?{messages:c,targets:d}:null}async function k(a,b,c,d,e,f){let g,h=function(a){try{let b=new URL(a);return b.pathname=`${b.pathname.replace(/\/$/,"")}/v1/compress`,b.hash="",b.toString()}catch{let[b,c=""]=String(a).replace(/#.*$/,"").split("?",2),d=`${b.replace(/\/$/,"")}/v1/compress`;return c?`${d}?${c}`:d}}(a);f.endpoint=function(a){try{let b=new URL(a);return b.username="",b.password="",b.search="",b.hash="",b.toString()}catch{return String(a).replace(/\/\/[^/@\s]+@/,"//").replace(/[?#].*$/,"")}}(h);let j={messages:b,model:c};e&&(j.config={compress_user_messages:!0});try{g=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j),signal:AbortSignal.timeout(d)})}catch(d){var k;let a,b,c;return i(f,`request failed: ${(k=d,a=k?.cause,b=a?.code||k?.code,c=String(a?.message||k?.message||String(k)).replace(/\/\/[^/@\s]+@/g,"//").replace(/(https?:\/\/[^\s?#]+)[?#][^\s)]*/g,"$1"),b?`${b}: ${c}`:c)}`),null}if(!g.ok)return i(f,`proxy returned HTTP ${g.status}`),null;let l=await g.json();return Array.isArray(l?.messages)?l:(i(f,"proxy response missing messages[]"),null)}async function l(a,{enabled:b,url:c,model:g,format:m,compressUserMessages:n,timeoutMs:o=3e3,diagnostics:p=null}={}){var q;if(o="number"==typeof(q=o)&&Number.isFinite(q)&&q>0?q:3e3,!b)return i(p,"disabled"),null;if(!c)return i(p,"missing proxy URL"),null;if(!a)return i(p,"missing request body"),null;try{if(p&&(p.before=h(a)),"claude"===m){let b=(0,d.t)(g,a,!1);if(!Array.isArray(b?.messages))return i(p,"Claude request did not translate to messages[]"),null;let f=await k(c,b.messages,g,o,n,p||{});if(!f)return null;let j=(0,e.p)(g,{...b,messages:f.messages},!1);return Array.isArray(j?.messages)&&(a.messages=j.messages),j?.system!==void 0&&(a.system=j.system),p&&(p.after=h(a)),f}if("openai-responses"===m){if(Array.isArray(a?.input)&&a.input.some(a=>!(!a||"object"!=typeof a||Array.isArray(a))&&"string"==typeof a.type&&"message"!==a.type))return i(p,"skipped: openai-responses tool/reasoning input is not safe to compress"),null;let b=(0,f.Z)(g,a,!1);if(!Array.isArray(b?.messages))return i(p,"openai-responses request did not translate to messages[]"),null;let d=await k(c,b.messages,g,o,n,p||{});if(!d)return null;let e=(0,f.h)(g,{...b,input:void 0,messages:d.messages},!1);return Array.isArray(e?.input)&&(a.input=e.input),p&&(p.after=h(a)),d}if("kiro"===m){let b=j(a);if(!b)return i(p,"Kiro request did not project to messages[]"),null;let d=await k(c,b.messages,g,o,n,p||{});if(!d||!function(a,b,c){if(!Array.isArray(b)||b.length!==a.messages.length)return i(c,"proxy response did not match Kiro message count"),!1;let d=[];for(let e=0;e<a.messages.length;e++){let f=a.messages[e],g=b[e];if(!g||g.role!==f.role)return i(c,"proxy response did not preserve Kiro message order"),!1;let h=function(a){let b=a?.content;if("string"==typeof b)return b;if(!Array.isArray(b))return null;let c=[];for(let a of b)"string"==typeof a?c.push(a):"string"==typeof a?.text&&c.push(a.text);return c.length>0?c.join("\n"):null}(g);if(null===h)return i(c,"proxy response missing Kiro text content"),!1;d.push({target:a.targets[e],text:h})}for(let a of d)a.target.object[a.target.key]=a.text;return!0}(b,d.messages,p))return null;return p&&(p.after=h(a)),d}let b=Array.isArray(a.messages)?"messages":Array.isArray(a.input)?"input":null;if(!b)return i(p,`unsupported ${m||"unknown"} request shape`),null;let l=await k(c,a[b],g,o,n,p||{});if(!l)return null;return a[b]=l.messages,p&&(p.after=h(a)),l}catch(a){return i(p,`unexpected error: ${a?.message||String(a)}`),null}}function m(a){if(!a)return null;let b=a.tokens_before||0,c=a.tokens_after||0,d=a.tokens_saved||0,e=b>0?(d/b*100).toFixed(1):"0";return`reported token delta=${d} before=${b}${c?` after=${c}`:""} (${e}%)`.trim()}function n(a){let b=a?.before,c=a?.after;if(!b||!c)return"";let d=b.bodyBytes>0?((b.bodyBytes-c.bodyBytes)/b.bodyBytes*100).toFixed(1):"0.0";return`body=${b.bodyBytes}B→${c.bodyBytes}B messages=${b.messageBytes}B→${c.messageBytes}B tools=${b.toolSchemaBytes||0}B→${c.toolSchemaBytes||0}B toolHistory=${b.toolHistoryBytes||0}B→${c.toolHistoryBytes||0}B effective=${d}%`}function o(a,b,c=.05){return!!a?.tokens_saved&&!(a.tokens_saved<=0)&&["bodyBytes","messageBytes"].every(a=>{let d=b?.before?.[a]||0,e=b?.after?.[a]||0;return d>0&&e>0&&e>=d*(1-c)})}},71336:(a,b,c)=>{c.d(b,{q7:()=>m});let d="u">typeof process&&process.versions?.node&&!0,e="u">typeof process&&process.env?.ENABLE_REQUEST_LOGS==="true",f=null,g=null,h=null;async function i(){if(d&&e&&!f)try{f=await Promise.resolve().then(c.t.bind(c,29021,23)),h=(g=await Promise.resolve().then(c.t.bind(c,33873,23))).join("u">typeof process&&process.cwd?process.cwd():".","logs")}catch{}}async function j(a,b,c){if(await i(),!f||!h)return null;try{f.existsSync(h)||f.mkdirSync(h,{recursive:!0});let d=function(a=new Date){let b=a=>String(a).padStart(2,"0"),c=a.getFullYear(),d=b(a.getMonth()+1),e=b(a.getDate()),f=b(a.getHours()),g=b(a.getMinutes()),h=b(a.getSeconds()),i=String(a.getMilliseconds()).padStart(3,"0");return`${c}${d}${e}_${f}${g}${h}_${i}`}(),e=(c||"unknown").replace(/[/:]/g,"-"),i=`${a}_${b}_${e}_${d}`,j=g.join(h,i);return f.mkdirSync(j,{recursive:!0}),j}catch(a){return console.log("[LOG] Failed to create log session:",a.message),null}}function k(a,b,c){if(f&&a)try{let d=g.join(a,b);f.writeFileSync(d,JSON.stringify(c,null,2))}catch(a){console.log(`[LOG] Failed to write ${b}:`,a.message)}}function l(a){return a?{...a}:{}}async function m(a,b,c){if(!e)return{sessionPath:null,logClientRawRequest(){},logRawRequest(){},logOpenAIRequest(){},logTargetRequest(){},logProviderResponse(){},appendProviderChunk(){},appendOpenAIChunk(){},logConvertedResponse(){},appendConvertedChunk(){},logError(){}};let d=await j(a,b,c);return{get sessionPath(){return d},logClientRawRequest(a,b,c={}){k(d,"1_req_client.json",{timestamp:new Date().toISOString(),endpoint:a,headers:l(c),body:b})},logRawRequest(a,b={}){k(d,"2_req_source.json",{timestamp:new Date().toISOString(),headers:l(b),body:a})},logOpenAIRequest(a){k(d,"3_req_openai.json",{timestamp:new Date().toISOString(),body:a})},logTargetRequest(a,b,c){k(d,"4_req_target.json",{timestamp:new Date().toISOString(),url:a,headers:l(b),body:c})},logProviderResponse(a,b,c,e){k(d,"5_res_provider.json",{timestamp:new Date().toISOString(),status:a,statusText:b,headers:c?"function"==typeof c.entries?Object.fromEntries(c.entries()):c:{},body:e})},appendProviderChunk(a){if(f&&d)try{let b=g.join(d,"5_res_provider.txt");f.appendFileSync(b,a)}catch(a){}},appendOpenAIChunk(a){if(f&&d)try{let b=g.join(d,"6_res_openai.txt");f.appendFileSync(b,a)}catch(a){}},logConvertedResponse(a){k(d,"7_res_client.json",{timestamp:new Date().toISOString(),body:a})},appendConvertedChunk(a){if(f&&d)try{let b=g.join(d,"7_res_client.txt");f.appendFileSync(b,a)}catch(a){}},logError(a,b=null){k(d,"6_error.json",{timestamp:new Date().toISOString(),error:a?.message||String(a),stack:a?.stack,requestBody:b})}}}},71857:(a,b,c)=>{c.d(b,{i5:()=>o,l2:()=>p,lm:()=>g.lm,v8:()=>h.v8});var d=c(88499),e=c(14170),f=c(47370),g=c(73483),h=c(9024),i=c(30320),j=c(92306);c(78959);let k=new TextEncoder,l="translate",m="passthrough";function n(a={}){let{mode:b=l,targetFormat:c,sourceFormat:o,provider:p=null,reqLogger:q=null,toolNameMap:r=null,customToolNames:s=null,model:t=null,connectionId:u=null,body:v=null,onStreamComplete:w=null,apiKey:x=null,credentials:y=null}=a,z="",A=null,B=new TextDecoder("utf-8",{fatal:!1}),C=b===l?{...(0,d.Ws)(o),provider:p,toolNameMap:r,customToolNames:new Set(s||[]),model:t,sessionId:y?._clientSessionId||null,targetFormat:c}:null,D=0,E="",F="",G=null,H=0,I=0,J={},K=null,L=!1,M=!1,N=!1,O=!1,P=null,Q=()=>{if(P&&(clearTimeout(P),P=null),O)return;O=!0;let a=b===m,d=a?A:C?.usage;!(0,g.Gh)(d)&&D>0&&(d=(0,g.OF)(v,D,a?e.h.OPENAI:o),a?A=d:C.usage=d),(0,g.Gh)(d)?(0,g.IF)(a?p:C?.provider||c,d,t,u,x):(0,f.E5)({model:t,provider:p,connectionId:u,tokens:null,status:"200 OK"}).catch(()=>{}),w&&w({content:E,thinking:F},d,G)},R=a=>{for(let b of(0,d.Y8)(c,o,null,C)||[]){if(null==b)continue;let c=(0,h.v8)(b,o);q?.appendConvertedChunk?.(c),a.enqueue(k.encode(c)),I++}Q()};return new TransformStream({transform(a,f){G||(G=Date.now());let n=B.decode(a,{stream:!0});z+=n,q?.appendProviderChunk?.(n);let p=z.split("\n");for(let a of(z=p.pop()||"",p)){let n=a.trim();if(j.T&&n&&(H++,n.startsWith("event:"))){let a=n.slice(6).trim();J[a]=(J[a]||0)+1}if(b===l&&c===e.h.OPENAI_RESPONSES&&n.startsWith("event:")&&(K=n.slice(6).trim()),b===m){let b,c=!1,d=!1;if(n.startsWith("data:")&&"[DONE]"!==n.slice(5).trim())try{let a=JSON.parse(n.slice(5).trim()),f=(0,h.A4)(a),j=!1;if(void 0!==a.choices&&(a.object||(a.object="chat.completion.chunk",j=!0),a.created||(a.created=Math.floor(Date.now()/1e3),j=!0)),void 0!==a.prompt_filter_results&&(delete a.prompt_filter_results,j=!0),a?.choices)for(let b of a.choices)void 0!==b.content_filter_results&&(delete b.content_filter_results,j=!0);if(a?.choices)for(let b of a.choices)b.delta?.tool_calls&&Array.isArray(b.delta.tool_calls)&&0===b.delta.tool_calls.length&&(delete b.delta.tool_calls,j=!0);if(!(0,h.c2)(a,e.h.OPENAI))continue;let k=a.choices?.[0]?.delta,l=k?.content,m=k?.reasoning_content;l&&"string"==typeof l&&(D+=l.length,E+=l),m&&"string"==typeof m&&(D+=m.length,F+=m);let o=(0,g.f5)(a);o&&(A=(0,g._L)(A,o)),d=(0,i.nu)(K,a);let p=a.choices?.[0]?.finish_reason;if(p&&!(0,g.Gh)(a.usage)){let d=(0,g.OF)(v,D,e.h.OPENAI);a.usage=(0,g.WL)(d,e.h.OPENAI),b=`data: ${JSON.stringify(a)}
|
|
14
14
|
`,A=d,c=!0}else if(p&&A){let d=(0,g.O9)(A);a.usage=(0,g.WL)(d,e.h.OPENAI),b=`data: ${JSON.stringify(a)}
|
|
15
15
|
`,c=!0}else(f||j)&&(b=`data: ${JSON.stringify(a)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.id=8920,exports.ids=[8920],exports.modules={58920:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,ad:()=>k,calculateCostFromTokens:()=>l,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"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-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"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:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"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:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},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.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"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-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"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.1-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-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},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},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}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{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:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{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.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{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-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{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 i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}function k(){return g}function l(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=8920,exports.ids=[8920],exports.modules={58920:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,calculateCostFromTokens:()=>k,gH:()=>i,getPricingForModel:()=>j});let d=["cline-free/"],e={input:0,output:0,cached:0,reasoning:0,cache_creation:0},f={"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-5-5-thinking":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-high":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-medium":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-opus-5-5-low":{input:4,output:20,cached:.2,reasoning:20,cache_creation:5},"claude-fable-5":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"claude-sonnet-5-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-thinking":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-high":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-medium":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5-5-low":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"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:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5-mini":{input:.25,output:2,cached:.125,reasoning:2,cache_creation:.25},"gpt-5-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"gpt-5.1-codex":{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25},"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:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.2-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75},"gpt-5.3-codex-spark":{input:3,output:12,cached:.3,reasoning:12,cache_creation:3},"gpt-5.6":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-luna":{input:1,output:6,cached:.1,reasoning:6,cache_creation:1},"gpt-5.6-terra":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5},"gpt-5.6-sol":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5},"gpt-6.1-sol":{input:2,output:10,cached:.1,reasoning:10,cache_creation:2.5},"gpt-6-sol":{input:2,output:10,cached:.2,reasoning:10,cache_creation:2.5},"gpt-6-luna":{input:.1,output:.5,cached:.01,reasoning:.5,cache_creation:.125},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.8-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.8-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.7-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-high":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-medium":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.6-flash-low":{input:1.5,output:7.5,cached:.15,reasoning:11.25,cache_creation:1.875},"gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.375},"gemini-3.5-flash-high":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"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-k3":{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},k3:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3},"kimi-k2.7-code":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-k2.7-code-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"kimi-for-coding":{input:.95,output:4,cached:.19,reasoning:4,cache_creation:.95},"kimi-for-coding-highspeed":{input:1.9,output:8,cached:.38,reasoning:8,cache_creation:1.9},"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-k2.6":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"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.1-flash":{input:.14,output:.28,cached:.0028,reasoning:.28,cache_creation:.14},"deepseek-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},"muse-spark-1.3":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25,cache_creation:0},"muse-spark-1.3-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2,cache_creation:0},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}},g={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},tokenrouter:{"MiniMax-M3":{input:.3,output:1.2,cached:.06,reasoning:1.2},"anthropic/claude-fable-5":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-haiku-4.5":{input:1,output:5,cached:.1,cache_creation:1.25,reasoning:5},"anthropic/claude-opus-4.5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.6":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.7-fast":{input:30,output:150,cached:3,reasoning:150},"anthropic/claude-opus-4.8":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-4.8-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-opus-5":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"anthropic/claude-opus-5-fast":{input:10,output:50,cached:1,cache_creation:12.5,reasoning:50},"anthropic/claude-sonnet-4":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.5":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-4.6":{input:3,output:15,cached:.3,cache_creation:3.75,reasoning:15},"anthropic/claude-sonnet-5":{input:2,output:10,cached:.2,reasoning:10},"claude-opus-4-8-m-aws":{input:5,output:25,cached:.5,cache_creation:6.25,reasoning:25},"deepseek/deepseek-v3.2":{input:.26,output:.38,cached:.13,reasoning:.38},"deepseek/deepseek-v4-flash":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-flash-0731":{input:.14,output:.28,cached:.0028,reasoning:.28},"deepseek/deepseek-v4-pro":{input:.435,output:.87,cached:.003625,reasoning:.87},"ex/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"google/gemini-2.5-flash-image":{input:.3,output:2.5,reasoning:2.5},"google/gemini-3-flash-preview":{input:.5,output:3,cached:.05,cache_creation:.08333,reasoning:3},"google/gemini-3-pro-image-preview":{input:2,output:12,reasoning:12},"google/gemini-3.1-flash-image-preview":{input:.5,output:3,reasoning:3},"google/gemini-3.1-flash-lite-image":{input:.25,output:1.5,reasoning:1.5},"google/gemini-3.1-pro-preview":{input:2,output:12,cached:.2,cache_creation:.375,reasoning:12},"google/gemini-3.5-flash":{input:1.5,output:9,cached:.15,cache_creation:.08333,reasoning:9},"google/gemini-3.5-flash-lite":{input:.3,output:2.5,cached:.03,cache_creation:.08333,reasoning:2.5},"google/gemini-3.6-flash":{input:1.5,output:7.5,cached:.15,cache_creation:.08333,reasoning:7.5},"google/gemini-embedding-2":{input:1,output:6,cached:.1,reasoning:6},"google/gemma-4-26b-a4b-it":{input:.06,output:.33,reasoning:.33},"kling-3.0-turbo":{input:2.1,output:2.1,reasoning:2.1},"microsoft/mai-image-2.5":{input:5,output:47,reasoning:47},"minimax/minimax-m2-her":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.1-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"minimax/minimax-m2.5":{input:.3,output:1.2,cached:.03,reasoning:1.2},"minimax/minimax-m2.7":{input:.3,output:1.2,cached:.06,reasoning:1.2},"minimax/minimax-m2.7-highspeed":{input:.6,output:2.4,cached:.06,reasoning:2.4},"miromind/mirothinker-1-7-deepresearch":{input:4,output:25,reasoning:25},"miromind/mirothinker-1-7-deepresearch-mini":{input:1.25,output:10,reasoning:10},"mistralai/devstral-2512":{input:.4,output:2,cached:.04,reasoning:2},"mistralai/mistral-medium-3-5":{input:1.5,output:7.5,reasoning:7.5},"mistralai/mistral-small-2603":{input:.15,output:.6,cached:.015,reasoning:.6},"mistralai/voxtral-small-24b-2507":{input:.1,output:.3,cached:.01,reasoning:.3},"moonshotai/kimi-k2.5":{input:.6,output:3,cached:.1,reasoning:3},"moonshotai/kimi-k2.6":{input:.95,output:4,cached:.16,reasoning:4},"moonshotai/kimi-k2.7-code":{input:.9286,output:3.8571,cached:.1857,reasoning:3.8571},"moonshotai/kimi-k3":{input:3,output:15,cached:.3,reasoning:15},"nvidia/nemotron-3-super-120b-a12b":{input:.3,output:.9,cached:.1,reasoning:.9},"openai/gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.6},"openai/gpt-5":{input:1.25,output:10,cached:.125,reasoning:10},"openai/gpt-5-image":{input:10,output:40,cached:2.5,reasoning:40},"openai/gpt-5-image-mini":{input:2.5,output:8,cached:.25,reasoning:8},"openai/gpt-5-mini":{input:.25,output:2,cached:.025,reasoning:2},"openai/gpt-5.2":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14},"openai/gpt-5.4":{input:2.5,output:15,cached:.25,reasoning:15},"openai/gpt-5.4-image-2":{input:8,output:30,cached:2,reasoning:30},"openai/gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5},"openai/gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25},"openai/gpt-5.4-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.5":{input:5,output:30,cached:.5,reasoning:30},"openai/gpt-5.5-pro":{input:30,output:180,reasoning:180},"openai/gpt-5.6-luna":{input:.2,output:1.2,cached:.02,cache_creation:.25,reasoning:1.2},"openai/gpt-5.6-sol":{input:5,output:30,cached:.5,cache_creation:6.25,reasoning:30},"openai/gpt-5.6-terra":{input:2,output:12,cached:.2,cache_creation:2.5,reasoning:12},"openai/gpt-audio":{input:2.5,output:10,reasoning:10},"openai/gpt-audio-mini":{input:.6,output:2.4,reasoning:2.4},"openai/gpt-oss-120b":{input:.039,output:.18,reasoning:.18},"qwen/qwen3-coder-next":{input:.12,output:.75,cached:.06,reasoning:.75},"qwen/qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen/qwen3.5-35b-a3b":{input:.1625,output:1.3,reasoning:1.3},"qwen/qwen3.5-397b-a17b":{input:.39,output:2.34,reasoning:2.34},"qwen/qwen3.5-9b":{input:.1,output:.15,reasoning:.15},"qwen/qwen3.5-flash":{input:.1048,output:.4194,reasoning:.4194},"qwen/qwen3.5-plus-02-15":{input:.26,output:1.56,reasoning:1.56},"qwen/qwen3.6-plus":{input:.54,output:3.21,reasoning:3.21},"qwen/qwen3.7-max":{input:1.25,output:3.75,cached:.25,reasoning:3.75},"qwen/qwen3.7-plus":{input:.4,output:1.6,cached:.08,reasoning:1.6},"qwen/qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.5-omni-plus":{input:1,output:5.7143,reasoning:5.7143},"qwen3.6-flash":{input:.171,output:1.029,cached:.017,cache_creation:.214,reasoning:1.029},"sakana/fugu-ultra":{input:5,output:30,cached:.5,reasoning:30},"seed-2-0-code-preview-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"seed-2-0-lite-260428":{input:.5,output:4,cached:.1,cache_creation:.008333,reasoning:4},"seed-2-0-mini-260428":{input:.2,output:.8,cached:.04,cache_creation:.00833,reasoning:.8},"seed-2-0-pro-260328":{input:1,output:6,cached:.2,cache_creation:.008333,reasoning:6},"stepfun/step-3.5-flash":{input:.1,output:.3,cached:.02,reasoning:.3},"stepfun/step-3.7-flash":{input:.2,output:1.15,cached:.04,reasoning:1.15},"tencent/hy3-preview":{input:.066,output:.26,cached:.029,reasoning:.26},"x-ai/grok-4.1-fast":{input:.2,output:.5,cached:.05,reasoning:.5},"x-ai/grok-4.20-beta":{input:2,output:6,cached:.2,reasoning:6},"x-ai/grok-4.3":{input:1.25,output:2.5,cached:.2,reasoning:2.5},"x-ai/grok-4.5":{input:2,output:6,cached:.5,reasoning:6},"x-ai/grok-build-0.1":{input:1,output:2,cached:.2,reasoning:2},"xiaomi/mimo-v2-flash":{input:.1,output:.3,cached:.01,reasoning:.3},"xiaomi/mimo-v2-omni":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2-pro":{input:1,output:3,cached:.2,reasoning:3},"xiaomi/mimo-v2.5":{input:.4,output:2,cached:.08,reasoning:2},"xiaomi/mimo-v2.5-pro":{input:1,output:3,cached:.2,reasoning:3},"z-ai/glm-4.5-air":{input:.13,output:.85,cached:.025,reasoning:.85},"z-ai/glm-4.6":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-4.6v":{input:.3,output:.9,reasoning:.9},"z-ai/glm-4.7":{input:.6,output:2.2,cached:.11,reasoning:2.2},"z-ai/glm-5":{input:1,output:3.2,cached:.2,reasoning:3.2},"z-ai/glm-5-turbo":{input:1.2,output:4,cached:.24,reasoning:4},"z-ai/glm-5.1":{input:1.05,output:3.5,cached:.525,reasoning:3.5},"z-ai/glm-5.2":{input:1.4,output:4.4,cached:.26,reasoning:4.4},"z-ai/glm-5.3-free":{input:0,output:0,cached:0,reasoning:0}}},h=[{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:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-none",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex-spark",pricing:{input:3,output:12,cached:.3,reasoning:12,cache_creation:3}},{pattern:"codex-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"*-codex",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{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.6-*",pricing:{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5}},{pattern:"gpt-5.3-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.2-*",pricing:{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}},{pattern:"gpt-5.1-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5-*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{pattern:"gpt-5*",pricing:{input:1.25,output:10,cached:.625,reasoning:10,cache_creation:1.25}},{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-k3*",pricing:{input:3,output:15,cached:.3,reasoning:15,cache_creation:3}},{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 i(a,b){return RegExp("^"+a.split("*").map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(b)}function j(a,b){if(!b)return null;if(a&&g[a]?.[b])return g[a][b];if(function(a){if(!a)return!1;let b=String(a).toLowerCase();return d.some(a=>b.startsWith(a))}(b))return e;let c=b.includes("/")?b.split("/").pop():b;if(f[c])return f[c];if(f[b])return f[b];for(let{pattern:a,pricing:d}of h)if(i(a,c)||i(a,b))return d;return null}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}}};
|