cartethyia 2.6.7 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/.env.example +106 -113
  2. package/dist/dashboard/assets/{BannedPage-Dskhyp0l.js → BannedPage-P76QLGJA.js} +1 -1
  3. package/dist/dashboard/assets/BannedPage-P76QLGJA.js.gz +0 -0
  4. package/dist/dashboard/assets/{CliToolDetailPage--SJhk7qQ.js → CliToolDetailPage-DdBggJS9.js} +1 -1
  5. package/dist/dashboard/assets/CliToolDetailPage-DdBggJS9.js.gz +0 -0
  6. package/dist/dashboard/assets/{CliToolsPage-C203VT-c.js → CliToolsPage-aN1iXhhP.js} +1 -1
  7. package/dist/dashboard/assets/CliToolsPage-aN1iXhhP.js.gz +0 -0
  8. package/dist/dashboard/assets/{CombosPage-BcS7kGG1.js → CombosPage-DE-F1nxZ.js} +1 -1
  9. package/dist/dashboard/assets/CombosPage-DE-F1nxZ.js.gz +0 -0
  10. package/dist/dashboard/assets/{ConsoleLogPage-ChmiSLwO.js → ConsoleLogPage-5SpmfLyw.js} +1 -1
  11. package/dist/dashboard/assets/ConsoleLogPage-5SpmfLyw.js.gz +0 -0
  12. package/dist/dashboard/assets/{CustomizationPage-uujbBYwC.js → CustomizationPage-3CUxMy2X.js} +1 -1
  13. package/dist/dashboard/assets/CustomizationPage-3CUxMy2X.js.gz +0 -0
  14. package/dist/dashboard/assets/{HealthEventsModal-fKAWd-OQ.js → HealthEventsModal-BkmJQKC0.js} +1 -1
  15. package/dist/dashboard/assets/HealthEventsModal-BkmJQKC0.js.gz +0 -0
  16. package/dist/dashboard/assets/{LoginPage-DoOUthbG.js → LoginPage-B_0FUKWc.js} +1 -1
  17. package/dist/dashboard/assets/LoginPage-B_0FUKWc.js.gz +0 -0
  18. package/dist/dashboard/assets/{ModelPicker-CA1kLs45.js → ModelPicker-DKVslqG3.js} +1 -1
  19. package/dist/dashboard/assets/ModelPicker-DKVslqG3.js.gz +0 -0
  20. package/dist/dashboard/assets/OverviewPage-D-H4MEiT.js +1 -0
  21. package/dist/dashboard/assets/OverviewPage-D-H4MEiT.js.gz +0 -0
  22. package/dist/dashboard/assets/{ProviderDetailPage-CFu1qGcT.js → ProviderDetailPage-CEJw6Guo.js} +3 -3
  23. package/dist/dashboard/assets/ProviderDetailPage-CEJw6Guo.js.gz +0 -0
  24. package/dist/dashboard/assets/{ProvidersPage-CnlJZbxF.js → ProvidersPage-CEplAR-i.js} +1 -1
  25. package/dist/dashboard/assets/ProvidersPage-CEplAR-i.js.gz +0 -0
  26. package/dist/dashboard/assets/{ProxyPage-B9mBTweh.js → ProxyPage-CAN7hy0f.js} +1 -1
  27. package/dist/dashboard/assets/ProxyPage-CAN7hy0f.js.gz +0 -0
  28. package/dist/dashboard/assets/{QuotaPage-BueSWX5D.js → QuotaPage-BjldQwIU.js} +1 -1
  29. package/dist/dashboard/assets/QuotaPage-BjldQwIU.js.gz +0 -0
  30. package/dist/dashboard/assets/SettingsPage-DUIoLRxk.js +1 -0
  31. package/dist/dashboard/assets/SettingsPage-DUIoLRxk.js.gz +0 -0
  32. package/dist/dashboard/assets/{SetupPage-DQ9oDRpi.js → SetupPage-_bCaTM0v.js} +1 -1
  33. package/dist/dashboard/assets/SetupPage-_bCaTM0v.js.gz +0 -0
  34. package/dist/dashboard/assets/{SortableList-DrKeMcGN.js → SortableList-fI7JkdIB.js} +1 -1
  35. package/dist/dashboard/assets/SortableList-fI7JkdIB.js.gz +0 -0
  36. package/dist/dashboard/assets/{StudioPage-qjuYtccc.js → StudioPage-CHVZqskZ.js} +1 -1
  37. package/dist/dashboard/assets/StudioPage-CHVZqskZ.js.gz +0 -0
  38. package/dist/dashboard/assets/UsagePage-DiFBymHj.js +56 -0
  39. package/dist/dashboard/assets/UsagePage-DiFBymHj.js.gz +0 -0
  40. package/dist/dashboard/assets/{api-keys-C23S9sgp.js → api-keys-DFY_fZU4.js} +1 -1
  41. package/dist/dashboard/assets/api-keys-DFY_fZU4.js.gz +0 -0
  42. package/dist/dashboard/assets/app-BOJ1_xUB.css +2 -0
  43. package/dist/dashboard/assets/app-BOJ1_xUB.css.gz +0 -0
  44. package/dist/dashboard/assets/{assert-DU6qrMA_.js → assert-CwdnZARt.js} +1 -1
  45. package/dist/dashboard/assets/assert-CwdnZARt.js.gz +0 -0
  46. package/dist/dashboard/assets/{badge-Bkz_-RrM.js → badge-Dr-uf0Au.js} +1 -1
  47. package/dist/dashboard/assets/badge-Dr-uf0Au.js.gz +0 -0
  48. package/dist/dashboard/assets/{banner-C-7y3VKV.js → banner-BddmMdoS.js} +1 -1
  49. package/dist/dashboard/assets/banner-BddmMdoS.js.gz +0 -0
  50. package/dist/dashboard/assets/{card-BOPBuBzD.js → card-CK0PXWlX.js} +1 -1
  51. package/dist/dashboard/assets/card-CK0PXWlX.js.gz +0 -0
  52. package/dist/dashboard/assets/{cli-tools-BaFUuFFF.js → cli-tools-CcB6mGh2.js} +1 -1
  53. package/dist/dashboard/assets/cli-tools-CcB6mGh2.js.gz +0 -0
  54. package/dist/dashboard/assets/{clipboard-button-e-Mlk0FH.js → clipboard-button-DGb2P9Yx.js} +1 -1
  55. package/dist/dashboard/assets/clipboard-button-DGb2P9Yx.js.gz +0 -0
  56. package/dist/dashboard/assets/{dialog-Iec_ywbD.js → dialog-LkfuL50u.js} +1 -1
  57. package/dist/dashboard/assets/dialog-LkfuL50u.js.gz +0 -0
  58. package/dist/dashboard/assets/{drawer-Bs8MIIHc.js → drawer-ZbEZ_84c.js} +1 -1
  59. package/dist/dashboard/assets/drawer-ZbEZ_84c.js.gz +0 -0
  60. package/dist/dashboard/assets/{entry-DcobaKFu.js → entry-BJfsVMvA.js} +1 -1
  61. package/dist/dashboard/assets/entry-BJfsVMvA.js.gz +0 -0
  62. package/dist/dashboard/assets/{entry-DOddwoc0.js → entry-CWBY5A0f.js} +3 -3
  63. package/dist/dashboard/assets/entry-CWBY5A0f.js.gz +0 -0
  64. package/dist/dashboard/assets/{entry-BRszm4_Z.js → entry-CvC1-Zqx.js} +1 -1
  65. package/dist/dashboard/assets/entry-CvC1-Zqx.js.gz +0 -0
  66. package/dist/dashboard/assets/{github-badge-BuDsrsPn.js → github-badge-BxpznFLt.js} +1 -1
  67. package/dist/dashboard/assets/github-badge-BxpznFLt.js.gz +0 -0
  68. package/dist/dashboard/assets/{index-BeLRhsmt.js → index-CDzP3ovJ.js} +2 -2
  69. package/dist/dashboard/assets/index-CDzP3ovJ.js.gz +0 -0
  70. package/dist/dashboard/assets/{inline-DToMICwl.js → inline-Ae13MQ5w.js} +1 -1
  71. package/dist/dashboard/assets/inline-Ae13MQ5w.js.gz +0 -0
  72. package/dist/dashboard/assets/{input-WlyHWeG2.js → input-D23fo7cp.js} +1 -1
  73. package/dist/dashboard/assets/input-D23fo7cp.js.gz +0 -0
  74. package/dist/dashboard/assets/{layout-DaJ5baJr.js → layout-CSsxjj5P.js} +1 -1
  75. package/dist/dashboard/assets/layout-CSsxjj5P.js.gz +0 -0
  76. package/dist/dashboard/assets/{list-row-B3oSK13z.js → list-row-dmbwZMDY.js} +1 -1
  77. package/dist/dashboard/assets/list-row-dmbwZMDY.js.gz +0 -0
  78. package/dist/dashboard/assets/{live-ta6GMb-8.js → live-BG1oUsZZ.js} +1 -1
  79. package/dist/dashboard/assets/live-BG1oUsZZ.js.gz +0 -0
  80. package/dist/dashboard/assets/minimize-2-D-MN8W8a.js +1 -0
  81. package/dist/dashboard/assets/minimize-2-D-MN8W8a.js.gz +0 -0
  82. package/dist/dashboard/assets/{mutation-g_fduiNw.js → mutation-DSF-e4ho.js} +1 -1
  83. package/dist/dashboard/assets/mutation-DSF-e4ho.js.gz +0 -0
  84. package/dist/dashboard/assets/{numbers-Dulqgys5.js → numbers-Bm_aECY7.js} +1 -1
  85. package/dist/dashboard/assets/{numbers-Dulqgys5.js.gz → numbers-Bm_aECY7.js.gz} +0 -0
  86. package/dist/dashboard/assets/{query-keys-UETqfytp.js → query-keys-CF56nYIV.js} +1 -1
  87. package/dist/dashboard/assets/query-keys-CF56nYIV.js.gz +0 -0
  88. package/dist/dashboard/assets/{routing-BPUo-W8d.js → routing-CeA71n7G.js} +1 -1
  89. package/dist/dashboard/assets/routing-CeA71n7G.js.gz +0 -0
  90. package/dist/dashboard/assets/{select-BfZ3SCTM.js → select-KIT0rC6G.js} +1 -1
  91. package/dist/dashboard/assets/select-KIT0rC6G.js.gz +0 -0
  92. package/dist/dashboard/assets/settings-B_2gkePf.js +1 -0
  93. package/dist/dashboard/assets/settings-B_2gkePf.js.gz +0 -0
  94. package/dist/dashboard/assets/{stack-B1w5BM0u.js → stack-D7WOSzcX.js} +1 -1
  95. package/dist/dashboard/assets/stack-D7WOSzcX.js.gz +0 -0
  96. package/dist/dashboard/assets/{state-DhZBfWgx.js → state-BBxtKZOQ.js} +1 -1
  97. package/dist/dashboard/assets/state-BBxtKZOQ.js.gz +0 -0
  98. package/dist/dashboard/assets/{switch-yD7D99Lg.js → switch-DNS_D5Ea.js} +1 -1
  99. package/dist/dashboard/assets/switch-DNS_D5Ea.js.gz +0 -0
  100. package/dist/dashboard/assets/{useMutation-EDFRkn1i.js → useMutation-BgoxdoMk.js} +1 -1
  101. package/dist/dashboard/assets/useMutation-BgoxdoMk.js.gz +0 -0
  102. package/dist/dashboard/index.html +1 -1
  103. package/dist/dashboard/index.html.gz +0 -0
  104. package/dist/dashboard/precompressed-assets.json +51 -51
  105. package/package.json +96 -96
  106. package/src/boot/app.ts +714 -722
  107. package/src/boot/dependencies.ts +729 -750
  108. package/src/config/resources.ts +70 -137
  109. package/src/config/security.ts +37 -73
  110. package/src/config/spec.ts +358 -378
  111. package/src/console/console-router.ts +225 -233
  112. package/src/console/domain-registration.ts +381 -391
  113. package/src/console/remote-support/contracts.ts +3 -1
  114. package/src/console/remote-support/service.ts +115 -6
  115. package/src/main.ts +167 -169
  116. package/src/observability/metrics.ts +467 -457
  117. package/src/observability/runtime-metrics.ts +269 -254
  118. package/src/protocol/gateway-error.ts +232 -233
  119. package/src/providers/integrations/commandcode/commandcode.ts +134 -104
  120. package/src/providers/integrations/commandcode/discovery.ts +6 -5
  121. package/src/providers/integrations/qoder/qoder.ts +597 -23
  122. package/src/security/abuse.ts +17 -0
  123. package/src/transport/guards/auth-guard.ts +109 -127
  124. package/src/transport/guards/pipeline.ts +220 -226
  125. package/src/transport/guards/request-context.ts +238 -318
  126. package/src/transport/request/inflight.ts +21 -2
  127. package/dist/dashboard/assets/BannedPage-Dskhyp0l.js.gz +0 -0
  128. package/dist/dashboard/assets/CliToolDetailPage--SJhk7qQ.js.gz +0 -0
  129. package/dist/dashboard/assets/CliToolsPage-C203VT-c.js.gz +0 -0
  130. package/dist/dashboard/assets/CombosPage-BcS7kGG1.js.gz +0 -0
  131. package/dist/dashboard/assets/ConsoleLogPage-ChmiSLwO.js.gz +0 -0
  132. package/dist/dashboard/assets/CustomizationPage-uujbBYwC.js.gz +0 -0
  133. package/dist/dashboard/assets/HealthEventsModal-fKAWd-OQ.js.gz +0 -0
  134. package/dist/dashboard/assets/LoginPage-DoOUthbG.js.gz +0 -0
  135. package/dist/dashboard/assets/ModelPicker-CA1kLs45.js.gz +0 -0
  136. package/dist/dashboard/assets/OverviewPage-C5Z-UBz1.js +0 -1
  137. package/dist/dashboard/assets/OverviewPage-C5Z-UBz1.js.gz +0 -0
  138. package/dist/dashboard/assets/ProviderDetailPage-CFu1qGcT.js.gz +0 -0
  139. package/dist/dashboard/assets/ProvidersPage-CnlJZbxF.js.gz +0 -0
  140. package/dist/dashboard/assets/ProxyPage-B9mBTweh.js.gz +0 -0
  141. package/dist/dashboard/assets/QuotaPage-BueSWX5D.js.gz +0 -0
  142. package/dist/dashboard/assets/SettingsPage-B0x00MVY.js +0 -1
  143. package/dist/dashboard/assets/SettingsPage-B0x00MVY.js.gz +0 -0
  144. package/dist/dashboard/assets/SetupPage-DQ9oDRpi.js.gz +0 -0
  145. package/dist/dashboard/assets/SortableList-DrKeMcGN.js.gz +0 -0
  146. package/dist/dashboard/assets/StudioPage-qjuYtccc.js.gz +0 -0
  147. package/dist/dashboard/assets/UsagePage-Be7aNviQ.js +0 -56
  148. package/dist/dashboard/assets/UsagePage-Be7aNviQ.js.gz +0 -0
  149. package/dist/dashboard/assets/api-keys-C23S9sgp.js.gz +0 -0
  150. package/dist/dashboard/assets/app-BUSiYL6F.css +0 -2
  151. package/dist/dashboard/assets/app-BUSiYL6F.css.gz +0 -0
  152. package/dist/dashboard/assets/assert-DU6qrMA_.js.gz +0 -0
  153. package/dist/dashboard/assets/badge-Bkz_-RrM.js.gz +0 -0
  154. package/dist/dashboard/assets/banner-C-7y3VKV.js.gz +0 -0
  155. package/dist/dashboard/assets/card-BOPBuBzD.js.gz +0 -0
  156. package/dist/dashboard/assets/cli-tools-BaFUuFFF.js.gz +0 -0
  157. package/dist/dashboard/assets/clipboard-button-e-Mlk0FH.js.gz +0 -0
  158. package/dist/dashboard/assets/dialog-Iec_ywbD.js.gz +0 -0
  159. package/dist/dashboard/assets/drawer-Bs8MIIHc.js.gz +0 -0
  160. package/dist/dashboard/assets/entry-BRszm4_Z.js.gz +0 -0
  161. package/dist/dashboard/assets/entry-DOddwoc0.js.gz +0 -0
  162. package/dist/dashboard/assets/entry-DcobaKFu.js.gz +0 -0
  163. package/dist/dashboard/assets/github-badge-BuDsrsPn.js.gz +0 -0
  164. package/dist/dashboard/assets/index-BeLRhsmt.js.gz +0 -0
  165. package/dist/dashboard/assets/inline-DToMICwl.js.gz +0 -0
  166. package/dist/dashboard/assets/input-WlyHWeG2.js.gz +0 -0
  167. package/dist/dashboard/assets/layout-DaJ5baJr.js.gz +0 -0
  168. package/dist/dashboard/assets/list-row-B3oSK13z.js.gz +0 -0
  169. package/dist/dashboard/assets/live-ta6GMb-8.js.gz +0 -0
  170. package/dist/dashboard/assets/model-bans-BmYTmbAk.js +0 -1
  171. package/dist/dashboard/assets/model-bans-BmYTmbAk.js.gz +0 -0
  172. package/dist/dashboard/assets/mutation-g_fduiNw.js.gz +0 -0
  173. package/dist/dashboard/assets/query-keys-UETqfytp.js.gz +0 -0
  174. package/dist/dashboard/assets/routing-BPUo-W8d.js.gz +0 -0
  175. package/dist/dashboard/assets/select-BfZ3SCTM.js.gz +0 -0
  176. package/dist/dashboard/assets/settings--3hxSyry.js +0 -1
  177. package/dist/dashboard/assets/settings--3hxSyry.js.gz +0 -0
  178. package/dist/dashboard/assets/stack-B1w5BM0u.js.gz +0 -0
  179. package/dist/dashboard/assets/state-DhZBfWgx.js.gz +0 -0
  180. package/dist/dashboard/assets/switch-yD7D99Lg.js.gz +0 -0
  181. package/dist/dashboard/assets/useMutation-EDFRkn1i.js.gz +0 -0
  182. package/src/console/admin/model-abuse/contracts.ts +0 -38
  183. package/src/console/admin/model-abuse/routes.ts +0 -97
  184. package/src/security/model-abuse.ts +0 -704
  185. package/src/transport/guards/concurrency-guard.ts +0 -125
  186. /package/dist/dashboard/assets/{app-MdVfwraB.js → app-CaXZ9SCn.js} +0 -0
  187. /package/dist/dashboard/assets/{app-MdVfwraB.js.gz → app-CaXZ9SCn.js.gz} +0 -0
@@ -1,5 +1,6 @@
1
1
  // Factory-blocked (Phase C4): proprietary `{threadId, config, params}`
2
2
  // envelope with NDJSON stream transform — non-OpenAI wire; stays bespoke.
3
+ import { randomUUID } from "node:crypto";
3
4
  import { GatewayError } from "../../../protocol/gateway-error";
4
5
  import { canContainToolResult, joinTextParts, toolCallParts, toolResultParts } from "../../../protocol/canonical-model";
5
6
  import {
@@ -21,6 +22,21 @@ import {
21
22
  import { MimoThinkSplitter } from "../xiaomi-mimo/think-stream";
22
23
  export const COMMANDCODE_PROVIDER_ID = "commandcode" as const;
23
24
  export const COMMANDCODE_BASE_URL = providerBaseUrl("commandcode");
25
+ /**
26
+ * The host alone. `/provider/v1` (the catalog base) is a sibling of the
27
+ * generate surface, so dispatch resolves paths against the host instead:
28
+ * appending `/alpha/generate` to `/provider/v1` produced a URL that is
29
+ * neither surface.
30
+ */
31
+ export const COMMANDCODE_HOST = "https://api.commandcode.ai" as const;
32
+ /**
33
+ * The CLI's generate surface, and the one the reference client calls for every
34
+ * model — it does not vary the path by the wire family a model row declares.
35
+ * A completion dispatched to `/provider/v1/<wire>` was reaching the catalog
36
+ * surface, which serves `GET /models` and is not what the CLI calls to
37
+ * generate.
38
+ */
39
+ export const COMMANDCODE_GENERATE_PATH = "/alpha/generate" as const;
24
40
  /** The three routes the Provider API serves, one per wire family. */
25
41
  export const COMMANDCODE_CHAT_PATH = "/chat/completions" as const;
26
42
  export const COMMANDCODE_RESPONSES_PATH = "/responses" as const;
@@ -43,101 +59,101 @@ export const COMMANDCODE_MESSAGES_PATH = "/messages" as const;
43
59
  * rather than lingering as a card that can only ever fail.
44
60
  */
45
61
  export const COMMANDCODE_MODELS: readonly ModelDefinition[] = [
46
- defineModel({ id: "MiniMaxAI/MiniMax-M2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
47
- defineModel({ id: "MiniMaxAI/MiniMax-M2.7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
48
- defineModel({ id: "MiniMaxAI/MiniMax-M3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
49
- defineModel({ id: "Qwen/Qwen3.6-Max-Preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
50
- defineModel({ id: "Qwen/Qwen3.6-Plus", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
51
- defineModel({ id: "Qwen/Qwen3.7-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
52
- defineModel({ id: "Qwen/Qwen3.7-Max", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
53
- defineModel({ id: "Qwen/Qwen3.7-Plus", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
54
- defineModel({ id: "Qwen/Qwen3.8-27B", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 262144, reasoning: true, toolCall: true, vision: true }),
55
- defineModel({ id: "Qwen/Qwen3.8-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
56
- defineModel({ id: "Qwen/Qwen3.8-Max", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
57
- defineModel({ id: "Qwen/Qwen3.8-Max-0902", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
58
- defineModel({ id: "Qwen/Qwen3.8-Max-Prime", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
59
- defineModel({ id: "Qwen/Qwen3.8-Omni-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
60
- defineModel({ id: "claude-fable-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
61
- defineModel({ id: "claude-fable-5-1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
62
- defineModel({ id: "claude-haiku-4-5-20251001", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
63
- defineModel({ id: "claude-haiku-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
64
- defineModel({ id: "claude-opus-4-7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
65
- defineModel({ id: "claude-opus-4-8", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
66
- defineModel({ id: "claude-opus-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
67
- defineModel({ id: "claude-opus-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
68
- defineModel({ id: "claude-sonnet-4-6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
69
- defineModel({ id: "claude-sonnet-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
70
- defineModel({ id: "claude-sonnet-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: "/messages", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
71
- defineModel({ id: "deepseek/deepseek-v4-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
72
- defineModel({ id: "deepseek/deepseek-v4-flash-fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
73
- defineModel({ id: "deepseek/deepseek-v4-flash-vision-exp", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
74
- defineModel({ id: "deepseek/deepseek-v4-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
75
- defineModel({ id: "deepseek/deepseek-v4.1-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
76
- defineModel({ id: "deepseek/deepseek-v4.1-flash-fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
77
- defineModel({ id: "google/gemini-3.1-flash-lite", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
78
- defineModel({ id: "google/gemini-3.5-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
79
- defineModel({ id: "google/gemini-3.5-flash-lite", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
80
- defineModel({ id: "google/gemini-3.6-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
81
- defineModel({ id: "google/gemini-3.7-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
82
- defineModel({ id: "google/gemini-3.8-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
83
- defineModel({ id: "google/gemini-4-argon", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
84
- defineModel({ id: "gpt-5.3-codex", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 400000, reasoning: true, toolCall: true, vision: true }),
85
- defineModel({ id: "gpt-5.4", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 400000, reasoning: true, toolCall: true, vision: true }),
86
- defineModel({ id: "gpt-5.4-mini", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 400000, reasoning: true, toolCall: true, vision: true }),
87
- defineModel({ id: "gpt-5.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 400000, reasoning: true, toolCall: true, vision: true }),
88
- defineModel({ id: "gpt-5.6-luna", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
89
- defineModel({ id: "gpt-5.6-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
90
- defineModel({ id: "gpt-5.6-terra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
91
- defineModel({ id: "gpt-6-astra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
92
- defineModel({ id: "gpt-6-luna", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
93
- defineModel({ id: "gpt-6-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
94
- defineModel({ id: "gpt-6.1-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
95
- defineModel({ id: "inclusionai/ling-3.1-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 262144, reasoning: true, toolCall: true, vision: true }),
96
- defineModel({ id: "meituan/LongCat-2.0", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
97
- defineModel({ id: "meta/muse-spark-1.1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
98
- defineModel({ id: "meta/muse-spark-1.2", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
99
- defineModel({ id: "meta/muse-spark-1.2-contributor", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
100
- defineModel({ id: "meta/muse-spark-1.3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
101
- defineModel({ id: "meta/muse-spark-1.3-contributor", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
102
- defineModel({ id: "meta/muse-spark-open", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
103
- defineModel({ id: "meta/muse-wonder-1.0", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
104
- defineModel({ id: "minimax/minimax-m3.1-flash-preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
105
- defineModel({ id: "minimax/minimax-m3.1-flash-preview:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
106
- defineModel({ id: "mistral/mistral-large-4", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 524288, reasoning: true, toolCall: true, vision: true }),
107
- defineModel({ id: "moonshotai/Kimi-K2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
108
- defineModel({ id: "moonshotai/Kimi-K2.6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
109
- defineModel({ id: "moonshotai/Kimi-K2.7-Code", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
110
- defineModel({ id: "moonshotai/Kimi-K2.7-Code-Highspeed", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 262000, reasoning: true, toolCall: true, vision: true }),
111
- defineModel({ id: "moonshotai/Kimi-K3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
112
- defineModel({ id: "nvidia/nemotron-3-ultra-550b-a55b", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
113
- defineModel({ id: "nvidia/nemotron-3.5-super-vl", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 262144, reasoning: true, toolCall: true, vision: true }),
114
- defineModel({ id: "poolside/laguna-s-2.1-free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
115
- defineModel({ id: "reflection/beam:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
116
- defineModel({ id: "sakana/fugu-ultra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
117
- defineModel({ id: "stealth/cat-jam:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
118
- defineModel({ id: "stealth/glyph-cluster:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
119
- defineModel({ id: "stepfun/Step-3.5-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 262144, reasoning: true, toolCall: true, vision: true }),
120
- defineModel({ id: "stepfun/Step-3.7-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
121
- defineModel({ id: "stepfun/Step-5-Preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
122
- defineModel({ id: "tencent/hy3-paid", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 262144, reasoning: true, toolCall: true, vision: true }),
123
- defineModel({ id: "tencent/hy4-preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
124
- defineModel({ id: "thinkingmachines/inkling", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 256000, reasoning: true, toolCall: true, vision: true }),
125
- defineModel({ id: "thinkingmachines/inkling-small", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
126
- defineModel({ id: "xai/grok-4.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 500000, reasoning: true, toolCall: true, vision: true }),
127
- defineModel({ id: "xai/grok-4.6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 500000, reasoning: true, toolCall: true, vision: true }),
128
- defineModel({ id: "xai/grok-4.7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 500000, reasoning: true, toolCall: true, vision: true }),
129
- defineModel({ id: "xiaomi/mimo-v2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
130
- defineModel({ id: "xiaomi/mimo-v2.5-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
131
- defineModel({ id: "xiaomi/mimo-v2.6-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
132
- defineModel({ id: "xiaomi/mimo-v2.6-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
133
- defineModel({ id: "xiaomi/mimo-v2.6-pro-ultraspeed", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
134
- defineModel({ id: "z-ai/glm-5.3-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: "/chat/completions", ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
135
- defineModel({ id: "z-ai/glm-5.3-flashx", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
136
- defineModel({ id: "zai-org/GLM-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
137
- defineModel({ id: "zai-org/GLM-5.1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 200000, reasoning: true, toolCall: true, vision: true }),
138
- defineModel({ id: "zai-org/GLM-5.2", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
139
- defineModel({ id: "zai-org/GLM-5.2-Fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
140
- defineModel({ id: "zai-org/GLM-5.3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: "/responses", ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
62
+ defineModel({ id: "MiniMaxAI/MiniMax-M2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
63
+ defineModel({ id: "MiniMaxAI/MiniMax-M2.7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
64
+ defineModel({ id: "MiniMaxAI/MiniMax-M3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
65
+ defineModel({ id: "Qwen/Qwen3.6-Max-Preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
66
+ defineModel({ id: "Qwen/Qwen3.6-Plus", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
67
+ defineModel({ id: "Qwen/Qwen3.7-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
68
+ defineModel({ id: "Qwen/Qwen3.7-Max", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
69
+ defineModel({ id: "Qwen/Qwen3.7-Plus", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
70
+ defineModel({ id: "Qwen/Qwen3.8-27B", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262144, reasoning: true, toolCall: true, vision: true }),
71
+ defineModel({ id: "Qwen/Qwen3.8-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
72
+ defineModel({ id: "Qwen/Qwen3.8-Max", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
73
+ defineModel({ id: "Qwen/Qwen3.8-Max-0902", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
74
+ defineModel({ id: "Qwen/Qwen3.8-Max-Prime", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
75
+ defineModel({ id: "Qwen/Qwen3.8-Omni-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
76
+ defineModel({ id: "claude-fable-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
77
+ defineModel({ id: "claude-fable-5-1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
78
+ defineModel({ id: "claude-haiku-4-5-20251001", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
79
+ defineModel({ id: "claude-haiku-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
80
+ defineModel({ id: "claude-opus-4-7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
81
+ defineModel({ id: "claude-opus-4-8", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
82
+ defineModel({ id: "claude-opus-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
83
+ defineModel({ id: "claude-opus-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
84
+ defineModel({ id: "claude-sonnet-4-6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
85
+ defineModel({ id: "claude-sonnet-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
86
+ defineModel({ id: "claude-sonnet-5-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "messages", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
87
+ defineModel({ id: "deepseek/deepseek-v4-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
88
+ defineModel({ id: "deepseek/deepseek-v4-flash-fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
89
+ defineModel({ id: "deepseek/deepseek-v4-flash-vision-exp", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
90
+ defineModel({ id: "deepseek/deepseek-v4-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
91
+ defineModel({ id: "deepseek/deepseek-v4.1-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
92
+ defineModel({ id: "deepseek/deepseek-v4.1-flash-fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
93
+ defineModel({ id: "google/gemini-3.1-flash-lite", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
94
+ defineModel({ id: "google/gemini-3.5-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
95
+ defineModel({ id: "google/gemini-3.5-flash-lite", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
96
+ defineModel({ id: "google/gemini-3.6-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
97
+ defineModel({ id: "google/gemini-3.7-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
98
+ defineModel({ id: "google/gemini-3.8-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
99
+ defineModel({ id: "google/gemini-4-argon", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
100
+ defineModel({ id: "gpt-5.3-codex", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 400000, reasoning: true, toolCall: true, vision: true }),
101
+ defineModel({ id: "gpt-5.4", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 400000, reasoning: true, toolCall: true, vision: true }),
102
+ defineModel({ id: "gpt-5.4-mini", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 400000, reasoning: true, toolCall: true, vision: true }),
103
+ defineModel({ id: "gpt-5.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 400000, reasoning: true, toolCall: true, vision: true }),
104
+ defineModel({ id: "gpt-5.6-luna", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
105
+ defineModel({ id: "gpt-5.6-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
106
+ defineModel({ id: "gpt-5.6-terra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
107
+ defineModel({ id: "gpt-6-astra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
108
+ defineModel({ id: "gpt-6-luna", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
109
+ defineModel({ id: "gpt-6-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
110
+ defineModel({ id: "gpt-6.1-sol", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1050000, reasoning: true, toolCall: true, vision: true }),
111
+ defineModel({ id: "inclusionai/ling-3.1-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262144, reasoning: true, toolCall: true, vision: true }),
112
+ defineModel({ id: "meituan/LongCat-2.0", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
113
+ defineModel({ id: "meta/muse-spark-1.1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
114
+ defineModel({ id: "meta/muse-spark-1.2", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
115
+ defineModel({ id: "meta/muse-spark-1.2-contributor", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
116
+ defineModel({ id: "meta/muse-spark-1.3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
117
+ defineModel({ id: "meta/muse-spark-1.3-contributor", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
118
+ defineModel({ id: "meta/muse-spark-open", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
119
+ defineModel({ id: "meta/muse-wonder-1.0", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
120
+ defineModel({ id: "minimax/minimax-m3.1-flash-preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
121
+ defineModel({ id: "minimax/minimax-m3.1-flash-preview:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
122
+ defineModel({ id: "mistral/mistral-large-4", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 524288, reasoning: true, toolCall: true, vision: true }),
123
+ defineModel({ id: "moonshotai/Kimi-K2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
124
+ defineModel({ id: "moonshotai/Kimi-K2.6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
125
+ defineModel({ id: "moonshotai/Kimi-K2.7-Code", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
126
+ defineModel({ id: "moonshotai/Kimi-K2.7-Code-Highspeed", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262000, reasoning: true, toolCall: true, vision: true }),
127
+ defineModel({ id: "moonshotai/Kimi-K3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
128
+ defineModel({ id: "nvidia/nemotron-3-ultra-550b-a55b", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
129
+ defineModel({ id: "nvidia/nemotron-3.5-super-vl", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262144, reasoning: true, toolCall: true, vision: true }),
130
+ defineModel({ id: "poolside/laguna-s-2.1-free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
131
+ defineModel({ id: "reflection/beam:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
132
+ defineModel({ id: "sakana/fugu-ultra", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
133
+ defineModel({ id: "stealth/cat-jam:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
134
+ defineModel({ id: "stealth/glyph-cluster:free", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
135
+ defineModel({ id: "stepfun/Step-3.5-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262144, reasoning: true, toolCall: true, vision: true }),
136
+ defineModel({ id: "stepfun/Step-3.7-Flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
137
+ defineModel({ id: "stepfun/Step-5-Preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
138
+ defineModel({ id: "tencent/hy3-paid", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 262144, reasoning: true, toolCall: true, vision: true }),
139
+ defineModel({ id: "tencent/hy4-preview", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
140
+ defineModel({ id: "thinkingmachines/inkling", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 256000, reasoning: true, toolCall: true, vision: true }),
141
+ defineModel({ id: "thinkingmachines/inkling-small", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
142
+ defineModel({ id: "xai/grok-4.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 500000, reasoning: true, toolCall: true, vision: true }),
143
+ defineModel({ id: "xai/grok-4.6", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 500000, reasoning: true, toolCall: true, vision: true }),
144
+ defineModel({ id: "xai/grok-4.7", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 500000, reasoning: true, toolCall: true, vision: true }),
145
+ defineModel({ id: "xiaomi/mimo-v2.5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
146
+ defineModel({ id: "xiaomi/mimo-v2.5-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
147
+ defineModel({ id: "xiaomi/mimo-v2.6-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
148
+ defineModel({ id: "xiaomi/mimo-v2.6-pro", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
149
+ defineModel({ id: "xiaomi/mimo-v2.6-pro-ultraspeed", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
150
+ defineModel({ id: "z-ai/glm-5.3-flash", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "chat", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1048576, reasoning: true, toolCall: true, vision: true }),
151
+ defineModel({ id: "z-ai/glm-5.3-flashx", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
152
+ defineModel({ id: "zai-org/GLM-5", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
153
+ defineModel({ id: "zai-org/GLM-5.1", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 200000, reasoning: true, toolCall: true, vision: true }),
154
+ defineModel({ id: "zai-org/GLM-5.2", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
155
+ defineModel({ id: "zai-org/GLM-5.2-Fast", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
156
+ defineModel({ id: "zai-org/GLM-5.3", providerId: COMMANDCODE_PROVIDER_ID, wireFamily: "responses", endpoint: COMMANDCODE_GENERATE_PATH, ctx: 1000000, reasoning: true, toolCall: true, vision: true }),
141
157
  ];
142
158
 
143
159
 
@@ -615,11 +631,13 @@ export async function* transformNdjson(body: ReadableStream<Uint8Array>, signal:
615
631
  // ProviderAdapter — the Provider API serves three wires, so dispatch is the
616
632
  // shared OpenAI-compatible adapter rather than one bespoke NDJSON reader.
617
633
  //
618
- // `/provider/v1` answers `/chat/completions`, `/responses` and `/messages`, and
619
- // the model row states which one serves it. The bespoke `/alpha/generate`
620
- // envelope is the CLI's own surface and stays reachable through
621
- // `buildRequest` for callers that still speak it, while routing follows the
622
- // wire each model row declares rather than forcing every model onto it.
634
+ // Generation goes to `/alpha/generate` for every model: that is the CLI's own
635
+ // surface and the one the reference client calls, and it does not vary the path
636
+ // by the wire a model row declares. `/provider/v1` is the catalog surface — it
637
+ // answers `GET /models`, which discovery still uses — so a completion posted to
638
+ // `/provider/v1/<wire>` was reaching a surface the CLI never calls to
639
+ // generate. The wire family still decides how the body is shaped; only the
640
+ // endpoint is shared.
623
641
 
624
642
  interface CommandCodeAdapterOptions {
625
643
  readonly fetch?: typeof fetch;
@@ -632,6 +650,11 @@ function commandCodeIdentityHeaders(_token: string): Record<string, string> {
632
650
  "x-taste-learning": "true",
633
651
  "x-project-slug": "cartethyia",
634
652
  "user-agent": "cli",
653
+ // Per-request, as the CLI client sends it. The upstream expects a session
654
+ // id on every generate call and the reference client mints a fresh UUID
655
+ // for each one; sending a constant correlated requests that had nothing
656
+ // to do with each other.
657
+ "x-session-id": randomUUID(),
635
658
  };
636
659
  }
637
660
 
@@ -639,11 +662,18 @@ function providerApiAdapter(options: CommandCodeAdapterOptions): ProviderAdapter
639
662
  return createApiKeyAdapter(
640
663
  {
641
664
  provider_id: COMMANDCODE_PROVIDER_ID,
642
- base_url: COMMANDCODE_BASE_URL,
665
+ // The host, not the `/provider/v1` base: generation is a sibling
666
+ // surface, so every wire resolves under the host and the path below
667
+ // supplies the CLI endpoint. Nesting it under `/provider/v1` produced a
668
+ // URL that is neither surface.
669
+ base_url: COMMANDCODE_HOST,
643
670
  endpoint_paths_by_wire_family: {
644
- chat: COMMANDCODE_CHAT_PATH,
645
- responses: COMMANDCODE_RESPONSES_PATH,
646
- messages: COMMANDCODE_MESSAGES_PATH,
671
+ // Every wire, not one per family: the reference client sends all
672
+ // generation to `/alpha/generate` regardless of the row's declared
673
+ // wire, so dispatch must not fan out across three paths.
674
+ chat: COMMANDCODE_GENERATE_PATH,
675
+ responses: COMMANDCODE_GENERATE_PATH,
676
+ messages: COMMANDCODE_GENERATE_PATH,
647
677
  },
648
678
  buildExtraHeaders: async (context: ProviderDispatchContext) =>
649
679
  commandCodeIdentityHeaders(await readCredentialSecret(context.credential, "Command Code bearer token is required")),
@@ -30,14 +30,13 @@ import { isRecord } from "../../../protocol/codecs";
30
30
  import { boundedUpstreamNumber, sanitizeUpstreamLabel } from "../../provider-sanitize";
31
31
  import type { ProviderModelDiscovery } from "../../discovery/discovery-types";
32
32
  import { defineModel } from "../../provider-model-definition";
33
- import { COMMANDCODE_PROVIDER_ID } from "./commandcode";
33
+ import { COMMANDCODE_GENERATE_PATH, COMMANDCODE_PROVIDER_ID } from "./commandcode";
34
34
 
35
35
  /** The Provider API's OpenAI-shaped model listing. */
36
36
  export const COMMANDCODE_MODELS_PATH = "/models" as const;
37
37
 
38
38
  /** The route that selects the OpenAI Responses wire when a model lists it. */
39
39
  const RESPONSES_ENDPOINT = "/responses" as const;
40
- const ANTHROPIC_MESSAGES_ENDPOINT = "/messages" as const;
41
40
 
42
41
  const MAX_CONTEXT = 1_000_000_000;
43
42
 
@@ -54,12 +53,14 @@ export function commandCodeWireFor(
54
53
  supportedEndpoints?: readonly string[],
55
54
  ): { readonly wireFamily: "messages" | "responses" | "chat"; readonly endpointPath: string } {
56
55
  if (modelId.startsWith("claude-")) {
57
- return { wireFamily: "messages", endpointPath: ANTHROPIC_MESSAGES_ENDPOINT };
56
+ // The wire family still decides how the body is shaped; only the endpoint
57
+ // is the CLI's, for every row. See `COMMANDCODE_GENERATE_PATH`.
58
+ return { wireFamily: "messages", endpointPath: COMMANDCODE_GENERATE_PATH };
58
59
  }
59
60
  if (supportedEndpoints?.includes(RESPONSES_ENDPOINT)) {
60
- return { wireFamily: "responses", endpointPath: RESPONSES_ENDPOINT };
61
+ return { wireFamily: "responses", endpointPath: COMMANDCODE_GENERATE_PATH };
61
62
  }
62
- return { wireFamily: "chat", endpointPath: "/chat/completions" };
63
+ return { wireFamily: "chat", endpointPath: COMMANDCODE_GENERATE_PATH };
63
64
  }
64
65
 
65
66
  /** Reads `supported_endpoints` tolerantly — unknown rows keep the chat wire. */