codex-multi-auth 2.17.2 → 2.18.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 (405) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/README.md +86 -425
  3. package/config/README.md +1 -1
  4. package/config/codex-legacy.json +12 -212
  5. package/config/codex-modern.json +4 -80
  6. package/config/minimal-codex.json +1 -1
  7. package/dist/index.d.ts +0 -1
  8. package/dist/lib/account-policy.d.ts +18 -2
  9. package/dist/lib/account-policy.js +97 -40
  10. package/dist/lib/accounts/rate-limits.d.ts +0 -1
  11. package/dist/lib/accounts.d.ts +0 -1
  12. package/dist/lib/accounts.js +4 -5
  13. package/dist/lib/api-route-store.d.ts +0 -1
  14. package/dist/lib/audit.d.ts +0 -1
  15. package/dist/lib/audit.js +43 -12
  16. package/dist/lib/auth/account-access.d.ts +0 -1
  17. package/dist/lib/auth/account-access.js +5 -1
  18. package/dist/lib/auth/auth.d.ts +4 -3
  19. package/dist/lib/auth/auth.js +220 -28
  20. package/dist/lib/auth/browser.d.ts +0 -1
  21. package/dist/lib/auth/callback-guidance.d.ts +0 -1
  22. package/dist/lib/auth/device-auth.d.ts +0 -1
  23. package/dist/lib/auth/index.d.ts +0 -1
  24. package/dist/lib/auth/org-override.d.ts +0 -1
  25. package/dist/lib/auth/server.d.ts +1 -2
  26. package/dist/lib/auth/server.js +100 -53
  27. package/dist/lib/auth/token-utils.d.ts +0 -1
  28. package/dist/lib/auth-rate-limit.d.ts +0 -1
  29. package/dist/lib/budget-guard.d.ts +16 -2
  30. package/dist/lib/budget-guard.js +123 -43
  31. package/dist/lib/capability-policy.d.ts +0 -1
  32. package/dist/lib/circuit-breaker.d.ts +20 -1
  33. package/dist/lib/circuit-breaker.js +24 -5
  34. package/dist/lib/cli.d.ts +0 -1
  35. package/dist/lib/codex-cli/index.d.ts +0 -1
  36. package/dist/lib/codex-cli/observability.d.ts +0 -1
  37. package/dist/lib/codex-cli/state.d.ts +0 -1
  38. package/dist/lib/codex-cli/sync.d.ts +0 -1
  39. package/dist/lib/codex-cli/writer.d.ts +0 -1
  40. package/dist/lib/codex-manager/account-credentials.d.ts +0 -1
  41. package/dist/lib/codex-manager/account-manager-commands.d.ts +0 -1
  42. package/dist/lib/codex-manager/account-pool-write.d.ts +0 -1
  43. package/dist/lib/codex-manager/active-account-sync.d.ts +6 -0
  44. package/dist/lib/codex-manager/active-account-sync.js +336 -0
  45. package/dist/lib/codex-manager/api-login-menu.d.ts +0 -1
  46. package/dist/lib/codex-manager/backend-category-entry.d.ts +0 -1
  47. package/dist/lib/codex-manager/backend-category-helpers.d.ts +0 -1
  48. package/dist/lib/codex-manager/backend-category-prompt.d.ts +0 -1
  49. package/dist/lib/codex-manager/backend-settings-controller.d.ts +0 -1
  50. package/dist/lib/codex-manager/backend-settings-entry.d.ts +0 -1
  51. package/dist/lib/codex-manager/backend-settings-helpers.d.ts +0 -1
  52. package/dist/lib/codex-manager/backend-settings-prompt.d.ts +0 -1
  53. package/dist/lib/codex-manager/backend-settings-schema.d.ts +0 -1
  54. package/dist/lib/codex-manager/behavior-settings-panel.d.ts +0 -1
  55. package/dist/lib/codex-manager/commands/account.d.ts +8 -3
  56. package/dist/lib/codex-manager/commands/account.js +46 -34
  57. package/dist/lib/codex-manager/commands/best.d.ts +0 -1
  58. package/dist/lib/codex-manager/commands/bridge.d.ts +0 -1
  59. package/dist/lib/codex-manager/commands/budget.d.ts +8 -3
  60. package/dist/lib/codex-manager/commands/budget.js +6 -4
  61. package/dist/lib/codex-manager/commands/check.d.ts +0 -1
  62. package/dist/lib/codex-manager/commands/config-explain.d.ts +0 -1
  63. package/dist/lib/codex-manager/commands/debug-bundle.d.ts +0 -1
  64. package/dist/lib/codex-manager/commands/forecast.d.ts +0 -1
  65. package/dist/lib/codex-manager/commands/history.d.ts +0 -1
  66. package/dist/lib/codex-manager/commands/init-config.d.ts +0 -1
  67. package/dist/lib/codex-manager/commands/integrations.d.ts +0 -1
  68. package/dist/lib/codex-manager/commands/limits.d.ts +0 -1
  69. package/dist/lib/codex-manager/commands/models.d.ts +0 -1
  70. package/dist/lib/codex-manager/commands/monitor.d.ts +0 -1
  71. package/dist/lib/codex-manager/commands/report.d.ts +0 -1
  72. package/dist/lib/codex-manager/commands/resets.d.ts +0 -1
  73. package/dist/lib/codex-manager/commands/resets.js +9 -1
  74. package/dist/lib/codex-manager/commands/rotation.d.ts +0 -1
  75. package/dist/lib/codex-manager/commands/status.d.ts +0 -1
  76. package/dist/lib/codex-manager/commands/switch.d.ts +0 -1
  77. package/dist/lib/codex-manager/commands/uninstall.d.ts +0 -1
  78. package/dist/lib/codex-manager/commands/unpin.d.ts +0 -1
  79. package/dist/lib/codex-manager/commands/usage.d.ts +0 -1
  80. package/dist/lib/codex-manager/commands/verify.d.ts +0 -1
  81. package/dist/lib/codex-manager/commands/why-selected.d.ts +0 -1
  82. package/dist/lib/codex-manager/commands/workspace.d.ts +0 -1
  83. package/dist/lib/codex-manager/dashboard-display-panel.d.ts +0 -1
  84. package/dist/lib/codex-manager/dashboard-formatters.d.ts +0 -1
  85. package/dist/lib/codex-manager/dashboard-settings-controller.d.ts +0 -1
  86. package/dist/lib/codex-manager/dashboard-settings-data.d.ts +0 -1
  87. package/dist/lib/codex-manager/dashboard-settings-entry.d.ts +0 -1
  88. package/dist/lib/codex-manager/experimental-settings-entry.d.ts +0 -1
  89. package/dist/lib/codex-manager/experimental-settings-prompt.d.ts +0 -1
  90. package/dist/lib/codex-manager/experimental-settings-schema.d.ts +0 -1
  91. package/dist/lib/codex-manager/experimental-sync-target-entry.d.ts +0 -1
  92. package/dist/lib/codex-manager/experimental-sync-target.d.ts +0 -1
  93. package/dist/lib/codex-manager/forecast-report-shared.d.ts +0 -1
  94. package/dist/lib/codex-manager/formatters/account-formatters.d.ts +0 -1
  95. package/dist/lib/codex-manager/formatters/index.d.ts +0 -1
  96. package/dist/lib/codex-manager/formatters/model-formatters.d.ts +0 -1
  97. package/dist/lib/codex-manager/formatters/quota-formatters.d.ts +0 -1
  98. package/dist/lib/codex-manager/formatters/text-style.d.ts +0 -1
  99. package/dist/lib/codex-manager/health-check.d.ts +0 -1
  100. package/dist/lib/codex-manager/help.d.ts +0 -1
  101. package/dist/lib/codex-manager/login-action-panel.d.ts +0 -1
  102. package/dist/lib/codex-manager/login-flow.d.ts +0 -1
  103. package/dist/lib/codex-manager/login-menu-actions.d.ts +0 -1
  104. package/dist/lib/codex-manager/login-menu-data.d.ts +0 -1
  105. package/dist/lib/codex-manager/login-oauth.d.ts +0 -1
  106. package/dist/lib/codex-manager/login-workspace-choice.d.ts +0 -1
  107. package/dist/lib/codex-manager/manual-callback.d.ts +0 -1
  108. package/dist/lib/codex-manager/persist-selected-account.d.ts +0 -1
  109. package/dist/lib/codex-manager/quota-cache-helpers.d.ts +0 -1
  110. package/dist/lib/codex-manager/rate-limit-markers.d.ts +0 -1
  111. package/dist/lib/codex-manager/repair-commands.d.ts +0 -1
  112. package/dist/lib/codex-manager/settings-hub/backend.d.ts +0 -1
  113. package/dist/lib/codex-manager/settings-hub/dashboard.d.ts +0 -1
  114. package/dist/lib/codex-manager/settings-hub/experimental.d.ts +0 -1
  115. package/dist/lib/codex-manager/settings-hub/index.d.ts +0 -1
  116. package/dist/lib/codex-manager/settings-hub/shared.d.ts +0 -1
  117. package/dist/lib/codex-manager/settings-hub-entry.d.ts +0 -1
  118. package/dist/lib/codex-manager/settings-hub-menu.d.ts +0 -1
  119. package/dist/lib/codex-manager/settings-hub-prompt.d.ts +0 -1
  120. package/dist/lib/codex-manager/settings-hub.d.ts +0 -1
  121. package/dist/lib/codex-manager/settings-panels.d.ts +0 -1
  122. package/dist/lib/codex-manager/settings-persist-utils.d.ts +0 -1
  123. package/dist/lib/codex-manager/settings-preview.d.ts +0 -1
  124. package/dist/lib/codex-manager/settings-write-queue.d.ts +0 -1
  125. package/dist/lib/codex-manager/statusline-settings-panel.d.ts +0 -1
  126. package/dist/lib/codex-manager/theme-settings-panel.d.ts +0 -1
  127. package/dist/lib/codex-manager/unified-settings-controller.d.ts +0 -1
  128. package/dist/lib/codex-manager/unified-settings-entry.d.ts +0 -1
  129. package/dist/lib/codex-manager.d.ts +1 -2
  130. package/dist/lib/codex-manager.js +5 -95
  131. package/dist/lib/concurrency.d.ts +0 -1
  132. package/dist/lib/config-schema.d.ts +0 -1
  133. package/dist/lib/config.d.ts +0 -1
  134. package/dist/lib/config.js +46 -241
  135. package/dist/lib/constants.d.ts +0 -1
  136. package/dist/lib/context-budget/model-context-windows.d.ts +1 -2
  137. package/dist/lib/context-budget/model-context-windows.js +10 -13
  138. package/dist/lib/context-budget-guard.d.ts +0 -1
  139. package/dist/lib/context-budget-response.d.ts +0 -1
  140. package/dist/lib/context-overflow.d.ts +0 -1
  141. package/dist/lib/dashboard-settings.d.ts +0 -1
  142. package/dist/lib/entitlement-cache.d.ts +0 -1
  143. package/dist/lib/env-parsing.d.ts +13 -1
  144. package/dist/lib/env-parsing.js +21 -0
  145. package/dist/lib/errors.d.ts +0 -1
  146. package/dist/lib/forecast.d.ts +0 -1
  147. package/dist/lib/fs-retry.d.ts +0 -1
  148. package/dist/lib/health.d.ts +0 -1
  149. package/dist/lib/index.d.ts +0 -1
  150. package/dist/lib/integration-generators.d.ts +0 -1
  151. package/dist/lib/live-account-sync.d.ts +0 -1
  152. package/dist/lib/local-bridge.d.ts +0 -1
  153. package/dist/lib/local-bridge.js +4 -1
  154. package/dist/lib/local-client-tokens.d.ts +0 -1
  155. package/dist/lib/local-client-tokens.js +125 -30
  156. package/dist/lib/logger.d.ts +0 -1
  157. package/dist/lib/logger.js +11 -1
  158. package/dist/lib/model-capability-matrix.d.ts +0 -1
  159. package/dist/lib/model-route-policy.d.ts +1 -2
  160. package/dist/lib/named-backup-export.d.ts +0 -1
  161. package/dist/lib/oc-chatgpt-import-adapter.d.ts +0 -1
  162. package/dist/lib/oc-chatgpt-orchestrator.d.ts +0 -1
  163. package/dist/lib/oc-chatgpt-target-detection.d.ts +3 -3
  164. package/dist/lib/oc-chatgpt-target-detection.js +40 -13
  165. package/dist/lib/parallel-probe.d.ts +0 -1
  166. package/dist/lib/policy/runtime-policy-cache.d.ts +80 -0
  167. package/dist/lib/policy/runtime-policy-cache.js +310 -0
  168. package/dist/lib/policy/runtime-policy.d.ts +1 -2
  169. package/dist/lib/policy/runtime-policy.js +46 -19
  170. package/dist/lib/preemptive-quota-scheduler.d.ts +0 -1
  171. package/dist/lib/proactive-refresh.d.ts +0 -1
  172. package/dist/lib/prompts/codex-host-bridge.d.ts +0 -1
  173. package/dist/lib/prompts/codex.d.ts +0 -1
  174. package/dist/lib/prompts/fetch-utils.d.ts +0 -1
  175. package/dist/lib/prompts/host-codex-prompt.d.ts +0 -1
  176. package/dist/lib/quota-cache.d.ts +0 -1
  177. package/dist/lib/quota-cache.js +60 -36
  178. package/dist/lib/quota-probe.d.ts +0 -1
  179. package/dist/lib/quota-probe.js +5 -2
  180. package/dist/lib/quota-readiness.d.ts +0 -1
  181. package/dist/lib/recovery/constants.d.ts +0 -1
  182. package/dist/lib/recovery/storage.d.ts +0 -1
  183. package/dist/lib/recovery/types.d.ts +0 -1
  184. package/dist/lib/recovery.d.ts +0 -1
  185. package/dist/lib/redaction.d.ts +0 -1
  186. package/dist/lib/refresh-guardian.d.ts +0 -1
  187. package/dist/lib/refresh-lease.d.ts +0 -1
  188. package/dist/lib/refresh-queue.d.ts +0 -1
  189. package/dist/lib/request/client-cancellation.d.ts +0 -1
  190. package/dist/lib/request/error-classification.d.ts +0 -1
  191. package/dist/lib/request/error-classification.js +41 -52
  192. package/dist/lib/request/failover-config.d.ts +0 -1
  193. package/dist/lib/request/failure-policy.d.ts +0 -1
  194. package/dist/lib/request/fetch-helpers.d.ts +0 -1
  195. package/dist/lib/request/fetch-helpers.js +1 -1
  196. package/dist/lib/request/headers.d.ts +0 -1
  197. package/dist/lib/request/helpers/input-utils.d.ts +0 -1
  198. package/dist/lib/request/helpers/input-utils.js +88 -34
  199. package/dist/lib/request/helpers/model-map.d.ts +2 -3
  200. package/dist/lib/request/helpers/model-map.js +120 -78
  201. package/dist/lib/request/helpers/tool-utils.d.ts +0 -1
  202. package/dist/lib/request/helpers/tool-utils.js +421 -4
  203. package/dist/lib/request/index.d.ts +0 -1
  204. package/dist/lib/request/rate-limit-backoff.d.ts +0 -1
  205. package/dist/lib/request/rate-limit-decision.d.ts +0 -1
  206. package/dist/lib/request/request-attempt-budget.d.ts +0 -1
  207. package/dist/lib/request/request-init.d.ts +0 -1
  208. package/dist/lib/request/request-resilience.d.ts +0 -1
  209. package/dist/lib/request/request-transformer.d.ts +1 -2
  210. package/dist/lib/request/request-transformer.js +51 -26
  211. package/dist/lib/request/response-compaction.d.ts +0 -1
  212. package/dist/lib/request/response-handler.d.ts +0 -1
  213. package/dist/lib/request/response-metadata.d.ts +0 -1
  214. package/dist/lib/request/response-outcome.d.ts +0 -1
  215. package/dist/lib/request/stream-failover-runtime.d.ts +0 -1
  216. package/dist/lib/request/stream-failover.d.ts +0 -1
  217. package/dist/lib/request/stream-failover.js +28 -4
  218. package/dist/lib/request/token-refresh.d.ts +0 -1
  219. package/dist/lib/request/url-rewriting.d.ts +0 -1
  220. package/dist/lib/request/wait-utils.d.ts +0 -1
  221. package/dist/lib/rotation.d.ts +0 -1
  222. package/dist/lib/routing-mutex.d.ts +0 -1
  223. package/dist/lib/routing-profiles.d.ts +16 -2
  224. package/dist/lib/routing-profiles.js +119 -44
  225. package/dist/lib/runtime/account-check-helpers.d.ts +0 -1
  226. package/dist/lib/runtime/account-check-types.d.ts +0 -1
  227. package/dist/lib/runtime/account-check.d.ts +0 -1
  228. package/dist/lib/runtime/account-manager-cache-entry.d.ts +0 -1
  229. package/dist/lib/runtime/account-manager-cache.d.ts +0 -1
  230. package/dist/lib/runtime/account-model-catalog.d.ts +1 -2
  231. package/dist/lib/runtime/account-pool.d.ts +0 -1
  232. package/dist/lib/runtime/account-reset-credits.d.ts +0 -1
  233. package/dist/lib/runtime/account-reset-credits.js +8 -2
  234. package/dist/lib/runtime/account-scope.d.ts +0 -1
  235. package/dist/lib/runtime/account-select-event.d.ts +0 -1
  236. package/dist/lib/runtime/account-selection.d.ts +0 -1
  237. package/dist/lib/runtime/account-state.d.ts +0 -1
  238. package/dist/lib/runtime/account-status.d.ts +0 -1
  239. package/dist/lib/runtime/account-storage-scope-entry.d.ts +0 -1
  240. package/dist/lib/runtime/api-model-capabilities.d.ts +0 -1
  241. package/dist/lib/runtime/api-model-runtime.d.ts +0 -1
  242. package/dist/lib/runtime/app-bind.d.ts +0 -1
  243. package/dist/lib/runtime/app-helper-selection.d.ts +0 -1
  244. package/dist/lib/runtime/auth-facade.d.ts +0 -1
  245. package/dist/lib/runtime/automatic-account-checks.d.ts +0 -1
  246. package/dist/lib/runtime/automatic-subscription-checks.d.ts +0 -1
  247. package/dist/lib/runtime/browser-oauth-flow.d.ts +0 -1
  248. package/dist/lib/runtime/capability-boost.d.ts +0 -1
  249. package/dist/lib/runtime/catalog-capabilities.d.ts +0 -1
  250. package/dist/lib/runtime/config-toml.d.ts +0 -1
  251. package/dist/lib/runtime/context-budget-settings.d.ts +0 -1
  252. package/dist/lib/runtime/event-handler.d.ts +0 -1
  253. package/dist/lib/runtime/first-run.d.ts +0 -1
  254. package/dist/lib/runtime/flagged-verify-types.d.ts +0 -1
  255. package/dist/lib/runtime/hydrate-emails.d.ts +0 -1
  256. package/dist/lib/runtime/inference-activity.d.ts +0 -1
  257. package/dist/lib/runtime/live-sync-entry.d.ts +0 -1
  258. package/dist/lib/runtime/live-sync.d.ts +0 -1
  259. package/dist/lib/runtime/loader-setup.d.ts +0 -1
  260. package/dist/lib/runtime/login-menu-accounts.d.ts +0 -1
  261. package/dist/lib/runtime/manual-oauth-flow.d.ts +0 -1
  262. package/dist/lib/runtime/model-discovery-status.d.ts +0 -1
  263. package/dist/lib/runtime/native-account-storage.d.ts +0 -1
  264. package/dist/lib/runtime/native-account-sync.d.ts +0 -1
  265. package/dist/lib/runtime/native-binding-lock.d.ts +0 -1
  266. package/dist/lib/runtime/native-client-auth.d.ts +0 -1
  267. package/dist/lib/runtime/native-provider-config.d.ts +0 -1
  268. package/dist/lib/runtime/native-rate-limits.d.ts +2 -1
  269. package/dist/lib/runtime/native-rate-limits.js +23 -6
  270. package/dist/lib/runtime/preemptive-quota.d.ts +0 -1
  271. package/dist/lib/runtime/quota-headers.d.ts +0 -1
  272. package/dist/lib/runtime/quota-probe.d.ts +0 -1
  273. package/dist/lib/runtime/quota-settings.d.ts +0 -1
  274. package/dist/lib/runtime/refresh-guardian-entry.d.ts +0 -1
  275. package/dist/lib/runtime/refresh-guardian.d.ts +0 -1
  276. package/dist/lib/runtime/request-init.d.ts +0 -1
  277. package/dist/lib/runtime/reset-credit-routing.d.ts +0 -1
  278. package/dist/lib/runtime/reset-credits.d.ts +0 -1
  279. package/dist/lib/runtime/response-output-history.d.ts +0 -1
  280. package/dist/lib/runtime/responses-websocket.d.ts +0 -1
  281. package/dist/lib/runtime/resume-picker.d.ts +0 -1
  282. package/dist/lib/runtime/rotation-account-selection.d.ts +0 -1
  283. package/dist/lib/runtime/rotation-proxy-state.d.ts +0 -1
  284. package/dist/lib/runtime/rotation-server-types.d.ts +0 -1
  285. package/dist/lib/runtime/rotation-storage-meta.d.ts +0 -1
  286. package/dist/lib/runtime/rotation-token-refresh.d.ts +0 -1
  287. package/dist/lib/runtime/runtime-capability-failures.d.ts +0 -1
  288. package/dist/lib/runtime/runtime-current-account.d.ts +0 -1
  289. package/dist/lib/runtime/runtime-observability.d.ts +0 -1
  290. package/dist/lib/runtime/runtime-services.d.ts +0 -1
  291. package/dist/lib/runtime/session-affinity-entry.d.ts +0 -1
  292. package/dist/lib/runtime/session-recovery.d.ts +0 -1
  293. package/dist/lib/runtime/status-marker.d.ts +0 -1
  294. package/dist/lib/runtime/storage-scope.d.ts +0 -1
  295. package/dist/lib/runtime/subscription-first-use.d.ts +0 -1
  296. package/dist/lib/runtime/subscription-quota-event.d.ts +0 -1
  297. package/dist/lib/runtime/subscription-quota-order.d.ts +0 -1
  298. package/dist/lib/runtime/toast.d.ts +0 -1
  299. package/dist/lib/runtime/ui-runtime-entry.d.ts +0 -1
  300. package/dist/lib/runtime/ui-runtime.d.ts +0 -1
  301. package/dist/lib/runtime/verify-flagged.d.ts +0 -1
  302. package/dist/lib/runtime/workspace-model-scopes.d.ts +0 -1
  303. package/dist/lib/runtime-constants.d.ts +0 -1
  304. package/dist/lib/runtime-paths.d.ts +0 -1
  305. package/dist/lib/runtime-rotation-proxy.d.ts +1 -1
  306. package/dist/lib/runtime-rotation-proxy.js +133 -0
  307. package/dist/lib/schemas.d.ts +35 -13
  308. package/dist/lib/schemas.js +19 -2
  309. package/dist/lib/session-affinity.d.ts +0 -1
  310. package/dist/lib/shutdown.d.ts +0 -1
  311. package/dist/lib/storage/account-clear-entry.d.ts +0 -1
  312. package/dist/lib/storage/account-clear.d.ts +0 -1
  313. package/dist/lib/storage/account-match-utils.d.ts +0 -1
  314. package/dist/lib/storage/account-persistence.d.ts +0 -1
  315. package/dist/lib/storage/account-port.d.ts +0 -1
  316. package/dist/lib/storage/account-save-entry.d.ts +0 -1
  317. package/dist/lib/storage/account-save.d.ts +9 -2
  318. package/dist/lib/storage/account-save.js +4 -1
  319. package/dist/lib/storage/account-snapshot.d.ts +0 -1
  320. package/dist/lib/storage/backup-metadata-builder.d.ts +0 -1
  321. package/dist/lib/storage/backup-metadata.d.ts +0 -1
  322. package/dist/lib/storage/backup-paths.d.ts +0 -1
  323. package/dist/lib/storage/backup-restore.d.ts +0 -1
  324. package/dist/lib/storage/cache-artifacts.d.ts +0 -1
  325. package/dist/lib/storage/credential-sidecars.d.ts +0 -1
  326. package/dist/lib/storage/error-hints.d.ts +0 -1
  327. package/dist/lib/storage/file-lock.d.ts +0 -1
  328. package/dist/lib/storage/file-lock.js +33 -1
  329. package/dist/lib/storage/file-paths.d.ts +0 -1
  330. package/dist/lib/storage/fixture-guards.d.ts +0 -1
  331. package/dist/lib/storage/flagged-entry.d.ts +0 -1
  332. package/dist/lib/storage/flagged-load-entry.d.ts +0 -1
  333. package/dist/lib/storage/flagged-save-entry.d.ts +0 -1
  334. package/dist/lib/storage/flagged-storage-file.d.ts +0 -1
  335. package/dist/lib/storage/flagged-storage-io.d.ts +0 -1
  336. package/dist/lib/storage/flagged-storage.d.ts +0 -1
  337. package/dist/lib/storage/gitignore.d.ts +0 -1
  338. package/dist/lib/storage/hash.d.ts +0 -1
  339. package/dist/lib/storage/health.d.ts +0 -1
  340. package/dist/lib/storage/identity.d.ts +0 -1
  341. package/dist/lib/storage/import-export.d.ts +0 -1
  342. package/dist/lib/storage/json-store-lock.d.ts +105 -0
  343. package/dist/lib/storage/json-store-lock.js +259 -0
  344. package/dist/lib/storage/metadata-section.d.ts +0 -1
  345. package/dist/lib/storage/migrations.d.ts +0 -1
  346. package/dist/lib/storage/migrations.js +31 -18
  347. package/dist/lib/storage/named-backup-entry.d.ts +0 -1
  348. package/dist/lib/storage/named-backups-entry.d.ts +0 -1
  349. package/dist/lib/storage/named-backups.d.ts +0 -1
  350. package/dist/lib/storage/path-state.d.ts +0 -1
  351. package/dist/lib/storage/paths.d.ts +0 -1
  352. package/dist/lib/storage/pending-auth.d.ts +9 -3
  353. package/dist/lib/storage/pending-auth.js +30 -8
  354. package/dist/lib/storage/project-migration.d.ts +0 -1
  355. package/dist/lib/storage/public-types.d.ts +0 -1
  356. package/dist/lib/storage/record-identity.d.ts +0 -1
  357. package/dist/lib/storage/record-utils.d.ts +0 -1
  358. package/dist/lib/storage/restore-assessment.d.ts +0 -1
  359. package/dist/lib/storage/restore-backup-entry.d.ts +0 -1
  360. package/dist/lib/storage/restore-metadata.d.ts +0 -1
  361. package/dist/lib/storage/save-retry.d.ts +0 -1
  362. package/dist/lib/storage/snapshot-inspectors.d.ts +0 -1
  363. package/dist/lib/storage/snapshot-merge.d.ts +0 -1
  364. package/dist/lib/storage/storage-parser.d.ts +2 -1
  365. package/dist/lib/storage/storage-parser.js +10 -2
  366. package/dist/lib/storage/transactions.d.ts +0 -1
  367. package/dist/lib/storage.d.ts +15 -2
  368. package/dist/lib/storage.js +612 -25
  369. package/dist/lib/synthetic-response.d.ts +0 -1
  370. package/dist/lib/table-formatter.d.ts +0 -1
  371. package/dist/lib/temp-path.d.ts +0 -1
  372. package/dist/lib/tools/hashline-tools.d.ts +0 -1
  373. package/dist/lib/types.d.ts +0 -1
  374. package/dist/lib/ui/ansi.d.ts +0 -1
  375. package/dist/lib/ui/auth-menu-builder.d.ts +0 -1
  376. package/dist/lib/ui/auth-menu.d.ts +0 -1
  377. package/dist/lib/ui/check-progress.d.ts +0 -1
  378. package/dist/lib/ui/confirm.d.ts +0 -1
  379. package/dist/lib/ui/display-width.d.ts +0 -1
  380. package/dist/lib/ui/format.d.ts +0 -1
  381. package/dist/lib/ui/index.d.ts +0 -1
  382. package/dist/lib/ui/runtime.d.ts +0 -1
  383. package/dist/lib/ui/select.d.ts +0 -1
  384. package/dist/lib/ui/theme.d.ts +0 -1
  385. package/dist/lib/ui/ui-copy.d.ts +1 -2
  386. package/dist/lib/ui/ui-copy.js +1 -1
  387. package/dist/lib/unified-settings.d.ts +13 -11
  388. package/dist/lib/unified-settings.js +22 -14
  389. package/dist/lib/update-notice.d.ts +0 -1
  390. package/dist/lib/usage/index.d.ts +0 -1
  391. package/dist/lib/usage/ledger.d.ts +0 -1
  392. package/dist/lib/usage/pricing.d.ts +1 -2
  393. package/dist/lib/usage/pricing.js +41 -16
  394. package/dist/lib/usage/redaction.d.ts +0 -1
  395. package/dist/lib/usage/stream-usage-deferral.d.ts +0 -1
  396. package/dist/lib/usage/types.d.ts +0 -1
  397. package/dist/lib/usage/usage-extraction.d.ts +0 -1
  398. package/dist/lib/utils.d.ts +21 -1
  399. package/dist/lib/utils.js +31 -0
  400. package/dist/lib/wsl.d.ts +0 -1
  401. package/package.json +11 -5
  402. package/scripts/codex-bin-resolver.js +20 -1
  403. package/scripts/codex-multi-auth.js +7 -1
  404. package/scripts/codex.js +385 -89
  405. package/skills/codex-auth-setup/SKILL.md +73 -0
@@ -67,20 +67,21 @@ export const CURRENT_CODEX_MODEL = "gpt-5.6-sol";
67
67
  * `gpt-5.1-codex-mini`, rather than up to Sol.
68
68
  */
69
69
  const CODEX_MINI_REPLACEMENT_MODEL = "gpt-5.6-terra";
70
- export const DEFAULT_MODEL = "gpt-5.5";
70
+ // The default tracks whatever upstream defaults a fresh Codex session to:
71
+ // `gpt-6.1-sol` entered the bundled catalog on 2026-09-29 as priority 1
72
+ // (openai/codex #49318), above Astra. `gpt-5.5`, the previous default here,
73
+ // retires from ChatGPT/Codex on 2026-10-14, so keeping it would have landed
74
+ // every unresolvable request — and the legacy `gpt-5` alias — on a dying id.
75
+ export const DEFAULT_MODEL = "gpt-6.1-sol";
71
76
  // Model used for diagnostic live/quota probes (`check`, `report`, `best`).
72
77
  // Deliberately distinct from DEFAULT_MODEL: GPT-5.6 is the latest general family
73
- // (issue #627), so the probe leads with it, while DEFAULT_MODEL stays on 5.5 so
74
- // actual request routing and the legacy `gpt-5` alias remain opt-in per 2.5.0.
78
+ // (issue #627) with a year of rollout behind it, so the probe leads with it —
79
+ // a probe only needs a response's quota headers, and leading with a fresh
80
+ // launch model (Astra on 2026-09-03, 6.1 Sol on 2026-09-29) spends one failed
81
+ // request per probe on every account not yet entitled and buys nothing. Move
82
+ // DEFAULT_PROBE_MODEL forward once a newer model is broadly available.
75
83
  // Bare `gpt-5.6` aliases to Sol; we pin the canonical id so the probe display
76
84
  // and report `modelSelection` read `gpt-5.6-sol` without a remap arrow.
77
- //
78
- // GPT-6 Astra deliberately does NOT lead the probe as of its 2026-09-03 launch.
79
- // A probe only needs a response's quota headers, and Astra is still rolling out
80
- // org by org, so leading with it would spend one failed request per probe for
81
- // every account without entitlement yet and buy nothing. Move DEFAULT_PROBE_MODEL
82
- // to `gpt-6-astra` once it is broadly available, and put `gpt-5.6-sol` directly
83
- // behind it in QUOTA_PROBE_MODEL_CHAIN.
84
85
  export const DEFAULT_PROBE_MODEL = "gpt-5.6-sol";
85
86
  // Single source of truth for the live/quota probe fallback chain. Both the
86
87
  // manager probe (lib/quota-probe.ts) and the runtime probe (lib/runtime/quota-probe.ts)
@@ -126,17 +127,16 @@ const GPT_5_6_LUNA_EFFORTS = [
126
127
  /**
127
128
  * GPT-6 Astra, OpenAI's 2026-09-03 frontier release.
128
129
  *
129
- * The launch lineup was the flagship plus `aeon`, a long-horizon variant built
130
- * for runs measured in days; Sol and Luna followed on 2026-09-22 (below).
131
- * `gpt-6-astra` is the API model name OpenAI published at launch;
132
- * `gpt-6-astra-aeon` is the second slug that shipped beside it in the Codex
133
- * model list. "Astra Pro" is a plan tier, not a separate slug we have seen, so
134
- * it is deliberately not registered as its own canonical model — the GPT-6
135
- * resolver below claims `gpt-6-astra-pro` and every other unrecognised GPT-6 id
136
- * for the flagship rather than letting it fall through to GPT-5.5.
130
+ * Sol and Luna followed on 2026-09-22 (below). `gpt-6-astra` is the API model
131
+ * name OpenAI published at launch. The long-horizon `gpt-6-astra-aeon` slug
132
+ * that leaked beside it never appeared in the bundled catalog or the public
133
+ * model docs and is retired below — its ids now alias the flagship. "Astra
134
+ * Pro" is a plan tier, not a separate slug we have seen, so it is deliberately
135
+ * not registered as its own canonical model — the GPT-6 resolver below claims
136
+ * `gpt-6-astra-pro` and every other unrecognised GPT-6 id for the flagship
137
+ * rather than letting it fall through to the default.
137
138
  */
138
139
  const GPT_6_ASTRA_MODEL = "gpt-6-astra";
139
- const GPT_6_ASTRA_AEON_MODEL = "gpt-6-astra-aeon";
140
140
  /** Bare `gpt-6` resolves to the flagship, mirroring bare `gpt-5.6` -> Sol. */
141
141
  const GPT_6_FLAGSHIP_ALIAS = "gpt-6";
142
142
  /**
@@ -171,6 +171,20 @@ const GPT_6_LUNA_EFFORTS = [
171
171
  "xhigh",
172
172
  "max",
173
173
  ];
174
+ /**
175
+ * GPT-6.1 Sol, the first 6.1 release: added to the upstream catalog on
176
+ * 2026-09-29 (openai/codex #49318) as the default model — priority 1, above
177
+ * Astra — with "near-Astra performance at a lower cost". The same commit
178
+ * demoted `gpt-6-sol` to "previous generation workhorse". The catalog ships
179
+ * the full low..ultra ladder with a `low` default (the API model page
180
+ * documents `medium` for direct-API callers; the Codex catalog this wrapper
181
+ * mirrors says `low`). Sol is the only 6.1 tier yet, so bare `gpt-6.1` and
182
+ * any unrecognised 6.1 id resolve to it, matching the bare-alias convention.
183
+ */
184
+ const GPT_6_1_SOL_MODEL = "gpt-6.1-sol";
185
+ /** Bare `gpt-6.1` resolves to Sol — the only tier OpenAI ships at 6.1. */
186
+ const GPT_6_1_FLAGSHIP_ALIAS = "gpt-6.1";
187
+ const GPT_6_1_SOL_EFFORTS = GPT_6_ASTRA_EFFORTS;
174
188
  /**
175
189
  * Cyber-specialty models from the upstream Codex catalog
176
190
  * (openai/codex `codex-rs/models-manager/models.json`).
@@ -192,47 +206,55 @@ const DAYBREAK_EFFORTS = [
192
206
  "max",
193
207
  "ultra",
194
208
  ];
195
- const GPT_5_5_CANONICAL_MODEL = "gpt-5.5";
196
- const GPT_5_5_PRO_CANONICAL_MODEL = "gpt-5.5-pro";
197
- const GPT_5_5_RELEASE_MODEL = "gpt-5.5-2026-04-23";
198
- const GPT_5_5_PRO_RELEASE_MODEL = "gpt-5.5-pro-2026-04-23";
199
- const GPT_5_5_RELEASE_COMPAT_MODEL = "gpt-5.5-20260423";
200
- const GPT_5_5_PRO_RELEASE_COMPAT_MODEL = "gpt-5.5-pro-20260423";
201
209
  /**
202
- * Where an unrecognised `gpt-5.<minor>` id lands. Every minor below 5.5 is
203
- * retired (OpenAI deprecations page, upstream catalog removals), so each maps
204
- * to the replacement OpenAI names for it rather than to a model that no longer
205
- * answers: 5.1/5.2 to Sol, 5.4 to GPT-6 Sol/Luna as upstream Codex migrates it,
206
- * and every `pro` to the one live pro model.
210
+ * Where an unrecognised `gpt-5.<minor>` id lands. Every known minor is
211
+ * retired (OpenAI deprecations page, upstream catalog removals, the
212
+ * 2026-10-14 `gpt-5.5` OAuth shutdown), so each maps to the replacement
213
+ * OpenAI names for it rather than to a model that no longer answers:
214
+ * 5.1/5.2 to Sol, 5.4 to GPT-6 Sol/Luna as upstream Codex migrates it,
215
+ * 5.5 to GPT-6 Sol likewise, and every `pro` to the frontier flagship that
216
+ * replaced the API-only `gpt-5.5-pro`.
207
217
  */
208
218
  const GENERAL_GPT5_VERSION_CATALOG = {
209
219
  1: {
210
220
  base: GPT_5_6_SOL_MODEL,
211
- pro: GPT_5_5_PRO_CANONICAL_MODEL,
221
+ pro: GPT_6_ASTRA_MODEL,
212
222
  },
213
223
  2: {
214
224
  base: GPT_5_6_SOL_MODEL,
215
- pro: GPT_5_5_PRO_CANONICAL_MODEL,
225
+ pro: GPT_6_ASTRA_MODEL,
216
226
  },
217
227
  4: {
218
228
  base: GPT_6_SOL_MODEL,
219
- pro: GPT_5_5_PRO_CANONICAL_MODEL,
229
+ pro: GPT_6_ASTRA_MODEL,
220
230
  mini: GPT_6_LUNA_MODEL,
221
231
  nano: GPT_6_LUNA_MODEL,
222
232
  },
223
233
  5: {
224
- base: GPT_5_5_CANONICAL_MODEL,
225
- pro: GPT_5_5_PRO_CANONICAL_MODEL,
234
+ base: GPT_6_SOL_MODEL,
235
+ pro: GPT_6_ASTRA_MODEL,
226
236
  mini: GPT_5_6_TERRA_MODEL,
227
237
  nano: GPT_5_6_LUNA_MODEL,
228
238
  },
229
239
  };
230
- const GENERAL_GPT5_STABLE_VARIANTS = GENERAL_GPT5_VERSION_CATALOG[5];
240
+ /**
241
+ * Landing spot for a `gpt-5.<minor>` whose minor this catalog does not know
242
+ * (a `gpt-5.7` or `gpt-5.9` id, say): the newest generation the 5.x line
243
+ * still serves. Deliberately NOT the migration target `gpt-6-sol` — an id
244
+ * naming a 5.x minor keeps its generation, the same way every known minor
245
+ * above lands on a living 5.x or the replacement OpenAI actually named.
246
+ */
247
+ const GENERAL_GPT5_STABLE_VARIANTS = {
248
+ base: GPT_5_6_SOL_MODEL,
249
+ pro: GPT_6_ASTRA_MODEL,
250
+ mini: GPT_5_6_TERRA_MODEL,
251
+ nano: GPT_5_6_LUNA_MODEL,
252
+ };
231
253
  // `gpt-5-mini`/`gpt-5-nano` point at snapshots OpenAI retires on 2026-12-11;
232
254
  // the deprecations page names Terra and Luna as their replacements.
233
255
  const GENERAL_GPT5_GENERIC_VARIANTS = {
234
- base: DEFAULT_MODEL,
235
- pro: GPT_5_5_PRO_CANONICAL_MODEL,
256
+ base: GPT_5_6_SOL_MODEL,
257
+ pro: GPT_6_ASTRA_MODEL,
236
258
  mini: GPT_5_6_TERRA_MODEL,
237
259
  nano: GPT_5_6_LUNA_MODEL,
238
260
  };
@@ -258,11 +280,11 @@ export const MODEL_PROFILES = {
258
280
  supportedReasoningEfforts: GPT_6_ASTRA_EFFORTS,
259
281
  capabilities: TOOL_CAPABILITIES.full,
260
282
  },
261
- [GPT_6_ASTRA_AEON_MODEL]: {
262
- normalizedModel: GPT_6_ASTRA_AEON_MODEL,
283
+ [GPT_6_1_SOL_MODEL]: {
284
+ normalizedModel: GPT_6_1_SOL_MODEL,
263
285
  promptFamily: "gpt-5.2",
264
- defaultReasoningEffort: "medium",
265
- supportedReasoningEfforts: GPT_6_ASTRA_EFFORTS,
286
+ defaultReasoningEffort: "low",
287
+ supportedReasoningEfforts: GPT_6_1_SOL_EFFORTS,
266
288
  capabilities: TOOL_CAPABILITIES.full,
267
289
  },
268
290
  [GPT_6_SOL_MODEL]: {
@@ -317,26 +339,15 @@ export const MODEL_PROFILES = {
317
339
  supportedReasoningEfforts: GPT_5_6_LUNA_EFFORTS,
318
340
  capabilities: TOOL_CAPABILITIES.full,
319
341
  },
320
- [GPT_5_5_CANONICAL_MODEL]: {
321
- normalizedModel: GPT_5_5_CANONICAL_MODEL,
322
- promptFamily: "gpt-5.2",
323
- defaultReasoningEffort: "none",
324
- supportedReasoningEfforts: ["none", "low", "medium", "high", "xhigh"],
325
- capabilities: TOOL_CAPABILITIES.full,
326
- },
327
- [GPT_5_5_PRO_CANONICAL_MODEL]: {
328
- normalizedModel: GPT_5_5_PRO_CANONICAL_MODEL,
329
- promptFamily: "gpt-5.2",
330
- defaultReasoningEffort: "high",
331
- supportedReasoningEfforts: ["medium", "high", "xhigh"],
332
- capabilities: TOOL_CAPABILITIES.computerAndCompact,
333
- },
334
- // Every model older than 5.5 is retired: `gpt-5.1`, `gpt-5.2` and the whole
335
- // 5.4 family left the upstream Codex catalog, the codex models and the
336
- // chat-latest snapshots are past their shutdown date on OpenAI's
337
- // deprecations page, and `gpt-5-mini`/`gpt-5-nano` shut down 2026-12-11.
338
- // Their ids stay accepted as aliases of the named replacement (below) so an
339
- // old config keeps working, but no request is sent under a dead name.
342
+ // 5.5 and older are all retired: `gpt-5.5` leaves ChatGPT/Codex on
343
+ // 2026-10-14, `gpt-5.5-pro` left the bundled Codex catalog earlier (it is
344
+ // API-only now, which this OAuth surface cannot serve), `gpt-5.1`,
345
+ // `gpt-5.2` and the whole 5.4 family left the upstream Codex catalog, the
346
+ // codex models and the chat-latest snapshots are past their shutdown date
347
+ // on OpenAI's deprecations page, and `gpt-5-mini`/`gpt-5-nano` shut down
348
+ // 2026-12-11. Their ids stay accepted as aliases of the named replacement
349
+ // (below) so an old config keeps working, but no request is sent under a
350
+ // dead name.
340
351
  };
341
352
  const MODEL_MAP = {};
342
353
  function addAlias(alias, normalizedModel) {
@@ -368,17 +379,21 @@ function addGpt56Aliases() {
368
379
  }
369
380
  function addGpt6Aliases() {
370
381
  addEffortAliases(GPT_6_ASTRA_MODEL, GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
371
- addEffortAliases(GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_EFFORTS);
372
382
  addEffortAliases(GPT_6_FLAGSHIP_ALIAS, GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
373
383
  // `astra` on its own is how the model is spoken about everywhere; accept it
374
- // rather than letting it fall through to GPT-5.5.
384
+ // rather than letting it fall through to the default.
375
385
  addEffortAliases("astra", GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
376
- addEffortAliases("astra-aeon", GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_EFFORTS);
386
+ // `astra-aeon` was only ever a leaked slug and is retired now, so the name
387
+ // resolves to the flagship it was a variant of. Its `gpt-6-astra-aeon`
388
+ // form comes from the retired table, not from a dedicated registration.
389
+ addEffortAliases("astra-aeon", GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
377
390
  // No bare `sol`/`luna` aliases: those names already mean the 5.6 tiers to
378
391
  // anyone who used them before 2026-09-22, and re-pointing them would swap a
379
392
  // user's model generation without asking.
380
393
  addEffortAliases(GPT_6_SOL_MODEL, GPT_6_SOL_MODEL, GPT_6_SOL_EFFORTS);
381
394
  addEffortAliases(GPT_6_LUNA_MODEL, GPT_6_LUNA_MODEL, GPT_6_LUNA_EFFORTS);
395
+ addEffortAliases(GPT_6_1_SOL_MODEL, GPT_6_1_SOL_MODEL, GPT_6_1_SOL_EFFORTS);
396
+ addEffortAliases(GPT_6_1_FLAGSHIP_ALIAS, GPT_6_1_SOL_MODEL, GPT_6_1_SOL_EFFORTS);
382
397
  }
383
398
  function addDaybreakAliases() {
384
399
  addEffortAliases(DAYBREAK_BLUE_MODEL, DAYBREAK_BLUE_MODEL, DAYBREAK_EFFORTS);
@@ -387,14 +402,12 @@ function addDaybreakAliases() {
387
402
  addEffortAliases("daybreak-red", DAYBREAK_RED_MODEL, DAYBREAK_EFFORTS);
388
403
  }
389
404
  function addGeneralAliases() {
390
- addReasoningAliases(GPT_5_5_CANONICAL_MODEL, GPT_5_5_CANONICAL_MODEL);
391
- addReasoningAliases(GPT_5_5_RELEASE_MODEL, GPT_5_5_CANONICAL_MODEL);
392
- addReasoningAliases(GPT_5_5_RELEASE_COMPAT_MODEL, GPT_5_5_CANONICAL_MODEL);
393
- addReasoningAliases(GPT_5_5_PRO_CANONICAL_MODEL, GPT_5_5_PRO_CANONICAL_MODEL);
394
- addReasoningAliases(GPT_5_5_PRO_RELEASE_MODEL, GPT_5_5_PRO_CANONICAL_MODEL);
395
- addReasoningAliases(GPT_5_5_PRO_RELEASE_COMPAT_MODEL, GPT_5_5_PRO_CANONICAL_MODEL);
396
- addReasoningAliases("gpt-5-pro", GPT_5_5_PRO_CANONICAL_MODEL);
397
- addReasoningAliases("gpt-5", DEFAULT_MODEL);
405
+ // `gpt-5` and `gpt-5-pro` are the last un-versioned ids upstream published.
406
+ // With 5.5 retired, "the gpt-5 line" is Sol 5.6 and "the pro tier" is the
407
+ // Astra flagship that replaced the API-only `gpt-5.5-pro`. The dated and
408
+ // pro-suffixed forms of 5.5 itself come from the retired table below.
409
+ addReasoningAliases("gpt-5-pro", GPT_6_ASTRA_MODEL);
410
+ addReasoningAliases("gpt-5", GPT_5_6_SOL_MODEL);
398
411
  }
399
412
  /**
400
413
  * Retired general ids, each kept as an alias of the replacement OpenAI names
@@ -405,12 +418,27 @@ function addGeneralAliases() {
405
418
  * efforts the replacement does not accept are coerced as for any request.
406
419
  */
407
420
  const RETIRED_GENERAL_MODEL_REPLACEMENTS = {
421
+ // `gpt-6-astra-aeon` never appeared in the bundled Codex catalog or the
422
+ // public model docs — it existed only as a Statsig-flag leak — so the id
423
+ // is dead and goes to the flagship it was a long-horizon variant of.
424
+ "gpt-6-astra-aeon": GPT_6_ASTRA_MODEL,
425
+ // `gpt-5.5` leaves ChatGPT/Codex OAuth on 2026-10-14; the bundled catalog
426
+ // already relabels it "legacy" and names GPT-6 Sol as the migration
427
+ // target. `gpt-5.5-pro` left the bundled catalog earlier — it is API-only
428
+ // now, a surface this OAuth wrapper cannot reach — so its ids go to the
429
+ // frontier flagship. The dated snapshot ids retire with them.
430
+ "gpt-5.5": GPT_6_SOL_MODEL,
431
+ "gpt-5.5-2026-04-23": GPT_6_SOL_MODEL,
432
+ "gpt-5.5-20260423": GPT_6_SOL_MODEL,
433
+ "gpt-5.5-pro": GPT_6_ASTRA_MODEL,
434
+ "gpt-5.5-pro-2026-04-23": GPT_6_ASTRA_MODEL,
435
+ "gpt-5.5-pro-20260423": GPT_6_ASTRA_MODEL,
408
436
  "gpt-5.4": GPT_6_SOL_MODEL,
409
437
  "gpt-5.4-mini": GPT_6_LUNA_MODEL,
410
438
  "gpt-5.4-nano": GPT_6_LUNA_MODEL,
411
- "gpt-5.4-pro": GPT_5_5_PRO_CANONICAL_MODEL,
439
+ "gpt-5.4-pro": GPT_6_ASTRA_MODEL,
412
440
  "gpt-5.2": GPT_5_6_SOL_MODEL,
413
- "gpt-5.2-pro": GPT_5_5_PRO_CANONICAL_MODEL,
441
+ "gpt-5.2-pro": GPT_6_ASTRA_MODEL,
414
442
  "gpt-5.1": GPT_5_6_SOL_MODEL,
415
443
  "gpt-5-mini": GPT_5_6_TERRA_MODEL,
416
444
  "gpt-5-nano": GPT_5_6_LUNA_MODEL,
@@ -534,11 +562,17 @@ function resolveGpt6CatalogModel(modelId) {
534
562
  // never forms and it used to fall through to GPT-5.5 while still passing
535
563
  // capability-policy's catalog gate. Gate and resolver have to agree on the
536
564
  // same id or the policy store keys state a request never reads.
537
- const isGpt6 = versionToken === "6" || tokens.includes("gpt6");
565
+ const gpt6Index = tokens.indexOf("gpt6");
566
+ const isGpt6 = versionToken === "6" || gpt6Index !== -1;
567
+ // A 6.1 minor shows up as the token after `6` (`gpt-6.1-sol`) or after
568
+ // `gpt6` (`gpt6.1-sol`); both forms have to land on the 6.1 generation,
569
+ // not on the 6.0 tier the trailing `sol`/`luna` tokens name.
570
+ const isGpt61 = (isGpt6 && gptIndex !== -1 && tokens[gptIndex + 2] === "1") ||
571
+ (gpt6Index !== -1 && tokens[gpt6Index + 1] === "1");
538
572
  // A bare `astra` token counts too. OpenAI's own launch material and every
539
573
  // picker label say "Astra" without the `gpt-6` prefix, so `Astra Pro` and
540
574
  // `astra-fast` reach this resolver with no version tokens at all; without
541
- // this clause they miss every branch and land on GPT-5.5.
575
+ // this clause they miss every branch and land on the default.
542
576
  //
543
577
  // It is anchored, not a free-floating substring: an id that names a
544
578
  // DIFFERENT GPT major version does not get claimed for the frontier model
@@ -551,10 +585,18 @@ function resolveGpt6CatalogModel(modelId) {
551
585
  if ((!isGpt6 && !isAstra) || tokens.includes("codex")) {
552
586
  return undefined;
553
587
  }
588
+ // `aeon` was the leaked long-horizon Astra variant; retired, its ids run on
589
+ // the flagship. `astra` keeps its own canonical id because Astra is a
590
+ // behaviourally different model, not a rename of the Sol workhorse.
554
591
  if (tokens.includes("aeon"))
555
- return GPT_6_ASTRA_AEON_MODEL;
592
+ return GPT_6_ASTRA_MODEL;
556
593
  if (isAstra)
557
594
  return GPT_6_ASTRA_MODEL;
595
+ // Every unrecognised 6.1 id resolves to the generation's only tier, Sol —
596
+ // the same in-minor flagship rule the 5.6 resolver applies, kept behind
597
+ // `astra` so `gpt-6.1-astra` names the frontier model it actually means.
598
+ if (isGpt61)
599
+ return GPT_6_1_SOL_MODEL;
558
600
  // Before Sol and Luna existed every non-Astra GPT-6 id fell to the line
559
601
  // below, so `gpt-6-luna` silently ran Astra at 100x Luna's price. `terra`
560
602
  // goes to Sol because there is no GPT-6 Terra and upstream migrates
@@ -13,4 +13,3 @@ import type { RequestToolDefinition } from "../../types.js";
13
13
  * @returns Cleaned array of tool definitions
14
14
  */
15
15
  export declare function cleanupToolDefinitions(tools: RequestToolDefinition[] | undefined): RequestToolDefinition[] | undefined;
16
- //# sourceMappingURL=tool-utils.d.ts.map