@nyte-ai/ai 0.0.0-stage → 0.0.18

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 (314) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -2
  3. package/THIRD-PARTY-NOTICES.md +800 -0
  4. package/dist/chunks/account-limits-cache-031vfpt3.js +37 -0
  5. package/dist/chunks/account-limits-cache-09vs98g6.js +41 -0
  6. package/dist/chunks/account-limits-cache-0af5gqeg.js +15 -0
  7. package/dist/chunks/account-limits-cache-0yd6bde8.js +103 -0
  8. package/dist/chunks/account-limits-cache-1jv43fhh.js +22 -0
  9. package/dist/chunks/account-limits-cache-3ykqmnj5.js +88 -0
  10. package/dist/chunks/account-limits-cache-4b8ckwqw.js +293 -0
  11. package/dist/chunks/account-limits-cache-4fn5w63p.js +295 -0
  12. package/dist/chunks/account-limits-cache-4hptgd2h.js +49 -0
  13. package/dist/chunks/account-limits-cache-53e64mhx.js +417 -0
  14. package/dist/chunks/account-limits-cache-5jdhn0e1.js +562 -0
  15. package/dist/chunks/account-limits-cache-5rx2pfm5.js +8 -0
  16. package/dist/chunks/account-limits-cache-5ygxyyss.js +19 -0
  17. package/dist/chunks/account-limits-cache-6250ykn6.js +21 -0
  18. package/dist/chunks/account-limits-cache-6x05n06z.js +49 -0
  19. package/dist/chunks/account-limits-cache-736tdyme.js +6 -0
  20. package/dist/chunks/account-limits-cache-75smws02.js +213 -0
  21. package/dist/chunks/account-limits-cache-7z9s8j16.js +139 -0
  22. package/dist/chunks/account-limits-cache-8137j3zp.js +37 -0
  23. package/dist/chunks/account-limits-cache-8qzk56vj.js +160 -0
  24. package/dist/chunks/account-limits-cache-8s8bz4dr.js +36 -0
  25. package/dist/chunks/account-limits-cache-8vzx8k6r.js +166 -0
  26. package/dist/chunks/account-limits-cache-8wfqg73s.js +135 -0
  27. package/dist/chunks/account-limits-cache-90c9c2eb.js +50 -0
  28. package/dist/chunks/account-limits-cache-9wqk28n5.js +25 -0
  29. package/dist/chunks/account-limits-cache-a1jyaq00.js +56 -0
  30. package/dist/chunks/account-limits-cache-a558rjbg.js +138 -0
  31. package/dist/chunks/account-limits-cache-a55e14fr.js +70 -0
  32. package/dist/chunks/account-limits-cache-a6cgeagz.js +77 -0
  33. package/dist/chunks/account-limits-cache-ag5b8dja.js +38 -0
  34. package/dist/chunks/account-limits-cache-b0x2sfya.js +45 -0
  35. package/dist/chunks/account-limits-cache-b23sbrke.js +26 -0
  36. package/dist/chunks/account-limits-cache-b4edaybk.js +8 -0
  37. package/dist/chunks/account-limits-cache-bsknrh6t.js +74 -0
  38. package/dist/chunks/account-limits-cache-c7v93krb.js +235 -0
  39. package/dist/chunks/account-limits-cache-csbxvam7.js +12 -0
  40. package/dist/chunks/account-limits-cache-cw7q7vfy.js +293 -0
  41. package/dist/chunks/account-limits-cache-d1ypzqzp.js +27 -0
  42. package/dist/chunks/account-limits-cache-d2a51dka.js +17 -0
  43. package/dist/chunks/account-limits-cache-dejeygdt.js +114 -0
  44. package/dist/chunks/account-limits-cache-eejm0vth.js +11 -0
  45. package/dist/chunks/account-limits-cache-ehy0ze2b.js +33 -0
  46. package/dist/chunks/account-limits-cache-emg5b4hj.js +53 -0
  47. package/dist/chunks/account-limits-cache-eqwweapz.js +6 -0
  48. package/dist/chunks/account-limits-cache-eyx1jcxc.js +8 -0
  49. package/dist/chunks/account-limits-cache-f9z00x8c.js +36 -0
  50. package/dist/chunks/account-limits-cache-fbkaq46e.js +113 -0
  51. package/dist/chunks/account-limits-cache-fdwad56n.js +399 -0
  52. package/dist/chunks/account-limits-cache-fht68jp2.js +22 -0
  53. package/dist/chunks/account-limits-cache-fp03ztsw.js +17 -0
  54. package/dist/chunks/account-limits-cache-fsktnetm.js +69 -0
  55. package/dist/chunks/account-limits-cache-fvadc36m.js +110 -0
  56. package/dist/chunks/account-limits-cache-ghe9ne4j.js +69 -0
  57. package/dist/chunks/account-limits-cache-gknnm1kv.js +13 -0
  58. package/dist/chunks/account-limits-cache-gqsrbky9.js +40 -0
  59. package/dist/chunks/account-limits-cache-gr671dr2.js +0 -0
  60. package/dist/chunks/account-limits-cache-gs8a3fhw.js +32 -0
  61. package/dist/chunks/account-limits-cache-gsa5tzck.js +37 -0
  62. package/dist/chunks/account-limits-cache-h92bzz1j.js +235 -0
  63. package/dist/chunks/account-limits-cache-hemxtapd.js +142 -0
  64. package/dist/chunks/account-limits-cache-hj1h48sc.js +92 -0
  65. package/dist/chunks/account-limits-cache-hj3ek3ty.js +128 -0
  66. package/dist/chunks/account-limits-cache-hwehc67r.js +509 -0
  67. package/dist/chunks/account-limits-cache-hyzn1jmk.js +46 -0
  68. package/dist/chunks/account-limits-cache-j2bt392s.js +63 -0
  69. package/dist/chunks/account-limits-cache-k0pkzhbx.js +74 -0
  70. package/dist/chunks/account-limits-cache-kjx405q0.js +277 -0
  71. package/dist/chunks/account-limits-cache-ks1sjym9.js +37 -0
  72. package/dist/chunks/account-limits-cache-me1x57bs.js +89 -0
  73. package/dist/chunks/account-limits-cache-n3yk6g5c.js +314 -0
  74. package/dist/chunks/account-limits-cache-nbhht7xz.js +72 -0
  75. package/dist/chunks/account-limits-cache-nbkyhs6v.js +42 -0
  76. package/dist/chunks/account-limits-cache-nn9jebsj.js +26 -0
  77. package/dist/chunks/account-limits-cache-nxkprk3g.js +13 -0
  78. package/dist/chunks/account-limits-cache-nyy770yd.js +38 -0
  79. package/dist/chunks/account-limits-cache-pfa86y8e.js +45 -0
  80. package/dist/chunks/account-limits-cache-pfr14mcn.js +59 -0
  81. package/dist/chunks/account-limits-cache-q1ebtvet.js +8 -0
  82. package/dist/chunks/account-limits-cache-q63mc41j.js +51 -0
  83. package/dist/chunks/account-limits-cache-re8hpzwn.js +104 -0
  84. package/dist/chunks/account-limits-cache-rz8p1g5y.js +9 -0
  85. package/dist/chunks/account-limits-cache-skbfmzqe.js +7 -0
  86. package/dist/chunks/account-limits-cache-tc38g0ca.js +20 -0
  87. package/dist/chunks/account-limits-cache-v4n30az2.js +24 -0
  88. package/dist/chunks/account-limits-cache-vwgfz727.js +281 -0
  89. package/dist/chunks/account-limits-cache-x9fvb3s5.js +8 -0
  90. package/dist/chunks/account-limits-cache-xds88kxd.js +209 -0
  91. package/dist/chunks/account-limits-cache-xz65wyd1.js +428 -0
  92. package/dist/chunks/account-limits-cache-ydq8p8qp.js +39 -0
  93. package/dist/chunks/account-limits-cache-ykbqsvv6.js +134 -0
  94. package/dist/chunks/account-limits-cache-za42x8a3.js +25 -0
  95. package/dist/chunks/account-limits-cache-zcbkmrvy.js +79 -0
  96. package/dist/chunks/account-limits-cache-zgzptd0z.js +62 -0
  97. package/dist/chunks/account-limits-cache-zn01kscn.js +252 -0
  98. package/dist/chunks/account-limits-cache-zpjmeyt0.js +113 -0
  99. package/dist/chunks/account-limits-cache-zqdb4yh4.js +8 -0
  100. package/dist/src/account-limits-cache.d.ts +16 -0
  101. package/dist/src/account-limits-cache.js +7 -0
  102. package/dist/src/api/anthropic-client.d.ts +25 -0
  103. package/dist/src/api/anthropic-client.js +30 -0
  104. package/dist/src/api/anthropic-convert.d.ts +17 -0
  105. package/dist/src/api/anthropic-convert.js +14 -0
  106. package/dist/src/api/anthropic-events.d.ts +101 -0
  107. package/dist/src/api/anthropic-events.js +11 -0
  108. package/dist/src/api/anthropic-messages.d.ts +88 -0
  109. package/dist/src/api/anthropic-messages.js +578 -0
  110. package/dist/src/api/anthropic-messages.lazy.d.ts +2 -0
  111. package/dist/src/api/anthropic-messages.lazy.js +11 -0
  112. package/dist/src/api/assistant-stream.d.ts +23 -0
  113. package/dist/src/api/assistant-stream.js +15 -0
  114. package/dist/src/api/claude-code.d.ts +12 -0
  115. package/dist/src/api/claude-code.js +12 -0
  116. package/dist/src/api/cloudflare.d.ts +8 -0
  117. package/dist/src/api/cloudflare.js +11 -0
  118. package/dist/src/api/constrained-sampling.d.ts +24 -0
  119. package/dist/src/api/constrained-sampling.js +16 -0
  120. package/dist/src/api/deferred.d.ts +7 -0
  121. package/dist/src/api/deferred.js +10 -0
  122. package/dist/src/api/github-copilot-headers.d.ts +15 -0
  123. package/dist/src/api/github-copilot-headers.js +12 -0
  124. package/dist/src/api/google-generative-ai.d.ts +22 -0
  125. package/dist/src/api/google-generative-ai.js +583 -0
  126. package/dist/src/api/google-generative-ai.lazy.d.ts +2 -0
  127. package/dist/src/api/google-generative-ai.lazy.js +11 -0
  128. package/dist/src/api/lazy.d.ts +18 -0
  129. package/dist/src/api/lazy.js +12 -0
  130. package/dist/src/api/openai-codex-compact.d.ts +14 -0
  131. package/dist/src/api/openai-codex-compact.js +389 -0
  132. package/dist/src/api/openai-codex-compaction-error.d.ts +7 -0
  133. package/dist/src/api/openai-codex-compaction-error.js +6 -0
  134. package/dist/src/api/openai-codex-protocol.d.ts +125 -0
  135. package/dist/src/api/openai-codex-protocol.js +48 -0
  136. package/dist/src/api/openai-codex-responses.d.ts +4 -0
  137. package/dist/src/api/openai-codex-responses.js +175 -0
  138. package/dist/src/api/openai-codex-responses.lazy.d.ts +2 -0
  139. package/dist/src/api/openai-codex-responses.lazy.js +11 -0
  140. package/dist/src/api/openai-codex-websocket.d.ts +13 -0
  141. package/dist/src/api/openai-codex-websocket.js +37 -0
  142. package/dist/src/api/openai-codex-wire.d.ts +44 -0
  143. package/dist/src/api/openai-codex-wire.js +34 -0
  144. package/dist/src/api/openai-compact.d.ts +9 -0
  145. package/dist/src/api/openai-compact.js +12 -0
  146. package/dist/src/api/openai-completions-convert.d.ts +58 -0
  147. package/dist/src/api/openai-completions-convert.js +21 -0
  148. package/dist/src/api/openai-completions-params.d.ts +29 -0
  149. package/dist/src/api/openai-completions-params.js +20 -0
  150. package/dist/src/api/openai-completions-reasoning.d.ts +54 -0
  151. package/dist/src/api/openai-completions-reasoning.js +22 -0
  152. package/dist/src/api/openai-completions.d.ts +22 -0
  153. package/dist/src/api/openai-completions.js +484 -0
  154. package/dist/src/api/openai-completions.lazy.d.ts +5 -0
  155. package/dist/src/api/openai-completions.lazy.js +11 -0
  156. package/dist/src/api/openai-prompt-cache.d.ts +1 -0
  157. package/dist/src/api/openai-prompt-cache.js +6 -0
  158. package/dist/src/api/openai-responses-convert.d.ts +58 -0
  159. package/dist/src/api/openai-responses-convert.js +16 -0
  160. package/dist/src/api/openai-responses-events.d.ts +379 -0
  161. package/dist/src/api/openai-responses-events.js +12 -0
  162. package/dist/src/api/openai-responses-stream.d.ts +36 -0
  163. package/dist/src/api/openai-responses-stream.js +25 -0
  164. package/dist/src/api/openai-responses.d.ts +18 -0
  165. package/dist/src/api/openai-responses.js +276 -0
  166. package/dist/src/api/openai-responses.lazy.d.ts +2 -0
  167. package/dist/src/api/openai-responses.lazy.js +11 -0
  168. package/dist/src/api/simple-options.d.ts +17 -0
  169. package/dist/src/api/simple-options.js +18 -0
  170. package/dist/src/api/token-count.d.ts +5 -0
  171. package/dist/src/api/token-count.js +8 -0
  172. package/dist/src/api/transform-messages.d.ts +9 -0
  173. package/dist/src/api/transform-messages.js +6 -0
  174. package/dist/src/api-options.d.ts +27 -0
  175. package/dist/src/api-options.js +0 -0
  176. package/dist/src/auth/context.d.ts +11 -0
  177. package/dist/src/auth/context.js +6 -0
  178. package/dist/src/auth/credential-store.d.ts +17 -0
  179. package/dist/src/auth/credential-store.js +7 -0
  180. package/dist/src/auth/helpers.d.ts +24 -0
  181. package/dist/src/auth/helpers.js +8 -0
  182. package/dist/src/auth/oauth/anthropic.d.ts +7 -0
  183. package/dist/src/auth/oauth/anthropic.js +12 -0
  184. package/dist/src/auth/oauth/authorization-input.d.ts +14 -0
  185. package/dist/src/auth/oauth/authorization-input.js +6 -0
  186. package/dist/src/auth/oauth/device-code.d.ts +29 -0
  187. package/dist/src/auth/oauth/device-code.js +9 -0
  188. package/dist/src/auth/oauth/github-copilot.d.ts +23 -0
  189. package/dist/src/auth/oauth/github-copilot.js +12 -0
  190. package/dist/src/auth/oauth/load.d.ts +14 -0
  191. package/dist/src/auth/oauth/load.js +10 -0
  192. package/dist/src/auth/oauth/oauth-page.d.ts +13 -0
  193. package/dist/src/auth/oauth/oauth-page.js +8 -0
  194. package/dist/src/auth/oauth/openai-codex.d.ts +10 -0
  195. package/dist/src/auth/oauth/openai-codex.js +18 -0
  196. package/dist/src/auth/oauth/pkce.d.ts +12 -0
  197. package/dist/src/auth/oauth/pkce.js +6 -0
  198. package/dist/src/auth/resolve.d.ts +38 -0
  199. package/dist/src/auth/resolve.js +12 -0
  200. package/dist/src/auth/store.d.ts +29 -0
  201. package/dist/src/auth/store.js +10 -0
  202. package/dist/src/auth/types.d.ts +291 -0
  203. package/dist/src/auth/types.js +8 -0
  204. package/dist/src/auth/verify.d.ts +13 -0
  205. package/dist/src/auth/verify.js +7 -0
  206. package/dist/src/bun-oauth.d.ts +2 -0
  207. package/dist/src/bun-oauth.js +25 -0
  208. package/dist/src/env-api-keys.d.ts +32 -0
  209. package/dist/src/env-api-keys.js +27 -0
  210. package/dist/src/file-models-store.d.ts +18 -0
  211. package/dist/src/file-models-store.js +9 -0
  212. package/dist/src/index.d.ts +62 -0
  213. package/dist/src/index.js +372 -0
  214. package/dist/src/model-capabilities.d.ts +21 -0
  215. package/dist/src/model-capabilities.js +14 -0
  216. package/dist/src/model-pricing.d.ts +6 -0
  217. package/dist/src/model-pricing.js +10 -0
  218. package/dist/src/model-variants.d.ts +21 -0
  219. package/dist/src/model-variants.js +19 -0
  220. package/dist/src/models-refresh.d.ts +27 -0
  221. package/dist/src/models-refresh.js +9 -0
  222. package/dist/src/models-store.d.ts +31 -0
  223. package/dist/src/models-store.js +6 -0
  224. package/dist/src/models-types.d.ts +206 -0
  225. package/dist/src/models-types.js +0 -0
  226. package/dist/src/models.d.ts +7 -0
  227. package/dist/src/models.js +44 -0
  228. package/dist/src/prompt-cache.d.ts +5 -0
  229. package/dist/src/prompt-cache.js +9 -0
  230. package/dist/src/provider.d.ts +23 -0
  231. package/dist/src/provider.js +14 -0
  232. package/dist/src/providers/account-limits.d.ts +13 -0
  233. package/dist/src/providers/account-limits.js +8 -0
  234. package/dist/src/providers/anthropic-limits.d.ts +9 -0
  235. package/dist/src/providers/anthropic-limits.js +10 -0
  236. package/dist/src/providers/anthropic.d.ts +2 -0
  237. package/dist/src/providers/anthropic.js +25 -0
  238. package/dist/src/providers/github-copilot-catalog.d.ts +5 -0
  239. package/dist/src/providers/github-copilot-catalog.js +7 -0
  240. package/dist/src/providers/github-copilot.d.ts +2 -0
  241. package/dist/src/providers/github-copilot.js +23 -0
  242. package/dist/src/providers/nyte-catalog.d.ts +15 -0
  243. package/dist/src/providers/nyte-catalog.js +63 -0
  244. package/dist/src/providers/openai-codex-limits.d.ts +8 -0
  245. package/dist/src/providers/openai-codex-limits.js +14 -0
  246. package/dist/src/providers/openai-codex.d.ts +2 -0
  247. package/dist/src/providers/openai-codex.js +23 -0
  248. package/dist/src/providers/openai.d.ts +2 -0
  249. package/dist/src/providers/openai.js +19 -0
  250. package/dist/src/providers/opencode-go.d.ts +5 -0
  251. package/dist/src/providers/opencode-go.js +22 -0
  252. package/dist/src/providers/opencode-headers.d.ts +5 -0
  253. package/dist/src/providers/opencode-headers.js +6 -0
  254. package/dist/src/providers/opencode.d.ts +14 -0
  255. package/dist/src/providers/opencode.js +23 -0
  256. package/dist/src/providers/openrouter.d.ts +2 -0
  257. package/dist/src/providers/openrouter.js +19 -0
  258. package/dist/src/providers/vercel-ai-gateway.d.ts +3 -0
  259. package/dist/src/providers/vercel-ai-gateway.js +19 -0
  260. package/dist/src/session-resources.d.ts +9 -0
  261. package/dist/src/session-resources.js +10 -0
  262. package/dist/src/types.d.ts +210 -0
  263. package/dist/src/types.js +1 -0
  264. package/dist/src/utils/abort.d.ts +12 -0
  265. package/dist/src/utils/abort.js +10 -0
  266. package/dist/src/utils/deferred-tools.d.ts +11 -0
  267. package/dist/src/utils/deferred-tools.js +6 -0
  268. package/dist/src/utils/diagnostics.d.ts +11 -0
  269. package/dist/src/utils/diagnostics.js +12 -0
  270. package/dist/src/utils/error-body.d.ts +26 -0
  271. package/dist/src/utils/error-body.js +10 -0
  272. package/dist/src/utils/estimate.d.ts +20 -0
  273. package/dist/src/utils/estimate.js +14 -0
  274. package/dist/src/utils/event-stream.d.ts +22 -0
  275. package/dist/src/utils/event-stream.js +11 -0
  276. package/dist/src/utils/failure.d.ts +49 -0
  277. package/dist/src/utils/failure.js +10 -0
  278. package/dist/src/utils/fifo-queue.d.ts +11 -0
  279. package/dist/src/utils/fifo-queue.js +6 -0
  280. package/dist/src/utils/hash.d.ts +5 -0
  281. package/dist/src/utils/hash.js +6 -0
  282. package/dist/src/utils/headers.d.ts +12 -0
  283. package/dist/src/utils/headers.js +14 -0
  284. package/dist/src/utils/json-parse.d.ts +33 -0
  285. package/dist/src/utils/json-parse.js +12 -0
  286. package/dist/src/utils/node-http-proxy.d.ts +6 -0
  287. package/dist/src/utils/node-http-proxy.js +9 -0
  288. package/dist/src/utils/nyte-home.d.ts +2 -0
  289. package/dist/src/utils/nyte-home.js +6 -0
  290. package/dist/src/utils/nyte-user-agent.d.ts +1 -0
  291. package/dist/src/utils/nyte-user-agent.js +6 -0
  292. package/dist/src/utils/overflow.d.ts +18 -0
  293. package/dist/src/utils/overflow.js +9 -0
  294. package/dist/src/utils/provider-env.d.ts +9 -0
  295. package/dist/src/utils/provider-env.js +6 -0
  296. package/dist/src/utils/provider-retry.d.ts +22 -0
  297. package/dist/src/utils/provider-retry.js +9 -0
  298. package/dist/src/utils/retry.d.ts +66 -0
  299. package/dist/src/utils/retry.js +18 -0
  300. package/dist/src/utils/sanitize-unicode.d.ts +24 -0
  301. package/dist/src/utils/sanitize-unicode.js +6 -0
  302. package/dist/src/utils/sse.d.ts +21 -0
  303. package/dist/src/utils/sse.js +6 -0
  304. package/dist/src/utils/text.d.ts +5 -0
  305. package/dist/src/utils/text.js +10 -0
  306. package/dist/src/utils/transcript.d.ts +5 -0
  307. package/dist/src/utils/transcript.js +36 -0
  308. package/dist/src/utils/typebox-helpers.d.ts +19 -0
  309. package/dist/src/utils/typebox-helpers.js +6 -0
  310. package/dist/src/utils/uuid.d.ts +2 -0
  311. package/dist/src/utils/uuid.js +6 -0
  312. package/dist/src/utils/validation.d.ts +13 -0
  313. package/dist/src/utils/validation.js +8 -0
  314. package/package.json +152 -3
@@ -0,0 +1,293 @@
1
+ import {
2
+ GITHUB_COPILOT_API_VERSION2,
3
+ GITHUB_COPILOT_DEFAULT_ORIGIN2,
4
+ GITHUB_COPILOT_HEADERS2
5
+ } from "./account-limits-cache-za42x8a3.js";
6
+ import {
7
+ parseGitHubCopilotCatalog2
8
+ } from "./account-limits-cache-gs8a3fhw.js";
9
+ import {
10
+ raceWithAbortSignal2
11
+ } from "./account-limits-cache-j2bt392s.js";
12
+ import {
13
+ pollOAuthDeviceCodeFlow2
14
+ } from "./account-limits-cache-4hptgd2h.js";
15
+
16
+ // src/auth/oauth/github-copilot.ts
17
+ import { Type } from "typebox";
18
+ import { Value } from "typebox/value";
19
+ var DEFAULT_CLIENT_ID = "Iv1.b507a08c87ecfe98";
20
+ var DEVICE_CODE_LIFETIME_SECONDS = 15 * 60;
21
+ var EXPIRED_MESSAGE = "The device code expired before GitHub approved it. Sign in again.";
22
+ var CREDENTIAL_ERROR = "Invalid stored GitHub Copilot credential. Sign in to GitHub Copilot again.";
23
+ var KNOWN_GRANT_ERRORS = new Set([
24
+ "unsupported_grant_type",
25
+ "incorrect_client_credentials",
26
+ "incorrect_device_code",
27
+ "device_flow_disabled"
28
+ ]);
29
+ var DeviceCodeResponse = Type.Object({
30
+ device_code: Type.String({ minLength: 1 }),
31
+ user_code: Type.String({ minLength: 1 }),
32
+ verification_uri: Type.String({ minLength: 1 }),
33
+ interval: Type.Optional(Type.Unknown()),
34
+ expires_in: Type.Optional(Type.Unknown())
35
+ });
36
+ var GitHubToken = Type.Object({ access_token: Type.String({ minLength: 1 }) });
37
+ var GrantError = Type.Object({ error: Type.String(), interval: Type.Optional(Type.Unknown()) });
38
+ var PositiveSeconds = Type.Number({ exclusiveMinimum: 0 });
39
+ var CopilotToken = Type.Object({
40
+ token: Type.String({ minLength: 1 }),
41
+ expires_at: Type.Number()
42
+ });
43
+ var CopilotCredential = Type.Object({
44
+ type: Type.Literal("oauth"),
45
+ refresh: Type.String({ minLength: 1 }),
46
+ access: Type.String({ minLength: 1 }),
47
+ expires: Type.Integer({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }),
48
+ availableModelIds: Type.Array(Type.String({ minLength: 1 }))
49
+ });
50
+ function matchesCopilotCredential2(value) {
51
+ return Value.Check(CopilotCredential, value);
52
+ }
53
+ function copilotOrigin(token) {
54
+ const proxy = /(?:^|;)proxy-ep=([^;]+)/u.exec(token)?.[1];
55
+ if (proxy === undefined)
56
+ return GITHUB_COPILOT_DEFAULT_ORIGIN2;
57
+ const url = URL.parse(`https://${proxy.replace(/^proxy\./u, "api.")}`);
58
+ if (!url || url.protocol !== "https:" || !url.hostname.endsWith(".githubcopilot.com") || url.port !== "" || url.username !== "" || url.password !== "" || url.pathname !== "/" || url.search !== "" || url.hash !== "") {
59
+ throw new Error("GitHub Copilot token contains an untrusted API endpoint");
60
+ }
61
+ return url.origin;
62
+ }
63
+ async function requestCopilot(input) {
64
+ const bounded = AbortSignal.any([input.signal, AbortSignal.timeout(15000)]);
65
+ let response;
66
+ try {
67
+ response = await raceWithAbortSignal2((input.fetch ?? globalThis.fetch)(input.url, {
68
+ ...input.init,
69
+ signal: bounded,
70
+ redirect: "error"
71
+ }), bounded);
72
+ } catch (error) {
73
+ if (input.signal.aborted)
74
+ throw new Error("Login cancelled", { cause: error });
75
+ if (bounded.aborted)
76
+ throw new Error(`${input.describe} timed out`, { cause: error });
77
+ throw new Error(`${input.describe} failed: network error`, { cause: error });
78
+ }
79
+ if (!response.ok)
80
+ throw new Error(`${input.describe} failed (HTTP ${String(response.status)})`);
81
+ try {
82
+ return await raceWithAbortSignal2(response.json(), bounded);
83
+ } catch (error) {
84
+ if (input.signal.aborted)
85
+ throw new Error("Login cancelled", { cause: error });
86
+ if (bounded.aborted)
87
+ throw new Error(`${input.describe} timed out`, { cause: error });
88
+ throw new Error(`${input.describe} returned an unreadable response`, { cause: error });
89
+ }
90
+ }
91
+ var DEVICE_HEADERS = {
92
+ Accept: "application/json",
93
+ "Content-Type": "application/x-www-form-urlencoded",
94
+ "User-Agent": GITHUB_COPILOT_HEADERS2["User-Agent"]
95
+ };
96
+ async function startDeviceAuthorization(input) {
97
+ const json = await requestCopilot({
98
+ fetch: input.fetch,
99
+ url: "https://github.com/login/device/code",
100
+ init: {
101
+ method: "POST",
102
+ headers: DEVICE_HEADERS,
103
+ body: new URLSearchParams({ client_id: input.clientId, scope: "read:user" })
104
+ },
105
+ signal: input.signal,
106
+ describe: "GitHub device code request"
107
+ });
108
+ if (!Value.Check(DeviceCodeResponse, json))
109
+ throw new Error("GitHub device code response is missing required fields");
110
+ const url = URL.parse(json.verification_uri);
111
+ if (!url || url.protocol !== "https:" || url.hostname !== "github.com" && url.hostname !== "www.github.com" || url.port !== "" || url.username !== "" || url.password !== "" || !url.pathname.startsWith("/login/")) {
112
+ throw new Error("GitHub device code response named a verification page outside github.com");
113
+ }
114
+ return {
115
+ ...json,
116
+ verification_uri: url.href,
117
+ interval: Value.Check(PositiveSeconds, json.interval) ? json.interval : undefined,
118
+ expires_in: Math.min(DEVICE_CODE_LIFETIME_SECONDS, Value.Check(PositiveSeconds, json.expires_in) ? json.expires_in : DEVICE_CODE_LIFETIME_SECONDS)
119
+ };
120
+ }
121
+ var LIFETIME_GRACE_MS = 1000;
122
+ async function pollForGitHubToken(input) {
123
+ const lifetime = AbortSignal.timeout(Math.ceil(input.device.expires_in * 1000) + LIFETIME_GRACE_MS);
124
+ const pollSignal = AbortSignal.any([input.signal, lifetime]);
125
+ try {
126
+ return await pollOAuthDeviceCodeFlow2({
127
+ intervalSeconds: input.device.interval,
128
+ expiresInSeconds: input.device.expires_in,
129
+ waitBeforeFirstPoll: true,
130
+ signal: pollSignal,
131
+ poll: async () => {
132
+ const json = await requestCopilot({
133
+ fetch: input.fetch,
134
+ url: "https://github.com/login/oauth/access_token",
135
+ init: {
136
+ method: "POST",
137
+ headers: DEVICE_HEADERS,
138
+ body: new URLSearchParams({
139
+ client_id: input.clientId,
140
+ device_code: input.device.device_code,
141
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code"
142
+ })
143
+ },
144
+ signal: pollSignal,
145
+ describe: "GitHub device authorization"
146
+ });
147
+ if (Value.Check(GitHubToken, json))
148
+ return { status: "complete", value: json };
149
+ if (!Value.Check(GrantError, json))
150
+ return { status: "failed", message: "GitHub device authorization response is malformed" };
151
+ switch (json.error) {
152
+ case "authorization_pending":
153
+ return { status: "pending" };
154
+ case "slow_down":
155
+ return {
156
+ status: "slow_down",
157
+ intervalSeconds: Value.Check(PositiveSeconds, json.interval) ? json.interval : undefined
158
+ };
159
+ case "expired_token":
160
+ return { status: "failed", message: EXPIRED_MESSAGE };
161
+ case "access_denied":
162
+ return { status: "failed", message: "GitHub sign-in was denied." };
163
+ default:
164
+ return {
165
+ status: "failed",
166
+ message: KNOWN_GRANT_ERRORS.has(json.error) ? `GitHub device authorization failed: ${json.error}` : "GitHub device authorization failed with an unrecognized error"
167
+ };
168
+ }
169
+ }
170
+ });
171
+ } catch (error) {
172
+ if (input.signal.aborted)
173
+ throw new Error("Login cancelled", { cause: error });
174
+ if (lifetime.aborted)
175
+ throw new Error(EXPIRED_MESSAGE, { cause: error });
176
+ throw error;
177
+ }
178
+ }
179
+ async function loadCopilotCredential(input) {
180
+ const token = await requestCopilot({
181
+ fetch: input.fetch,
182
+ url: "https://api.github.com/copilot_internal/v2/token",
183
+ init: {
184
+ headers: {
185
+ Accept: "application/json",
186
+ Authorization: `Bearer ${input.github.access_token}`,
187
+ ...GITHUB_COPILOT_HEADERS2
188
+ }
189
+ },
190
+ signal: input.signal,
191
+ describe: "GitHub Copilot token exchange"
192
+ });
193
+ if (!Value.Check(CopilotToken, token) || !Number.isSafeInteger(token.expires_at * 1000) || token.expires_at * 1000 <= Date.now()) {
194
+ throw new Error("GitHub Copilot token exchange returned an invalid token or expiry. Sign in to GitHub Copilot again.");
195
+ }
196
+ const origin = copilotOrigin(token.token);
197
+ const catalog = parseGitHubCopilotCatalog2(await requestCopilot({
198
+ fetch: input.fetch,
199
+ url: `${origin}/models`,
200
+ init: {
201
+ headers: {
202
+ Accept: "application/json",
203
+ Authorization: `Bearer ${token.token}`,
204
+ ...GITHUB_COPILOT_HEADERS2,
205
+ "X-GitHub-Api-Version": GITHUB_COPILOT_API_VERSION2
206
+ }
207
+ },
208
+ signal: input.signal,
209
+ describe: "GitHub Copilot catalog request"
210
+ }), origin, input.knownModelIds);
211
+ input.signal.throwIfAborted();
212
+ return {
213
+ credential: {
214
+ type: "oauth",
215
+ refresh: input.github.access_token,
216
+ access: token.token,
217
+ expires: token.expires_at * 1000,
218
+ availableModelIds: catalog.availableModelIds
219
+ },
220
+ needsApproval: catalog.needsApproval
221
+ };
222
+ }
223
+ function githubCopilotOAuth2(options = {}, knownModelIds = () => new Set) {
224
+ return {
225
+ name: "GitHub Copilot",
226
+ isSubscription: true,
227
+ loginLabel: "Sign in with GitHub",
228
+ login: async (interaction) => {
229
+ interaction.signal.throwIfAborted();
230
+ const environment = typeof process === "undefined" ? undefined : process.env.NYTE_GITHUB_COPILOT_CLIENT_ID;
231
+ const clientId = options.clientId || environment || DEFAULT_CLIENT_ID;
232
+ const device = await startDeviceAuthorization({
233
+ fetch: options.fetch,
234
+ clientId,
235
+ signal: interaction.signal
236
+ });
237
+ if (interaction.signal.aborted)
238
+ throw new Error("Login cancelled");
239
+ const deviceCode = {
240
+ type: "device_code",
241
+ userCode: device.user_code,
242
+ verificationUri: device.verification_uri,
243
+ intervalSeconds: device.interval,
244
+ expiresInSeconds: device.expires_in
245
+ };
246
+ if (clientId === DEFAULT_CLIENT_ID) {
247
+ deviceCode.instructions = "This sign-in uses GitHub's Copilot app, not a Nyte OAuth app.";
248
+ }
249
+ interaction.notify(deviceCode);
250
+ const github = await pollForGitHubToken({
251
+ fetch: options.fetch,
252
+ clientId,
253
+ device,
254
+ signal: interaction.signal
255
+ });
256
+ interaction.notify({ type: "progress", message: "Connecting to GitHub Copilot" });
257
+ const result = await loadCopilotCredential({
258
+ fetch: options.fetch,
259
+ github,
260
+ knownModelIds: knownModelIds(),
261
+ signal: interaction.signal
262
+ });
263
+ if (result.needsApproval)
264
+ interaction.notify({
265
+ type: "info",
266
+ message: "Some Copilot models need account approval. Enable them in your Copilot settings, then sign in again."
267
+ });
268
+ return result.credential;
269
+ },
270
+ refresh: async (previous, signal) => {
271
+ if (!matchesCopilotCredential2(previous))
272
+ throw new Error(CREDENTIAL_ERROR);
273
+ const result = await loadCopilotCredential({
274
+ fetch: options.fetch,
275
+ github: { access_token: previous.refresh },
276
+ knownModelIds: knownModelIds(),
277
+ signal
278
+ });
279
+ return result.credential;
280
+ },
281
+ async toAuth(credential) {
282
+ if (!matchesCopilotCredential2(credential))
283
+ throw new Error(CREDENTIAL_ERROR);
284
+ return {
285
+ apiKey: credential.access,
286
+ baseUrl: copilotOrigin(credential.access),
287
+ headers: GITHUB_COPILOT_HEADERS2
288
+ };
289
+ }
290
+ };
291
+ }
292
+
293
+ export { matchesCopilotCredential2, githubCopilotOAuth2 };
@@ -0,0 +1,27 @@
1
+ // src/auth/oauth/authorization-input.ts
2
+ function parseAuthorizationInput2(input) {
3
+ const value = input.trim();
4
+ if (!value)
5
+ return {};
6
+ try {
7
+ const url = new URL(value);
8
+ return {
9
+ code: url.searchParams.get("code") ?? undefined,
10
+ state: url.searchParams.get("state") ?? undefined
11
+ };
12
+ } catch {}
13
+ if (value.includes("#")) {
14
+ const [code, state] = value.split("#", 2);
15
+ return { code, state };
16
+ }
17
+ if (value.includes("code=")) {
18
+ const params = new URLSearchParams(value);
19
+ return {
20
+ code: params.get("code") ?? undefined,
21
+ state: params.get("state") ?? undefined
22
+ };
23
+ }
24
+ return { code: value };
25
+ }
26
+
27
+ export { parseAuthorizationInput2 };
@@ -0,0 +1,17 @@
1
+ import {
2
+ getProviderEnvValue2
3
+ } from "./account-limits-cache-b23sbrke.js";
4
+
5
+ // src/prompt-cache.ts
6
+ function resolveCacheRetention2(retention, env) {
7
+ if (retention !== undefined)
8
+ return retention;
9
+ return getProviderEnvValue2("NYTE_CACHE_RETENTION", env) === "short" ? "short" : "long";
10
+ }
11
+ function promptCacheMinimumTtlMs2(policy, retention) {
12
+ if (policy === undefined || retention === "none")
13
+ return;
14
+ return policy.minimumRetentionMs[retention];
15
+ }
16
+
17
+ export { resolveCacheRetention2, promptCacheMinimumTtlMs2 };
@@ -0,0 +1,114 @@
1
+ // src/utils/estimate.ts
2
+ import { getSystemMessageText } from "@nyte-ai/schema/model";
3
+ var CHARS_PER_TOKEN = 4;
4
+ var ESTIMATED_IMAGE_CHARS = 4800;
5
+ function calculateContextTokens2(usage) {
6
+ return usage.totalTokens || usage.input + usage.output + usage.cacheRead + usage.cacheWrite;
7
+ }
8
+ function safeJsonStringify(value) {
9
+ try {
10
+ return JSON.stringify(value) ?? "undefined";
11
+ } catch {
12
+ return "[unserializable]";
13
+ }
14
+ }
15
+ function estimateTextAndImageContentChars(content) {
16
+ if (!Array.isArray(content))
17
+ return content.length;
18
+ let chars = 0;
19
+ for (const block of content)
20
+ chars += block.type === "text" ? block.text.length : ESTIMATED_IMAGE_CHARS;
21
+ return chars;
22
+ }
23
+ function estimateTextTokens2(text) {
24
+ return Math.ceil(text.length / CHARS_PER_TOKEN);
25
+ }
26
+ function estimateTextAndImageContentTokens2(content) {
27
+ return Math.ceil(estimateTextAndImageContentChars(content) / CHARS_PER_TOKEN);
28
+ }
29
+ function estimateMessageTokens2(message) {
30
+ let chars = 0;
31
+ if (message.role === "system") {
32
+ return estimateTextTokens2(getSystemMessageText(message)) + estimateToolsTokens(message.toolsAdded) + estimateToolsTokens(message.toolsRemoved);
33
+ }
34
+ if (message.role === "user")
35
+ return estimateTextAndImageContentTokens2(message.content);
36
+ if (message.role === "toolResult")
37
+ return estimateTextAndImageContentTokens2(message.content);
38
+ for (const block of message.content) {
39
+ if (block.type === "text") {
40
+ chars += block.text.length;
41
+ } else if (block.type === "thinking") {
42
+ chars += block.thinking.length;
43
+ } else {
44
+ chars += block.name.length + safeJsonStringify(block.arguments).length;
45
+ }
46
+ }
47
+ return Math.ceil(chars / CHARS_PER_TOKEN);
48
+ }
49
+ function getLastAssistantUsageInfo(messages) {
50
+ let latestPrefixTimestamp = Number.NEGATIVE_INFINITY;
51
+ let usageInfo;
52
+ for (let i = 0;i < messages.length; i++) {
53
+ const message = messages[i];
54
+ if (message.role === "assistant") {
55
+ const usageAppliesToPrefix = message.timestamp >= latestPrefixTimestamp;
56
+ if (usageAppliesToPrefix && message.stopReason !== "aborted" && message.stopReason !== "error" && calculateContextTokens2(message.usage) > 0) {
57
+ usageInfo = { usage: message.usage, index: i };
58
+ }
59
+ }
60
+ latestPrefixTimestamp = Math.max(latestPrefixTimestamp, message.timestamp);
61
+ }
62
+ return usageInfo;
63
+ }
64
+ function estimateMessages(messages) {
65
+ const usageInfo = getLastAssistantUsageInfo(messages);
66
+ if (usageInfo) {
67
+ const usageTokens = calculateContextTokens2(usageInfo.usage);
68
+ let trailingTokens = 0;
69
+ for (let i = usageInfo.index + 1;i < messages.length; i++) {
70
+ trailingTokens += estimateMessageTokens2(messages[i]);
71
+ }
72
+ return {
73
+ tokens: usageTokens + trailingTokens,
74
+ usageTokens,
75
+ trailingTokens,
76
+ lastUsageIndex: usageInfo.index
77
+ };
78
+ }
79
+ let tokens = 0;
80
+ for (const message of messages)
81
+ tokens += estimateMessageTokens2(message);
82
+ return { tokens, usageTokens: 0, trailingTokens: tokens, lastUsageIndex: null };
83
+ }
84
+ function estimateToolsTokens(tools) {
85
+ if (!tools || tools.length === 0)
86
+ return 0;
87
+ return estimateTextTokens2(safeJsonStringify(tools));
88
+ }
89
+ function estimateContextTokens2(context) {
90
+ if (!("messages" in context))
91
+ return estimateMessages(context);
92
+ const estimate = estimateMessages(context.messages);
93
+ if (!("systemPrompt" in context) && !("tools" in context))
94
+ return estimate;
95
+ if (estimate.lastUsageIndex !== null) {
96
+ const addedNames = new Set(context.messages.slice(estimate.lastUsageIndex + 1).filter((message) => message.role === "toolResult").flatMap((message) => message.addedToolNames ?? []));
97
+ const addedToolTokens = estimateToolsTokens(context.tools?.filter((tool) => addedNames.has(tool.name)));
98
+ return {
99
+ tokens: estimate.tokens + addedToolTokens,
100
+ usageTokens: estimate.usageTokens,
101
+ trailingTokens: estimate.trailingTokens + addedToolTokens,
102
+ lastUsageIndex: estimate.lastUsageIndex
103
+ };
104
+ }
105
+ const prefixTokens = (context.systemPrompt ? estimateTextTokens2(context.systemPrompt) : 0) + estimateToolsTokens(context.tools);
106
+ return {
107
+ tokens: estimate.tokens + prefixTokens,
108
+ usageTokens: estimate.usageTokens,
109
+ trailingTokens: estimate.trailingTokens + prefixTokens,
110
+ lastUsageIndex: estimate.lastUsageIndex
111
+ };
112
+ }
113
+
114
+ export { calculateContextTokens2, estimateTextTokens2, estimateTextAndImageContentTokens2, estimateMessageTokens2, estimateContextTokens2 };
@@ -0,0 +1,11 @@
1
+ // src/api/openai-codex-compaction-error.ts
2
+ class OpenAICodexCompactionError2 extends Error {
3
+ usage;
4
+ constructor(message, usage) {
5
+ super(message);
6
+ this.name = "OpenAICodexCompactionError";
7
+ this.usage = usage;
8
+ }
9
+ }
10
+
11
+ export { OpenAICodexCompactionError2 };
@@ -0,0 +1,33 @@
1
+ // src/providers/account-limits.ts
2
+ import { Value } from "typebox/value";
3
+ function limitWindow2(id, label, usedPercent, resetsAt, windowMinutes) {
4
+ const window = {
5
+ id,
6
+ label,
7
+ usedPercent: Math.max(0, Math.min(100, usedPercent))
8
+ };
9
+ if (resetsAt !== undefined)
10
+ window.resetsAt = resetsAt;
11
+ if (windowMinutes !== undefined)
12
+ window.windowMinutes = windowMinutes;
13
+ return window;
14
+ }
15
+ async function fetchAccountUsage2(url, headers, options, schema, label) {
16
+ const timeoutSignal = options?.timeoutMs !== undefined && options.timeoutMs > 0 ? AbortSignal.timeout(Math.floor(options.timeoutMs)) : undefined;
17
+ const signal = AbortSignal.any([options?.signal, timeoutSignal].filter((candidate) => candidate !== undefined));
18
+ const response = await (options?.fetch ?? globalThis.fetch)(url, {
19
+ method: "GET",
20
+ headers,
21
+ signal
22
+ });
23
+ if (!response.ok) {
24
+ const text = await response.text().catch(() => "");
25
+ throw new Error(`${label} usage request failed (${String(response.status)}): ${text || response.statusText}`);
26
+ }
27
+ const decoded = await response.json();
28
+ if (!Value.Check(schema, decoded))
29
+ throw new Error(`${label} usage response was not an object`);
30
+ return decoded;
31
+ }
32
+
33
+ export { limitWindow2, fetchAccountUsage2 };
@@ -0,0 +1,53 @@
1
+ import {
2
+ operationSignal2,
3
+ raceWithAbortSignal2
4
+ } from "./account-limits-cache-j2bt392s.js";
5
+
6
+ // src/auth/credential-store.ts
7
+ import { keyedSerial } from "@nyte-ai/schema/serial";
8
+ class InMemoryCredentialStore2 {
9
+ credentials = new Map;
10
+ writes = keyedSerial();
11
+ enqueue(providerId, task, options) {
12
+ const signal = operationSignal2(options?.signal);
13
+ const queued = this.writes.run(providerId, () => {
14
+ signal.throwIfAborted();
15
+ return task();
16
+ });
17
+ return raceWithAbortSignal2(queued, signal);
18
+ }
19
+ async read(providerId, options) {
20
+ options?.signal?.throwIfAborted();
21
+ return this.credentials.get(providerId);
22
+ }
23
+ async list(options) {
24
+ options?.signal?.throwIfAborted();
25
+ return [...this.credentials].flatMap(([providerId, stored]) => stored.accounts.map((account) => ({
26
+ providerId,
27
+ id: account.id,
28
+ label: account.label,
29
+ type: account.credential.type,
30
+ active: stored.active === account.id
31
+ })));
32
+ }
33
+ modify(providerId, fn, options) {
34
+ return this.enqueue(providerId, async () => {
35
+ const current = this.credentials.get(providerId);
36
+ const next = await fn(current);
37
+ if (next !== undefined) {
38
+ if (next.accounts.length === 0)
39
+ this.credentials.delete(providerId);
40
+ else
41
+ this.credentials.set(providerId, next);
42
+ }
43
+ return next ?? current;
44
+ }, options);
45
+ }
46
+ delete(providerId, options) {
47
+ return this.enqueue(providerId, async () => {
48
+ this.credentials.delete(providerId);
49
+ }, options);
50
+ }
51
+ }
52
+
53
+ export { InMemoryCredentialStore2 };
@@ -0,0 +1,6 @@
1
+ // src/utils/sanitize-unicode.ts
2
+ function sanitizeSurrogates2(text) {
3
+ return text.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, "");
4
+ }
5
+
6
+ export { sanitizeSurrogates2 };
@@ -0,0 +1,8 @@
1
+ import {
2
+ lazyApi2
3
+ } from "./account-limits-cache-90c9c2eb.js";
4
+
5
+ // src/api/openai-completions.lazy.ts
6
+ var openAICompletionsApi2 = () => lazyApi2(() => import("../src/api/openai-completions.js"));
7
+
8
+ export { openAICompletionsApi2 };
@@ -0,0 +1,36 @@
1
+ // src/model-pricing.ts
2
+ var ANTHROPIC_FAST_MODE_COST_MULTIPLIER2 = 2;
3
+ function getServiceTierCostMultiplier(model, serviceTier) {
4
+ switch (serviceTier) {
5
+ case "flex":
6
+ return 0.5;
7
+ case "priority":
8
+ case "fast":
9
+ return model.id === "gpt-5.5" ? 2.5 : 2;
10
+ default:
11
+ return 1;
12
+ }
13
+ }
14
+ function applyServiceTierPricing2(usage, serviceTier, model) {
15
+ const multiplier = getServiceTierCostMultiplier(model, serviceTier ?? undefined);
16
+ if (multiplier === 1)
17
+ return;
18
+ usage.cost.input *= multiplier;
19
+ usage.cost.output *= multiplier;
20
+ usage.cost.cacheRead *= multiplier;
21
+ usage.cost.cacheWrite *= multiplier;
22
+ usage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;
23
+ }
24
+ function getFastModeCostMultiplier2(model) {
25
+ switch (model.api) {
26
+ case "openai-responses":
27
+ case "openai-codex-responses":
28
+ return getServiceTierCostMultiplier(model, "priority");
29
+ case "anthropic-messages":
30
+ return model.provider === "anthropic" ? ANTHROPIC_FAST_MODE_COST_MULTIPLIER2 : undefined;
31
+ default:
32
+ return;
33
+ }
34
+ }
35
+
36
+ export { ANTHROPIC_FAST_MODE_COST_MULTIPLIER2, applyServiceTierPricing2, getFastModeCostMultiplier2 };