@rabbi696/ezrouter 0.6.15 → 0.6.16

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.
Files changed (863) hide show
  1. package/README.md +72 -1
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +27 -27
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +10 -6
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  95. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  96. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  98. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  103. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  105. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  106. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  107. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  108. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  109. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
  110. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  112. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
  186. package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
  236. package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  252. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
  366. package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
  401. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -3
  443. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  482. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/callback.html +1 -1
  485. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  486. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  487. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  488. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
  489. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  490. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  491. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
  494. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  495. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  499. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  501. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
  504. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  509. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  511. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
  514. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  519. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  521. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
  524. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  528. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
  529. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
  531. package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  533. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
  534. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  535. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  538. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  539. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  541. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
  543. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
  544. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
  550. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
  552. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
  553. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
  555. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  560. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
  561. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
  563. package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
  566. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
  567. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
  571. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
  573. package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
  574. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
  576. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  577. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  579. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  581. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
  582. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
  584. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
  587. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  588. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  589. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  591. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  592. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  594. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
  597. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  598. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  599. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  601. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  602. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  604. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  605. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
  607. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  608. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  609. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  613. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  615. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
  618. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  623. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  625. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  626. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  628. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  629. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  633. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  635. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  636. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  637. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
  638. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  639. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  641. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  642. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
  643. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  644. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
  645. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  646. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
  648. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  649. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  651. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  652. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  653. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  655. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
  658. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
  659. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
  660. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  661. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  662. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
  663. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
  664. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
  665. package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
  666. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  667. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  668. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  669. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  670. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  671. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  672. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  673. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  674. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  675. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  676. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  677. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  678. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  679. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  680. package/app/.next-cli-build/server/app/dashboard/skills.rsc +5 -5
  681. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  682. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  683. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  685. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +5 -5
  686. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +3 -3
  688. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  689. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  690. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
  691. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  692. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  693. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  695. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
  696. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  697. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
  698. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  699. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  700. package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
  701. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  702. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  704. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  705. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  706. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  708. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  710. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  711. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  712. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  713. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  714. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  715. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  716. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  717. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  718. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  719. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  720. package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
  721. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  722. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  723. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  724. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
  725. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  726. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
  727. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  728. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  729. package/app/.next-cli-build/server/app/index.html +1 -1
  730. package/app/.next-cli-build/server/app/index.rsc +3 -3
  731. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  733. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  734. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
  735. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  736. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  737. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  738. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  739. package/app/.next-cli-build/server/app/landing.html +1 -1
  740. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  741. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  742. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  743. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
  744. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  745. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  746. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  747. package/app/.next-cli-build/server/app/login/page.js +1 -1
  748. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  749. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  750. package/app/.next-cli-build/server/app/login.html +1 -1
  751. package/app/.next-cli-build/server/app/login.rsc +4 -4
  752. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  753. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  754. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
  755. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  756. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  757. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  758. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  759. package/app/.next-cli-build/server/app/page.js +1 -1
  760. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  761. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  762. package/app/.next-cli-build/server/app-paths-manifest.json +27 -27
  763. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  764. package/app/.next-cli-build/server/chunks/1482.js +4 -2
  765. package/app/.next-cli-build/server/chunks/1531.js +1 -1
  766. package/app/.next-cli-build/server/chunks/1641.js +1 -0
  767. package/app/.next-cli-build/server/chunks/1733.js +1 -1
  768. package/app/.next-cli-build/server/chunks/1847.js +1 -1
  769. package/app/.next-cli-build/server/chunks/2269.js +1 -1
  770. package/app/.next-cli-build/server/chunks/2348.js +1 -1
  771. package/app/.next-cli-build/server/chunks/2898.js +1 -1
  772. package/app/.next-cli-build/server/chunks/3583.js +2 -2
  773. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  774. package/app/.next-cli-build/server/chunks/369.js +22 -22
  775. package/app/.next-cli-build/server/chunks/3886.js +1 -1
  776. package/app/.next-cli-build/server/chunks/3912.js +1 -1
  777. package/app/.next-cli-build/server/chunks/3977.js +2 -2
  778. package/app/.next-cli-build/server/chunks/412.js +1 -1
  779. package/app/.next-cli-build/server/chunks/4378.js +3 -3
  780. package/app/.next-cli-build/server/chunks/4485.js +1 -1
  781. package/app/.next-cli-build/server/chunks/4574.js +1 -1
  782. package/app/.next-cli-build/server/chunks/4646.js +1 -1
  783. package/app/.next-cli-build/server/chunks/4704.js +2 -2
  784. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  785. package/app/.next-cli-build/server/chunks/4768.js +1 -1
  786. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  787. package/app/.next-cli-build/server/chunks/4803.js +2 -2
  788. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  789. package/app/.next-cli-build/server/chunks/4878.js +1 -1
  790. package/app/.next-cli-build/server/chunks/5011.js +1 -1
  791. package/app/.next-cli-build/server/chunks/507.js +2 -2
  792. package/app/.next-cli-build/server/chunks/5130.js +1 -1
  793. package/app/.next-cli-build/server/chunks/{8421.js → 5251.js} +1 -1
  794. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  795. package/app/.next-cli-build/server/chunks/5434.js +1 -1
  796. package/app/.next-cli-build/server/chunks/5460.js +40 -0
  797. package/app/.next-cli-build/server/chunks/5704.js +254 -0
  798. package/app/.next-cli-build/server/chunks/5872.js +1 -0
  799. package/app/.next-cli-build/server/chunks/5875.js +1 -1
  800. package/app/.next-cli-build/server/chunks/6252.js +2 -2
  801. package/app/.next-cli-build/server/chunks/6420.js +1 -1
  802. package/app/.next-cli-build/server/chunks/6670.js +2 -2
  803. package/app/.next-cli-build/server/chunks/6769.js +1 -0
  804. package/app/.next-cli-build/server/chunks/6799.js +2 -2
  805. package/app/.next-cli-build/server/chunks/698.js +2 -2
  806. package/app/.next-cli-build/server/chunks/7073.js +2 -2
  807. package/app/.next-cli-build/server/chunks/7218.js +1 -1
  808. package/app/.next-cli-build/server/chunks/7239.js +2 -2
  809. package/app/.next-cli-build/server/chunks/7362.js +1 -1
  810. package/app/.next-cli-build/server/chunks/7594.js +6 -6
  811. package/app/.next-cli-build/server/chunks/7663.js +1 -1
  812. package/app/.next-cli-build/server/chunks/7677.js +1 -1
  813. package/app/.next-cli-build/server/chunks/7775.js +1 -1
  814. package/app/.next-cli-build/server/chunks/7811.js +1 -0
  815. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  816. package/app/.next-cli-build/server/chunks/8062.js +2 -2
  817. package/app/.next-cli-build/server/chunks/8129.js +1 -1
  818. package/app/.next-cli-build/server/chunks/8231.js +1 -1
  819. package/app/.next-cli-build/server/chunks/8243.js +5 -5
  820. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  821. package/app/.next-cli-build/server/chunks/8469.js +2 -2
  822. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  823. package/app/.next-cli-build/server/chunks/8644.js +1 -1
  824. package/app/.next-cli-build/server/chunks/8772.js +1 -1
  825. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  826. package/app/.next-cli-build/server/chunks/9026.js +24 -24
  827. package/app/.next-cli-build/server/chunks/9062.js +1 -1
  828. package/app/.next-cli-build/server/chunks/9303.js +1 -1
  829. package/app/.next-cli-build/server/chunks/9485.js +1 -1
  830. package/app/.next-cli-build/server/chunks/9718.js +1 -1
  831. package/app/.next-cli-build/server/instrumentation.js +1 -1
  832. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  833. package/app/.next-cli-build/server/middleware.js +3 -3
  834. package/app/.next-cli-build/server/pages/404.html +1 -1
  835. package/app/.next-cli-build/server/pages/500.html +1 -1
  836. package/app/.next-cli-build/static/chunks/1321-73fdccd2b1bf151d.js +1 -0
  837. package/app/.next-cli-build/static/chunks/{5497-8766958582f95dc7.js → 5497-ff58e90f4053e184.js} +3 -3
  838. package/app/.next-cli-build/static/chunks/{6252-34f2d410651e1103.js → 6252-886aa8324e135e9c.js} +13 -13
  839. package/app/.next-cli-build/static/chunks/8105-9b41dc96e4b019cf.js +1 -0
  840. package/app/.next-cli-build/static/chunks/9227-4471c8f39a105c5f.js +5 -0
  841. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-89b4f70958736f2a.js → page-c35f746b4bd9fc90.js} +18 -14
  842. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-fa195b4f7348e2d6.js → page-0868ecc0d2f1bd04.js} +2 -2
  843. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-a31d9ca05cc3d528.js → page-6cb070834a750fdd.js} +1 -1
  844. package/app/CHANGELOG.md +54 -32
  845. package/app/package.json +1 -1
  846. package/app/public/CHANGELOG.md +54 -32
  847. package/app/src/mitm/server.js +24 -24
  848. package/cli.js +71 -69
  849. package/package.json +1 -1
  850. package/src/cli/commands/connect.js +157 -15
  851. package/src/cli/commands/connectTools.js +222 -4
  852. package/src/cli/commands/show.js +101 -0
  853. package/src/cli/menus/providers.js +8 -0
  854. package/app/.next-cli-build/server/chunks/3252.js +0 -1
  855. package/app/.next-cli-build/server/chunks/3267.js +0 -40
  856. package/app/.next-cli-build/server/chunks/6707.js +0 -1
  857. package/app/.next-cli-build/server/chunks/8450.js +0 -254
  858. package/app/.next-cli-build/server/chunks/9143.js +0 -1
  859. package/app/.next-cli-build/static/chunks/1321-043afc56cba448b8.js +0 -1
  860. package/app/.next-cli-build/static/chunks/8105-9dfc2c5ffef6e778.js +0 -1
  861. package/app/.next-cli-build/static/chunks/9227-af65f6ac1fca28c9.js +0 -3
  862. /package/app/.next-cli-build/static/{zQapcWqcr7oLVi5jh7t01 → Y5Sk8uSUyB0vJ-ZgW1X1U}/_buildManifest.js +0 -0
  863. /package/app/.next-cli-build/static/{zQapcWqcr7oLVi5jh7t01 → Y5Sk8uSUyB0vJ-ZgW1X1U}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=4378,exports.ids=[4378],exports.modules={2081:(a,b,c)=>{c.d(b,{k:()=>q,t:()=>r});var d=c(11847),e=c(84646),f=c(3148),g=c(39141),h=c(29485);let i=["none","low","medium","high"],j=["none","thinking"],k=["none","low","medium","high","max"],l=["none","low","medium","high","xhigh","max"],m={qoder:l,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":l,"claude-budget":l,"gemini-level":["minimal","low","medium","high"],"gemini-budget":i,zai:j,qwen:i,kimi:k,opencode:k,deepseek:["none","high","max"],minimax:j,hunyuan:i,step:i,nous:i,meta:["minimal","low","medium","high","xhigh"],ollama:k},n=["none","minimal","low","medium","high","xhigh","max"],o=["none","low","medium","high","max"],p=[{pattern:"*claude*4.6*",levels:o},{pattern:"*claude*4-6*",levels:o},{provider:"codex",pattern:"*gpt-6*",levels:n},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:n},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{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:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"qoder",pattern:"*",levels:l},{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.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function q(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 j=String(b||"").replace(/\([^()]+\)\s*$/,""),k="codex"===a?(0,h.SM)("cx").find(a=>a.id===j)?.thinkingLevels:null,l=p.find(c=>(!c.providers||!a||c.providers.includes(a))&&(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),n=(a?g.xq[a]?.thinkingFormat:null)||c.thinkingFormat,o=k||c.thinkingLevels||l?.levels||m[n]||i;return!1===c.thinkingCanDisable&&(o=o.filter(a=>"none"!==a)),o}function r(a,b,c){return q(a,b)?.includes(c)===!0}},3148:(a,b,c)=>{c.d(b,{$D:()=>w,Oj:()=>i,P9:()=>n,QR:()=>k,We:()=>l,Zm:()=>h,aZ:()=>x,cr:()=>r,if:()=>v,pA:()=>q,rG:()=>m,rx:()=>j,yh:()=>s});var d=c(94454),e=c(14014);let f="-agentic",g="-thinking",h=64,i=10237,j="AmazonCodeWhispererStreamingService.GenerateAssistantResponse",k=new Set([401,403,404]);function l(a){return"google"===a||"github"===a?"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK":"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX"}let m=`
1
+ "use strict";exports.id=4378,exports.ids=[4378,9485],exports.modules={2081:(a,b,c)=>{c.d(b,{k:()=>q,t:()=>r});var d=c(11847),e=c(84646),f=c(3148),g=c(39141),h=c(29485);let i=["none","low","medium","high"],j=["none","thinking"],k=["none","low","medium","high","max"],l=["none","low","medium","high","xhigh","max"],m={qoder:l,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":l,"claude-budget":l,"gemini-level":["minimal","low","medium","high"],"gemini-budget":i,zai:j,qwen:i,kimi:k,opencode:k,deepseek:["none","high","max"],minimax:j,hunyuan:i,step:i,nous:i,meta:["minimal","low","medium","high","xhigh"],ollama:k},n=["none","minimal","low","medium","high","xhigh","max"],o=["none","low","medium","high","max"],p=[{pattern:"*claude*4.6*",levels:o},{pattern:"*claude*4-6*",levels:o},{provider:"codex",pattern:"*gpt-6*",levels:n},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:n},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{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:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"qoder",pattern:"*",levels:l},{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.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function q(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 j=String(b||"").replace(/\([^()]+\)\s*$/,""),k="codex"===a?(0,h.SM)("cx").find(a=>a.id===j)?.thinkingLevels:null,l=p.find(c=>(!c.providers||!a||c.providers.includes(a))&&(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),n=(a?g.xq[a]?.thinkingFormat:null)||c.thinkingFormat,o=k||c.thinkingLevels||l?.levels||m[n]||i;return!1===c.thinkingCanDisable&&(o=o.filter(a=>"none"!==a)),o}function r(a,b,c){return q(a,b)?.includes(c)===!0}},3148:(a,b,c)=>{c.d(b,{$D:()=>w,Oj:()=>i,P9:()=>n,QR:()=>k,We:()=>l,Zm:()=>h,aZ:()=>x,cr:()=>r,if:()=>v,pA:()=>q,rG:()=>m,rx:()=>j,yh:()=>s});var d=c(94454),e=c(14014);let f="-agentic",g="-thinking",h=64,i=10237,j="AmazonCodeWhispererStreamingService.GenerateAssistantResponse",k=new Set([401,403,404]);function l(a){return"google"===a||"github"===a?"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK":"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX"}let m=`
2
2
  # CRITICAL: CHUNKED WRITE PROTOCOL (MANDATORY)
3
3
 
4
4
  You MUST follow these rules for ALL file operations. Violation causes server timeouts and task failure.
@@ -48,7 +48,7 @@ WRONG: Generating massive code blocks without chunking -> TIMEOUT
48
48
 
49
49
  REMEMBER: When in doubt, write LESS per operation. Multiple small operations > one large operation.
50
50
  `.trim();function n(a,b,c){let f=(0,d.sS)(a);if(f)return"none"===f.mode||"level"===f.mode&&"disabled"===f.level?null:"budget"===f.mode?f.budget:"level"===f.mode?(0,e.nE)(f.level)??16e3:16e3;if(b){let a=function(a,b){if(!a)return;if("function"==typeof a.get)return a.get(b);let c=b.toLowerCase();for(let b of Object.keys(a))if(b.toLowerCase()===c)return a[b]}(b,"anthropic-beta");if("string"==typeof a&&a.toLowerCase().includes("interleaved-thinking"))return 16e3}if(function(a){for(let b of Array.isArray(a?.messages)?a.messages:[]){if(!b||"system"!==b.role&&"user"!==b.role)continue;let a=b.content;if("string"==typeof a){if(y(a))return!0}else if(Array.isArray(a))for(let b of a){let a=b?.text;if("string"==typeof a&&y(a))return!0}}return!!("string"==typeof a?.system&&y(a.system))}(a))return 16e3;if("string"==typeof c&&c){let a=c.toLowerCase();if(a.includes("thinking")||a.includes("-reason"))return 16e3}return null}function o(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return b?{major:Number(b[1]),minor:void 0===b[2]?null:Number(b[2])}:null}function p(a){let b=a?.output_config?.effort??a?.reasoning_effort??("object"==typeof a?.reasoning?a.reasoning?.effort:null);if("string"!=typeof b)return null;let c=b.toLowerCase();return"max"===c?"xhigh":["low","medium","high","xhigh"].includes(c)?c:null}function q(a){if("string"!=typeof a)return null;let b=a.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(b))return"reasoning";if(!b.includes("claude"))return null;let c=o(a);if(!c)return null;let{major:d,minor:e}=c;return d<4||4===d&&(null===e||e<=5||null!==e&&e>=1e3)?null:"output_config"}function r(a,b){return"reasoning"===q(b)&&null!==p(a)}function s(a,b){let c=q(b);if(c)return function(a,b="output_config",c){let d="reasoning"===b?p(a):function(a,b){let c=a?.output_config?.effort??a?.reasoning_effort??("object"==typeof a?.reasoning?a.reasoning?.effort:null);if("string"!=typeof c)return null;let d=c.toLowerCase();if("none"===d||"off"===d||"disabled"===d)return null;if("xhigh"===d){let a;return(a=o(b))&&(4!==a.major||null===a.minor||!(a.minor<=6))?"xhigh":"high"}return"max"===d?"max":["low","medium","high"].includes(d)?d:null}(a,c);if(d)return"reasoning"===b?{reasoning:{effort:d}}:{thinking:{type:"adaptive",display:"summarized"},output_config:{effort:d}}}(a,c,b)}function t(a){return"string"==typeof a&&a.endsWith(f)}function u(a){return"string"==typeof a&&a.endsWith(g)}function v(a){return"string"==typeof a&&a.startsWith("claude")?a.replace(/([a-z])\.(\d)/g,"$1-$2"):a}function w(a){var b,c;let d=a,e=!1,h=!1;return t(d)&&(e=!0,d=t(b=d)?b.slice(0,-f.length):b),u(d)&&(h=!0,d=u(c=d)?c.slice(0,-g.length):c),{upstream:d,agentic:e,thinking:h}}function x(a=16e3){let b=Math.max(1,Math.min(32e3,Number(a)||16e3));return`<thinking_mode>enabled</thinking_mode>
51
- <max_thinking_length>${b}</max_thinking_length>`}function y(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}},4905:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}},9155:(a,b,c)=>{c.d(b,{EV:()=>g,So:()=>h,X5:()=>d.X5,_M:()=>f});var d=c(78574),e=c(40467);async function f(a,b=null,c=null,g=null){let h=a?.apiKey||a?.accessToken;if(!(0,d.zh)(h))return{...a,accessToken:h,apiKey:h};let i=g||(0,e.ty)(a?.provider);try{let e=await (0,d.JQ)(h,{profile:i,proxyOptions:b,signal:c});return{...a,accessToken:e.accessToken,providerSpecificData:{...a?.providerSpecificData||{},userId:e.userId||a?.providerSpecificData?.userId||""}}}catch(b){return{...a,accessToken:h,apiKey:h}}}async function g(a,b={}){let c=b.region||(0,e.ty)(a?.provider),h=await f(a,b.proxyOptions,b.signal,c),i=b.profile||c;return(0,d.EV)(h,{...b,profile:i})}function h(a){if(!a)return[];let b=[],c=new Set;for(let d of a.models||[])!d?.id||c.has(d.id)||(c.add(d.id),b.push({id:d.id,name:d.name||d.id,hidden:!1}));for(let[d,e]of a.rawConfigs||[])!d||c.has(d)||(c.add(d),b.push({id:d,name:e?.display_name||d,hidden:!0}));return b}},14014:(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"}},29485:(a,b,c)=>{c.d(b,{KC:()=>u,OA:()=>q,PROVIDER_MODELS:()=>f.vq,SM:()=>k,Xg:()=>t,cY:()=>v,ez:()=>p,fZ:()=>l,kt:()=>r,ux:()=>o});var d=c(4630),e=c(17218),f=c(39141),g=c(6595),h=c(8382),i=c(19956);let j=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function k(a){return f.vq[a]||[]}function l(a){let b=f.vq[a];return b?.[0]?.id||null}let m=new Set(["kr","kiro"]);function n(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!m.has(c))return;let f=(0,g.Kq)(d);if(f!==d)return a.find(a=>a.id===f)}function o(a,b){if(j(a)&&(0,h.nh)(b))return i.h.OPENAI_RESPONSES;let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?(0,g.gr)(d):j(a)&&(0,h.i8)(b)?.targetFormat||null}function p(a,b){let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?(0,g.ec)(d):j(a)?(0,h.i8)(b)?.supportedFormats||[i.h.OPENAI]:null}function q(a,b){let c=f.vq[a];if(!c)return null;let d=n(c,b,a);return d?.kind||d?.type||null}function r(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=n(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let s=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),t=Object.fromEntries(Object.keys(d.xq).map(a=>[a,s[a]||a]));function u(a){let b=t[a]||a;return f.vq[b]||[]}function v(a,b){return(0,g.g5)(n(f.vq[a],b,a))}},40467:(a,b,c)=>{c.d(b,{KC:()=>s,L7:()=>h,OQ:()=>q,RB:()=>A,Ty:()=>w,_G:()=>o,bb:()=>j,bg:()=>n,cT:()=>v,e9:()=>u,eM:()=>i,pM:()=>z,pr:()=>B,qk:()=>x,rf:()=>l,t6:()=>t,ty:()=>g,xG:()=>y,x_:()=>p});let d="intl",e={[d]:{chat:"https://api3.qoder.sh",chatAlt:"https://api2.qoder.sh",openApi:"https://openapi.qoder.sh",center:"https://center.qoder.sh",login:"https://qoder.com/device/selectAccounts",website:"https://qoder.com"},cn:{chat:"https://gateway.qoder.com.cn",chatAlt:"https://gateway.qoder.com.cn",openApi:"https://openapi.qoder.com.cn",center:"https://gateway.qoder.com.cn",login:"https://qoder.com.cn/device/selectAccounts",website:"https://qoder.com.cn"}};function f(a){return e[a]||e[d]}function g(a){return"qoder-cn"===a?"cn":d}let h=e[d].openApi,i=e[d].center,j=e[d].chat,k=e[d].chatAlt,l=e[d].login;function m(a){return f(a).openApi}let n=`${m(d)}/api/v1/deviceToken/poll`,o=`${m(d)}/api/v1/userinfo`,p=`${m(d)}/api/v2/quota/usage`;f(d).center;let q=`${m(d)}/api/v1/jobToken/exchange`,r=`${j}/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common`,s=`${r}&Encode=1`,t=`${f(d).chat}/algo/api/v2/model/list?Encode=1`;function u(a,b=d){if("cn"===b)return e.cn.chat;let c=a?.apiKey||a?.accessToken;return"string"==typeof c&&!c.startsWith("pt-")&&(c.startsWith("jt-")||(a?.accessToken||"").startsWith("jt-"))?k:j}Object.freeze({AUTO:"auto",MAX:"max",DEFAULT:"default"});let v="1.0.0",w="5",x="disagree",y="v2",z=function(a=process.arch,b=process.platform){return`${"arm64"===a?"aarch64":"x64"===a?"x86_64":a}_${"win32"===b?"windows":b}`}(),A="5",B=`-----BEGIN PUBLIC KEY-----
51
+ <max_thinking_length>${b}</max_thinking_length>`}function y(a){return!!a&&!!a.includes("<thinking_mode>")&&(a.includes("<thinking_mode>enabled</thinking_mode>")||a.includes("<thinking_mode>interleaved</thinking_mode>"))}},4905:(a,b,c)=>{c.d(b,{$U:()=>d,RK:()=>g,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"},g={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","Access-Control-Allow-Origin":"*"}},9155:(a,b,c)=>{c.d(b,{EV:()=>g,So:()=>h,X5:()=>d.X5,_M:()=>f});var d=c(78574),e=c(40467);async function f(a,b=null,c=null,g=null){let h=a?.apiKey||a?.accessToken;if(!(0,d.zh)(h))return{...a,accessToken:h,apiKey:h};let i=g||(0,e.ty)(a?.provider);try{let e=await (0,d.JQ)(h,{profile:i,proxyOptions:b,signal:c});return{...a,accessToken:e.accessToken,providerSpecificData:{...a?.providerSpecificData||{},userId:e.userId||a?.providerSpecificData?.userId||""}}}catch(b){return{...a,accessToken:h,apiKey:h}}}async function g(a,b={}){let c=b.region||(0,e.ty)(a?.provider),h=await f(a,b.proxyOptions,b.signal,c),i=b.profile||c;return(0,d.EV)(h,{...b,profile:i})}function h(a){if(!a)return[];let b=[],c=new Set;for(let d of a.models||[])!d?.id||c.has(d.id)||(c.add(d.id),b.push({id:d.id,name:d.name||d.id,hidden:!1}));for(let[d,e]of a.rawConfigs||[])!d||c.has(d)||(c.add(d),b.push({id:d,name:e?.display_name||d,hidden:!0}));return b}},14014:(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"}},29485:(a,b,c)=>{c.d(b,{KC:()=>s,OA:()=>p,PROVIDER_MODELS:()=>e.vq,SM:()=>j,Xg:()=>r,cY:()=>t,ez:()=>o,fZ:()=>k,kt:()=>q,ux:()=>n});var d=c(17218),e=c(39141),f=c(6595),g=c(8382),h=c(19956);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}function k(a){let b=e.vq[a];return b?.[0]?.id||null}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function n(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function o(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,f.ec)(d):i(a)?(0,g.i8)(b)?.supportedFormats||[h.h.OPENAI]:null}function p(a,b){let c=e.vq[a];if(!c)return null;let d=m(c,b,a);return d?.kind||d?.type||null}function q(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=m(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));let r=Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]));function s(a){let b=r[a]||a;return e.vq[b]||[]}function t(a,b){return(0,f.g5)(m(e.vq[a],b,a))}},40467:(a,b,c)=>{c.d(b,{KC:()=>s,L7:()=>h,OQ:()=>q,RB:()=>A,Ty:()=>w,_G:()=>o,bb:()=>j,bg:()=>n,cT:()=>v,e9:()=>u,eM:()=>i,pM:()=>z,pr:()=>B,qk:()=>x,rf:()=>l,t6:()=>t,ty:()=>g,xG:()=>y,x_:()=>p});let d="intl",e={[d]:{chat:"https://api3.qoder.sh",chatAlt:"https://api2.qoder.sh",openApi:"https://openapi.qoder.sh",center:"https://center.qoder.sh",login:"https://qoder.com/device/selectAccounts",website:"https://qoder.com"},cn:{chat:"https://gateway.qoder.com.cn",chatAlt:"https://gateway.qoder.com.cn",openApi:"https://openapi.qoder.com.cn",center:"https://gateway.qoder.com.cn",login:"https://qoder.com.cn/device/selectAccounts",website:"https://qoder.com.cn"}};function f(a){return e[a]||e[d]}function g(a){return"qoder-cn"===a?"cn":d}let h=e[d].openApi,i=e[d].center,j=e[d].chat,k=e[d].chatAlt,l=e[d].login;function m(a){return f(a).openApi}let n=`${m(d)}/api/v1/deviceToken/poll`,o=`${m(d)}/api/v1/userinfo`,p=`${m(d)}/api/v2/quota/usage`;f(d).center;let q=`${m(d)}/api/v1/jobToken/exchange`,r=`${j}/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common`,s=`${r}&Encode=1`,t=`${f(d).chat}/algo/api/v2/model/list?Encode=1`;function u(a,b=d){if("cn"===b)return e.cn.chat;let c=a?.apiKey||a?.accessToken;return"string"==typeof c&&!c.startsWith("pt-")&&(c.startsWith("jt-")||(a?.accessToken||"").startsWith("jt-"))?k:j}Object.freeze({AUTO:"auto",MAX:"max",DEFAULT:"default"});let v="1.0.0",w="5",x="disagree",y="v2",z=function(a=process.arch,b=process.platform){return`${"arm64"===a?"aarch64":"x64"===a?"x86_64":a}_${"win32"===b?"windows":b}`}(),A="5",B=`-----BEGIN PUBLIC KEY-----
52
52
  MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA8iMH5c02LilrsERw9t6Pv5Nc
53
53
  4k6Pz1EaDicBMpdpxKduSZu5OANqUq8er4GM95omAGIOPOh+Nx0spthYA2BqGz+l
54
54
  6HRkPJ7S236FZz73In/KVuLnwI8JJ2CbuJap8kvheCCZpmAWpb/cPx/3Vr/J6I17
@@ -65,4 +65,4 @@ XcW+ML9FoCI6AOvOzwIDAQAB
65
65
  ${l}
66
66
  ${n}
67
67
  ${k.toString("latin1")}
68
- ${t}`,v=p(Buffer.from(u,"latin1")),w=c.machineId||g.randomUUID(),x=c.machineToken||w,y=p(k),z=String(k.length);return{Authorization:`Bearer COSY.${s}.${v}`,"Cosy-Key":l,"Cosy-User":c.userId,"Cosy-Date":n,"Cosy-Version":j.ideVersion,"Cosy-Machineid":w,"Cosy-Machinetoken":x,"Cosy-Machinetype":j.machineType,"Cosy-Machineos":j.machineOs,"Cosy-Clienttype":j.clientType,"Cosy-Clientip":"127.0.0.1","Cosy-Bodyhash":y,"Cosy-Bodylength":z,"Cosy-Sigpath":t,"Cosy-Data-Policy":j.dataPolicy,"Cosy-Organization-Id":"","Cosy-Organization-Tags":"","Login-Version":j.loginVersion,"X-Request-Id":g.randomUUID()}}var r=c(9155),s=c(91576),t=c(94454);let u={chat_task:"FREE_INPUT",stream:!0,is_reply:!0,is_retry:!1,source:1,version:"3",agent_id:"agent_common",task_id:"common",aliyun_user_type:""},v=["name","tool_calls","tool_call_id","reasoning_content"];function w(a,b){"string"==typeof b&&b&&!a.includes(b)&&a.push(b)}function x(a){if("string"==typeof a)return a;if(null==a)return"";if(Array.isArray(a)){let b=[];for(let c of a)c&&"object"==typeof c&&"string"==typeof c.text&&b.push(c.text);return b.join("\n")}return"object"==typeof a&&"string"==typeof a.text?a.text:String(a)}async function y({model:a,body:b,credentials:c,log:d,proxyOptions:e,signal:f,profile:h=null,modelConfig:i=null,includeBusiness:j=!1}){let k=o(h),l=(0,t.kD)(String(a||"").replace(/^qoder\//,"")),m=i;if(m)m.key||(m={...m,key:l});else if(!(m=await (0,r.X5)(c,l,{log:d,proxyOptions:e,signal:f,profile:k}))){let a=await (0,r.EV)(c,{forceRefresh:!0,log:d,proxyOptions:e,signal:f,profile:k}),b=a?.rawConfigs.get(l);if(!b)throw Error(`qoder: model_config for "${l}" not yet known (inject modelConfig or fetch model list)`);m={...b,key:l}}let{messages:n,systemText:p,imageUrls:q}=function(a){if(!Array.isArray(a)||0===a.length)return{messages:[],systemText:"",imageUrls:[]};let b=[],c=[],d=[];for(let e of a){if(!e||"object"!=typeof e)continue;if("system"===e.role||"developer"===e.role){let a=x(e.content);a&&b.push(a);continue}let{content:a,imageUrls:f}=function a(b){if("string"==typeof b)return{content:b,imageUrls:[]};if(null==b)return{content:"",imageUrls:[]};if(!Array.isArray(b)&&"object"==typeof b)return a([b]);if(!Array.isArray(b))return{content:String(b),imageUrls:[]};let c=[],d=[];for(let a of b){if(null==a)continue;if("string"==typeof a){c.push({type:"text",text:a});continue}if("object"!=typeof a)continue;let b="string"==typeof a.type?a.type:"";if("text"===b||"string"==typeof a.text&&!b&&!a.image_url&&!a.binary){"string"==typeof a.text&&c.push({type:"text",text:a.text});continue}if("image_url"===b||a.image_url){let b,e=a.image_url??a,f="";if("string"==typeof e?f=e:e&&"object"==typeof e&&(f="string"==typeof e.url?e.url:"","string"==typeof e.detail&&e.detail&&(b=e.detail)),f||"string"!=typeof a.url||(f=a.url),!f)continue;let g=b?{url:f,detail:b}:{url:f};c.push({type:"image_url",image_url:g}),w(d,f);continue}if("binary"===b||a.binary||"string"==typeof a.data&&(a.mime_type||a.mimeType)){let b=a.binary&&"object"==typeof a.binary?a.binary:a,e="string"==typeof b.data?b.data:"",f="string"==typeof b.mime_type&&b.mime_type||"string"==typeof b.mimeType&&b.mimeType||"";if(!e||!f)continue;c.push({type:"binary",binary:{data:e,mime_type:f}}),e.startsWith("data:")&&w(d,e);continue}}return 0===c.length?{content:"",imageUrls:[]}:0===d.length&&c.every(a=>"text"===a.type&&"string"==typeof a.text)?{content:c.map(a=>a.text).join("\n"),imageUrls:[]}:{content:c,imageUrls:d}}(e.content);for(let a of f)w(d,a);let g=function(a){let b={role:a.role};for(let c of v)void 0!==a[c]&&(b[c]=a[c]);return b}(e);g.content=a,c.push(g)}return{messages:c,systemText:b.join("\n\n"),imageUrls:d}}(b?.messages||[]),z=Array.isArray(b?.tools)?b.tools:[],A=!!m.is_reasoning,B=Number(m.max_output_tokens)||0,C=32768;B>0&&(C=B),"number"==typeof b?.max_tokens&&b.max_tokens>0&&b.max_tokens<C&&(C=b.max_tokens),"number"==typeof b?.max_completion_tokens&&b.max_completion_tokens>0&&b.max_completion_tokens<C&&(C=b.max_completion_tokens);let D=function(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(c?.role!=="user")continue;let d=x(c.content);if(d)return d;if(Array.isArray(c.content)&&c.content.length)break;if("string"==typeof c.content)return c.content}return""}(b?.messages||n),E=c?.providerSpecificData||{},F=(0,g.randomUUID)(),G=(0,s.oV)({headers:c?.rawHeaders,body:b,connectionId:c?.connectionId||E.userId||l,scope:"qoder"}),H={max_tokens:C},I=function(a){if(!a||"object"!=typeof a)return;let b=a.reasoning_effort;if(null==b&&a.reasoning&&"object"==typeof a.reasoning&&(b=a.reasoning.effort),null==b)return;let c=String(b).trim().toLowerCase();return c?"disabled"===c||"off"===c?"none":"x-high"===c?"xhigh":"auto"!==c?c:void 0:void 0}(b);if(void 0!==I?H.reasoning_effort=I:A&&(H.reasoning_effort="high"),A&&"number"==typeof b?.max_thinking_tokens&&(H.max_thinking_tokens=b.max_thinking_tokens),void 0!==b?.tool_choice&&(H.tool_choice=b.tool_choice),"number"==typeof b?.context_length&&b.context_length>0)H.context_length=b.context_length;else if("number"==typeof b?.contextWindow&&b.contextWindow>0)H.context_length=b.contextWindow;else{let a=function(a){let b=a?.context_config;if(b&&"object"==typeof b){let a=0;for(let c of Object.values(b)){let b=Number(c?.token_count);Number.isFinite(b)&&b>a&&(a=b)}if(a>0)return a}let c=Number(a?.max_input_tokens);return Number.isFinite(c)&&c>0?c:void 0}(m);a&&(H.context_length=a)}let J=q.length?q:null,K={key:m.key||l,display_name:m.display_name||m.displayName||l,model:"",format:m.format||"openai",is_vl:!!m.is_vl,is_reasoning:!!m.is_reasoning,api_key:"",url:"",source:m.source||"system",max_input_tokens:m.max_input_tokens??2e5},L={request_id:F,request_set_id:F,chat_record_id:F,session_id:G,...u,session_type:k.sessionType,model_config:K,system:p,messages:n,tools:z,parameters:H,chat_context:function(a,b,c,d=null){return{text:a,features:[],extra:{context:[],modelConfig:{key:b,is_reasoning:!!c},originalContent:a},chatPrompt:"",imageUrls:d&&d.length?d:null}}(D,l,A,J)};return(j||k.includeBusiness)&&(L.business={product:k.businessProduct,version:k.businessVersion,type:k.businessType||"agent",stage:"init",id:(0,g.randomUUID)(),name:D&&D.length>30?`${D.slice(0,30)}...`:D||"",begin_at:Date.now()}),{qoderKey:l,payload:L,modelConfig:m}}async function z(a){return y(a)}var A=c(71483);let B=new Map,C="qodercli/1.0.0";function D(a){return"string"==typeof a&&a.startsWith("pt-")}async function E(a,b,c,e){let f=await (0,d.proxyAwareFetch)(b.jobTokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":C,"Cosy-Version":b.ideVersion,"Cosy-ClientType":b.clientType},body:JSON.stringify({personal_token:a}),signal:e},c);if(!f.ok){let a=await f.text().catch(()=>"");throw Error(`qoder PAT exchange failed: ${f.status} ${a.slice(0,200)}`)}let g=await f.json();if(!g.token)throw Error("qoder PAT exchange returned no job token");let h=Date.now()+864e5;if(g.expires_at){let a=Date.parse(g.expires_at);Number.isNaN(a)||(h=a)}else"number"==typeof g.expires_in&&g.expires_in>0&&(h=Date.now()+g.expires_in);return{jobToken:g.token,jobRefreshToken:g.refresh_token||"",expiresAt:h}}async function F(a,b,c,e){try{let f=await (0,d.proxyAwareFetch)(b.userInfoUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":C},signal:e},c);if(!f.ok)return"";let g=await f.json().catch(()=>({}));return g.id||g.userId||g.user_id||""}catch{return""}}async function G(a,b={}){let c=o(b.profile),d=b.proxyOptions??null,e=b.signal??null,f=`${c.id}:${a}`,g=B.get(f);if(g&&g.expiresAt-Date.now()>3e5)return g;let{jobToken:h,expiresAt:i}=await E(a,c,d,e),j=await F(h,c,d,e),k={accessToken:h,userId:j,expiresAt:i};return B.set(f,k),k}async function H({model:a,body:b,credentials:c,signal:g,log:h,proxyOptions:i=null,profile:j=null,timeoutMs:k=null,modelConfig:l=null,fetchImpl:m=null,includeBusiness:n=!1}){let p,r,s,t,u=o(j),v=u.chatUrl,w=c?.accessToken||c?.apiKey;if(D(w))try{let a=await G(w,{profile:u,proxyOptions:i,signal:g});c={...c,accessToken:a.accessToken,apiKey:void 0,providerSpecificData:{authMethod:"pat",...c?.providerSpecificData||{},userId:a.userId||c?.providerSpecificData?.userId||"",machineId:c?.providerSpecificData?.machineId||"",machineToken:c?.providerSpecificData?.machineToken||""}}}catch(a){return h?.error?.("QODER",`PAT exchange failed: ${a.message}`),{response:new Response(JSON.stringify({error:{message:`qoder PAT exchange failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let x=c?.providerSpecificData||{};if(!x.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b};if(!c?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b};try{({qoderKey:p,payload:r}=await z({model:a,body:b,credentials:c,log:h,proxyOptions:i,signal:g,profile:u,modelConfig:l,includeBusiness:n}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let y=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,d=Math.floor(c/3),e=b.slice(c-d)+b.slice(d,c-d)+b.slice(0,d),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=e.charCodeAt(a);b<128&&f[b]>=0?g[a]=f[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(r),"utf8")),B=Buffer.from(y,"latin1");try{s=q(B,v,{userId:x.userId,authToken:c.accessToken,name:c.displayName||"",email:c.email||"",machineId:x.machineId||"",machineToken:x.machineToken||x.machineId||""},u)}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let C={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":p,"X-Model-Source":r.model_config&&r.model_config.source||"system","Accept-Encoding":"identity",...s},E=k||e.pH,F=new AbortController,I=setTimeout(()=>F.abort(Error("fetch connect timeout")),E),J=g?AbortSignal.any([g,F.signal]):F.signal;try{let a={method:"POST",headers:C,body:B,signal:J};t="function"==typeof m?await m(v,a):await (0,d.proxyAwareFetch)(v,a,{...i,strictProxy:!0})}catch(a){if(J.aborted)throw J.reason;throw a}finally{clearTimeout(I)}return t.ok?{response:await (0,A.ZU)(t,`qoder/${p}`,h),url:v,headers:C,transformedBody:r}:{response:t,url:v,headers:C,transformedBody:r}}let I=new Map,J=new Map;async function K(a,b,c=null,e=null){let f,g,i={userId:(g=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:g.machineId||"",machineToken:g.machineToken||g.machineId||""};if(!i.userId||!i.authToken)return null;let j=o(e),k="cn"===j.id||"cn-work"===j.id?j.modelListUrl:`${(0,h.e9)(a,j.id)}/algo/api/v2/model/list?Encode=1`,l={Accept:"application/json","Accept-Encoding":"identity",...q(Buffer.alloc(0),k,i,j)},m=new AbortController,n=null,p=null;try{n=setTimeout(()=>m.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?m.abort(b.reason):(p=()=>m.abort(b.reason),b.addEventListener("abort",p))),f=await (0,d.proxyAwareFetch)(k,{method:"GET",headers:l,signal:m.signal},c)}finally{n&&clearTimeout(n),b&&p&&b.removeEventListener("abort",p)}if(!f.ok)return null;let r=await f.json().catch(()=>null);if(!r||!Array.isArray(r.chat))return null;let s=[],t=new Map;for(let a of r.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b)continue;t.set(b,a);let c=a.display_name||a.displayName||a.name||a.title||b,d=Number(a.max_input_tokens)||131072;s.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||"",enabled:!1!==a.enable})}return{models:s,rawConfigs:t}}async function L(a,b,c={}){let d=await M(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function M(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let d=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,g.createHash)("sha256").update(`qoder:${c}`).digest("hex")),e=Date.now();if(!b.forceRefresh){let a=I.get(d);if(a&&a.expiresAt>e)return a}let f=J.get(d);if(f&&!b.forceRefresh)return f;let h=(async()=>{let c=await K(a,b.signal,b.proxyOptions,b.profile);if(!c)return null;let e={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return I.set(d,e),e})();J.set(d,h);try{return await h}finally{J.get(d)===h&&J.delete(d)}}},91576:(a,b,c)=>{c.d(b,{E9:()=>s,RF:()=>i,YC:()=>r,oV:()=>q});var d=c(55511),e=c(60290);let f=new Map,g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of f)a-c.lastUsed>e.v1.sessionTtlMs&&f.delete(b)},e.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=f.get(a);if(b)return b.lastUsed=Date.now(),f.delete(a),f.set(a,b),b.sessionId;if(f.size>=1e3){let a=f.keys().next().value;f.delete(a)}let c=j();return f.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return d.randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function o(a,b){return a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null}let p=/^[a-z]+\/([0-9a-f-]{36})\//i;function q(a={}){return function({headers:a,body:b,connectionId:c,workspaceId:e,scope:f=""}={}){let g=function(a,b,c=""){let d=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id)||o(a,"x-claude-code-session-id");if(d)return"claude"===c?d:`claude:${d}`;let e=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(p):null;return c?n(c[1]):null}(b);if(e)return`antigravity:${e}`;for(let b of l){let c=o(a,b);if(c)return c}let f="kiro"===c?null:o(a,"x-client-request-id");return f||n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||("kiro"===c?null:n(b?.metadata?.user_id))||null}(a,b,f);if(g)return{sessionId:g,ephemeral:!1};let h="kiro"===f?null:function(a,b){var c;let e=function(a){let b=Array.isArray(a?.messages)?a.messages:Array.isArray(a?.input)?a.input:[];if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(e.length<50)return null;let f=(c=`${a}:${e.slice(0,50)}`,d.createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),k.delete(f),k.set(f,g),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return{sessionId:h,ephemeral:!1};let q=n(e);return q?{sessionId:q,ephemeral:!1}:"kiro"===f?{sessionId:j(),ephemeral:!0}:{sessionId:i(c),ephemeral:!1}}(a).sessionId}function r(a,b,c,d=""){return q({headers:b?.rawHeaders,body:a,connectionId:c,scope:d})}function s(a){let b=n(a);if(!b)return null;if(/^-?\d+$/.test(b))return b;let c=0x7fffffffffffffffn&d.createHash("sha256").update(b).digest().readBigUInt64BE(0);return`-${c.toString()}`}let t=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>e.v1.sessionTtlMs&&k.delete(b);for(let[b,c]of g)a-c.lastUsed>e.v1.sessionTtlMs&&g.delete(b)},e.v1.sessionCleanupIntervalMs);t.unref&&t.unref()},94454:(a,b,c)=>{c.d(b,{NU:()=>k,kD:()=>i,sS:()=>j,z:()=>t});var d=c(11847),e=c(2081),f=c(39141),g=c(14014);let h={openai:"openai","openai-responses":"openai-responses","openai-response":"openai",codex:"openai",claude:"claude-budget",gemini:"gemini-budget","gemini-cli":"gemini-budget",vertex:"gemini-budget",antigravity:"gemini-budget",kiro:"kiro",ollama:"ollama"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if(!a||"object"!=typeof a)return null;let b=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);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.output_config?.effort;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"}}}if(void 0!==a.think){let b=a.think;if(!1===b)return{mode:"none"};if(!0===b)return{mode:"auto"};if("string"==typeof b){let a=b.toLowerCase().trim();if("none"===a||"off"===a||"false"===a)return{mode:"none"};if("auto"===a||"true"===a)return{mode:"auto"};if("minimal"===a||"low"===a||"medium"===a||"high"===a||"max"===a||"xhigh"===a)return{mode:"level",level:"xhigh"===a?"max":a};if(a)return{mode:"level",level:a}}return b?{mode:"auto"}:{mode:"none"}}let e=a.additionalModelRequestFields;if(e&&"object"==typeof e){let a=e.output_config?.effort||e.thinking?.effort;if("string"==typeof a&&a)return{mode:"level",level:a.toLowerCase()};let b=e.reasoning?.effort;if("string"==typeof b&&b)return{mode:"level",level:b.toLowerCase()}}let f=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(f&&"object"==typeof f){if("string"==typeof f.thinkingLevel)return{mode:"level",level:f.thinkingLevel.toLowerCase()};let a=Number(f.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 k(a){let b=j(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 l=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function m(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 n(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}let o={minimal:4096,low:8192,medium:16384,high:65535};function p(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 q(a,b){p(a).thinkingConfig=b}function r(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=p(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function s(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,delete a.think,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig}function t(a,b,c,i=null,k){if(!c||"object"!=typeof c)return c;let{cleanModel:p,override:u}=function(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"}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:"ultra"}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}(b),v=u||k||j(c),w=(0,d.getCapabilitiesForModel)(i,p);if(!w.reasoning)return s(c),c;if(!v)return c;let x=function(a,b,c){if("string"==typeof c&&c.startsWith("openai-compatible-"))return"openai";if("openai-responses"===a)return"openai-responses";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)&&l.has(g.thinkingFormat))?g.thinkingFormat:h[a]||"openai"}(a,p,i),y="string"==typeof c.thinking?.display?c.thinking.display:k?.display;return s(c),!function(a,b,c,d,f,h,i){var j;let k="none"===c.mode,l=!1!==d.thinkingCanDisable,p=k&&!l?{mode:"level",level:"minimal"}:c;switch(a){case"openai-responses":{if(k&&l){delete b.reasoning;break}let a=n(p);a&&(b.reasoning={effort:"ultra"!==a||(0,e.t)(f,h,"ultra")?"max"!==a||(0,e.t)(f,h,"max")?a:"xhigh":"max"});break}case"openai":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort="max"!==a||(0,e.t)(f,h,"max")?a:"xhigh");break}case"qoder":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort=a);break}case"claude-adaptive":{if(k&&l){b.thinking={type:"disabled"};break}l?b.thinking={type:"adaptive",...i?{display:i}:{}}:delete b.thinking;let a=n(p);b.output_config={effort:"auto"!==a&&a?"minimal"===a?"low":"xhigh"!==a||(0,e.t)(f,h,"xhigh")?a:"high":"high"};break}case"claude-budget":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...i?{display:i}:{}}:{type:"enabled",budget_tokens:a||8192,...i?{display:i}:{}};break}case"gemini-level":{let a,c=k?"minimal":(a="auto"===p.mode?"high":n(p)||"high",(0,g.wd)(a));q(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),r(b,o[c]||o.high,d);break}case"gemini-budget":{if(k&&l){q(b,{thinkingBudget:0,includeThoughts:!1});break}let a=m(p,d.thinkingRange);q(b,{thinkingBudget:a??-1,includeThoughts:!0}),r(b,-1!==(j=a??-1)&&Number.isFinite(j)?j<=1024?8192:j<=8192?16384:j<=24576?32768:65535:32768,d);break}case"zai":if(k&&l){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=n(p);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(k&&l){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=m(p,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(k&&l){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=n(p),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"!==c||(0,e.t)(f,h,"max")?c:"high";break}case"kimi":{let a;if(k&&l){b.thinking={type:"disabled"};break}let c="auto"===(a=n(p))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"ollama":{if(k&&l){b.think=!1;break}let a=function(a,b){if(!a)return null;if("auto"===a.mode)return!0;let c=n(a);return!c||"auto"===c||("minimal"===c?"low":"xhigh"===c?"max":["low","medium","high","max"].includes(c)?"max"===c&&b&&!b.includes("max")?"high":c:"medium")}(p,d?.thinkingLevels);null!=a&&(b.think=a);break}case"opencode":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);if(!a||"auto"===a)break;b.reasoning_effort="xhigh"===a||"ultra"===a?"max":"minimal"===a?"low":a;break}case"minimax":b.thinking={type:k&&l?"disabled":"adaptive"};break;case"hunyuan":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(k&&l)break;let a=n(p);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(k&&l)break;let a="auto"===p.mode?"medium":n(p);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"meta":{let a=n(p);if("none"===a)break;a&&(b.reasoning_effort="max"===a||"ultra"===a?"xhigh":a)}}}(x,c,v,w,i,p,y),c}}};
68
+ ${t}`,v=p(Buffer.from(u,"latin1")),w=c.machineId||g.randomUUID(),x=c.machineToken||w,y=p(k),z=String(k.length);return{Authorization:`Bearer COSY.${s}.${v}`,"Cosy-Key":l,"Cosy-User":c.userId,"Cosy-Date":n,"Cosy-Version":j.ideVersion,"Cosy-Machineid":w,"Cosy-Machinetoken":x,"Cosy-Machinetype":j.machineType,"Cosy-Machineos":j.machineOs,"Cosy-Clienttype":j.clientType,"Cosy-Clientip":"127.0.0.1","Cosy-Bodyhash":y,"Cosy-Bodylength":z,"Cosy-Sigpath":t,"Cosy-Data-Policy":j.dataPolicy,"Cosy-Organization-Id":"","Cosy-Organization-Tags":"","Login-Version":j.loginVersion,"X-Request-Id":g.randomUUID()}}var r=c(9155),s=c(91576),t=c(94454);let u={chat_task:"FREE_INPUT",stream:!0,is_reply:!0,is_retry:!1,source:1,version:"3",agent_id:"agent_common",task_id:"common",aliyun_user_type:""},v=["name","tool_calls","tool_call_id","reasoning_content"];function w(a,b){"string"==typeof b&&b&&!a.includes(b)&&a.push(b)}function x(a){if("string"==typeof a)return a;if(null==a)return"";if(Array.isArray(a)){let b=[];for(let c of a)c&&"object"==typeof c&&"string"==typeof c.text&&b.push(c.text);return b.join("\n")}return"object"==typeof a&&"string"==typeof a.text?a.text:String(a)}async function y({model:a,body:b,credentials:c,log:d,proxyOptions:e,signal:f,profile:h=null,modelConfig:i=null,includeBusiness:j=!1}){let k=o(h),l=(0,t.kD)(String(a||"").replace(/^qoder\//,"")),m=i;if(m)m.key||(m={...m,key:l});else if(!(m=await (0,r.X5)(c,l,{log:d,proxyOptions:e,signal:f,profile:k}))){let a=await (0,r.EV)(c,{forceRefresh:!0,log:d,proxyOptions:e,signal:f,profile:k}),b=a?.rawConfigs.get(l);if(!b)throw Error(`qoder: model_config for "${l}" not yet known (inject modelConfig or fetch model list)`);m={...b,key:l}}let{messages:n,systemText:p,imageUrls:q}=function(a){if(!Array.isArray(a)||0===a.length)return{messages:[],systemText:"",imageUrls:[]};let b=[],c=[],d=[];for(let e of a){if(!e||"object"!=typeof e)continue;if("system"===e.role||"developer"===e.role){let a=x(e.content);a&&b.push(a);continue}let{content:a,imageUrls:f}=function a(b){if("string"==typeof b)return{content:b,imageUrls:[]};if(null==b)return{content:"",imageUrls:[]};if(!Array.isArray(b)&&"object"==typeof b)return a([b]);if(!Array.isArray(b))return{content:String(b),imageUrls:[]};let c=[],d=[];for(let a of b){if(null==a)continue;if("string"==typeof a){c.push({type:"text",text:a});continue}if("object"!=typeof a)continue;let b="string"==typeof a.type?a.type:"";if("text"===b||"string"==typeof a.text&&!b&&!a.image_url&&!a.binary){"string"==typeof a.text&&c.push({type:"text",text:a.text});continue}if("image_url"===b||a.image_url){let b,e=a.image_url??a,f="";if("string"==typeof e?f=e:e&&"object"==typeof e&&(f="string"==typeof e.url?e.url:"","string"==typeof e.detail&&e.detail&&(b=e.detail)),f||"string"!=typeof a.url||(f=a.url),!f)continue;let g=b?{url:f,detail:b}:{url:f};c.push({type:"image_url",image_url:g}),w(d,f);continue}if("binary"===b||a.binary||"string"==typeof a.data&&(a.mime_type||a.mimeType)){let b=a.binary&&"object"==typeof a.binary?a.binary:a,e="string"==typeof b.data?b.data:"",f="string"==typeof b.mime_type&&b.mime_type||"string"==typeof b.mimeType&&b.mimeType||"";if(!e||!f)continue;c.push({type:"binary",binary:{data:e,mime_type:f}}),e.startsWith("data:")&&w(d,e);continue}}return 0===c.length?{content:"",imageUrls:[]}:0===d.length&&c.every(a=>"text"===a.type&&"string"==typeof a.text)?{content:c.map(a=>a.text).join("\n"),imageUrls:[]}:{content:c,imageUrls:d}}(e.content);for(let a of f)w(d,a);let g=function(a){let b={role:a.role};for(let c of v)void 0!==a[c]&&(b[c]=a[c]);return b}(e);g.content=a,c.push(g)}return{messages:c,systemText:b.join("\n\n"),imageUrls:d}}(b?.messages||[]),z=Array.isArray(b?.tools)?b.tools:[],A=!!m.is_reasoning,B=Number(m.max_output_tokens)||0,C=32768;B>0&&(C=B),"number"==typeof b?.max_tokens&&b.max_tokens>0&&b.max_tokens<C&&(C=b.max_tokens),"number"==typeof b?.max_completion_tokens&&b.max_completion_tokens>0&&b.max_completion_tokens<C&&(C=b.max_completion_tokens);let D=function(a){for(let b=a.length-1;b>=0;b--){let c=a[b];if(c?.role!=="user")continue;let d=x(c.content);if(d)return d;if(Array.isArray(c.content)&&c.content.length)break;if("string"==typeof c.content)return c.content}return""}(b?.messages||n),E=c?.providerSpecificData||{},F=(0,g.randomUUID)(),G=(0,s.oV)({headers:c?.rawHeaders,body:b,connectionId:c?.connectionId||E.userId||l,scope:"qoder"}),H={max_tokens:C},I=function(a){if(!a||"object"!=typeof a)return;let b=a.reasoning_effort;if(null==b&&a.reasoning&&"object"==typeof a.reasoning&&(b=a.reasoning.effort),null==b)return;let c=String(b).trim().toLowerCase();return c?"disabled"===c||"off"===c?"none":"x-high"===c?"xhigh":"auto"!==c?c:void 0:void 0}(b);if(void 0!==I?H.reasoning_effort=I:A&&(H.reasoning_effort="high"),A&&"number"==typeof b?.max_thinking_tokens&&(H.max_thinking_tokens=b.max_thinking_tokens),void 0!==b?.tool_choice&&(H.tool_choice=b.tool_choice),"number"==typeof b?.context_length&&b.context_length>0)H.context_length=b.context_length;else if("number"==typeof b?.contextWindow&&b.contextWindow>0)H.context_length=b.contextWindow;else{let a=function(a){let b=a?.context_config;if(b&&"object"==typeof b){let a=0;for(let c of Object.values(b)){let b=Number(c?.token_count);Number.isFinite(b)&&b>a&&(a=b)}if(a>0)return a}let c=Number(a?.max_input_tokens);return Number.isFinite(c)&&c>0?c:void 0}(m);a&&(H.context_length=a)}let J=q.length?q:null,K={key:m.key||l,display_name:m.display_name||m.displayName||l,model:"",format:m.format||"openai",is_vl:!!m.is_vl,is_reasoning:!!m.is_reasoning,api_key:"",url:"",source:m.source||"system",max_input_tokens:m.max_input_tokens??2e5},L={request_id:F,request_set_id:F,chat_record_id:F,session_id:G,...u,session_type:k.sessionType,model_config:K,system:p,messages:n,tools:z,parameters:H,chat_context:function(a,b,c,d=null){return{text:a,features:[],extra:{context:[],modelConfig:{key:b,is_reasoning:!!c},originalContent:a},chatPrompt:"",imageUrls:d&&d.length?d:null}}(D,l,A,J)};return(j||k.includeBusiness)&&(L.business={product:k.businessProduct,version:k.businessVersion,type:k.businessType||"agent",stage:"init",id:(0,g.randomUUID)(),name:D&&D.length>30?`${D.slice(0,30)}...`:D||"",begin_at:Date.now()}),{qoderKey:l,payload:L,modelConfig:m}}async function z(a){return y(a)}var A=c(71483);let B=new Map,C="qodercli/1.0.0";function D(a){return"string"==typeof a&&a.startsWith("pt-")}async function E(a,b,c,e){let f=await (0,d.proxyAwareFetch)(b.jobTokenExchangeUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":C,"Cosy-Version":b.ideVersion,"Cosy-ClientType":b.clientType},body:JSON.stringify({personal_token:a}),signal:e},c);if(!f.ok){let a=await f.text().catch(()=>"");throw Error(`qoder PAT exchange failed: ${f.status} ${a.slice(0,200)}`)}let g=await f.json();if(!g.token)throw Error("qoder PAT exchange returned no job token");let h=Date.now()+864e5;if(g.expires_at){let a=Date.parse(g.expires_at);Number.isNaN(a)||(h=a)}else"number"==typeof g.expires_in&&g.expires_in>0&&(h=Date.now()+g.expires_in);return{jobToken:g.token,jobRefreshToken:g.refresh_token||"",expiresAt:h}}async function F(a,b,c,e){try{let f=await (0,d.proxyAwareFetch)(b.userInfoUrl,{method:"GET",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","User-Agent":C},signal:e},c);if(!f.ok)return"";let g=await f.json().catch(()=>({}));return g.id||g.userId||g.user_id||""}catch{return""}}async function G(a,b={}){let c=o(b.profile),d=b.proxyOptions??null,e=b.signal??null,f=`${c.id}:${a}`,g=B.get(f);if(g&&g.expiresAt-Date.now()>3e5)return g;let{jobToken:h,expiresAt:i}=await E(a,c,d,e),j=await F(h,c,d,e),k={accessToken:h,userId:j,expiresAt:i};return B.set(f,k),k}async function H({model:a,body:b,credentials:c,signal:g,log:h,proxyOptions:i=null,profile:j=null,timeoutMs:k=null,modelConfig:l=null,fetchImpl:m=null,includeBusiness:n=!1}){let p,r,s,t,u=o(j),v=u.chatUrl,w=c?.accessToken||c?.apiKey;if(D(w))try{let a=await G(w,{profile:u,proxyOptions:i,signal:g});c={...c,accessToken:a.accessToken,apiKey:void 0,providerSpecificData:{authMethod:"pat",...c?.providerSpecificData||{},userId:a.userId||c?.providerSpecificData?.userId||"",machineId:c?.providerSpecificData?.machineId||"",machineToken:c?.providerSpecificData?.machineToken||""}}}catch(a){return h?.error?.("QODER",`PAT exchange failed: ${a.message}`),{response:new Response(JSON.stringify({error:{message:`qoder PAT exchange failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let x=c?.providerSpecificData||{};if(!x.userId)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing userId; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b};if(!c?.accessToken)return{response:new Response(JSON.stringify({error:{message:"qoder credential is missing accessToken; reconnect the account"}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b};try{({qoderKey:p,payload:r}=await z({model:a,body:b,credentials:c,log:h,proxyOptions:i,signal:g,profile:u,modelConfig:l,includeBusiness:n}))}catch(a){return{response:new Response(JSON.stringify({error:{message:a.message}}),{status:400,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let y=function(a){let b=(Buffer.isBuffer(a)?a:"string"==typeof a?Buffer.from(a,"utf8"):Buffer.from(a)).toString("base64"),c=b.length,d=Math.floor(c/3),e=b.slice(c-d)+b.slice(d,c-d)+b.slice(0,d),g=Buffer.alloc(c);for(let a=0;a<c;a++){let b=e.charCodeAt(a);b<128&&f[b]>=0?g[a]=f[b]:g[a]=b}return g.toString("latin1")}(Buffer.from(JSON.stringify(r),"utf8")),B=Buffer.from(y,"latin1");try{s=q(B,v,{userId:x.userId,authToken:c.accessToken,name:c.displayName||"",email:c.email||"",machineId:x.machineId||"",machineToken:x.machineToken||x.machineId||""},u)}catch(a){return{response:new Response(JSON.stringify({error:{message:`qoder cosy signing failed: ${a.message}`}}),{status:401,headers:{"Content-Type":"application/json"}}),url:v,headers:{},transformedBody:b}}let C={"Content-Type":"application/json",Accept:"text/event-stream","Cache-Control":"no-cache","X-Model-Key":p,"X-Model-Source":r.model_config&&r.model_config.source||"system","Accept-Encoding":"identity",...s},E=k||e.pH,F=new AbortController,I=setTimeout(()=>F.abort(Error("fetch connect timeout")),E),J=g?AbortSignal.any([g,F.signal]):F.signal;try{let a={method:"POST",headers:C,body:B,signal:J};t="function"==typeof m?await m(v,a):await (0,d.proxyAwareFetch)(v,a,{...i,strictProxy:!0})}catch(a){if(J.aborted)throw J.reason;throw a}finally{clearTimeout(I)}return t.ok?{response:await (0,A.ZU)(t,`qoder/${p}`,h),url:v,headers:C,transformedBody:r}:{response:t,url:v,headers:C,transformedBody:r}}let I=new Map,J=new Map;async function K(a,b,c=null,e=null){let f,g,i={userId:(g=a?.providerSpecificData||{}).userId,authToken:a.accessToken,name:a.displayName||"",email:a.email||"",machineId:g.machineId||"",machineToken:g.machineToken||g.machineId||""};if(!i.userId||!i.authToken)return null;let j=o(e),k="cn"===j.id||"cn-work"===j.id?j.modelListUrl:`${(0,h.e9)(a,j.id)}/algo/api/v2/model/list?Encode=1`,l={Accept:"application/json","Accept-Encoding":"identity",...q(Buffer.alloc(0),k,i,j)},m=new AbortController,n=null,p=null;try{n=setTimeout(()=>m.abort("timeout"),15e3),b&&"function"==typeof b.addEventListener&&(b.aborted?m.abort(b.reason):(p=()=>m.abort(b.reason),b.addEventListener("abort",p))),f=await (0,d.proxyAwareFetch)(k,{method:"GET",headers:l,signal:m.signal},c)}finally{n&&clearTimeout(n),b&&p&&b.removeEventListener("abort",p)}if(!f.ok)return null;let r=await f.json().catch(()=>null);if(!r||!Array.isArray(r.chat))return null;let s=[],t=new Map;for(let a of r.chat){if(!a||"object"!=typeof a)continue;let b=a.key;if(!b)continue;t.set(b,a);let c=a.display_name||a.displayName||a.name||a.title||b,d=Number(a.max_input_tokens)||131072;s.push({id:b,name:`${c}`,contextLength:d,isVL:!!a.is_vl,isReasoning:!!a.is_reasoning,maxOutputTokens:Number(a.max_output_tokens)||0,description:a.description||"",enabled:!1!==a.enable})}return{models:s,rawConfigs:t}}async function L(a,b,c={}){let d=await M(a,c);if(!d)return null;let e=d.rawConfigs.get(b);return e?{...e,key:b}:null}async function M(a,b={}){let c;if(!a?.accessToken||!(a.providerSpecificData||{}).userId)return null;let d=(c=(a?.providerSpecificData||{}).userId||a?.refreshToken||a?.accessToken||"anonymous",(0,g.createHash)("sha256").update(`qoder:${c}`).digest("hex")),e=Date.now();if(!b.forceRefresh){let a=I.get(d);if(a&&a.expiresAt>e)return a}let f=J.get(d);if(f&&!b.forceRefresh)return f;let h=(async()=>{let c=await K(a,b.signal,b.proxyOptions,b.profile);if(!c)return null;let e={expiresAt:Date.now()+36e5,models:c.models,rawConfigs:c.rawConfigs,fetched:!0};return I.set(d,e),e})();J.set(d,h);try{return await h}finally{J.get(d)===h&&J.delete(d)}}},91576:(a,b,c)=>{c.d(b,{E9:()=>s,RF:()=>i,YC:()=>r,oV:()=>q});var d=c(55511),e=c(60290);let f=new Map,g=new Map,h=setInterval(()=>{let a=Date.now();for(let[b,c]of f)a-c.lastUsed>e.v1.sessionTtlMs&&f.delete(b)},e.v1.sessionCleanupIntervalMs);function i(a){if(!a)return j();let b=f.get(a);if(b)return b.lastUsed=Date.now(),f.delete(a),f.set(a,b),b.sessionId;if(f.size>=1e3){let a=f.keys().next().value;f.delete(a)}let c=j();return f.set(a,{sessionId:c,lastUsed:Date.now()}),c}function j(){return d.randomUUID()+Date.now().toString()}h.unref&&h.unref();let k=new Map,l=["x-session-id","session-id","session_id","x-amp-thread-id"],m=/_session_([a-f0-9-]+)$/;function n(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>256?null:b}function o(a,b){return a&&"object"==typeof a?n(a[b]??a[b.toLowerCase()]):null}let p=/^[a-z]+\/([0-9a-f-]{36})\//i;function q(a={}){return function({headers:a,body:b,connectionId:c,workspaceId:e,scope:f=""}={}){let g=function(a,b,c=""){let d=function(a){if("string"!=typeof a||!a)return null;let b=a.match(m);if(b)return b[1];if("{"===a[0])try{return n(JSON.parse(a)?.session_id)}catch{}return null}(b?.metadata?.user_id)||o(a,"x-claude-code-session-id");if(d)return"claude"===c?d:`claude:${d}`;let e=function(a){let b=a?.request?.sessionId;if(null!=b&&""!==b)return n(String(b));let c="string"==typeof a?.requestId?a.requestId.match(p):null;return c?n(c[1]):null}(b);if(e)return`antigravity:${e}`;for(let b of l){let c=o(a,b);if(c)return c}let f="kiro"===c?null:o(a,"x-client-request-id");return f||n(b?.prompt_cache_key)||n(b?.session_id)||n(b?.conversation_id)||("kiro"===c?null:n(b?.metadata?.user_id))||null}(a,b,f);if(g)return{sessionId:g,ephemeral:!1};let h="kiro"===f?null:function(a,b){var c;let e=function(a){let b=Array.isArray(a?.messages)?a.messages:Array.isArray(a?.input)?a.input:[];if(!b)return"";let c="";for(let a of b)if(a?.role==="assistant"){if("string"==typeof a.content)c+=a.content;else if(Array.isArray(a.content))for(let b of a.content)c+=b?.text||b?.output||"";if(c.length>=50)break}return c}(b);if(e.length<50)return null;let f=(c=`${a}:${e.slice(0,50)}`,d.createHash("sha256").update(c).digest("hex").slice(0,16)),g=k.get(f);if(g)return g.lastUsed=Date.now(),k.delete(f),k.set(f,g),g.sessionId;k.size>=5e3&&k.delete(k.keys().next().value);let h=j();return k.set(f,{sessionId:h,lastUsed:Date.now()}),h}(`${f}:${c||""}`,b);if(h)return{sessionId:h,ephemeral:!1};let q=n(e);return q?{sessionId:q,ephemeral:!1}:"kiro"===f?{sessionId:j(),ephemeral:!0}:{sessionId:i(c),ephemeral:!1}}(a).sessionId}function r(a,b,c,d=""){return q({headers:b?.rawHeaders,body:a,connectionId:c,scope:d})}function s(a){let b=n(a);if(!b)return null;if(/^-?\d+$/.test(b))return b;let c=0x7fffffffffffffffn&d.createHash("sha256").update(b).digest().readBigUInt64BE(0);return`-${c.toString()}`}let t=setInterval(()=>{let a=Date.now();for(let[b,c]of k)a-c.lastUsed>e.v1.sessionTtlMs&&k.delete(b);for(let[b,c]of g)a-c.lastUsed>e.v1.sessionTtlMs&&g.delete(b)},e.v1.sessionCleanupIntervalMs);t.unref&&t.unref()},94454:(a,b,c)=>{c.d(b,{NU:()=>k,kD:()=>i,sS:()=>j,z:()=>t});var d=c(11847),e=c(2081),f=c(39141),g=c(14014);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",ollama:"ollama"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if(!a||"object"!=typeof a)return null;let b=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);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.output_config?.effort;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"}}}if(void 0!==a.think){let b=a.think;if(!1===b)return{mode:"none"};if(!0===b)return{mode:"auto"};if("string"==typeof b){let a=b.toLowerCase().trim();if("none"===a||"off"===a||"false"===a)return{mode:"none"};if("auto"===a||"true"===a)return{mode:"auto"};if("minimal"===a||"low"===a||"medium"===a||"high"===a||"max"===a||"xhigh"===a)return{mode:"level",level:"xhigh"===a?"max":a};if(a)return{mode:"level",level:a}}return b?{mode:"auto"}:{mode:"none"}}let e=a.additionalModelRequestFields;if(e&&"object"==typeof e){let a=e.output_config?.effort||e.thinking?.effort;if("string"==typeof a&&a)return{mode:"level",level:a.toLowerCase()};let b=e.reasoning?.effort;if("string"==typeof b&&b)return{mode:"level",level:b.toLowerCase()}}let f=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(f&&"object"==typeof f){if("string"==typeof f.thinkingLevel)return{mode:"level",level:f.thinkingLevel.toLowerCase()};let a=Number(f.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 k(a){let b=j(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 l=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function m(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 n(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}let o={minimal:4096,low:8192,medium:16384,high:65535};function p(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 q(a,b){p(a).thinkingConfig=b}function r(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=p(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function s(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,delete a.think,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig}function t(a,b,c,i=null,k){if(!c||"object"!=typeof c)return c;let{cleanModel:p,override:u}=function(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"}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:"ultra"}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}(b),v=u||k||j(c),w=(0,d.getCapabilitiesForModel)(i,p);if(!w.reasoning)return s(c),c;if(!v)return c;let x=function(a,b,c){if("string"==typeof c&&c.startsWith("openai-compatible-"))return"openai";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)&&l.has(g.thinkingFormat))?g.thinkingFormat:h[a]||"openai"}(a,p,i),y="string"==typeof c.thinking?.display?c.thinking.display:k?.display;return s(c),!function(a,b,c,d,f,h,i){var j;let k="none"===c.mode,l=!1!==d.thinkingCanDisable,p=k&&!l?{mode:"level",level:"minimal"}:c;switch(a){case"openai":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort="max"!==a||(0,e.t)(f,h,"max")?a:"xhigh");break}case"qoder":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort=a);break}case"claude-adaptive":{if(k&&l){b.thinking={type:"disabled"};break}l?b.thinking={type:"adaptive",...i?{display:i}:{}}:delete b.thinking;let a=n(p);b.output_config={effort:"auto"!==a&&a?"minimal"===a?"low":"xhigh"!==a||(0,e.t)(f,h,"xhigh")?a:"high":"high"};break}case"claude-budget":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...i?{display:i}:{}}:{type:"enabled",budget_tokens:a||8192,...i?{display:i}:{}};break}case"gemini-level":{let a,c=k?"minimal":(a="auto"===p.mode?"high":n(p)||"high",(0,g.wd)(a));q(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),r(b,o[c]||o.high,d);break}case"gemini-budget":{if(k&&l){q(b,{thinkingBudget:0,includeThoughts:!1});break}let a=m(p,d.thinkingRange);q(b,{thinkingBudget:a??-1,includeThoughts:!0}),r(b,-1!==(j=a??-1)&&Number.isFinite(j)?j<=1024?8192:j<=8192?16384:j<=24576?32768:65535:32768,d);break}case"zai":if(k&&l){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=n(p);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(k&&l){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=m(p,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(k&&l){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=n(p),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"!==c||(0,e.t)(f,h,"max")?c:"high";break}case"kimi":{let a;if(k&&l){b.thinking={type:"disabled"};break}let c="auto"===(a=n(p))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"ollama":{if(k&&l){b.think=!1;break}let a=function(a,b){if(!a)return null;if("auto"===a.mode)return!0;let c=n(a);return!c||"auto"===c||("minimal"===c?"low":"xhigh"===c?"max":["low","medium","high","max"].includes(c)?"max"===c&&b&&!b.includes("max")?"high":c:"medium")}(p,d?.thinkingLevels);null!=a&&(b.think=a);break}case"opencode":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);if(!a||"auto"===a)break;b.reasoning_effort="xhigh"===a||"ultra"===a?"max":"minimal"===a?"low":a;break}case"minimax":b.thinking={type:k&&l?"disabled":"adaptive"};break;case"hunyuan":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(k&&l)break;let a=n(p);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(k&&l)break;let a="auto"===p.mode?"medium":n(p);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"meta":{let a=n(p);if("none"===a)break;a&&(b.reasoning_effort="max"===a||"ultra"===a?"xhigh":a)}}}(x,c,v,w,i,p,y),c}}};
@@ -1 +1 @@
1
- exports.id=4485,exports.ids=[4485,4755,9718],exports.modules={49190:(a,b,c)=>{"use strict";c.d(b,{HM:()=>g,cL:()=>d});let d="latency-aware",e={windowSize:20,minSamples:3,latencyWeight:.5,errorWeight:.5,latencyToleranceRatio:1,explorationRate:.15,circuitErrorRate:.5,circuitMinSamples:4,circuitCooldownMs:6e4,sampleTtlMs:9e5},f={windowSize:{min:5,max:200},minSamples:{min:1,max:50},latencyWeight:{min:0,max:1},errorWeight:{min:0,max:1},latencyToleranceRatio:{min:.1,max:10},explorationRate:{min:0,max:1},circuitErrorRate:{min:.1,max:1},circuitMinSamples:{min:2,max:100},circuitCooldownMs:{min:1e3,max:18e5},sampleTtlMs:{min:6e4,max:864e5}};function g(a=null){let b={...e};if(!a||"object"!=typeof a)return b;for(let c of Object.keys(e))void 0!==a[c]&&null!==a[c]&&""!==a[c]&&(b[c]=function(a,b,c){let d=Number(a);return Number.isFinite(d)?c?Math.min(c.max,Math.max(c.min,d)):d:b}(a[c],e[c],f[c]));return b}},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},58336:(a,b,c)=>{"use strict";c.d(b,{JL:()=>k,Sn:()=>j,Z2:()=>l});var d=c(49190);function e(){return globalThis.__9routerHealthStore||(globalThis.__9routerHealthStore=new Map),globalThis.__9routerHealthStore}function f(a,b=null){return b?`${a}\0${b}`:String(a)}function g(a){let b=a.indexOf("\0");return -1===b?{connectionId:a,model:null}:{connectionId:a.slice(0,b),model:a.slice(b+1)}}function h(a,b){let c=a?function(a,b){let c=Date.now()-b.sampleTtlMs,{samples:d}=a,e=0;for(;e<d.length&&d[e].at<c;)e++;return e>0&&d.splice(0,e),d}(a,b):[],d=c.length;if(0===d)return{samples:0,successes:0,failures:0,errorRate:0,avgLatencyMs:0,p95LatencyMs:0,lastFailureAt:a?.lastFailureAt||0,lastSampleAt:0};let e=0,f=[];for(let a of c)a.ok?f.push(a.latencyMs):e++;let g=f.length,h=g>0?f.reduce((a,b)=>a+b,0)/g:0;return{samples:d,successes:g,failures:e,errorRate:e/d,avgLatencyMs:Math.round(h),p95LatencyMs:Math.round(function(a){if(0===a.length)return 0;let b=Math.min(a.length-1,Math.floor(.95*a.length));return a[b]}([...f].sort((a,b)=>a-b))),lastFailureAt:a.lastFailureAt||0,lastSampleAt:c[c.length-1].at}}function i(a,b=null){let c=(0,d.HM)(b);return!!a&&!(a.samples<c.circuitMinSamples)&&!(a.errorRate<c.circuitErrorRate)&&!!a.lastFailureAt&&Date.now()-a.lastFailureAt<c.circuitCooldownMs}function j(a,{model:b=null,config:c=null,random:g=Math.random}={}){let k=Array.isArray(a)?a.filter(Boolean):[];if(0===k.length)return{connection:null,reason:"no-candidates",scored:[]};if(1===k.length)return{connection:k[0],reason:"only-candidate",scored:[]};let l=(0,d.HM)(c),m=k.map(a=>({connection:a,health:function(a,b=null,c=null){let g=(0,d.HM)(c),j=e(),k=null,l=!1;if(b){let c=h(j.get(f(a,b)),g);c.samples>=g.minSamples&&(k=c,l=!0)}return k||(k=h(j.get(f(a)),g)),{...k,scoped:l,circuitOpen:i(k,g)}}(a.id,b,l)})),n=m.filter(a=>a.health.samples<l.minSamples);if(n.length>0)return{connection:n.sort((a,b)=>a.health.samples-b.health.samples||(a.connection.priority||999)-(b.connection.priority||999))[0].connection,reason:"probe-unproven",scored:m};let o=m.filter(a=>!a.health.circuitOpen),p="best-score";0===o.length&&(o=m,p="all-circuits-open");let q=o.map(a=>a.health.avgLatencyMs).filter(a=>a>0),r=q.length>0?Math.min(...q):0;for(let a of o)a.score=function(a,b,c){let d=0;b>0&&a.avgLatencyMs>b&&(d=Math.min(1,(a.avgLatencyMs/b-1)/c.latencyToleranceRatio));let e=c.latencyWeight+c.errorWeight;return e<=0?0:(c.latencyWeight*d+c.errorWeight*a.errorRate)/e}(a.health,r,l);let s=[...o].sort((a,b)=>a.score-b.score||(a.connection.priority||999)-(b.connection.priority||999));if(s.length>1&&l.explorationRate>0&&g()<l.explorationRate){let a=s.slice(1);return{connection:a[Math.floor(g()*a.length)%a.length].connection,reason:"explore",scored:m}}return{connection:s[0].connection,reason:p,scored:m}}function k(a=null){let b=(0,d.HM)(a),c=e(),f=[];for(let[a,d]of c.entries()){let{connectionId:c,model:e}=g(a),j=h(d,b);0!==j.samples&&f.push({connectionId:c,model:e,provider:d.provider||null,connectionName:d.connectionName||null,...j,circuitOpen:i(j,b)})}return f.sort((a,b)=>!!a.model-!!b.model||b.errorRate-a.errorRate||b.avgLatencyMs-a.avgLatencyMs)}function l(a=null){let b=e();if(!a)return void b.clear();for(let c of[...b.keys()])g(c).connectionId===a&&b.delete(c)}},78335:()=>{},89718:(a,b,c)=>{"use strict";c.d(b,{$e:()=>d.$e,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(53267)},94755:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},96487:()=>{}};
1
+ exports.id=4485,exports.ids=[4485,4755,9718],exports.modules={49190:(a,b,c)=>{"use strict";c.d(b,{HM:()=>g,cL:()=>d});let d="latency-aware",e={windowSize:20,minSamples:3,latencyWeight:.5,errorWeight:.5,latencyToleranceRatio:1,explorationRate:.15,circuitErrorRate:.5,circuitMinSamples:4,circuitCooldownMs:6e4,sampleTtlMs:9e5},f={windowSize:{min:5,max:200},minSamples:{min:1,max:50},latencyWeight:{min:0,max:1},errorWeight:{min:0,max:1},latencyToleranceRatio:{min:.1,max:10},explorationRate:{min:0,max:1},circuitErrorRate:{min:.1,max:1},circuitMinSamples:{min:2,max:100},circuitCooldownMs:{min:1e3,max:18e5},sampleTtlMs:{min:6e4,max:864e5}};function g(a=null){let b={...e};if(!a||"object"!=typeof a)return b;for(let c of Object.keys(e))void 0!==a[c]&&null!==a[c]&&""!==a[c]&&(b[c]=function(a,b,c){let d=Number(a);return Number.isFinite(d)?c?Math.min(c.max,Math.max(c.min,d)):d:b}(a[c],e[c],f[c]));return b}},50122:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},58336:(a,b,c)=>{"use strict";c.d(b,{JL:()=>k,Sn:()=>j,Z2:()=>l});var d=c(49190);function e(){return globalThis.__9routerHealthStore||(globalThis.__9routerHealthStore=new Map),globalThis.__9routerHealthStore}function f(a,b=null){return b?`${a}\0${b}`:String(a)}function g(a){let b=a.indexOf("\0");return -1===b?{connectionId:a,model:null}:{connectionId:a.slice(0,b),model:a.slice(b+1)}}function h(a,b){let c=a?function(a,b){let c=Date.now()-b.sampleTtlMs,{samples:d}=a,e=0;for(;e<d.length&&d[e].at<c;)e++;return e>0&&d.splice(0,e),d}(a,b):[],d=c.length;if(0===d)return{samples:0,successes:0,failures:0,errorRate:0,avgLatencyMs:0,p95LatencyMs:0,lastFailureAt:a?.lastFailureAt||0,lastSampleAt:0};let e=0,f=[];for(let a of c)a.ok?f.push(a.latencyMs):e++;let g=f.length,h=g>0?f.reduce((a,b)=>a+b,0)/g:0;return{samples:d,successes:g,failures:e,errorRate:e/d,avgLatencyMs:Math.round(h),p95LatencyMs:Math.round(function(a){if(0===a.length)return 0;let b=Math.min(a.length-1,Math.floor(.95*a.length));return a[b]}([...f].sort((a,b)=>a-b))),lastFailureAt:a.lastFailureAt||0,lastSampleAt:c[c.length-1].at}}function i(a,b=null){let c=(0,d.HM)(b);return!!a&&!(a.samples<c.circuitMinSamples)&&!(a.errorRate<c.circuitErrorRate)&&!!a.lastFailureAt&&Date.now()-a.lastFailureAt<c.circuitCooldownMs}function j(a,{model:b=null,config:c=null,random:g=Math.random}={}){let k=Array.isArray(a)?a.filter(Boolean):[];if(0===k.length)return{connection:null,reason:"no-candidates",scored:[]};if(1===k.length)return{connection:k[0],reason:"only-candidate",scored:[]};let l=(0,d.HM)(c),m=k.map(a=>({connection:a,health:function(a,b=null,c=null){let g=(0,d.HM)(c),j=e(),k=null,l=!1;if(b){let c=h(j.get(f(a,b)),g);c.samples>=g.minSamples&&(k=c,l=!0)}return k||(k=h(j.get(f(a)),g)),{...k,scoped:l,circuitOpen:i(k,g)}}(a.id,b,l)})),n=m.filter(a=>a.health.samples<l.minSamples);if(n.length>0)return{connection:n.sort((a,b)=>a.health.samples-b.health.samples||(a.connection.priority||999)-(b.connection.priority||999))[0].connection,reason:"probe-unproven",scored:m};let o=m.filter(a=>!a.health.circuitOpen),p="best-score";0===o.length&&(o=m,p="all-circuits-open");let q=o.map(a=>a.health.avgLatencyMs).filter(a=>a>0),r=q.length>0?Math.min(...q):0;for(let a of o)a.score=function(a,b,c){let d=0;b>0&&a.avgLatencyMs>b&&(d=Math.min(1,(a.avgLatencyMs/b-1)/c.latencyToleranceRatio));let e=c.latencyWeight+c.errorWeight;return e<=0?0:(c.latencyWeight*d+c.errorWeight*a.errorRate)/e}(a.health,r,l);let s=[...o].sort((a,b)=>a.score-b.score||(a.connection.priority||999)-(b.connection.priority||999));if(s.length>1&&l.explorationRate>0&&g()<l.explorationRate){let a=s.slice(1);return{connection:a[Math.floor(g()*a.length)%a.length].connection,reason:"explore",scored:m}}return{connection:s[0].connection,reason:p,scored:m}}function k(a=null){let b=(0,d.HM)(a),c=e(),f=[];for(let[a,d]of c.entries()){let{connectionId:c,model:e}=g(a),j=h(d,b);0!==j.samples&&f.push({connectionId:c,model:e,provider:d.provider||null,connectionName:d.connectionName||null,...j,circuitOpen:i(j,b)})}return f.sort((a,b)=>!!a.model-!!b.model||b.errorRate-a.errorRate||b.avgLatencyMs-a.avgLatencyMs)}function l(a=null){let b=e();if(!a)return void b.clear();for(let c of[...b.keys()])g(c).connectionId===a&&b.delete(c)}},78335:()=>{},89718:(a,b,c)=>{"use strict";c.d(b,{$e:()=>d.$e,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(33079)},94755:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},96487:()=>{}};
@@ -1 +1 @@
1
- "use strict";exports.id=4574,exports.ids=[4574,4755,9718],exports.modules={50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv,xN:()=>d.xN});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{$e:()=>d.$e,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(53267)},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
1
+ "use strict";exports.id=4574,exports.ids=[4574,4755,9718],exports.modules={50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},71998:(a,b,c)=>{c.d(b,{Fh:()=>d.Fh,L9:()=>d.L9,Mc:()=>d.Mc,OM:()=>d.OM,Pc:()=>d.Pc,Qu:()=>d.Qu,S8:()=>d.S8,Yd:()=>d.Yd,ZO:()=>d.ZO,c:()=>d.c,createProviderConnection:()=>d.iE,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.getProviderConnections,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,o5:()=>d.o5,op:()=>d.op,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.updateProviderConnection,uv:()=>d.uv,xN:()=>d.xN});var d=c(89718)},89718:(a,b,c)=>{c.d(b,{$e:()=>d.$e,CF:()=>d.CF,CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,Ko:()=>d.Ko,L:()=>d.L,L9:()=>d.L9,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q6:()=>d.Q6,Q_:()=>d.Q_,Qu:()=>d.Qu,RT:()=>d.RT,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,__:()=>d.__,aQ:()=>d.aQ,bI:()=>d.bI,c:()=>d.c,dA:()=>d.dA,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,lk:()=>d.lk,mV:()=>d.mV,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,pO:()=>d.pO,qr:()=>d.qr,r4:()=>d.r4,sZ:()=>d.sZ,t$:()=>d.t$,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,xN:()=>d.xN,y7:()=>d.y7,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(33079)},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
@@ -1 +1 @@
1
- "use strict";exports.id=4646,exports.ids=[4646],exports.modules={84646:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,ad:()=>k,calculateCostFromTokens:()=>m,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-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":{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.4":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5,long_context:{threshold:272e3,input:5,output:22.5,cached:.5,reasoning:22.5,cache_creation:5}},"gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5,cache_creation:.75},"gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25,cache_creation:.2},"gpt-5.5":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5,long_context:{threshold:272e3,input:10,output:45,cached:1,reasoning:45,cache_creation:10}},"gpt-5.6":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-5.6-luna":{input:.2,output:1.2,cached:.02,reasoning:1.2,cache_creation:.25,long_context:{threshold:272e3,input:.4,output:1.8,cached:.04,reasoning:1.8,cache_creation:.5}},"gpt-5.6-terra":{input:2,output:12,cached:.2,reasoning:12,cache_creation:2.5,long_context:{threshold:272e3,input:4,output:18,cached:.4,reasoning:18,cache_creation:5}},"gpt-5.6-sol":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5,long_context:{threshold:272e3,input:20,output:75,cached:2,reasoning:75,cache_creation:25}},"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-4-argon":{input:2,output:10},"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},"qwen3-coder-plus":{input:.65,output:3.25,cached:.5,reasoning:3.25,cache_creation:1},"qwen3-coder-flash":{input:.195,output:.975,cached:.25,reasoning:.975,cache_creation:.5},"qwen3-coder-next":{input:.12,output:.8,cached:.06,reasoning:.8,cache_creation:.5},"qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.8-27b":{input:.4,output:3,cached:.05,reasoning:3},"qwen3.8-2.4t-a95b":{input:2,output:6,cached:.25,reasoning:6},"qwen3.7-max":{input:1.475,output:4.425,cached:.25,reasoning:4.425},"qwen3.7-plus":{input:.32,output:1.28,cached:.08,reasoning:1.28},"qwen3.6-plus":{input:.325,output:1.95,reasoning:1.95},"qwen3.6-flash":{input:.1875,output:1.125,cached:.01875,cache_creation:.2344,reasoning:1.125},"qwen3.6-35b-a3b":{input:.098,output:.95,reasoning:.95},"qwen3.6-27b":{input:.289,output:2.4,reasoning:2.4},"qwen3.6-max-preview":{input:1.027,output:6.162,reasoning:6.162},"qwen3.5-plus":{input:.3,output:1.8,reasoning:1.8},"qwen3.5-flash":{input:.065,output:.26,reasoning:.26},"qwen3.5-27b":{input:.195,output:1.56,reasoning:1.56},"qwen3.5-35b-a3b":{input:.14,output:1,reasoning:1},"qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen3.5-397b-a17b":{input:.3025,output:1.925,reasoning:1.925},"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-latest":{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04},"deepseek-v4-flash":{input:.05,output:.16,cached:.013,reasoning:.16,cache_creation:.05},"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},"glm-5.1":{input:.95,output:3.15,cached:.179,reasoning:3.15,cache_creation:.95},"glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5,cache_creation:.15},"glm-5.3":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"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},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:.6,reasoning:12,cache_creation:4}},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:1,reasoning:12,cache_creation:4}},"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}},meta:{"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2}},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-v4-flash*",pricing:{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04}},{pattern:"deepseek-v4-pro*",pricing:{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435}},{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.3-flash*",pricing:{input:.15,output:.5,cached:.075,reasoning:.5,cache_creation:.15}},{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}},{pattern:"*muse-spark*contributor*",pricing:{input:.1,output:.2,cached:.002,reasoning:.3,cache_creation:.1}},{pattern:"*muse-spark*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}},{pattern:"*muse-glimmer*",pricing:{input:.3,output:1.2,cached:.04,reasoning:1.8,cache_creation:.3}},{pattern:"*muse*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}}];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){if(null==a||""===a)return null;let b=Number(a);return Number.isFinite(b)&&b>=0?b:null}function m(a,b){if(!a)return 0;let c=l(a.cost_usd??a.cost_in_usd);if(null!==c)return c;let d=l(a.cost_in_usd_ticks);if(null!==d)return d/1e10;if(!b)return 0;let e=0,f=a.prompt_tokens||a.input_tokens||0,g=a.cached_tokens||a.cache_read_input_tokens||0,h=a.cache_creation_input_tokens||0;e+=Math.max(0,f-g-h)*(b.input/1e6),g>0&&(e+=g*((b.cached||b.input)/1e6)),e+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let i=a.reasoning_tokens||0;i>0&&(e+=i*((b.reasoning||b.output)/1e6)),h>0&&(e+=h*((b.cache_creation||b.input)/1e6));let j=Number(a.pricing_multiplier);return e*(Number.isFinite(j)&&j>0?j:1)}}};
1
+ "use strict";exports.id=4646,exports.ids=[4646],exports.modules={84646:(a,b,c)=>{c.d(b,{PROVIDER_PRICING:()=>g,ad:()=>k,calculateCostFromTokens:()=>m,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:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-high":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-medium":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-opus-5-5-low":{input:5,output:25,cached:.5,reasoning:37.5,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.4":{input:2.5,output:15,cached:.25,reasoning:15,cache_creation:2.5,long_context:{threshold:272e3,input:5,output:22.5,cached:.5,reasoning:22.5,cache_creation:5}},"gpt-5.4-mini":{input:.75,output:4.5,cached:.075,reasoning:4.5,cache_creation:.75},"gpt-5.4-nano":{input:.2,output:1.25,cached:.02,reasoning:1.25,cache_creation:.2},"gpt-5.5":{input:5,output:30,cached:.5,reasoning:30,cache_creation:5,long_context:{threshold:272e3,input:10,output:45,cached:1,reasoning:45,cache_creation:10}},"gpt-5.6":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-5.6-luna":{input:.2,output:1.2,cached:.02,reasoning:1.2,cache_creation:.25,long_context:{threshold:272e3,input:.4,output:1.8,cached:.04,reasoning:1.8,cache_creation:.5}},"gpt-5.6-terra":{input:2,output:12,cached:.2,reasoning:12,cache_creation:2.5,long_context:{threshold:272e3,input:4,output:18,cached:.4,reasoning:18,cache_creation:5}},"gpt-5.6-sol":{input:4,output:20,cached:.4,reasoning:20,cache_creation:5,long_context:{threshold:272e3,input:8,output:30,cached:.8,reasoning:30,cache_creation:10}},"gpt-6-astra":{input:10,output:50,cached:1,reasoning:50,cache_creation:12.5,long_context:{threshold:272e3,input:20,output:75,cached:2,reasoning:75,cache_creation:25}},"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-4-argon":{input:2,output:10},"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},"qwen3-coder-plus":{input:.65,output:3.25,cached:.5,reasoning:3.25,cache_creation:1},"qwen3-coder-flash":{input:.195,output:.975,cached:.25,reasoning:.975,cache_creation:.5},"qwen3-coder-next":{input:.12,output:.8,cached:.06,reasoning:.8,cache_creation:.5},"qwen3.8-max":{input:2,output:6,cached:.25,cache_creation:2.5,reasoning:6},"qwen3.8-27b":{input:.4,output:3,cached:.05,reasoning:3},"qwen3.8-2.4t-a95b":{input:2,output:6,cached:.25,reasoning:6},"qwen3.7-max":{input:1.475,output:4.425,cached:.25,reasoning:4.425},"qwen3.7-plus":{input:.32,output:1.28,cached:.08,reasoning:1.28},"qwen3.6-plus":{input:.325,output:1.95,reasoning:1.95},"qwen3.6-flash":{input:.1875,output:1.125,cached:.01875,cache_creation:.2344,reasoning:1.125},"qwen3.6-35b-a3b":{input:.098,output:.95,reasoning:.95},"qwen3.6-27b":{input:.289,output:2.4,reasoning:2.4},"qwen3.6-max-preview":{input:1.027,output:6.162,reasoning:6.162},"qwen3.5-plus":{input:.3,output:1.8,reasoning:1.8},"qwen3.5-flash":{input:.065,output:.26,reasoning:.26},"qwen3.5-27b":{input:.195,output:1.56,reasoning:1.56},"qwen3.5-35b-a3b":{input:.14,output:1,reasoning:1},"qwen3.5-122b-a10b":{input:.26,output:2.08,reasoning:2.08},"qwen3.5-397b-a17b":{input:.3025,output:1.925,reasoning:1.925},"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-latest":{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04},"deepseek-v4-flash":{input:.05,output:.16,cached:.013,reasoning:.16,cache_creation:.05},"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},"glm-5.1":{input:.95,output:3.15,cached:.179,reasoning:3.15,cache_creation:.95},"glm-5.3-flash":{input:.15,output:.5,cached:.03,reasoning:.5,cache_creation:.15},"glm-5.3":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"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},"grok-4.5":{input:2,output:6,cached:.3,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:.6,reasoning:12,cache_creation:4}},"grok-4.6":{input:2,output:6,cached:.5,reasoning:6,cache_creation:2,long_context:{threshold:2e5,inclusive:!0,input:4,output:12,cached:1,reasoning:12,cache_creation:4}},"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}},meta:{"muse-spark-1.2":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.1":{input:1.25,output:4.25,cached:.15,reasoning:4.25},"muse-spark-1.2-contributor":{input:.1,output:.2,cached:.002,reasoning:.2}},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-v4-flash*",pricing:{input:.04,output:.1,cached:.01,reasoning:.1,cache_creation:.04}},{pattern:"deepseek-v4-pro*",pricing:{input:.435,output:.87,cached:.003625,reasoning:.87,cache_creation:.435}},{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.3-flash*",pricing:{input:.15,output:.5,cached:.075,reasoning:.5,cache_creation:.15}},{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}},{pattern:"*muse-spark*contributor*",pricing:{input:.1,output:.2,cached:.002,reasoning:.3,cache_creation:.1}},{pattern:"*muse-spark*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}},{pattern:"*muse-glimmer*",pricing:{input:.3,output:1.2,cached:.04,reasoning:1.8,cache_creation:.3}},{pattern:"*muse*",pricing:{input:1.25,output:4.25,cached:.15,reasoning:6.375,cache_creation:1.25}}];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){if(null==a||""===a)return null;let b=Number(a);return Number.isFinite(b)&&b>=0?b:null}function m(a,b){if(!a)return 0;let c=l(a.cost_usd??a.cost_in_usd);if(null!==c)return c;let d=l(a.cost_in_usd_ticks);if(null!==d)return d/1e10;if(!b)return 0;let e=0,f=a.prompt_tokens||a.input_tokens||0,g=a.cached_tokens||a.cache_read_input_tokens||0,h=a.cache_creation_input_tokens||0;e+=Math.max(0,f-g-h)*(b.input/1e6),g>0&&(e+=g*((b.cached||b.input)/1e6)),e+=(a.completion_tokens||a.output_tokens||0)*(b.output/1e6);let i=a.reasoning_tokens||0;i>0&&(e+=i*((b.reasoning||b.output)/1e6)),h>0&&(e+=h*((b.cache_creation||b.input)/1e6));let j=Number(a.pricing_multiplier);return e*(Number.isFinite(j)&&j>0?j:1)}}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=4704,exports.ids=[4704],exports.modules={970:(a,b,c)=>{c.d(b,{EV:()=>g,X5:()=>d.X5,_M:()=>f});var d=c(53023),e=c(45914);async function f(a,b=null,c=null,g=null){let h=a?.apiKey||a?.accessToken;if(!(0,d.zh)(h))return{...a,accessToken:h,apiKey:h};let i=g||(0,e.ty)(a?.provider);try{let e=await (0,d.JQ)(h,{profile:i,proxyOptions:b,signal:c});return{...a,accessToken:e.accessToken,providerSpecificData:{...a?.providerSpecificData||{},userId:e.userId||a?.providerSpecificData?.userId||""}}}catch(b){return{...a,accessToken:h,apiKey:h}}}async function g(a,b={}){let c=b.region||(0,e.ty)(a?.provider),h=await f(a,b.proxyOptions,b.signal,c),i=b.profile||c;return(0,d.EV)(h,{...b,profile:i})}},19016:(a,b,c)=>{c.d(b,{$U:()=>d,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"}},19040:(a,b,c)=>{c.d(b,{k:()=>q,t:()=>r});var d=c(19303),e=c(71253),f=c(43835),g=c(15251),h=c(78492);let i=["none","low","medium","high"],j=["none","thinking"],k=["none","low","medium","high","max"],l=["none","low","medium","high","xhigh","max"],m={qoder:l,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":l,"claude-budget":l,"gemini-level":["minimal","low","medium","high"],"gemini-budget":i,zai:j,qwen:i,kimi:k,opencode:k,deepseek:["none","high","max"],minimax:j,hunyuan:i,step:i,nous:i,meta:["minimal","low","medium","high","xhigh"],ollama:k},n=["none","minimal","low","medium","high","xhigh","max"],o=["none","low","medium","high","max"],p=[{pattern:"*claude*4.6*",levels:o},{pattern:"*claude*4-6*",levels:o},{provider:"codex",pattern:"*gpt-6*",levels:n},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:n},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{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:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"qoder",pattern:"*",levels:l},{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.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function q(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 j=String(b||"").replace(/\([^()]+\)\s*$/,""),k="codex"===a?(0,h.SM)("cx").find(a=>a.id===j)?.thinkingLevels:null,l=p.find(c=>(!c.providers||!a||c.providers.includes(a))&&(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),n=(a?g.xq[a]?.thinkingFormat:null)||c.thinkingFormat,o=k||c.thinkingLevels||l?.levels||m[n]||i;return!1===c.thinkingCanDisable&&(o=o.filter(a=>"none"!==a)),o}function r(a,b,c){return q(a,b)?.includes(c)===!0}},26317:(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"}},39541:(a,b,c)=>{c.d(b,{NU:()=>k,kD:()=>i,sS:()=>j,z:()=>t});var d=c(19303),e=c(19040),f=c(15251),g=c(26317);let h={openai:"openai","openai-responses":"openai-responses","openai-response":"openai",codex:"openai",claude:"claude-budget",gemini:"gemini-budget","gemini-cli":"gemini-budget",vertex:"gemini-budget",antigravity:"gemini-budget",kiro:"kiro",ollama:"ollama"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if(!a||"object"!=typeof a)return null;let b=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);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.output_config?.effort;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"}}}if(void 0!==a.think){let b=a.think;if(!1===b)return{mode:"none"};if(!0===b)return{mode:"auto"};if("string"==typeof b){let a=b.toLowerCase().trim();if("none"===a||"off"===a||"false"===a)return{mode:"none"};if("auto"===a||"true"===a)return{mode:"auto"};if("minimal"===a||"low"===a||"medium"===a||"high"===a||"max"===a||"xhigh"===a)return{mode:"level",level:"xhigh"===a?"max":a};if(a)return{mode:"level",level:a}}return b?{mode:"auto"}:{mode:"none"}}let e=a.additionalModelRequestFields;if(e&&"object"==typeof e){let a=e.output_config?.effort||e.thinking?.effort;if("string"==typeof a&&a)return{mode:"level",level:a.toLowerCase()};let b=e.reasoning?.effort;if("string"==typeof b&&b)return{mode:"level",level:b.toLowerCase()}}let f=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(f&&"object"==typeof f){if("string"==typeof f.thinkingLevel)return{mode:"level",level:f.thinkingLevel.toLowerCase()};let a=Number(f.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 k(a){let b=j(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 l=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function m(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 n(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}let o={minimal:4096,low:8192,medium:16384,high:65535};function p(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 q(a,b){p(a).thinkingConfig=b}function r(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=p(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function s(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,delete a.think,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig}function t(a,b,c,i=null,k){if(!c||"object"!=typeof c)return c;let{cleanModel:p,override:u}=function(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"}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:"ultra"}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}(b),v=u||k||j(c),w=(0,d.getCapabilitiesForModel)(i,p);if(!w.reasoning)return s(c),c;if(!v)return c;let x=function(a,b,c){if("string"==typeof c&&c.startsWith("openai-compatible-"))return"openai";if("openai-responses"===a)return"openai-responses";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)&&l.has(g.thinkingFormat))?g.thinkingFormat:h[a]||"openai"}(a,p,i),y="string"==typeof c.thinking?.display?c.thinking.display:k?.display;return s(c),!function(a,b,c,d,f,h,i){var j;let k="none"===c.mode,l=!1!==d.thinkingCanDisable,p=k&&!l?{mode:"level",level:"minimal"}:c;switch(a){case"openai-responses":{if(k&&l){delete b.reasoning;break}let a=n(p);a&&(b.reasoning={effort:"ultra"!==a||(0,e.t)(f,h,"ultra")?"max"!==a||(0,e.t)(f,h,"max")?a:"xhigh":"max"});break}case"openai":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort="max"!==a||(0,e.t)(f,h,"max")?a:"xhigh");break}case"qoder":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort=a);break}case"claude-adaptive":{if(k&&l){b.thinking={type:"disabled"};break}l?b.thinking={type:"adaptive",...i?{display:i}:{}}:delete b.thinking;let a=n(p);b.output_config={effort:"auto"!==a&&a?"minimal"===a?"low":"xhigh"!==a||(0,e.t)(f,h,"xhigh")?a:"high":"high"};break}case"claude-budget":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...i?{display:i}:{}}:{type:"enabled",budget_tokens:a||8192,...i?{display:i}:{}};break}case"gemini-level":{let a,c=k?"minimal":(a="auto"===p.mode?"high":n(p)||"high",(0,g.wd)(a));q(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),r(b,o[c]||o.high,d);break}case"gemini-budget":{if(k&&l){q(b,{thinkingBudget:0,includeThoughts:!1});break}let a=m(p,d.thinkingRange);q(b,{thinkingBudget:a??-1,includeThoughts:!0}),r(b,-1!==(j=a??-1)&&Number.isFinite(j)?j<=1024?8192:j<=8192?16384:j<=24576?32768:65535:32768,d);break}case"zai":if(k&&l){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=n(p);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(k&&l){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=m(p,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(k&&l){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=n(p),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"!==c||(0,e.t)(f,h,"max")?c:"high";break}case"kimi":{let a;if(k&&l){b.thinking={type:"disabled"};break}let c="auto"===(a=n(p))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"ollama":{if(k&&l){b.think=!1;break}let a=function(a,b){if(!a)return null;if("auto"===a.mode)return!0;let c=n(a);return!c||"auto"===c||("minimal"===c?"low":"xhigh"===c?"max":["low","medium","high","max"].includes(c)?"max"===c&&b&&!b.includes("max")?"high":c:"medium")}(p,d?.thinkingLevels);null!=a&&(b.think=a);break}case"opencode":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);if(!a||"auto"===a)break;b.reasoning_effort="xhigh"===a||"ultra"===a?"max":"minimal"===a?"low":a;break}case"minimax":b.thinking={type:k&&l?"disabled":"adaptive"};break;case"hunyuan":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(k&&l)break;let a=n(p);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(k&&l)break;let a="auto"===p.mode?"medium":n(p);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"meta":{let a=n(p);if("none"===a)break;a&&(b.reasoning_effort="max"===a||"ultra"===a?"xhigh":a)}}}(x,c,v,w,i,p,y),c}},43835:(a,b,c)=>{c.d(b,{$D:()=>w,Oj:()=>i,P9:()=>n,QR:()=>k,We:()=>l,Zm:()=>h,aZ:()=>x,cr:()=>r,if:()=>v,pA:()=>q,rG:()=>m,rx:()=>j,yh:()=>s});var d=c(39541),e=c(26317);let f="-agentic",g="-thinking",h=64,i=10237,j="AmazonCodeWhispererStreamingService.GenerateAssistantResponse",k=new Set([401,403,404]);function l(a){return"google"===a||"github"===a?"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK":"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX"}let m=`
1
+ "use strict";exports.id=4704,exports.ids=[4704],exports.modules={970:(a,b,c)=>{c.d(b,{EV:()=>g,X5:()=>d.X5,_M:()=>f});var d=c(53023),e=c(45914);async function f(a,b=null,c=null,g=null){let h=a?.apiKey||a?.accessToken;if(!(0,d.zh)(h))return{...a,accessToken:h,apiKey:h};let i=g||(0,e.ty)(a?.provider);try{let e=await (0,d.JQ)(h,{profile:i,proxyOptions:b,signal:c});return{...a,accessToken:e.accessToken,providerSpecificData:{...a?.providerSpecificData||{},userId:e.userId||a?.providerSpecificData?.userId||""}}}catch(b){return{...a,accessToken:h,apiKey:h}}}async function g(a,b={}){let c=b.region||(0,e.ty)(a?.provider),h=await f(a,b.proxyOptions,b.signal,c),i=b.profile||c;return(0,d.EV)(h,{...b,profile:i})}},19016:(a,b,c)=>{c.d(b,{$U:()=>d,pb:()=>e,uB:()=>f});let d="data: [DONE]\n\n",e={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"},f={"Content-Type":"text/event-stream","Cache-Control":"no-cache","X-Accel-Buffering":"no"}},19040:(a,b,c)=>{c.d(b,{k:()=>q,t:()=>r});var d=c(19303),e=c(71253),f=c(43835),g=c(15251),h=c(78492);let i=["none","low","medium","high"],j=["none","thinking"],k=["none","low","medium","high","max"],l=["none","low","medium","high","xhigh","max"],m={qoder:l,openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":l,"claude-budget":l,"gemini-level":["minimal","low","medium","high"],"gemini-budget":i,zai:j,qwen:i,kimi:k,opencode:k,deepseek:["none","high","max"],minimax:j,hunyuan:i,step:i,nous:i,meta:["minimal","low","medium","high","xhigh"],ollama:k},n=["none","minimal","low","medium","high","xhigh","max"],o=["none","low","medium","high","max"],p=[{pattern:"*claude*4.6*",levels:o},{pattern:"*claude*4-6*",levels:o},{provider:"codex",pattern:"*gpt-6*",levels:n},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...n,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:n},{providers:["openai","codex"],pattern:"*gpt-5.6*",levels:["none","minimal","low","medium","high","xhigh","max","ultra"]},{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:"ollama",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"ollama-local",pattern:"*gpt-oss*",levels:["none","low","medium","high"]},{provider:"qoder",pattern:"*",levels:l},{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.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]}];function q(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 j=String(b||"").replace(/\([^()]+\)\s*$/,""),k="codex"===a?(0,h.SM)("cx").find(a=>a.id===j)?.thinkingLevels:null,l=p.find(c=>(!c.providers||!a||c.providers.includes(a))&&(!c.provider||c.provider===a)&&(0,e.gH)(c.pattern,b)),n=(a?g.xq[a]?.thinkingFormat:null)||c.thinkingFormat,o=k||c.thinkingLevels||l?.levels||m[n]||i;return!1===c.thinkingCanDisable&&(o=o.filter(a=>"none"!==a)),o}function r(a,b,c){return q(a,b)?.includes(c)===!0}},26317:(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"}},39541:(a,b,c)=>{c.d(b,{NU:()=>k,kD:()=>i,sS:()=>j,z:()=>t});var d=c(19303),e=c(19040),f=c(15251),g=c(26317);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",ollama:"ollama"};function i(a){if("string"!=typeof a)return a;let b=a.match(/^(.*)\([^()]+\)\s*$/);return b?b[1].trim():a}function j(a){if(!a||"object"!=typeof a)return null;let b=a.reasoning_effort??("object"==typeof a.reasoning?a.reasoning?.effort:null);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.output_config?.effort;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"}}}if(void 0!==a.think){let b=a.think;if(!1===b)return{mode:"none"};if(!0===b)return{mode:"auto"};if("string"==typeof b){let a=b.toLowerCase().trim();if("none"===a||"off"===a||"false"===a)return{mode:"none"};if("auto"===a||"true"===a)return{mode:"auto"};if("minimal"===a||"low"===a||"medium"===a||"high"===a||"max"===a||"xhigh"===a)return{mode:"level",level:"xhigh"===a?"max":a};if(a)return{mode:"level",level:a}}return b?{mode:"auto"}:{mode:"none"}}let e=a.additionalModelRequestFields;if(e&&"object"==typeof e){let a=e.output_config?.effort||e.thinking?.effort;if("string"==typeof a&&a)return{mode:"level",level:a.toLowerCase()};let b=e.reasoning?.effort;if("string"==typeof b&&b)return{mode:"level",level:b.toLowerCase()}}let f=a.thinkingConfig||a.generationConfig?.thinkingConfig||a.request?.generationConfig?.thinkingConfig;if(f&&"object"==typeof f){if("string"==typeof f.thinkingLevel)return{mode:"level",level:f.thinkingLevel.toLowerCase()};let a=Number(f.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 k(a){let b=j(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 l=new Set(["gemini-level","gemini-budget","claude-budget","claude-adaptive","kiro"]);function m(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 n(a){return"level"===a.mode?a.level:"budget"===a.mode?(0,g.vz)(a.budget)||"medium":"auto"===a.mode?"auto":null}let o={minimal:4096,low:8192,medium:16384,high:65535};function p(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 q(a,b){p(a).thinkingConfig=b}function r(a,b,c){let d=Number.isFinite(c?.maxOutput)?c.maxOutput:b,e=Math.min(b,d),f=p(a),g=Number(f.maxOutputTokens);(!Number.isFinite(g)||g<e)&&(f.maxOutputTokens=e)}function s(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,delete a.think,a.generationConfig&&delete a.generationConfig.thinkingConfig,a.request?.generationConfig&&delete a.request.generationConfig.thinkingConfig}function t(a,b,c,i=null,k){if(!c||"object"!=typeof c)return c;let{cleanModel:p,override:u}=function(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"}}:/^\d+$/.test(d)?{cleanModel:c,override:{mode:"budget",budget:Number(d)}}:"ultra"===d?{cleanModel:c,override:{mode:"level",level:"ultra"}}:void 0!==g.Dl[d]?{cleanModel:c,override:{mode:"level",level:d}}:{cleanModel:c,override:null}}(b),v=u||k||j(c),w=(0,d.getCapabilitiesForModel)(i,p);if(!w.reasoning)return s(c),c;if(!v)return c;let x=function(a,b,c){if("string"==typeof c&&c.startsWith("openai-compatible-"))return"openai";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)&&l.has(g.thinkingFormat))?g.thinkingFormat:h[a]||"openai"}(a,p,i),y="string"==typeof c.thinking?.display?c.thinking.display:k?.display;return s(c),!function(a,b,c,d,f,h,i){var j;let k="none"===c.mode,l=!1!==d.thinkingCanDisable,p=k&&!l?{mode:"level",level:"minimal"}:c;switch(a){case"openai":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort="max"!==a||(0,e.t)(f,h,"max")?a:"xhigh");break}case"qoder":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);a&&(b.reasoning_effort=a);break}case"claude-adaptive":{if(k&&l){b.thinking={type:"disabled"};break}l?b.thinking={type:"adaptive",...i?{display:i}:{}}:delete b.thinking;let a=n(p);b.output_config={effort:"auto"!==a&&a?"minimal"===a?"low":"xhigh"!==a||(0,e.t)(f,h,"xhigh")?a:"high":"high"};break}case"claude-budget":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled",...i?{display:i}:{}}:{type:"enabled",budget_tokens:a||8192,...i?{display:i}:{}};break}case"gemini-level":{let a,c=k?"minimal":(a="auto"===p.mode?"high":n(p)||"high",(0,g.wd)(a));q(b,{thinkingLevel:c,includeThoughts:"minimal"!==c}),r(b,o[c]||o.high,d);break}case"gemini-budget":{if(k&&l){q(b,{thinkingBudget:0,includeThoughts:!1});break}let a=m(p,d.thinkingRange);q(b,{thinkingBudget:a??-1,includeThoughts:!0}),r(b,-1!==(j=a??-1)&&Number.isFinite(j)?j<=1024?8192:j<=8192?16384:j<=24576?32768:65535:32768,d);break}case"zai":if(k&&l){b.enable_thinking=!1,delete b.thinking;break}if(b.thinking={type:"enabled"},d.thinkingEffortSupported){let a=n(p);b.reasoning_effort="low"===a||"minimal"===a?"low":"high"===a||"medium"===a?"high":"max"}break;case"qwen":{if(k&&l){b.enable_thinking=!1;break}b.enable_thinking=!0;let a=m(p,d.thinkingRange);Number.isFinite(a)&&a>0&&(b.thinking_budget=a);break}case"deepseek":{if(k&&l){b.thinking={type:"disabled"};break}b.thinking={type:"enabled"};let a=n(p),c="xhigh"===a||"max"===a?"max":"high";b.reasoning_effort="max"!==c||(0,e.t)(f,h,"max")?c:"high";break}case"kimi":{let a;if(k&&l){b.thinking={type:"disabled"};break}let c="auto"===(a=n(p))?"high":"minimal"===a?"low":"xhigh"===a?"max":["low","medium","high","max"].includes(a)?a:null;c&&(b.reasoning_effort=c);break}case"ollama":{if(k&&l){b.think=!1;break}let a=function(a,b){if(!a)return null;if("auto"===a.mode)return!0;let c=n(a);return!c||"auto"===c||("minimal"===c?"low":"xhigh"===c?"max":["low","medium","high","max"].includes(c)?"max"===c&&b&&!b.includes("max")?"high":c:"medium")}(p,d?.thinkingLevels);null!=a&&(b.think=a);break}case"opencode":{if(k&&l){b.reasoning_effort="none";break}let a=n(p);if(!a||"auto"===a)break;b.reasoning_effort="xhigh"===a||"ultra"===a?"max":"minimal"===a?"low":a;break}case"minimax":b.thinking={type:k&&l?"disabled":"adaptive"};break;case"hunyuan":{if(k&&l){b.thinking={type:"disabled"};break}let a=m(p,d.thinkingRange);b.thinking=-1===a?{type:"enabled"}:{type:"enabled",budget_tokens:a||8192};break}case"step":{if(k&&l)break;let a=n(p);a&&(b.reasoning_effort="xhigh"===a||"max"===a?"high":a);break}case"nous":{if(k&&l)break;let a="auto"===p.mode?"medium":n(p);b.reasoning={enabled:!0,...a?{effort:a}:{}};break}case"meta":{let a=n(p);if("none"===a)break;a&&(b.reasoning_effort="max"===a||"ultra"===a?"xhigh":a)}}}(x,c,v,w,i,p,y),c}},43835:(a,b,c)=>{c.d(b,{$D:()=>w,Oj:()=>i,P9:()=>n,QR:()=>k,We:()=>l,Zm:()=>h,aZ:()=>x,cr:()=>r,if:()=>v,pA:()=>q,rG:()=>m,rx:()=>j,yh:()=>s});var d=c(39541),e=c(26317);let f="-agentic",g="-thinking",h=64,i=10237,j="AmazonCodeWhispererStreamingService.GenerateAssistantResponse",k=new Set([401,403,404]);function l(a){return"google"===a||"github"===a?"arn:aws:codewhisperer:us-east-1:699475941385:profile/EHGA3GRVQMUK":"arn:aws:codewhisperer:us-east-1:638616132270:profile/AAAACCCCXXXX"}let m=`
2
2
  # CRITICAL: CHUNKED WRITE PROTOCOL (MANDATORY)
3
3
 
4
4
  You MUST follow these rules for ALL file operations. Violation causes server timeouts and task failure.
@@ -65,4 +65,4 @@ ${t}`,v=p(Buffer.from(u,"latin1")),w=c.machineId||g.randomUUID(),x=c.machineToke
65
65
 
66
66
  `)),e(c,p);return}let a=103===o||105===o||/login expired|login timeout|token.*expired|auth/i.test(q),d=10605===o||/queue|isQueued|retry_after/i.test(q);return void f(c,p,{model:b,message:q||`upstream status ${o}`,statusVal:a?401:d?429:o,type:a?"authentication_error":d?"model_queued":"qoder_upstream_error",code:a?"token_expired":d?"model_queued":o})}if(!q)return;if("[DONE]"===q||"[NOT_EXCEED_QUOTA]"===q||q.startsWith("[EXCEED_QUOTA]")||q.startsWith("[NOTIFICATIONS]"))return"[DONE]"===q?void e(c,p):q.startsWith("[EXCEED_QUOTA]")?void f(c,p,{model:b,message:q,statusVal:429}):void 0;try{j=JSON.parse(q)}catch{let a=q.replace(/\r?\n/g,"");p.contentEmitted=!0,c.enqueue(l.encode(`data: ${a}
67
67
 
68
- `));return}let r=function(a,b,c,d){if(!a||"object"!=typeof a||!Array.isArray(a.choices))return a;for(let e of a.choices){let a=e?.finish_reason;if(null!=a){if("model_context_window_exceeded"===a)return f(b,c,{model:d,message:"Model context window exceeded",statusVal:413,type:"context_length_exceeded",code:"context_length_exceeded"}),null;g.has(a)&&(e.finish_reason=null)}}return a}(j,c,p,b);if(null!==r){if(r&&"object"==typeof r&&Array.isArray(r.choices)&&0===r.choices.length&&r.usage&&"object"==typeof r.usage){p.pendingFinish&&(p.pendingFinish.usage=r.usage,h(c,l,p,p.pendingFinish),p.pendingFinish=null);return}if(r?.choices&&r.choices.some(a=>a?.finish_reason!=null&&!g.has(a.finish_reason))&&!(r.usage&&"object"==typeof r.usage)){p.pendingFinish=r;return}p.pendingFinish&&(h(c,l,p,p.pendingFinish),p.pendingFinish=null),h(c,l,p,r)}},r=a=>{((o+=d.decode()).length>0&&(q(o,a),o=""),p.pendingFinish&&(h(a,l,p,p.pendingFinish),p.pendingFinish=null),p.contentEmitted||p.doneEmitted)?e(a,p):f(a,p,{model:b,message:"Empty response: stream ended without any content",statusVal:502,type:"empty_response",code:"empty_response"})},s=new ReadableStream({async start(a){if(n.consumed){let b;for(o+=n.consumed;-1!==(b=o.indexOf("\n"));){let c=o.slice(0,b);o=o.slice(b+1),q(c,a)}}if(n.upstreamDone){r(a);try{a.close()}catch{}return}try{for(;;){let b,{done:c,value:e}=await m.read();if(c)break;for(o+=d.decode(e,{stream:!0});-1!==(b=o.indexOf("\n"));){let c=o.slice(0,b);o=o.slice(b+1),q(c,a)}}r(a)}catch(a){}finally{try{a.close()}catch{}await m.cancel().catch(()=>{})}},cancel:()=>m.cancel().catch(()=>{})});return new Response(s,{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}},78492:(a,b,c)=>{c.d(b,{SM:()=>k,kt:()=>o,ux:()=>n,vq:()=>f.vq});var d=c(38421),e=c(38772),f=c(15251),g=c(97915),h=c(62397),i=c(68531);let j=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function k(a){return f.vq[a]||[]}let l=new Set(["kr","kiro"]);function m(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!l.has(c))return;let f=(0,g.Kq)(d);if(f!==d)return a.find(a=>a.id===f)}function n(a,b){if(j(a)&&(0,h.nh)(b))return i.h.OPENAI_RESPONSES;let c=f.vq[a];if(!c)return null;let d=m(c,b,a);return d?(0,g.gr)(d):j(a)&&(0,h.i8)(b)?.targetFormat||null}function o(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",e=d?b.slice(0,c.index).trim():b,g=m(f.vq[a],e,a),i=g?.upstreamModelId||g?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof e&&e.endsWith(h.d5)?e.slice(0,-h.d5.length)+d:e+d}let p=Object.fromEntries(e.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias]));Object.fromEntries(Object.keys(d.xq).map(a=>[a,p[a]||a]))}};
68
+ `));return}let r=function(a,b,c,d){if(!a||"object"!=typeof a||!Array.isArray(a.choices))return a;for(let e of a.choices){let a=e?.finish_reason;if(null!=a){if("model_context_window_exceeded"===a)return f(b,c,{model:d,message:"Model context window exceeded",statusVal:413,type:"context_length_exceeded",code:"context_length_exceeded"}),null;g.has(a)&&(e.finish_reason=null)}}return a}(j,c,p,b);if(null!==r){if(r&&"object"==typeof r&&Array.isArray(r.choices)&&0===r.choices.length&&r.usage&&"object"==typeof r.usage){p.pendingFinish&&(p.pendingFinish.usage=r.usage,h(c,l,p,p.pendingFinish),p.pendingFinish=null);return}if(r?.choices&&r.choices.some(a=>a?.finish_reason!=null&&!g.has(a.finish_reason))&&!(r.usage&&"object"==typeof r.usage)){p.pendingFinish=r;return}p.pendingFinish&&(h(c,l,p,p.pendingFinish),p.pendingFinish=null),h(c,l,p,r)}},r=a=>{((o+=d.decode()).length>0&&(q(o,a),o=""),p.pendingFinish&&(h(a,l,p,p.pendingFinish),p.pendingFinish=null),p.contentEmitted||p.doneEmitted)?e(a,p):f(a,p,{model:b,message:"Empty response: stream ended without any content",statusVal:502,type:"empty_response",code:"empty_response"})},s=new ReadableStream({async start(a){if(n.consumed){let b;for(o+=n.consumed;-1!==(b=o.indexOf("\n"));){let c=o.slice(0,b);o=o.slice(b+1),q(c,a)}}if(n.upstreamDone){r(a);try{a.close()}catch{}return}try{for(;;){let b,{done:c,value:e}=await m.read();if(c)break;for(o+=d.decode(e,{stream:!0});-1!==(b=o.indexOf("\n"));){let c=o.slice(0,b);o=o.slice(b+1),q(c,a)}}r(a)}catch(a){}finally{try{a.close()}catch{}await m.cancel().catch(()=>{})}},cancel:()=>m.cancel().catch(()=>{})});return new Response(s,{status:a.status,statusText:a.statusText,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache"}})}},78492:(a,b,c)=>{c.d(b,{SM:()=>j,kt:()=>n,ux:()=>m,vq:()=>e.vq});var d=c(38772),e=c(15251),f=c(97915),g=c(62397),h=c(68531);let i=a=>!a||["oc","opencode","ocg","opencode-go","ocz","opencode-zen"].includes(a);function j(a){return e.vq[a]||[]}let k=new Set(["kr","kiro"]);function l(a,b,c){if(!a)return;let d="string"==typeof b?b.replace(/\([^()]+\)\s*$/,"").trim():b,e=a.find(a=>a.id===b||a.id===d);if(e)return e;if(!k.has(c))return;let g=(0,f.Kq)(d);if(g!==d)return a.find(a=>a.id===g)}function m(a,b){if(i(a)&&(0,g.nh)(b))return h.h.OPENAI_RESPONSES;let c=e.vq[a];if(!c)return null;let d=l(c,b,a);return d?(0,f.gr)(d):i(a)&&(0,g.i8)(b)?.targetFormat||null}function n(a,b){let c="string"==typeof b?b.match(/\([^()]+\)\s*$/):null,d=c?c[0]:"",f=d?b.slice(0,c.index).trim():b,h=l(e.vq[a],f,a),i=h?.upstreamModelId||h?.id;if(i){let a=i.match(/\([^()]+\)\s*$/),b=a?.[0]||"";return(b?i.slice(0,a.index).trim():i)+(d||b)}return"cx"===a&&"string"==typeof f&&f.endsWith(g.d5)?f.slice(0,-g.d5.length)+d:f+d}Object.fromEntries(d.default.filter(a=>a.alias&&a.alias!==a.id).map(a=>[a.id,a.alias])),Object.fromEntries(d.default.map(a=>[a.id,a.alias||a.id]))}};
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=4739,exports.ids=[4739],exports.modules={16329:(a,b,c)=>{c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},24739:(a,b,c)=>{c.d(b,{createBunSqliteAdapter:()=>f});var d=c(63775),e=c(16329);async function f(a){let{Database:b}=await Promise.resolve().then(c.t.bind(c,81787,23)),f=new b(a,{create:!0});f.exec(d.oG);let g=new Map;function h(a){let b=g.get(a);return b||(b=f.prepare(a),g.set(a,b)),b}let i=setInterval(()=>{try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function j(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{g.clear()}catch{}try{f.close()}catch{}}return"function"==typeof i.unref&&i.unref(),(0,e.Bb)(j,100),{driver:"bun:sqlite",run(a,b=[]){let c=h(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>h(a).get(...b),all:(a,b=[])=>h(a).all(...b),exec:a=>f.exec(a),transaction:a=>f.transaction(a)(),checkpoint(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(i),j()},raw:f}}},63775:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=6,e=`
1
+ "use strict";exports.id=4739,exports.ids=[4739],exports.modules={16329:(a,b,c)=>{c.d(b,{Bb:()=>e,Om:()=>g});let d=globalThis.__9routerShutdownState??={flushers:new Set,priorities:new Map,shutdownPromise:null,signalHandler:null,beforeExitHandler:null};function e(a,b=0){if("function"!=typeof a)throw TypeError("shutdown flusher must be a function");return d.flushers.add(a),d.priorities.set(a,Number.isFinite(b)?b:0),d.signalHandler??=()=>g(0),d.beforeExitHandler??=()=>f(),process.listeners("SIGINT").includes(d.signalHandler)||process.once("SIGINT",d.signalHandler),process.listeners("SIGTERM").includes(d.signalHandler)||process.once("SIGTERM",d.signalHandler),process.listeners("beforeExit").includes(d.beforeExitHandler)||process.once("beforeExit",d.beforeExitHandler),()=>{d.flushers.delete(a),d.priorities.delete(a)}}function f(){return d.shutdownPromise||(d.shutdownPromise=(async()=>{let a=new Map;for(let b of d.flushers){let c=d.priorities.get(b)??0;a.has(c)||a.set(c,[]),a.get(c).push(b)}for(let b of[...a.keys()].sort((a,b)=>a-b))for(let c of(await Promise.allSettled(a.get(b).map(a=>Promise.resolve().then(a)))))"rejected"===c.status&&console.error("[Shutdown] flusher failed:",c.reason?.message||c.reason)})()),d.shutdownPromise}async function g(a=0){await f(),process.exit(a)}},24739:(a,b,c)=>{c.d(b,{createBunSqliteAdapter:()=>f});var d=c(63775),e=c(16329);async function f(a){let{Database:b}=await Promise.resolve().then(c.t.bind(c,81787,23)),f=new b(a,{create:!0});f.exec(d.oG);let g=new Map;function h(a){let b=g.get(a);return b||(b=f.prepare(a),g.set(a,b)),b}let i=setInterval(()=>{try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function j(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{g.clear()}catch{}try{f.close()}catch{}}return"function"==typeof i.unref&&i.unref(),(0,e.Bb)(j,100),{driver:"bun:sqlite",run(a,b=[]){let c=h(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>h(a).get(...b),all:(a,b=[])=>h(a).all(...b),exec:a=>f.exec(a),transaction:a=>f.transaction(a)(),checkpoint(){try{f.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(i),j()},raw:f}}},63775:(a,b,c)=>{c.d(b,{CG:()=>f,f$:()=>d,oG:()=>e,zE:()=>g});let d=7,e=`
2
2
  PRAGMA journal_mode = WAL;
3
3
  PRAGMA synchronous = NORMAL;
4
4
  PRAGMA temp_store = MEMORY;
@@ -6,4 +6,4 @@ PRAGMA mmap_size = 30000000;
6
6
  PRAGMA cache_size = -64000;
7
7
  PRAGMA foreign_keys = ON;
8
8
  PRAGMA busy_timeout = 5000;
9
- `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL",scope:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
9
+ `,f={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL",scope:"TEXT",accessRestricted:"INTEGER DEFAULT 0",accessAllow:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",config:"TEXT",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},mcpInstances:{columns:{id:"TEXT PRIMARY KEY",slug:"TEXT UNIQUE NOT NULL",title:"TEXT",kind:"TEXT NOT NULL",transport:"TEXT NOT NULL",url:"TEXT",command:"TEXT",args:"TEXT",env:"TEXT",headers:"TEXT",oauth:"INTEGER DEFAULT 0",oauthTokens:"TEXT",enabled:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_inst_slug ON mcpInstances(slug)","CREATE INDEX IF NOT EXISTS idx_mcp_inst_enabled ON mcpInstances(enabled)"]},mcpGatewayKeys:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT",key:"TEXT UNIQUE NOT NULL",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_gwkey ON mcpGatewayKeys(key)"]},mcpKeyGrants:{columns:{keyId:"TEXT NOT NULL",instanceId:"TEXT NOT NULL",toolAllowlist:"TEXT"},primaryKey:"PRIMARY KEY (keyId, instanceId)",indexes:["CREATE INDEX IF NOT EXISTS idx_mcp_grant_key ON mcpKeyGrants(keyId)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]},errorLogs:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",endpoint:"TEXT",provider:"TEXT",model:"TEXT",connectionId:"TEXT",comboName:"TEXT",statusCode:"TEXT",errorMessage:"TEXT",request:"TEXT",providerRequest:"TEXT",providerResponse:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_el_ts ON errorLogs(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_el_provider ON errorLogs(provider)","CREATE INDEX IF NOT EXISTS idx_el_model ON errorLogs(model)","CREATE INDEX IF NOT EXISTS idx_el_conn ON errorLogs(connectionId)","CREATE INDEX IF NOT EXISTS idx_el_combo ON errorLogs(comboName)"]},tokenSaverDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},convoyRules:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT NOT NULL",enabled:"INTEGER DEFAULT 1",priority:"INTEGER DEFAULT 0",matchType:"TEXT NOT NULL DEFAULT 'literal'",action:"TEXT NOT NULL DEFAULT 'replace'",pattern:"TEXT NOT NULL",replacement:"TEXT DEFAULT ''",caseSensitive:"INTEGER DEFAULT 1",providerIds:"TEXT DEFAULT '[]'",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_cr_enabled ON convoyRules(enabled)","CREATE INDEX IF NOT EXISTS idx_cr_priority ON convoyRules(enabled, priority)"]}};function g(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};