@prometheus-ai/ai 0.5.3 → 0.5.8

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 (377) hide show
  1. package/dist/types/auth-broker/remote-store.d.ts +2 -1
  2. package/dist/types/auth-broker/wire-schemas.d.ts +4 -1
  3. package/dist/types/auth-gateway/server.d.ts +19 -0
  4. package/dist/types/auth-gateway/types.d.ts +9 -3
  5. package/dist/types/auth-retry.d.ts +119 -0
  6. package/dist/types/auth-storage.d.ts +217 -8
  7. package/dist/types/errors.d.ts +24 -0
  8. package/dist/types/index.d.ts +5 -9
  9. package/dist/types/provider-details.d.ts +1 -1
  10. package/dist/types/providers/amazon-bedrock.d.ts +12 -6
  11. package/dist/types/providers/anthropic-client.d.ts +10 -3
  12. package/dist/types/providers/anthropic-messages-server-schema.d.ts +2 -2
  13. package/dist/types/providers/anthropic-messages-server.d.ts +3 -3
  14. package/dist/types/providers/anthropic-wire.d.ts +3 -3
  15. package/dist/types/providers/anthropic.d.ts +41 -34
  16. package/dist/types/providers/aws-credentials.d.ts +8 -0
  17. package/dist/types/providers/azure-openai-responses.d.ts +1 -0
  18. package/dist/types/providers/google-gemini-cli.d.ts +22 -1
  19. package/dist/types/providers/google-shared.d.ts +22 -0
  20. package/dist/types/providers/google-types.d.ts +13 -1
  21. package/dist/types/providers/mock.d.ts +8 -3
  22. package/dist/types/providers/ollama.d.ts +6 -0
  23. package/dist/types/providers/openai-chat-server-schema.d.ts +6 -3
  24. package/dist/types/providers/openai-chat-server.d.ts +3 -3
  25. package/dist/types/providers/openai-chat-wire.d.ts +644 -0
  26. package/dist/types/providers/openai-codex/request-transformer.d.ts +8 -0
  27. package/dist/types/providers/openai-codex/response-handler.d.ts +9 -0
  28. package/dist/types/providers/openai-codex-responses.d.ts +31 -2
  29. package/dist/types/providers/openai-completions-compat.d.ts +2 -25
  30. package/dist/types/providers/openai-completions.d.ts +2 -10
  31. package/dist/types/providers/openai-responses-server-schema.d.ts +4 -4
  32. package/dist/types/providers/openai-responses-server.d.ts +2 -2
  33. package/dist/types/providers/openai-responses-shared.d.ts +49 -9
  34. package/dist/types/providers/openai-responses-wire.d.ts +6065 -0
  35. package/dist/types/providers/openai-responses.d.ts +13 -4
  36. package/dist/types/providers/prometheus-native-client.d.ts +9 -0
  37. package/dist/types/providers/prometheus-native-server.d.ts +4 -3
  38. package/dist/types/providers/transform-messages.d.ts +1 -2
  39. package/dist/types/rate-limit-utils.d.ts +3 -2
  40. package/dist/types/registry/aimlapi.d.ts +4 -0
  41. package/dist/types/registry/alibaba-coding-plan.d.ts +7 -0
  42. package/dist/types/registry/amazon-bedrock.d.ts +5 -0
  43. package/dist/types/registry/anthropic.d.ts +10 -0
  44. package/dist/types/{utils/oauth → registry}/api-key-login.d.ts +8 -2
  45. package/dist/types/{utils/oauth → registry}/api-key-validation.d.ts +15 -0
  46. package/dist/types/registry/cerebras.d.ts +7 -0
  47. package/dist/types/registry/cloudflare-ai-gateway.d.ts +13 -0
  48. package/dist/types/registry/cursor.d.ts +7 -0
  49. package/dist/types/registry/deepseek.d.ts +8 -0
  50. package/dist/types/registry/derived.d.ts +5 -0
  51. package/dist/types/registry/firepass.d.ts +16 -0
  52. package/dist/types/registry/fireworks.d.ts +7 -0
  53. package/dist/types/registry/github-copilot.d.ts +7 -0
  54. package/dist/types/registry/gitlab-duo.d.ts +9 -0
  55. package/dist/types/registry/google-antigravity.d.ts +9 -0
  56. package/dist/types/registry/google-gemini-cli.d.ts +9 -0
  57. package/dist/types/registry/google-vertex.d.ts +5 -0
  58. package/dist/types/registry/google.d.ts +4 -0
  59. package/dist/types/registry/groq.d.ts +4 -0
  60. package/dist/types/registry/huggingface.d.ts +7 -0
  61. package/dist/types/registry/index.d.ts +4 -0
  62. package/dist/types/registry/kagi.d.ts +14 -0
  63. package/dist/types/registry/kilo.d.ts +7 -0
  64. package/dist/types/registry/kimi-code.d.ts +7 -0
  65. package/dist/types/registry/litellm.d.ts +13 -0
  66. package/dist/types/registry/lm-studio.d.ts +8 -0
  67. package/dist/types/registry/minimax-code-cn.d.ts +6 -0
  68. package/dist/types/registry/minimax-code.d.ts +6 -0
  69. package/dist/types/registry/minimax.d.ts +4 -0
  70. package/dist/types/registry/mistral.d.ts +4 -0
  71. package/dist/types/registry/moonshot.d.ts +7 -0
  72. package/dist/types/registry/nanogpt.d.ts +7 -0
  73. package/dist/types/registry/nvidia.d.ts +7 -0
  74. package/dist/types/registry/oauth/__tests__/xai-oauth.test.d.ts +1 -0
  75. package/dist/types/{utils → registry}/oauth/anthropic.d.ts +2 -1
  76. package/dist/types/{utils → registry}/oauth/github-copilot.d.ts +15 -23
  77. package/dist/types/{utils → registry}/oauth/index.d.ts +1 -0
  78. package/dist/types/{utils → registry}/oauth/minimax-code.d.ts +5 -5
  79. package/dist/types/{utils → registry}/oauth/types.d.ts +6 -1
  80. package/dist/types/{utils → registry}/oauth/xai-oauth.d.ts +2 -1
  81. package/dist/types/registry/ollama-cloud.d.ts +7 -0
  82. package/dist/types/registry/ollama.d.ts +12 -0
  83. package/dist/types/registry/openai-codex-device.d.ts +8 -0
  84. package/dist/types/registry/openai-codex.d.ts +9 -0
  85. package/dist/types/registry/openai.d.ts +4 -0
  86. package/dist/types/registry/opencode-go.d.ts +6 -0
  87. package/dist/types/registry/opencode-zen.d.ts +6 -0
  88. package/dist/types/registry/openrouter.d.ts +13 -0
  89. package/dist/types/registry/parallel.d.ts +14 -0
  90. package/dist/types/registry/perplexity.d.ts +7 -0
  91. package/dist/types/registry/qianfan.d.ts +7 -0
  92. package/dist/types/registry/qwen-portal.d.ts +7 -0
  93. package/dist/types/registry/registry.d.ts +272 -0
  94. package/dist/types/registry/synthetic.d.ts +6 -0
  95. package/dist/types/registry/tavily.d.ts +14 -0
  96. package/dist/types/registry/together.d.ts +6 -0
  97. package/dist/types/registry/types.d.ts +51 -0
  98. package/dist/types/registry/venice.d.ts +13 -0
  99. package/dist/types/registry/vercel-ai-gateway.d.ts +7 -0
  100. package/dist/types/registry/vllm.d.ts +7 -0
  101. package/dist/types/registry/wafer-pass.d.ts +6 -0
  102. package/dist/types/registry/wafer-serverless.d.ts +6 -0
  103. package/dist/types/registry/xai-oauth.d.ts +7 -0
  104. package/dist/types/registry/xai.d.ts +4 -0
  105. package/dist/types/registry/xiaomi-token-plan-ams.d.ts +6 -0
  106. package/dist/types/registry/xiaomi-token-plan-cn.d.ts +6 -0
  107. package/dist/types/registry/xiaomi-token-plan-sgp.d.ts +6 -0
  108. package/dist/types/registry/xiaomi.d.ts +6 -0
  109. package/dist/types/registry/zai.d.ts +7 -0
  110. package/dist/types/registry/zenmux.d.ts +7 -0
  111. package/dist/types/registry/zhipu-coding-plan.d.ts +7 -0
  112. package/dist/types/stream.d.ts +9 -1
  113. package/dist/types/types.d.ts +56 -295
  114. package/dist/types/usage/google-antigravity.d.ts +15 -1
  115. package/dist/types/usage/openai-codex-reset.d.ts +79 -0
  116. package/dist/types/usage/openai-codex.d.ts +1 -0
  117. package/dist/types/usage.d.ts +77 -4
  118. package/dist/types/utils/abort.d.ts +6 -0
  119. package/dist/types/utils/event-stream.d.ts +2 -0
  120. package/dist/types/utils/http-inspector.d.ts +0 -1
  121. package/dist/types/utils/idle-iterator.d.ts +35 -0
  122. package/dist/types/utils/openai-http.d.ts +58 -0
  123. package/dist/types/utils/request-debug.d.ts +3 -0
  124. package/dist/types/utils/retry-after.d.ts +1 -0
  125. package/dist/types/utils/schema/fields.d.ts +5 -0
  126. package/dist/types/utils/schema/json-schema-validator.d.ts +8 -0
  127. package/dist/types/utils/schema/stamps.d.ts +7 -15
  128. package/dist/types/utils/sse-debug.d.ts +0 -5
  129. package/dist/types/utils/stream-markup-healing.d.ts +2 -0
  130. package/dist/types/utils.d.ts +1 -5
  131. package/package.json +17 -29
  132. package/src/auth-broker/remote-store.ts +10 -1
  133. package/src/auth-broker/snapshot-cache.ts +1 -1
  134. package/src/auth-broker/wire-schemas.ts +1 -1
  135. package/src/auth-gateway/http.ts +1 -1
  136. package/src/auth-gateway/server.ts +95 -30
  137. package/src/auth-gateway/types.ts +10 -2
  138. package/src/auth-retry.ts +238 -0
  139. package/src/auth-storage.ts +935 -430
  140. package/src/errors.ts +32 -0
  141. package/src/index.ts +9 -14
  142. package/src/provider-details.ts +1 -1
  143. package/src/providers/__tests__/google-auth.test.ts +144 -0
  144. package/src/providers/amazon-bedrock.ts +70 -40
  145. package/src/providers/anthropic-client.ts +15 -13
  146. package/src/providers/anthropic-messages-server-schema.ts +17 -7
  147. package/src/providers/anthropic-messages-server.ts +88 -20
  148. package/src/providers/anthropic-wire.ts +4 -3
  149. package/src/providers/anthropic.ts +1234 -621
  150. package/src/providers/aws-credentials.ts +47 -5
  151. package/src/providers/aws-eventstream.ts +5 -0
  152. package/src/providers/azure-openai-responses.ts +117 -67
  153. package/src/providers/cursor.ts +30 -30
  154. package/src/providers/github-copilot-headers.ts +1 -1
  155. package/src/providers/gitlab-duo.ts +36 -29
  156. package/src/providers/google-auth.ts +71 -8
  157. package/src/providers/google-gemini-cli.ts +118 -22
  158. package/src/providers/google-shared.ts +163 -43
  159. package/src/providers/google-types.ts +10 -1
  160. package/src/providers/kimi.ts +1 -1
  161. package/src/providers/mock.ts +11 -3
  162. package/src/providers/ollama.ts +64 -7
  163. package/src/providers/openai-anthropic-shim.ts +17 -8
  164. package/src/providers/openai-chat-server-schema.ts +9 -3
  165. package/src/providers/openai-chat-server.ts +82 -16
  166. package/src/providers/openai-chat-wire.ts +847 -0
  167. package/src/providers/openai-codex/request-transformer.ts +129 -34
  168. package/src/providers/openai-codex/response-handler.ts +22 -1
  169. package/src/providers/openai-codex-responses.ts +699 -247
  170. package/src/providers/openai-completions-compat.ts +8 -308
  171. package/src/providers/openai-completions.ts +416 -267
  172. package/src/providers/openai-responses-server-schema.ts +15 -9
  173. package/src/providers/openai-responses-server.ts +162 -114
  174. package/src/providers/openai-responses-shared.ts +320 -82
  175. package/src/providers/openai-responses-wire.ts +6391 -0
  176. package/src/providers/openai-responses.ts +382 -176
  177. package/src/providers/prometheus-native-client.ts +27 -11
  178. package/src/providers/prometheus-native-server.ts +44 -17
  179. package/src/providers/transform-messages.ts +311 -120
  180. package/src/providers/vision-guard.ts +5 -3
  181. package/src/rate-limit-utils.ts +13 -3
  182. package/src/registry/aimlapi.ts +6 -0
  183. package/src/{utils/oauth → registry}/alibaba-coding-plan.ts +8 -18
  184. package/src/registry/amazon-bedrock.ts +22 -0
  185. package/src/registry/anthropic.ts +26 -0
  186. package/src/{utils/oauth → registry}/api-key-login.ts +25 -3
  187. package/src/{utils/oauth → registry}/api-key-validation.ts +62 -2
  188. package/src/{utils/oauth → registry}/cerebras.ts +8 -1
  189. package/src/{utils/oauth → registry}/cloudflare-ai-gateway.ts +8 -12
  190. package/src/registry/cursor.ts +20 -0
  191. package/src/{utils/oauth → registry}/deepseek.ts +9 -17
  192. package/src/registry/derived.ts +9 -0
  193. package/src/{utils/oauth → registry}/firepass.ts +10 -2
  194. package/src/{utils/oauth → registry}/fireworks.ts +8 -1
  195. package/src/registry/github-copilot.ts +22 -0
  196. package/src/registry/gitlab-duo.ts +19 -0
  197. package/src/registry/google-antigravity.ts +21 -0
  198. package/src/registry/google-gemini-cli.ts +21 -0
  199. package/src/registry/google-vertex.ts +38 -0
  200. package/src/registry/google.ts +6 -0
  201. package/src/registry/groq.ts +6 -0
  202. package/src/{utils/oauth → registry}/huggingface.ts +8 -19
  203. package/src/registry/index.ts +4 -0
  204. package/src/{utils/oauth → registry}/kagi.ts +9 -11
  205. package/src/{utils/oauth → registry}/kilo.ts +11 -6
  206. package/src/registry/kimi-code.ts +17 -0
  207. package/src/{utils/oauth → registry}/litellm.ts +8 -12
  208. package/src/{utils/oauth → registry}/lm-studio.ts +9 -17
  209. package/src/registry/minimax-code-cn.ts +12 -0
  210. package/src/registry/minimax-code.ts +12 -0
  211. package/src/registry/minimax.ts +6 -0
  212. package/src/registry/mistral.ts +6 -0
  213. package/src/{utils/oauth → registry}/moonshot.ts +8 -9
  214. package/src/{utils/oauth → registry}/nanogpt.ts +8 -1
  215. package/src/{utils/oauth → registry}/nvidia.ts +8 -18
  216. package/src/{utils → registry}/oauth/__tests__/xai-oauth.test.ts +4 -7
  217. package/src/{utils → registry}/oauth/anthropic.ts +38 -17
  218. package/src/{utils → registry}/oauth/github-copilot.ts +79 -115
  219. package/src/registry/oauth/gitlab-duo.ts +198 -0
  220. package/src/{utils → registry}/oauth/google-antigravity.ts +1 -4
  221. package/src/{utils → registry}/oauth/google-gemini-cli.ts +1 -4
  222. package/src/registry/oauth/index.ts +164 -0
  223. package/src/{utils → registry}/oauth/minimax-code.ts +16 -14
  224. package/src/{utils → registry}/oauth/types.ts +7 -51
  225. package/src/{utils → registry}/oauth/wafer.ts +1 -1
  226. package/src/{utils → registry}/oauth/xai-oauth.ts +16 -8
  227. package/src/{utils → registry}/oauth/xiaomi.ts +9 -4
  228. package/src/{utils/oauth → registry}/ollama-cloud.ts +8 -1
  229. package/src/{utils/oauth → registry}/ollama.ts +8 -13
  230. package/src/registry/openai-codex-device.ts +18 -0
  231. package/src/registry/openai-codex.ts +19 -0
  232. package/src/registry/openai.ts +6 -0
  233. package/src/registry/opencode-go.ts +12 -0
  234. package/src/registry/opencode-zen.ts +12 -0
  235. package/src/{utils/oauth → registry}/openrouter.ts +10 -2
  236. package/src/{utils/oauth → registry}/parallel.ts +9 -11
  237. package/src/registry/perplexity.ts +13 -0
  238. package/src/{utils/oauth → registry}/qianfan.ts +8 -17
  239. package/src/{utils/oauth → registry}/qwen-portal.ts +8 -19
  240. package/src/registry/registry.ts +149 -0
  241. package/src/{utils/oauth → registry}/synthetic.ts +7 -1
  242. package/src/{utils/oauth → registry}/tavily.ts +10 -12
  243. package/src/{utils/oauth → registry}/together.ts +7 -1
  244. package/src/registry/types.ts +56 -0
  245. package/src/{utils/oauth → registry}/venice.ts +8 -12
  246. package/src/{utils/oauth → registry}/vercel-ai-gateway.ts +8 -18
  247. package/src/{utils/oauth → registry}/vllm.ts +9 -16
  248. package/src/registry/wafer-pass.ts +12 -0
  249. package/src/registry/wafer-serverless.ts +12 -0
  250. package/src/registry/xai-oauth.ts +17 -0
  251. package/src/registry/xai.ts +6 -0
  252. package/src/registry/xiaomi-token-plan-ams.ts +12 -0
  253. package/src/registry/xiaomi-token-plan-cn.ts +12 -0
  254. package/src/registry/xiaomi-token-plan-sgp.ts +12 -0
  255. package/src/registry/xiaomi.ts +12 -0
  256. package/src/{utils/oauth → registry}/zai.ts +10 -22
  257. package/src/{utils/oauth → registry}/zenmux.ts +8 -1
  258. package/src/{utils/oauth/zhipu.ts → registry/zhipu-coding-plan.ts} +9 -21
  259. package/src/stream.ts +229 -199
  260. package/src/types.ts +63 -384
  261. package/src/usage/claude.ts +4 -2
  262. package/src/usage/github-copilot.ts +4 -2
  263. package/src/usage/google-antigravity.ts +196 -28
  264. package/src/usage/kimi.ts +1 -1
  265. package/src/usage/minimax-code.ts +5 -6
  266. package/src/usage/openai-codex-reset.ts +174 -0
  267. package/src/usage/openai-codex.ts +19 -2
  268. package/src/usage/zai.ts +2 -1
  269. package/src/usage.ts +93 -4
  270. package/src/utils/abort.ts +14 -0
  271. package/src/utils/event-stream.ts +17 -0
  272. package/src/utils/http-inspector.ts +4 -12
  273. package/src/utils/idle-iterator.ts +250 -79
  274. package/src/utils/openai-http.ts +157 -0
  275. package/src/utils/request-debug.ts +67 -19
  276. package/src/utils/retry-after.ts +1 -1
  277. package/src/utils/retry.ts +23 -2
  278. package/src/utils/schema/CONSTRAINTS.md +4 -2
  279. package/src/utils/schema/fields.ts +16 -0
  280. package/src/utils/schema/json-schema-validator.ts +19 -1
  281. package/src/utils/schema/normalize.ts +80 -8
  282. package/src/utils/schema/stamps.ts +22 -10
  283. package/src/utils/schema/wire.ts +2 -2
  284. package/src/utils/sse-debug.ts +0 -271
  285. package/src/utils/stream-markup-healing.ts +50 -8
  286. package/src/utils/validation.ts +49 -13
  287. package/src/utils.ts +2 -26
  288. package/dist/types/model-cache.d.ts +0 -17
  289. package/dist/types/model-manager.d.ts +0 -64
  290. package/dist/types/model-thinking.d.ts +0 -100
  291. package/dist/types/models.d.ts +0 -12
  292. package/dist/types/provider-models/bundled-references.d.ts +0 -4
  293. package/dist/types/provider-models/descriptors.d.ts +0 -50
  294. package/dist/types/provider-models/google.d.ts +0 -24
  295. package/dist/types/provider-models/index.d.ts +0 -5
  296. package/dist/types/provider-models/ollama.d.ts +0 -7
  297. package/dist/types/provider-models/openai-compat.d.ts +0 -323
  298. package/dist/types/provider-models/special.d.ts +0 -16
  299. package/dist/types/utils/discovery/antigravity.d.ts +0 -61
  300. package/dist/types/utils/discovery/codex.d.ts +0 -38
  301. package/dist/types/utils/discovery/cursor.d.ts +0 -23
  302. package/dist/types/utils/discovery/gemini.d.ts +0 -25
  303. package/dist/types/utils/discovery/index.d.ts +0 -4
  304. package/dist/types/utils/discovery/openai-compatible.d.ts +0 -72
  305. package/dist/types/utils/oauth/alibaba-coding-plan.d.ts +0 -18
  306. package/dist/types/utils/oauth/cerebras.d.ts +0 -1
  307. package/dist/types/utils/oauth/cloudflare-ai-gateway.d.ts +0 -18
  308. package/dist/types/utils/oauth/deepseek.d.ts +0 -10
  309. package/dist/types/utils/oauth/firepass.d.ts +0 -1
  310. package/dist/types/utils/oauth/fireworks.d.ts +0 -1
  311. package/dist/types/utils/oauth/huggingface.d.ts +0 -19
  312. package/dist/types/utils/oauth/kagi.d.ts +0 -17
  313. package/dist/types/utils/oauth/kilo.d.ts +0 -5
  314. package/dist/types/utils/oauth/litellm.d.ts +0 -18
  315. package/dist/types/utils/oauth/lm-studio.d.ts +0 -17
  316. package/dist/types/utils/oauth/moonshot.d.ts +0 -1
  317. package/dist/types/utils/oauth/nanogpt.d.ts +0 -1
  318. package/dist/types/utils/oauth/nvidia.d.ts +0 -18
  319. package/dist/types/utils/oauth/ollama-cloud.d.ts +0 -2
  320. package/dist/types/utils/oauth/ollama.d.ts +0 -18
  321. package/dist/types/utils/oauth/openrouter.d.ts +0 -1
  322. package/dist/types/utils/oauth/parallel.d.ts +0 -17
  323. package/dist/types/utils/oauth/qianfan.d.ts +0 -17
  324. package/dist/types/utils/oauth/qwen-portal.d.ts +0 -19
  325. package/dist/types/utils/oauth/synthetic.d.ts +0 -1
  326. package/dist/types/utils/oauth/tavily.d.ts +0 -17
  327. package/dist/types/utils/oauth/together.d.ts +0 -1
  328. package/dist/types/utils/oauth/venice.d.ts +0 -18
  329. package/dist/types/utils/oauth/vercel-ai-gateway.d.ts +0 -18
  330. package/dist/types/utils/oauth/vllm.d.ts +0 -16
  331. package/dist/types/utils/oauth/zai.d.ts +0 -18
  332. package/dist/types/utils/oauth/zenmux.d.ts +0 -1
  333. package/dist/types/utils/oauth/zhipu.d.ts +0 -18
  334. package/src/model-cache.ts +0 -129
  335. package/src/model-manager.ts +0 -469
  336. package/src/model-thinking.ts +0 -756
  337. package/src/models.json +0 -60287
  338. package/src/models.json.d.ts +0 -9
  339. package/src/models.ts +0 -56
  340. package/src/provider-models/bundled-references.ts +0 -38
  341. package/src/provider-models/descriptors.ts +0 -364
  342. package/src/provider-models/google.ts +0 -88
  343. package/src/provider-models/index.ts +0 -5
  344. package/src/provider-models/ollama.ts +0 -153
  345. package/src/provider-models/openai-compat.ts +0 -2904
  346. package/src/provider-models/special.ts +0 -67
  347. package/src/utils/discovery/antigravity.ts +0 -261
  348. package/src/utils/discovery/codex.ts +0 -371
  349. package/src/utils/discovery/cursor.ts +0 -306
  350. package/src/utils/discovery/gemini.ts +0 -248
  351. package/src/utils/discovery/index.ts +0 -4
  352. package/src/utils/discovery/openai-compatible.ts +0 -224
  353. package/src/utils/oauth/gitlab-duo.ts +0 -123
  354. package/src/utils/oauth/index.ts +0 -502
  355. /package/dist/types/{utils/oauth/__tests__/xai-oauth.test.d.ts → providers/__tests__/google-auth.test.d.ts} +0 -0
  356. /package/dist/types/{utils → registry}/oauth/callback-server.d.ts +0 -0
  357. /package/dist/types/{utils → registry}/oauth/cursor.d.ts +0 -0
  358. /package/dist/types/{utils → registry}/oauth/gitlab-duo.d.ts +0 -0
  359. /package/dist/types/{utils → registry}/oauth/google-antigravity.d.ts +0 -0
  360. /package/dist/types/{utils → registry}/oauth/google-gemini-cli.d.ts +0 -0
  361. /package/dist/types/{utils → registry}/oauth/google-oauth-shared.d.ts +0 -0
  362. /package/dist/types/{utils → registry}/oauth/kimi.d.ts +0 -0
  363. /package/dist/types/{utils → registry}/oauth/openai-codex.d.ts +0 -0
  364. /package/dist/types/{utils → registry}/oauth/opencode.d.ts +0 -0
  365. /package/dist/types/{utils → registry}/oauth/perplexity.d.ts +0 -0
  366. /package/dist/types/{utils → registry}/oauth/pkce.d.ts +0 -0
  367. /package/dist/types/{utils → registry}/oauth/wafer.d.ts +0 -0
  368. /package/dist/types/{utils → registry}/oauth/xiaomi.d.ts +0 -0
  369. /package/src/{utils → registry}/oauth/callback-server.ts +0 -0
  370. /package/src/{utils → registry}/oauth/cursor.ts +0 -0
  371. /package/src/{utils → registry}/oauth/google-oauth-shared.ts +0 -0
  372. /package/src/{utils → registry}/oauth/kimi.ts +0 -0
  373. /package/src/{utils → registry}/oauth/oauth.html +0 -0
  374. /package/src/{utils → registry}/oauth/openai-codex.ts +0 -0
  375. /package/src/{utils → registry}/oauth/opencode.ts +0 -0
  376. /package/src/{utils → registry}/oauth/perplexity.ts +0 -0
  377. /package/src/{utils → registry}/oauth/pkce.ts +0 -0
@@ -1,61 +0,0 @@
1
- import type { Model } from "../../types";
2
- /**
3
- * Raw model metadata returned by Antigravity's `fetchAvailableModels` endpoint.
4
- */
5
- export interface AntigravityDiscoveryApiModel {
6
- displayName?: string;
7
- supportsImages?: boolean;
8
- supportsThinking?: boolean;
9
- thinkingBudget?: number;
10
- recommended?: boolean;
11
- maxTokens?: number;
12
- maxOutputTokens?: number;
13
- model?: string;
14
- apiProvider?: string;
15
- modelProvider?: string;
16
- isInternal?: boolean;
17
- supportsVideo?: boolean;
18
- }
19
- /**
20
- * Grouping metadata used by Antigravity to surface recommended model ids.
21
- */
22
- export interface AntigravityDiscoveryAgentModelGroup {
23
- modelIds?: string[];
24
- }
25
- /**
26
- * Sort/group metadata used by Antigravity to surface recommended model ids.
27
- */
28
- export interface AntigravityDiscoveryAgentModelSort {
29
- groups?: AntigravityDiscoveryAgentModelGroup[];
30
- }
31
- /**
32
- * Response payload returned by Antigravity's `fetchAvailableModels` endpoint.
33
- */
34
- export interface AntigravityDiscoveryApiResponse {
35
- models?: Record<string, AntigravityDiscoveryApiModel>;
36
- agentModelSorts?: AntigravityDiscoveryAgentModelSort[];
37
- }
38
- /**
39
- * Options for fetching Antigravity discovery models.
40
- */
41
- export interface FetchAntigravityDiscoveryModelsOptions {
42
- /** OAuth access token used as `Authorization: Bearer <token>`. */
43
- token: string;
44
- /** Optional endpoint override. Defaults to Antigravity fallback endpoints. */
45
- endpoint?: string;
46
- /** Deprecated and ignored for antigravity discovery parity. */
47
- project?: string;
48
- /** Optional user agent override. */
49
- userAgent?: string;
50
- /** Optional abort signal for request cancellation. */
51
- signal?: AbortSignal;
52
- /** Optional fetch implementation override for tests. */
53
- fetcher?: typeof fetch;
54
- }
55
- /**
56
- * Fetches discoverable Antigravity models and normalizes them into canonical model entries.
57
- *
58
- * Returns `null` on network/payload/auth failures.
59
- * Returns `[]` only when the endpoint responds successfully with no usable models.
60
- */
61
- export declare function fetchAntigravityDiscoveryModels(options: FetchAntigravityDiscoveryModelsOptions): Promise<Model<"google-gemini-cli">[] | null>;
@@ -1,38 +0,0 @@
1
- import type { Model } from "../../types";
2
- /**
3
- * Fetch options for OpenAI Codex model discovery.
4
- */
5
- export interface CodexModelDiscoveryOptions {
6
- /** OAuth access token used for `Authorization: Bearer ...`. */
7
- accessToken: string;
8
- /** ChatGPT account id value used for `chatgpt-account-id` header. */
9
- accountId?: string;
10
- /** Base URL for Codex backend. Defaults to `https://chatgpt.com/backend-api`. */
11
- baseUrl?: string;
12
- /** Optional client version attached as `client_version` query parameter. */
13
- clientVersion?: string;
14
- /** Optional endpoint path candidates. Defaults to `/codex/models`, then `/models`. */
15
- paths?: readonly string[];
16
- /** Additional headers merged on top of required Codex headers. */
17
- headers?: Record<string, string>;
18
- /** Abort signal for network request cancellation. */
19
- signal?: AbortSignal;
20
- /** Optional fetch implementation override for tests. */
21
- fetchFn?: typeof fetch;
22
- /** Optional registry fetch implementation override for client version lookup. */
23
- registryFetchFn?: typeof fetch;
24
- }
25
- /**
26
- * Normalized Codex discovery response.
27
- */
28
- export interface CodexModelDiscoveryResult {
29
- models: Model<"openai-codex-responses">[];
30
- etag?: string;
31
- }
32
- /**
33
- * Fetches model metadata from Codex backend and normalizes it for pi model management.
34
- *
35
- * Returns `null` when no supported model-list route can be fetched/parsed.
36
- * Returns `{ models: [] }` when a route succeeds but yields no usable models.
37
- */
38
- export declare function fetchCodexModels(options: CodexModelDiscoveryOptions): Promise<CodexModelDiscoveryResult | null>;
@@ -1,23 +0,0 @@
1
- import type { Model } from "../../types";
2
- /**
3
- * Options for fetching dynamic Cursor models from `GetUsableModels`.
4
- */
5
- export interface CursorModelDiscoveryOptions {
6
- /** Cursor access token used for bearer authentication. */
7
- apiKey: string;
8
- /** Optional Cursor API base URL override. */
9
- baseUrl?: string;
10
- /** Optional client version override sent as `x-cursor-client-version`. */
11
- clientVersion?: string;
12
- /** Optional request timeout in milliseconds. */
13
- timeoutMs?: number;
14
- /** Optional list of custom Cursor model ids to include in request context. */
15
- customModelIds?: string[];
16
- }
17
- /**
18
- * Fetches Cursor models through `GetUsableModels` and normalizes them into canonical model entries.
19
- *
20
- * Returns `null` on request/decode failures.
21
- * Returns `[]` only when the endpoint responds successfully with no usable models.
22
- */
23
- export declare function fetchCursorUsableModels(options: CursorModelDiscoveryOptions): Promise<Model<"cursor-agent">[] | null>;
@@ -1,25 +0,0 @@
1
- import type { Model } from "../../types";
2
- /**
3
- * Configuration for Google Generative AI model discovery.
4
- */
5
- export interface GeminiDiscoveryOptions {
6
- /** API key for the Google Generative AI public endpoint. */
7
- apiKey: string;
8
- /** Optional endpoint override for testing or proxying. */
9
- baseUrl?: string;
10
- /** Optional requested page size for model listing. */
11
- pageSize?: number;
12
- /** Maximum number of pages to request before stopping pagination. */
13
- maxPages?: number;
14
- /** Optional abort signal for HTTP requests. */
15
- signal?: AbortSignal;
16
- /** Optional fetch implementation override for tests. */
17
- fetch?: typeof fetch;
18
- }
19
- /**
20
- * Fetches and normalizes Google Generative AI models from the public models endpoint.
21
- *
22
- * Returns `null` on transport/protocol failures.
23
- * Returns `[]` only when the endpoint responds successfully with no usable models.
24
- */
25
- export declare function fetchGeminiModels(options: GeminiDiscoveryOptions): Promise<Model<"google-generative-ai">[] | null>;
@@ -1,4 +0,0 @@
1
- export * from "./antigravity";
2
- export * from "./codex";
3
- export * from "./gemini";
4
- export * from "./openai-compatible";
@@ -1,72 +0,0 @@
1
- import type { Api, Model, Provider } from "../../types";
2
- /**
3
- * Minimal OpenAI-style model entry shape consumed by discovery.
4
- *
5
- * Providers may return additional fields; this type only captures
6
- * fields that are useful for generic normalization.
7
- */
8
- export interface OpenAICompatibleModelRecord {
9
- id?: unknown;
10
- name?: unknown;
11
- object?: unknown;
12
- owned_by?: unknown;
13
- [key: string]: unknown;
14
- }
15
- /**
16
- * Tolerant envelope for OpenAI-compatible `/models` responses.
17
- *
18
- * Common providers return `{ data: [...] }`, but variants such as
19
- * `{ models: [...] }`, `{ result: [...] }`, or direct arrays are also
20
- * accepted during extraction.
21
- */
22
- export interface OpenAICompatibleModelsEnvelope {
23
- data?: unknown;
24
- models?: unknown;
25
- result?: unknown;
26
- items?: unknown;
27
- [key: string]: unknown;
28
- }
29
- /**
30
- * Context passed to custom OpenAI-compatible model mappers.
31
- */
32
- export interface OpenAICompatibleModelMapperContext<TApi extends Api> {
33
- api: TApi;
34
- provider: Provider;
35
- baseUrl: string;
36
- }
37
- /**
38
- * Options for fetching and normalizing OpenAI-compatible `/models` catalogs.
39
- */
40
- export interface FetchOpenAICompatibleModelsOptions<TApi extends Api> {
41
- /** API type assigned to normalized models. */
42
- api: TApi;
43
- /** Provider id assigned to normalized models. */
44
- provider: Provider;
45
- /** Provider base URL used for both fetch and normalized model records. */
46
- baseUrl: string;
47
- /** Optional bearer token for Authorization header. */
48
- apiKey?: string;
49
- /** Additional request headers. */
50
- headers?: Record<string, string>;
51
- /** Optional AbortSignal for request cancellation. */
52
- signal?: AbortSignal;
53
- /** Optional fetch implementation override for testing/custom runtimes. */
54
- fetch?: typeof globalThis.fetch;
55
- /**
56
- * Optional post-normalization filter.
57
- * Return false to skip a model.
58
- */
59
- filterModel?: (entry: OpenAICompatibleModelRecord, model: Model<TApi>) => boolean;
60
- /**
61
- * Optional mapper override for provider-specific quirks.
62
- * Return null to skip a model.
63
- */
64
- mapModel?: (entry: OpenAICompatibleModelRecord, defaults: Model<TApi>, context: OpenAICompatibleModelMapperContext<TApi>) => Model<TApi> | null;
65
- }
66
- /**
67
- * Fetches and normalizes an OpenAI-compatible `/models` catalog.
68
- *
69
- * Returns `null` on transport/protocol failures.
70
- * Returns `[]` only when the endpoint responds successfully with no usable models.
71
- */
72
- export declare function fetchOpenAICompatibleModels<TApi extends Api>(options: FetchOpenAICompatibleModelsOptions<TApi>): Promise<Model<TApi>[] | null>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Alibaba Coding Plan login flow.
3
- *
4
- * Alibaba Coding Plan provides OpenAI-compatible models via https://coding-intl.dashscope.aliyuncs.com/v1.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open browser to Alibaba Cloud DashScope API key settings
8
- * 2. User copies their API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Alibaba Coding Plan.
14
- *
15
- * Opens browser to API keys page, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginAlibabaCodingPlan(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginCerebras: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Cloudflare AI Gateway login flow.
3
- *
4
- * Cloudflare AI Gateway proxies upstream model providers.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open Cloudflare AI Gateway docs/dashboard
8
- * 2. User copies their Cloudflare AI Gateway token/API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Cloudflare AI Gateway.
14
- *
15
- * Opens browser to Cloudflare AI Gateway authentication docs and prompts for a gateway token/API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginCloudflareAiGateway(options: OAuthController): Promise<string>;
@@ -1,10 +0,0 @@
1
- import type { OAuthController } from "./types";
2
- /**
3
- * Normalize a pasted DeepSeek API key.
4
- *
5
- * Users frequently copy keys out of `curl` snippets that include the
6
- * `Authorization: Bearer …` prefix. Strip it so validation does not fail
7
- * with a confusing 401, and reject obviously empty input early.
8
- */
9
- export declare function normalizeDeepSeekApiKey(raw: string): string;
10
- export declare const loginDeepSeek: (options: OAuthController) => Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginFirepass: (options: import("./types").OAuthController) => Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginFireworks: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,19 +0,0 @@
1
- /**
2
- * Hugging Face Inference login flow.
3
- *
4
- * Hugging Face Inference Providers expose an OpenAI-compatible endpoint via
5
- * https://router.huggingface.co/v1.
6
- *
7
- * This is an API key flow:
8
- * 1. Open browser to Hugging Face token settings
9
- * 2. User creates/copies a token with Inference Providers permission
10
- * 3. User pastes the token into the CLI
11
- */
12
- import type { OAuthController } from "./types";
13
- /**
14
- * Login to Hugging Face Inference Providers.
15
- *
16
- * Opens browser to token settings, prompts user to paste their API key.
17
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
18
- */
19
- export declare function loginHuggingface(options: OAuthController): Promise<string>;
@@ -1,17 +0,0 @@
1
- /**
2
- * Kagi login flow.
3
- *
4
- * Kagi web search uses an API key from the account settings page.
5
- * This is an API key flow:
6
- * 1. Open browser to Kagi API settings
7
- * 2. User copies API key
8
- * 3. User pastes key into CLI
9
- */
10
- import type { OAuthController } from "./types";
11
- /**
12
- * Login to Kagi.
13
- *
14
- * Opens browser to API settings and prompts user to paste their API key.
15
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
16
- */
17
- export declare function loginKagi(options: OAuthController): Promise<string>;
@@ -1,5 +0,0 @@
1
- import type { OAuthController, OAuthCredentials } from "./types";
2
- /**
3
- * Login with Kilo Gateway OAuth (device code flow).
4
- */
5
- export declare function loginKilo(callbacks: OAuthController): Promise<OAuthCredentials>;
@@ -1,18 +0,0 @@
1
- /**
2
- * LiteLLM login flow.
3
- *
4
- * LiteLLM is an OpenAI-compatible proxy that routes requests to many upstream providers.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open browser to LiteLLM docs/dashboard
8
- * 2. User copies their LiteLLM API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to LiteLLM.
14
- *
15
- * Opens browser to LiteLLM setup docs, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginLiteLLM(options: OAuthController): Promise<string>;
@@ -1,17 +0,0 @@
1
- /**
2
- * LM Studio login flow.
3
- *
4
- * LM Studio provides an OpenAI-compatible API at a local base URL.
5
- * It usually runs unauthenticated but can be configured to require a bearer token.
6
- *
7
- * This flow stores an API-key-style credential used by `/login` and auth storage.
8
- */
9
- import type { OAuthController } from "./types";
10
- export declare const DEFAULT_LOCAL_TOKEN = "lm-studio-local";
11
- /**
12
- * Login to LM Studio.
13
- *
14
- * Opens LM Studio API docs, prompts for an optional token,
15
- * and returns a stored key value.
16
- */
17
- export declare function loginLmStudio(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginMoonshot: (options: import("./types").OAuthController) => Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginNanoGPT: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * NVIDIA login flow.
3
- *
4
- * NVIDIA provides OpenAI-compatible models via https://integrate.api.nvidia.com/v1.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open browser to NVIDIA NGC catalog
8
- * 2. User copies their API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to NVIDIA.
14
- *
15
- * Opens browser to NVIDIA dashboard, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginNvidia(options: OAuthController): Promise<string>;
@@ -1,2 +0,0 @@
1
- import type { OAuthController } from "./types";
2
- export declare function loginOllamaCloud(options: OAuthController): Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Ollama login flow.
3
- *
4
- * Ollama is typically used locally without authentication, but some hosted
5
- * deployments require a bearer token/API key.
6
- *
7
- * This flow is API-key based (not OAuth):
8
- * 1. Optionally open Ollama docs
9
- * 2. Prompt user for API key/token (optional)
10
- * 3. Persist key only when provided
11
- */
12
- import type { OAuthController } from "./types";
13
- /**
14
- * Login to Ollama.
15
- *
16
- * Returns a trimmed API key/token string. Empty string means local no-auth mode.
17
- */
18
- export declare function loginOllama(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginOpenRouter: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,17 +0,0 @@
1
- /**
2
- * Parallel login flow.
3
- *
4
- * Parallel uses an API key from the account settings page.
5
- * This is an API key flow:
6
- * 1. Open browser to Parallel API key settings
7
- * 2. User copies API key
8
- * 3. User pastes key into the CLI/TUI
9
- */
10
- import type { OAuthController } from "./types";
11
- /**
12
- * Login to Parallel.
13
- *
14
- * Opens browser to the API keys page, prompts the user to paste their API key,
15
- * and returns the API key directly.
16
- */
17
- export declare function loginParallel(options: OAuthController): Promise<string>;
@@ -1,17 +0,0 @@
1
- /**
2
- * Qianfan login flow.
3
- *
4
- * Qianfan provides an OpenAI-compatible API endpoint.
5
- * Login is API-key based:
6
- * 1. Open browser to Qianfan API key console
7
- * 2. User copies API key
8
- * 3. User pastes key into CLI prompt
9
- */
10
- import type { OAuthController } from "./types";
11
- /**
12
- * Login to Qianfan.
13
- *
14
- * Opens browser to API key page, prompts user to paste their API key.
15
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
16
- */
17
- export declare function loginQianfan(options: OAuthController): Promise<string>;
@@ -1,19 +0,0 @@
1
- /**
2
- * Qwen Portal login flow.
3
- *
4
- * Qwen Portal exposes an OpenAI-compatible endpoint at https://portal.qwen.ai/v1
5
- * and accepts OAuth bearer tokens or API keys.
6
- *
7
- * This is a token/API-key flow:
8
- * 1. Open Qwen Portal
9
- * 2. Copy either your OAuth token or API key
10
- * 3. Paste it into the CLI
11
- */
12
- import type { OAuthController } from "./types";
13
- /**
14
- * Login to Qwen Portal.
15
- *
16
- * Prompts for either `QWEN_OAUTH_TOKEN` or `QWEN_PORTAL_API_KEY` value.
17
- * Returns the value directly (stored as api_key credential in auth storage).
18
- */
19
- export declare function loginQwenPortal(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginSynthetic: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,17 +0,0 @@
1
- /**
2
- * Tavily login flow.
3
- *
4
- * Tavily web search uses an API key from the account settings page.
5
- * This is an API key flow:
6
- * 1. Open browser to Tavily settings
7
- * 2. User copies API key
8
- * 3. User pastes key into CLI
9
- */
10
- import type { OAuthController } from "./types";
11
- /**
12
- * Login to Tavily.
13
- *
14
- * Opens browser to API keys page and prompts user to paste their API key.
15
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
16
- */
17
- export declare function loginTavily(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginTogether: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Venice login flow.
3
- *
4
- * Venice provides OpenAI-compatible models via https://api.venice.ai/api/v1.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open browser to Venice API key settings
8
- * 2. User copies their API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Venice.
14
- *
15
- * Opens browser to API keys page, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginVenice(options: OAuthController): Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Vercel AI Gateway login flow.
3
- *
4
- * Vercel AI Gateway proxies upstream model providers through a unified endpoint.
5
- *
6
- * This is not OAuth - it's a simple API key flow:
7
- * 1. Open Vercel AI Gateway docs
8
- * 2. User copies their API key
9
- * 3. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Vercel AI Gateway.
14
- *
15
- * Opens browser to Vercel AI Gateway docs and prompts for an API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginVercelAiGateway(options: OAuthController): Promise<string>;
@@ -1,16 +0,0 @@
1
- /**
2
- * vLLM login flow.
3
- *
4
- * vLLM is commonly self-hosted with an OpenAI-compatible API at a local base URL.
5
- * Some deployments require a bearer token, others allow unauthenticated access.
6
- *
7
- * This flow stores an API-key-style credential used by `/login` and auth storage.
8
- */
9
- import type { OAuthController } from "./types";
10
- /**
11
- * Login to vLLM.
12
- *
13
- * Opens vLLM OpenAI-compatible auth docs, prompts for an optional token,
14
- * and returns a stored key value.
15
- */
16
- export declare function loginVllm(options: OAuthController): Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Z.AI login flow.
3
- *
4
- * Z.AI is a platform that provides access to GLM models through an OpenAI-compatible API.
5
- * API docs: https://docs.z.ai/guides/overview/quick-start
6
- *
7
- * This is not OAuth - it's a simple API key flow:
8
- * 1. User gets their API key from https://z.ai/settings/api-keys
9
- * 2. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Z.AI.
14
- *
15
- * Opens browser to API keys page, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginZai(options: OAuthController): Promise<string>;
@@ -1 +0,0 @@
1
- export declare const loginZenMux: (options: import("./types").OAuthController) => Promise<string>;
@@ -1,18 +0,0 @@
1
- /**
2
- * Zhipu Coding Plan login flow.
3
- *
4
- * GLM Coding Plan provides an OpenAI-compatible API on the dedicated coding
5
- * endpoint. API docs: https://docs.bigmodel.cn/cn/coding-plan/quick-start
6
- *
7
- * Simple API key flow:
8
- * 1. User gets a Coding Plan API key from https://bigmodel.cn/coding-plan/personal/overview
9
- * 2. User pastes the API key into the CLI
10
- */
11
- import type { OAuthController } from "./types";
12
- /**
13
- * Login to Zhipu Coding Plan.
14
- *
15
- * Opens browser to API keys page, prompts user to paste their API key.
16
- * Returns the API key directly (not OAuthCredentials - this isn't OAuth).
17
- */
18
- export declare function loginZhipuCodingPlan(options: OAuthController): Promise<string>;