@bastani/atomic 0.10.14 → 0.10.15-alpha.1

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 (341) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  6. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  7. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  8. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  9. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  10. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  11. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  12. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  13. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  14. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  15. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  16. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  17. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  18. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  19. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  20. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  21. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  22. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  23. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  25. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  26. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  27. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  28. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  29. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  30. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  31. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  32. package/dist/builtin/intercom/package.json +1 -1
  33. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  34. package/dist/builtin/mcp/package.json +1 -1
  35. package/dist/builtin/subagents/package.json +1 -1
  36. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  37. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/package.json +1 -1
  39. package/dist/cli/auth-cli.code.js +1 -1
  40. package/dist/cli/auth-cli.impl.js +3 -3
  41. package/dist/cli/auth-cli.js +3 -3
  42. package/dist/cli/blueprint-command.impl.js +3 -3
  43. package/dist/cli/blueprint-command.js +3 -3
  44. package/dist/cli/intercom-command.code.js +3 -3
  45. package/dist/cli/intercom-command.impl.js +3 -3
  46. package/dist/cli/intercom-command.js +3 -3
  47. package/dist/cli/list-models.impl.js +3 -3
  48. package/dist/cli/list-models.js +3 -3
  49. package/dist/cli/session-picker.code.js +1 -1
  50. package/dist/cli/session-picker.impl.js +3 -3
  51. package/dist/cli/session-picker.js +3 -3
  52. package/dist/cli/startup-ui.code.js +1 -1
  53. package/dist/cli/startup-ui.impl.js +3 -3
  54. package/dist/cli/startup-ui.js +3 -3
  55. package/dist/cli/storage-command.impl.js +3 -3
  56. package/dist/cli/storage-command.js +3 -3
  57. package/dist/cli/storage-search-session.code.js +1 -1
  58. package/dist/cli/storage-search-session.impl.js +3 -3
  59. package/dist/cli/storage-search-session.js +3 -3
  60. package/dist/cli/team-command.code.js +1 -1
  61. package/dist/cli/team-command.impl.js +3 -3
  62. package/dist/cli/team-command.js +3 -3
  63. package/dist/cli.js +2 -2
  64. package/dist/core/compaction/compactor.d.ts +0 -8
  65. package/dist/core/debug.impl.js +3 -3
  66. package/dist/core/debug.js +3 -3
  67. package/dist/core/export-html/card-projection.impl.js +3 -3
  68. package/dist/core/export-html/card-projection.js +3 -3
  69. package/dist/core/export-html/index.code.js +2 -2
  70. package/dist/core/export-html/index.impl.js +3 -3
  71. package/dist/core/export-html/index.js +3 -3
  72. package/dist/core/export-html/json-spans.impl.js +3 -3
  73. package/dist/core/export-html/json-spans.js +3 -3
  74. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  76. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  77. package/dist/core/export-html/tool-renderer.js +3 -3
  78. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  79. package/dist/core/extensions/jiti-loader.js +3 -3
  80. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.js +3 -3
  82. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.js +3 -3
  84. package/dist/core/intercom-broker-control-host.code.js +1 -1
  85. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  86. package/dist/core/intercom-broker-control-host.js +3 -3
  87. package/dist/core/intercom-broker-control.code.js +2 -2
  88. package/dist/core/intercom-broker-control.impl.js +3 -3
  89. package/dist/core/intercom-broker-control.js +3 -3
  90. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.js +3 -3
  92. package/dist/core/sdk.code.js +1 -1
  93. package/dist/core/sdk.impl.js +3 -3
  94. package/dist/core/sdk.js +3 -3
  95. package/dist/core/session-manager-core.js +3 -3
  96. package/dist/core/session-manager-list.impl.js +3 -3
  97. package/dist/core/session-manager-list.js +3 -3
  98. package/dist/core/session-manager.impl.js +3 -3
  99. package/dist/core/session-manager.js +3 -3
  100. package/dist/core/session-storage.impl.js +3 -3
  101. package/dist/core/session-storage.js +3 -3
  102. package/dist/core/storage/index.js +2 -2
  103. package/dist/core/storage/node-sqlite-thread.js +2 -2
  104. package/dist/core/storage/node-sqlite.js +2 -2
  105. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  106. package/dist/core/storage/offline-snapshot-file.js +3 -3
  107. package/dist/core/storage/provider.js +2 -2
  108. package/dist/core/storage/selection.js +2 -2
  109. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  111. package/dist/core/storage/session/branch-fork-source.js +3 -3
  112. package/dist/core/storage/session/card-view.impl.js +3 -3
  113. package/dist/core/storage/session/card-view.js +3 -3
  114. package/dist/core/storage/session/child-reader.code.js +2 -2
  115. package/dist/core/storage/session/child-reader.impl.js +3 -3
  116. package/dist/core/storage/session/child-reader.js +3 -3
  117. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  119. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  120. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  121. package/dist/core/storage/session/expanded-child-details.js +3 -3
  122. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  124. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.js +3 -3
  126. package/dist/core/storage/session/fork-staging.code.js +1 -1
  127. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  128. package/dist/core/storage/session/fork-staging.js +3 -3
  129. package/dist/core/storage/session/fork-window.code.js +2 -2
  130. package/dist/core/storage/session/fork-window.impl.js +3 -3
  131. package/dist/core/storage/session/fork-window.js +3 -3
  132. package/dist/core/storage/session/history-pages.impl.js +3 -3
  133. package/dist/core/storage/session/history-pages.js +3 -3
  134. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  136. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  138. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.js +3 -3
  140. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  141. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  142. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  143. package/dist/core/storage/session/released-history-files.code.js +1 -1
  144. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  145. package/dist/core/storage/session/released-history-files.js +3 -3
  146. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  148. package/dist/core/storage/session/session-resume.impl.js +3 -3
  149. package/dist/core/storage/session/session-resume.js +3 -3
  150. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.js +3 -3
  152. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  153. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  154. package/dist/core/storage/session/snapshot-history.js +3 -3
  155. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  156. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  157. package/dist/core/storage/session/sql-session-store.js +3 -3
  158. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  159. package/dist/core/storage/session/tree-outline.js +3 -3
  160. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.js +3 -3
  162. package/dist/core/storage/storage-status.impl.js +3 -3
  163. package/dist/core/storage/storage-status.js +3 -3
  164. package/dist/core/storage/team.impl.js +3 -3
  165. package/dist/core/storage/team.js +3 -3
  166. package/dist/core/structured-output/index.code.js +1 -1
  167. package/dist/core/structured-output/index.impl.js +3 -3
  168. package/dist/core/structured-output/index.js +3 -3
  169. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.js +3 -3
  171. package/dist/core/tasks/task-file-history.code.js +2 -2
  172. package/dist/core/tasks/task-file-history.impl.js +3 -3
  173. package/dist/core/tasks/task-file-history.js +3 -3
  174. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  175. package/dist/core/tasks/task-reference-archive.js +3 -3
  176. package/dist/core/tasks/task-reference-identity.js +3 -3
  177. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.js +3 -3
  179. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  181. package/dist/core/tasks/task-view-source.impl.js +3 -3
  182. package/dist/core/tasks/task-view-source.js +3 -3
  183. package/dist/core/tools/read-url.impl.js +3 -3
  184. package/dist/core/tools/read-url.js +3 -3
  185. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  186. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  187. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  188. package/dist/core/worktree-snapshot/errors.js +3 -3
  189. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  191. package/dist/extensions/codemode/execute.impl.js +3 -3
  192. package/dist/extensions/codemode/execute.js +3 -3
  193. package/dist/extensions/codemode/renderer.impl.js +3 -3
  194. package/dist/extensions/codemode/renderer.js +3 -3
  195. package/dist/extensions/mcp/cli.code.js +1 -1
  196. package/dist/extensions/mcp/cli.impl.js +3 -3
  197. package/dist/extensions/mcp/cli.js +3 -3
  198. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  199. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  200. package/dist/extensions/mcp/cli.lazy.js +3 -3
  201. package/dist/extensions/mcp/runtime.code.js +1 -1
  202. package/dist/extensions/mcp/runtime.impl.js +3 -3
  203. package/dist/extensions/mcp/runtime.js +3 -3
  204. package/dist/index.d.ts +21 -1
  205. package/dist/index.js +2 -2
  206. package/dist/main-first-time-setup.code.js +1 -1
  207. package/dist/main-first-time-setup.impl.js +3 -3
  208. package/dist/main-first-time-setup.js +3 -3
  209. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  210. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  211. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  212. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  214. package/dist/modes/print-mode.js +1 -1
  215. package/dist/package-manager-cli.code.js +2 -2
  216. package/dist/package-manager-cli.impl.js +3 -3
  217. package/dist/package-manager-cli.js +3 -3
  218. package/dist/startup-files.json +1 -1
  219. package/dist/startup-stages/6.js +1 -1
  220. package/dist/utils/startup-database-spare.code.js +1 -1
  221. package/dist/utils/startup-database-spare.impl.js +3 -3
  222. package/dist/utils/startup-database-spare.js +3 -3
  223. package/dist/utils/tools-manager.impl.js +3 -3
  224. package/dist/utils/tools-manager.js +3 -3
  225. package/docs/background-tasks/reference.md +182 -0
  226. package/docs/background-tasks.md +98 -405
  227. package/docs/build.md +67 -27
  228. package/docs/changelog.mdx +1 -1
  229. package/docs/codemode.md +108 -39
  230. package/docs/compaction/branch-summaries.md +54 -0
  231. package/docs/compaction/custom-compactors.md +161 -0
  232. package/docs/compaction/memory-compaction.md +77 -0
  233. package/docs/compaction/reference.md +86 -38
  234. package/docs/compaction.md +51 -252
  235. package/docs/computer-use.md +169 -321
  236. package/docs/containerization.md +71 -57
  237. package/docs/custom-provider/api-reference.md +119 -25
  238. package/docs/custom-provider/oauth.md +114 -132
  239. package/docs/custom-provider/override.md +37 -27
  240. package/docs/custom-provider/registration.md +107 -83
  241. package/docs/custom-provider/streaming.md +85 -71
  242. package/docs/custom-provider.md +85 -52
  243. package/docs/development.md +39 -29
  244. package/docs/docs.json +76 -63
  245. package/docs/environment-variables.md +94 -44
  246. package/docs/extensions/api-reference.md +86 -43
  247. package/docs/extensions/authoring.md +162 -154
  248. package/docs/extensions/events.md +80 -25
  249. package/docs/extensions/examples.md +90 -85
  250. package/docs/extensions/ui.md +206 -82
  251. package/docs/extensions.md +79 -108
  252. package/docs/getting-started/authentication.md +67 -36
  253. package/docs/getting-started/first-session.md +53 -43
  254. package/docs/getting-started/installation.md +116 -89
  255. package/docs/getting-started/project-instructions.md +48 -34
  256. package/docs/guides/configuration.md +82 -20
  257. package/docs/guides/non-interactive.md +66 -24
  258. package/docs/guides/resume-on-any-machine.md +135 -82
  259. package/docs/guides/team-setup.md +114 -105
  260. package/docs/guides.md +76 -32
  261. package/docs/herdr.md +15 -16
  262. package/docs/how-atomic-works.md +140 -0
  263. package/docs/index.md +58 -44
  264. package/docs/intercom/operations.md +141 -151
  265. package/docs/intercom/reference.md +85 -108
  266. package/docs/intercom.md +84 -145
  267. package/docs/json.md +120 -67
  268. package/docs/keybindings.md +85 -49
  269. package/docs/libraries/agent-core.md +137 -275
  270. package/docs/libraries/ai.md +100 -84
  271. package/docs/libraries/codemode.md +210 -300
  272. package/docs/libraries/schema.md +59 -53
  273. package/docs/libraries/storage-postgres.md +49 -35
  274. package/docs/libraries/telemetry.md +153 -354
  275. package/docs/libraries/tui.md +265 -393
  276. package/docs/libraries.md +42 -26
  277. package/docs/llama-cpp.md +171 -161
  278. package/docs/mcp-servers.md +90 -51
  279. package/docs/models/choose-a-model.md +188 -0
  280. package/docs/models/reference.md +74 -30
  281. package/docs/models.md +153 -88
  282. package/docs/orchestration/migrating-workflows.md +23 -16
  283. package/docs/orchestration/patterns.md +39 -44
  284. package/docs/orchestration.md +65 -26
  285. package/docs/packages/authoring.md +51 -29
  286. package/docs/packages/reference.md +42 -21
  287. package/docs/packages.md +69 -58
  288. package/docs/programmatic.md +118 -24
  289. package/docs/prompt-templates.md +84 -83
  290. package/docs/providers/reference.md +43 -48
  291. package/docs/providers.md +219 -451
  292. package/docs/quickstart.md +140 -120
  293. package/docs/reference/cli.md +135 -97
  294. package/docs/reference.md +20 -18
  295. package/docs/rpc/examples.md +76 -20
  296. package/docs/rpc/extension-ui.md +64 -38
  297. package/docs/rpc/protocol.md +361 -110
  298. package/docs/rpc.md +57 -17
  299. package/docs/sdk/reference.md +409 -534
  300. package/docs/sdk/storage.md +53 -13
  301. package/docs/sdk/structured-decisions.md +82 -56
  302. package/docs/sdk/web-server.md +57 -43
  303. package/docs/sdk.md +106 -84
  304. package/docs/security.md +42 -64
  305. package/docs/session-format.md +62 -38
  306. package/docs/sessions.md +99 -214
  307. package/docs/settings.md +165 -195
  308. package/docs/shell-aliases.md +9 -6
  309. package/docs/skills/authoring.md +69 -48
  310. package/docs/skills/reference.md +51 -20
  311. package/docs/skills.md +99 -148
  312. package/docs/slash-commands.md +129 -0
  313. package/docs/storage/custom-adapters.md +160 -85
  314. package/docs/storage/jsonl.md +81 -66
  315. package/docs/storage/postgres/pgbouncer.md +120 -126
  316. package/docs/storage/postgres/tuning.md +120 -143
  317. package/docs/storage/postgres.md +314 -330
  318. package/docs/storage/sqlite.md +71 -42
  319. package/docs/storage.md +298 -302
  320. package/docs/subagents/authoring.md +55 -38
  321. package/docs/subagents/reference.md +73 -33
  322. package/docs/subagents.md +119 -187
  323. package/docs/terminal-setup.md +50 -38
  324. package/docs/termux.md +67 -41
  325. package/docs/themes/reference.md +23 -19
  326. package/docs/themes.md +142 -127
  327. package/docs/tmux.md +47 -55
  328. package/docs/tools.md +147 -109
  329. package/docs/tui/reference.md +166 -214
  330. package/docs/tui.md +196 -341
  331. package/docs/usage.md +118 -138
  332. package/docs/verification.md +79 -51
  333. package/docs/web-access.md +121 -101
  334. package/docs/windows.md +26 -27
  335. package/docs/worktree-snapshots/reference.md +245 -0
  336. package/docs/worktree-snapshots.md +71 -259
  337. package/package.json +8 -8
  338. package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
  339. package/docs/guides/intercom.md +0 -32
  340. package/docs/guides/orchestration.md +0 -28
  341. package/docs/guides/subagents.md +0 -37
package/docs/providers.md CHANGED
@@ -1,30 +1,18 @@
1
1
  ---
2
- title: "Model providers"
3
- sidebarTitle: "Providers"
4
- description: "Sign in with subscriptions, configure API keys, verify credentials, and set up cloud or local model providers."
2
+ title: "Connect model providers"
3
+ sidebarTitle: "Connect Providers"
4
+ description: "Sign in with subscriptions, store API keys, verify credentials, and configure cloud, local, and specialized model providers."
5
5
  ---
6
6
 
7
7
  Atomic connects to subscription providers through OAuth and to API-key providers through `~/.atomic/agent/auth.json` or environment variables. Built-in catalogs ship with Atomic; configured providers refresh newer catalogs independently and cache them in `~/.atomic/agent/models-store.json` for offline use.
8
8
 
9
- For first-time login steps, see [Authentication](/getting-started/authentication). For credential precedence, terminal stop reasons, and GitHub Copilot SDK error classes, see the [Provider reference](/providers/reference). For streaming transport modes (`auto`, `websocket-cached`, `websocket`, `sse`), see [Message delivery settings](/settings#message-delivery).
10
-
11
- ## Where to look on this page
12
-
13
- | Topic | Section or page |
14
- | --- | --- |
15
- | OAuth subscriptions, `/login`, token refresh, and `atomic auth check` | [Subscriptions](#subscriptions) |
16
- | Provider environment variables, `auth.json`, and `!command` / `$VAR` key resolution | [API keys](#api-keys) and [Auth file](#auth-file) |
17
- | Cloud and gateway providers (NVIDIA NIM, Azure, Bedrock, Cloudflare, Vertex AI) | [Cloud and gateway providers](#cloud-and-gateway-providers) |
18
- | Local GGUF router server (`llama.cpp`) | [llama.cpp](#llama-cpp) and [Local models with llama.cpp](/llama-cpp) |
19
- | Specialized providers (OpenAI Decisions and Images, TypeSafe Jev, Morph compaction) | [OpenAI Decisions and Images](#subscription-and-api-key-at-the-same-time), [TypeSafe Jev](#typesafe-jev), [Morph compaction](#morph-compaction) |
20
- | Custom endpoints, proxies, OAuth flows, and custom streaming APIs | [Custom providers](#custom-providers), [Configure custom models](/models), [Build custom providers](/custom-provider) |
21
- | Credential precedence, stop reasons, and Copilot SDK error helpers | [Provider reference](/providers/reference) and [SDK API keys and OAuth](/sdk/reference#api-keys-and-oauth) |
9
+ For first-time setup steps, see [Authenticate a provider](/getting-started/authentication). For day-to-day model switching, scopes, and fallbacks, see [Choose a model](/models/choose-a-model). For credential precedence, terminal stop reasons, and GitHub Copilot error classes, see the [Provider reference](/providers/reference).
22
10
 
23
11
  ## Subscriptions
24
12
 
25
- Run `/login` in interactive mode, then select a provider:
13
+ Run `/login`, choose **Use a subscription** (or **Use an account** for non-subscription OAuth such as OpenRouter), then select a provider:
26
14
 
27
- - OpenRouter
15
+ - OpenRouter *(account OAuth)*
28
16
  - OpenAI (Sign in with ChatGPT)
29
17
  - ChatGPT Plus/Pro (Codex)
30
18
  - Claude Pro/Max
@@ -35,291 +23,179 @@ Run `/login` in interactive mode, then select a provider:
35
23
 
36
24
  OpenRouter, Atomic's preferred partner, appears first in `/login`, `/logout`, and their tab completions, marked with `✦`. All other providers follow alphabetically.
37
25
 
38
- Run `/login <provider>`, such as `/login openrouter` or `/login kimi-coding`, to open a provider directly. Choose subscription or API-key authentication when both are available.
39
-
40
- To sign in from the shell without starting a session, run `atomic auth login <provider>`. It opens a browser for account sign-in; pass `--no-browser` for a device code or another non-browser method, or `--api-key` to store an API key. See [Credential commands](/reference/cli#credential-commands).
41
-
42
- OpenRouter opens a browser PKCE flow and asks whether to mint a new API key. On remote or headless machines where the browser cannot reach the local callback, paste the final redirect URL or authorization code instead. Claude, OpenAI, ChatGPT Codex, and extension providers that set `usesCallbackServer` support the same paste fallback.
43
-
44
- Device-code logins (Kimi Code, GitHub Copilot, Meta, and extension providers) display the verification URL and code without opening a browser automatically. Press Enter to open the URL and copy the code, or open it manually and enter the code.
45
-
46
- Built-in and extension-provided OAuth work in all interactive and non-interactive sessions. Login finishes as soon as credentials are saved; catalog refresh runs separately in the background.
26
+ Run `/login <provider>` (such as `/login openrouter` or `/login kimi-coding`) to open a provider directly. When a provider offers both sign-in and an API key, Atomic prompts with **Use a subscription** (or **Use an account**) and **Use an API key**.
47
27
 
48
- Pressing Escape or Ctrl+C cancels an in-progress login quietly and leaves previously saved credentials and catalogs untouched. Provider denials, expired device codes, timeouts, network failures, malformed responses, token exchange failures, and storage errors remain visible.
28
+ To sign in from the shell without starting a session, run `atomic auth login <provider>`. Pass `--no-browser` for a device-code or non-browser flow (such as over SSH), or `--api-key` to store an API key without echoing it. See [Credential commands](/reference/cli#credential-commands).
49
29
 
50
- Use `/logout` to clear stored credentials. Logout immediately invalidates authentication in the active session and removes the provider from both `~/.atomic/agent/auth.json` and any legacy `~/.pi/agent/auth.json`. Environment variables, CLI flags, and `models.json` keys cannot be cleared by Atomic; when one still authenticates the provider, the logout message names that source.
30
+ - **Browser callback sign-in (OpenRouter, Claude, OpenAI, ChatGPT Codex, and compatible extension providers):** Opens a browser login and listens on a local callback port. On remote or headless machines where the browser cannot reach localhost, paste the final redirect URL or authorization code into the prompt instead.
31
+ - **Device-code sign-in (Kimi Code, GitHub Copilot, Meta, xAI, OpenAI Codex's device-code option, and compatible extension providers):** Displays the verification URL and code without opening a browser automatically. Press `Enter` to open the URL and copy the code, or open the URL manually and enter the code.
32
+ - **Cancellation and errors:** Pressing `Esc` or `Ctrl+C` cancels an in-progress login quietly and leaves previously saved credentials and catalogs untouched. Provider denials, expired device codes, timeouts, network errors, and storage errors remain visible.
33
+ - **Logout:** Run `/logout [provider]` (or `atomic auth logout <provider>` from the shell) to remove stored credentials from `~/.atomic/agent/auth.json` and any legacy `~/.pi/agent/auth.json`. Atomic cannot clear environment variables, CLI flags, or `models.json` keys; if one still authenticates the provider, the logout notice names it.
51
34
 
52
- Type `/logout ` to autocomplete providers with stored credentials, or run `/logout kimi-coding` to filter the selector. From the shell, `atomic auth logout <provider>` clears stored credentials and succeeds even when nothing is stored.
35
+ Built-in and extension-provided OAuth work in interactive and non-interactive sessions. Login completes as soon as credentials are saved; catalog refresh runs separately in the background.
53
36
 
54
37
  ### Token refresh
55
38
 
56
- Atomic refreshes a stored OAuth token when fewer than **five minutes** of validity remain, so long turns do not start with an expiring token. Tokens outside that window are left unchanged.
57
-
58
- Concurrent sessions sharing `auth.json`, including subagents, coordinate token refresh under a lock held for up to **2 minutes** rather than rotating the same credential independently. Chat requests allow up to **15 seconds** for pre-request authentication preparation, while catalog refreshes wait up to **60 seconds**. If a refresh reports a timeout, the token exchange keeps running and saves its result when it finishes; retry the request instead of signing in again.
59
-
60
- When Atomic exits normally (quitting interactively, `SIGTERM`, ending an `atomic -p` run, or finishing an `atomic auth` command), it waits up to **3 seconds** for an in-flight token exchange to save. If Atomic is killed or crashes mid-refresh, run `/login <provider>` to sign in again.
61
-
62
- Running sessions pick up `auth.json` changes made by another Atomic window, `atomic auth`, or another process's refresh without restarting. This includes extension-provided OAuth. If a provider rejects a stored login as revoked or expired (such as `invalid_grant`, OpenAI's `refresh_token_expired` or `refresh_token_reused`, or HTTP 401), Atomic checks for a newer saved login first; otherwise it reports the provider name and asks you to run `/login <provider>`.
63
-
64
- If a chat request fails with HTTP 401 or a revoked-token error before any response content arrives, Atomic rereads credentials and retries once only if the effective credential changed. Explicit request credentials and runtime API-key overrides still take precedence over `auth.json`.
65
-
66
- ### Verify readiness before a session
39
+ OAuth providers subtract a short expiry buffer (3 to 5 minutes) when saving tokens, and Atomic refreshes any stored OAuth token when fewer than **5 minutes** of validity remain so long turns do not start with an expiring token. Tokens outside that window stay untouched.
67
40
 
68
- Run `atomic auth check --provider <provider>` to verify effective credentials without starting a session. You can pass `--model <model>`, including `provider/model`, when your automation already tracks a model ID.
41
+ Concurrent sessions sharing `auth.json` (including subagents) coordinate token refresh under a shared lock held for up to **2 minutes** rather than rotating the same credential independently. Chat requests allow up to **15 seconds** for pre-request authentication preparation, while catalog refreshes wait up to **60 seconds**. If a refresh times out, the token exchange keeps running and saves its result when finished; retry the request instead of signing in again.
69
42
 
70
- The command prints `ready`, `not_ready`, or `invalid`, and exits with code `0` (`ready`), `1` (`not_ready`), or `2` (`invalid`). Add `--json` to include the resolved provider, credential type, and non-ready reason.
43
+ When Atomic exits normally (interactive quit, `SIGTERM`, ending an `atomic -p` run, or finishing an `atomic auth` command), it waits up to **3 seconds** for an in-flight token exchange to save. If Atomic crashes or is force-killed mid-refresh, run `/login <provider>` again.
71
44
 
72
- Checks refresh expired OAuth tokens by default through the locked `auth.json` path. Pass `--no-refresh` for a read-only probe that reads `~/.atomic/agent/auth.json` and legacy `~/.pi/agent/auth.json` without creating or writing files.
73
-
74
- Readiness output omits credential values unless you pass `--credentials` with `--provider` or an exact `--model`. That opt-in exports the credential on stdout (or in the JSON `credentials` field) and rejects an OAuth token with fewer than 30 minutes remaining when `--no-refresh` prevents a refresh. With `--credentials` (and without `--json`), non-ready and invalid statuses write to **stderr** so stdout stays empty and shell command substitution never captures `"not_ready"`.
45
+ Running sessions pick up `auth.json` updates made by another Atomic window, `atomic auth`, or another process's refresh without restarting. If a chat request fails with HTTP 401 or a revoked-token error before any response arrives, Atomic rereads credentials and retries once if the effective credential changed; otherwise it names the provider and asks you to run `/login <provider>`.
75
46
 
76
47
  ### OpenAI API or ChatGPT sign-in
77
48
 
78
- Run `/login openai`, then choose **API key** or **Sign in with ChatGPT**. ChatGPT sign-in authenticates the `openai` provider against OpenAI's Responses API; it is separate from `/login openai-codex`, which uses the Codex backend.
49
+ Run `/login openai`, then choose **Use a subscription** (Sign in with ChatGPT) or **Use an API key**. ChatGPT sign-in authenticates the `openai` provider against OpenAI's Responses API; it is separate from `/login openai-codex`, which uses the Codex backend.
79
50
 
80
- Complete the browser callback, or paste the final callback URL into the login dialog on a remote machine. If your browser cannot reach `127.0.0.1:1455`, copy the full address-bar URL (including `code`, `state`, and `client_id`) and paste it into Atomic. Atomic creates a global device identity on first use that project settings do not override. A saved login does not verify model entitlement or quota.
51
+ Complete the browser callback, or paste the final address-bar URL (including `code`, `state`, and `client_id`) into Atomic on a remote machine if your browser cannot reach `127.0.0.1:1455`. Atomic creates a global device identity on first use that project settings do not override. A saved login does not verify model entitlement or quota.
81
52
 
82
- For SDK-level `models.login()` options such as `agentName`, see [Provider reference](/providers/reference#sdk-login-options), [SDK API keys and OAuth](/sdk/reference#api-keys-and-oauth), and [`@bastani/atomic-ai`](/libraries/ai).
53
+ For SDK-level `models.login()` options such as `agentName`, see [SDK login options](/providers/reference#sdk-login-options) and [SDK API keys and OAuth](/sdk/reference#api-keys-and-oauth).
83
54
 
84
55
  ### Subscription and API key at the same time
85
56
 
86
- `openai` and `anthropic` store one credential each, so a subscription login replaces a stored API key. To use both simultaneously, configure the API-key-only providers `openai-api` and `anthropic-api`.
87
-
88
- Both providers expose the same chat models and endpoints as `openai` and `anthropic`, reading `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` unless you save a key with `/login openai-api` or `/login anthropic-api`. They never offer subscription login, and `anthropic-api` ignores `ANTHROPIC_OAUTH_TOKEN` and `ANTHROPIC_AUTH_TOKEN`.
57
+ `openai` and `anthropic` each store one credential, so a subscription login replaces a stored API key. To use both side by side, configure the API-key-only providers `openai-api` and `anthropic-api`.
89
58
 
90
- For example, sign in with ChatGPT under `openai` and select `openai/gpt-6-sol` for interactive chat while pinning a subagent to `openai-api/gpt-6-sol` to bill your API key.
59
+ Both expose the same chat models and endpoints as `openai` and `anthropic`, reading `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` unless you save a key via `/login openai-api` or `/login anthropic-api`. They never offer subscription login, and `anthropic-api` ignores `ANTHROPIC_OAUTH_TOKEN` and `ANTHROPIC_AUTH_TOKEN`.
91
60
 
92
- The GPT-6 Luna Decisions classifier (`openai-decisions`) has no login of its own. It resolves keys in order: `openai-api`, `openai` (API key only), then `OPENAI_API_KEY`, skipping ChatGPT sign-in. See [Classifier models](/models#use-classifier-models).
61
+ For example, sign in with ChatGPT under `openai` for interactive chat while pinning a subagent to `openai-api/gpt-6.2-sol` to bill your API key.
93
62
 
94
- OpenAI image models (`openai-images`, such as `openai-images/gpt-image-2.6-flare`) follow the same key order and also skip ChatGPT sign-in. If you only signed in with ChatGPT, save a key via `/login openai-api` or set `OPENAI_API_KEY` to enable image generation.
63
+ Two specialized OpenAI providers also skip ChatGPT sign-in and resolve keys in order (`openai-api`, `openai` API key, then `OPENAI_API_KEY`):
95
64
 
96
- GPT Image 2.6 models (`gpt-image-2.6-flare` and `gpt-image-2.6-sunburst`) support SVG (`outputFormat: "svg"`) and animated GIF (`outputFormat: "gif"`, 2 to 16 frames). SVG needs no extra option: when your account requires `svg.model` and the request omits it, Atomic retries once with `gpt-6.1-sol`. Pass `svg: { model }` to select a specific authoring model, which Atomic always sends as given. SVG generation takes tens of seconds, so avoid a short `timeoutMs`. Use these models from [codemode](/codemode#generate-images) or an [extension](/extensions/api-reference#ctx-modelregistry-ctx-model-ctx-scopedmodels).
65
+ - **OpenAI Decisions (`openai-decisions`):** Provides `openai-decisions/gpt-6-luna` for structured classification; see [Use classifier models](/models#use-classifier-models).
66
+ - **OpenAI Images (`openai-images`):** Provides GPT Image 1 through GPT Image 2.6 (including SVG and animated GIF generation on GPT Image 2.6); see [Use image models](/models#use-image-models). If you only signed in with ChatGPT, save a key via `/login openai-api` or set `OPENAI_API_KEY` to enable image generation.
97
67
 
98
68
  ### OpenAI Codex
99
69
 
100
70
  - Requires a ChatGPT Plus or Pro subscription.
101
71
  - Officially endorsed by OpenAI: [Codex for OSS](https://developers.openai.com/community/codex-for-oss).
72
+ - Supports both browser callback login and a device-code flow (`--no-browser`).
102
73
 
103
- If the Codex backend reports an invalidated or revoked token and no newer login exists, run `/logout`, choose **OpenAI ChatGPT Plus/Pro**, then run `/login` again and retry. Atomic displays these recovery steps with the error and never deletes stored credentials automatically.
104
-
105
- For Codex requests, `models.json` headers or per-request SDK headers can override `originator` and `User-Agent`. Atomic still supplies the authenticated bearer token and ChatGPT account ID.
74
+ If the Codex backend reports an invalidated or revoked token and no newer login exists, run `/logout`, choose **OpenAI ChatGPT Plus/Pro**, then run `/login` again and retry. Atomic displays these steps with the error and never deletes stored credentials automatically.
106
75
 
107
- Compare GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Astra, GPT-6.1 Sol, and GPT-6.1 Terra in [OpenAI built-in models](/models/reference#openai-built-in-models). GPT-6 Sol and GPT-6 Luna are also available as `openai/gpt-6-sol`, `openai/gpt-6-luna`, `openai-codex/gpt-6-sol`, and `openai-codex/gpt-6-luna`.
76
+ For Codex requests, `models.json` headers or per-request SDK headers can override `originator` and `User-Agent` while Atomic continues supplying the bearer token and ChatGPT account ID.
108
77
 
109
- Models that advertise a Fast tier get a derived `-fast` variant, such as `openai-codex/gpt-6.1-sol-fast`, which sends the base upstream model with `service_tier: priority`. For example, `atomic --model openai-codex/gpt-6.1-sol-fast:high` selects priority routing at high effort. Account rollouts and client policies still govern actual access.
110
-
111
- Account aliases follow their own authentication method. Fast and Ultrafast choices work with either authentication method when the account supports the requested tier.
78
+ Compare GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Astra, GPT-6.1 Sol, and GPT-6.1 Terra in [OpenAI built-in models](/models/reference#openai-built-in-models). GPT-6 Sol and GPT-6 Luna are also available as `openai/gpt-6-sol`, `openai/gpt-6-luna`, `openai-codex/gpt-6-sol`, and `openai-codex/gpt-6-luna`. Extension-registered provider aliases follow their own authentication method.
112
79
 
113
80
  #### Fast and Ultrafast tiers
114
81
 
115
- Atomic offers a tier only for models that advertise it in Codex's catalog or OpenAI's published API pricing:
116
-
117
- - **Fast** (`service_tier: priority`): every Codex model except GPT-6.1 Terra, plus `openai/*` models listed on OpenAI's [Fast pricing](https://developers.openai.com/api/docs/pricing) tab. Models such as `openai/gpt-5-nano`, `openai/gpt-5-pro`, and `openai/o1` have no `-fast` choice.
118
- - **Ultrafast** (`service_tier: "ultrafast"`): GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Astra, and GPT-6.1 Sol (`openai/gpt-6.2-astra-ultrafast`, `openai/gpt-6.2-sol-ultrafast`, `openai/gpt-6-astra-ultrafast`, and `openai/gpt-6.1-sol-ultrafast`, also under `openai-api/` and `openai-codex/`), plus `openai/gpt-5.6-sol-ultrafast` (also under `openai-api/`). Each sends the base upstream model with `service_tier: "ultrafast"`. GPT-5.6 Sol Ultrafast is a limited preview.
119
-
120
- Ultrafast requires an eligible plan: Pro $500 or an eligible Enterprise or Edu workspace with ChatGPT sign-in, or Pro $200 for GPT-6.2 Sol. With an API key, it is available at low default rate limits.
82
+ Atomic offers Fast and Ultrafast variants only for models that advertise them in Codex's catalog or OpenAI's published API pricing:
121
83
 
122
- If OpenAI or Codex rejects a Fast or Ultrafast tier (such as `400 Invalid service_tier argument`), Atomic retries once at the default tier and warns that the request ran at default. Other providers still fail the request.
84
+ - **Fast (`service_tier: priority`):** Every Codex model except GPT-6.1 Terra, plus `openai/*` models listed on OpenAI's [Fast pricing](https://developers.openai.com/api/docs/pricing) tab (for example `openai-codex/gpt-6.2-sol-fast:high`). Models such as `openai/gpt-5-nano` and `openai/gpt-5-pro` have no `-fast` variant.
85
+ - **Ultrafast (`service_tier: "ultrafast"`):** GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Astra, and GPT-6.1 Sol (`gpt-6.2-astra-ultrafast`, `gpt-6.2-sol-ultrafast`, `gpt-6-astra-ultrafast`, `gpt-6.1-sol-ultrafast` under `openai/`, `openai-api/`, and `openai-codex/`), plus limited-preview `gpt-5.6-sol-ultrafast` under `openai/` and `openai-api/`.
123
86
 
124
- With an API key, Atomic also warns if OpenAI reports a slower tier than requested. With ChatGPT sign-in on `openai/*` or `openai-codex/*`, it does not, because the ChatGPT backend reports `default` even when serving Fast or Ultrafast. Warnings appear under the response in interactive mode, on stderr in print mode, and in `diagnostics` in JSON mode.
87
+ Ultrafast requires an eligible plan (Pro $500 or an eligible Enterprise/Edu workspace with ChatGPT sign-in, or Pro $200 for GPT-6.2 Sol; available at low default rate limits with an API key).
125
88
 
126
- Unadvertised tiers are omitted so requests run at standard processing instead of failing. `flex` is always passed through. An explicit `default` omits the tier on Codex and sends `default` on the OpenAI API.
127
-
128
- Usage is priced at the serving tier using OpenAI's published per-model rates. Fast is typically 2x Standard (GPT-5.5 is 2.5x; GPT-4o is 1.7x). Ultrafast rates for GPT-6.2 Astra, GPT-6.2 Sol, GPT-6 Astra, and GPT-6.1 Sol are listed in [OpenAI built-in models](/models/reference#openai-built-in-models) ([OpenAI API pricing](https://developers.openai.com/api/docs/pricing?latest-pricing=ultrafast)); GPT-5.6 Sol Ultrafast is priced at 6x Standard ($24 input, $120 output).
129
-
130
- With an API key, a Fast request served at Standard is billed at Standard; with ChatGPT sign-in it uses the chosen tier's API rate for displayed cost. On ChatGPT sign-in, [Codex](https://developers.openai.com/codex/speed) counts Fast against included limits at 2.5x and Astra Ultrafast at 8x, and bills purchased credits at 2x and 6x.
131
-
132
- ### Fast models
133
-
134
- Fast inference is a selectable model ID, not a toggle. When a provider enables fast mode via an API parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives a `<id>-fast` model that sets that parameter, such as `anthropic/claude-opus-5-fast`. When a provider publishes fast models under their own IDs (GitHub Copilot), Atomic exposes those exact IDs without derivation.
135
-
136
- Fast models appear alongside their normal siblings in `/model` and `atomic --list-models` and work with thinking suffixes such as `anthropic/claude-opus-5-fast:high`.
137
-
138
- Three provider paths derive `-fast` variants:
139
-
140
- - **OpenAI and Codex** (`openai/*`, `openai-api/*`, `openai-codex/*`): models that advertise Fast (see [Fast and Ultrafast tiers](#fast-and-ultrafast-tiers)) send the base upstream model ID with `service_tier: priority`.
141
- - **xAI** (`xai/*`): every Grok model gets a `-fast` variant (such as `xai/grok-4.7-fast`) that sends the base upstream model ID with xAI [Priority Processing](https://docs.x.ai/developers/advanced-api-usage/priority-processing) (`service_tier: priority`).
142
- - **Anthropic** (`anthropic/*`, `anthropic-api/*`): exposes [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for `anthropic/claude-opus-5-5-fast`, `anthropic/claude-opus-5-fast`, and `anthropic/claude-opus-4-8-fast`, sending the base model ID with `speed: "fast"` and the `fast-mode-2026-02-01` beta header. Works with both API keys and Claude subscriptions.
143
-
144
- Renamed providers, proxies, Azure, Bedrock, Vertex, OpenRouter, Vercel AI Gateway, generic OpenAI- or Anthropic-compatible providers, and providers whose streaming is implemented by an extension never receive synthetic fast variants. GitHub Copilot advertises its own fast IDs per account; see [GitHub Copilot](#github-copilot).
145
-
146
- Atomic persists and displays the canonical `-fast` ID even when sending the base model ID upstream, so sessions, usage rows, fallbacks, and subagent labels distinguish fast from normal models without a separate UI badge.
147
-
148
- A derived fast variant owns two request fields: the upstream model ID and the tier (`service_tier` or Anthropic `speed`). A `before_provider_request` hook may modify other fields, but replacing the payload with a non-object or altering either route-owned field fails with an error. Select the normal sibling when a request needs custom routing.
149
-
150
- Fast behavior comes from built-in fast-tier routing, never from a `-fast` or `-ultrafast` name suffix. If a provider, `models.json`, or an extension already defines that exact ID, your definition wins, Atomic suppresses the derived duplicate, and startup warns about the collision.
151
-
152
- Provider-owned names ending in `-fast` or `-pro` stay ordinary exact IDs. For example, Vercel AI Gateway publishes `openai/gpt-6-astra` and `openai/gpt-6-astra-fast`, and OpenRouter publishes `openai/gpt-6-astra` and `openai/gpt-6-astra-pro`. Their own catalog routing and rates apply.
153
-
154
- Choose fast variants deliberately for subagents, because parallel runs multiply token usage and priority tiers cost more.
155
-
156
- Anthropic fast mode delivers up to 2.5x higher output throughput at 2x standard token rates (with prompt-cache multipliers on top), billed by the speed Anthropic reports in usage. Exhausted fast-mode rate limits return HTTP 429 and retry normally rather than silently downgrading to standard speed. Switching between fast and normal Claude models invalidates the prompt cache.
89
+ - If OpenAI or Codex rejects a Fast or Ultrafast tier (such as `400 Invalid service_tier argument`), Atomic retries once at the default tier and warns that the request ran at default.
90
+ - With an API key, Atomic warns if OpenAI reports a slower tier than requested. With ChatGPT sign-in, it does not, because the ChatGPT backend reports `default` even when serving Fast or Ultrafast.
91
+ - Unadvertised tiers are omitted so requests run at standard processing instead of failing. `flex` always passes through; explicit `default` omits the tier on Codex and sends `default` on the OpenAI API.
92
+ - Usage is priced at the serving tier using OpenAI's published per-model rates (Fast is typically 2x Standard; GPT-5.5 is 2.5x; GPT-4o is 1.7x; Ultrafast rates are listed in [OpenAI built-in models](/models/reference#openai-built-in-models)). On ChatGPT sign-in, [Codex](https://developers.openai.com/codex/speed) counts Fast against included limits at 2.5x and Astra Ultrafast at 8x, and bills purchased credits at 2x and 6x.
157
93
 
158
94
  ### Claude Pro/Max
159
95
 
160
96
  Anthropic subscription auth works with Claude Pro/Max accounts. Third-party usage draws from [extra usage](https://claude.ai/settings/usage) and bills per token rather than against Claude plan limits.
161
97
 
162
- Run `/login anthropic` and select subscription authentication. **Browser login (default)** uses a local callback on port `53692` (falling back to a free port) and accepts a pasted redirect URL. Choose **Copy code login (headless)** when your browser runs on another machine, then paste the displayed `code#state` value into Atomic.
98
+ Run `/login anthropic` and choose **Use a subscription**. **Browser login (default)** uses a local callback on port `53692` (falling back to a free port) and accepts a pasted redirect URL. Choose **Copy code login (headless)** when your browser runs on another machine, then paste the displayed `code#state` value into Atomic.
163
99
 
164
- When configuring Anthropic with environment variables instead of `/login`, Atomic checks credentials in this order:
100
+ When configuring Anthropic with environment variables instead of `/login`, Atomic checks credentials in this order (empty variables count as unset; avoid setting both `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_API_KEY` accidentally):
165
101
 
166
102
  1. Stored `auth.json` credential (subscription or saved API key)
167
103
  2. `ANTHROPIC_AUTH_TOKEN` (gateway-issued bearer token sent as `Authorization: Bearer ...` without synthesizing `x-api-key`)
168
104
  3. `ANTHROPIC_OAUTH_TOKEN`
169
105
  4. `ANTHROPIC_API_KEY`
170
- 5. Anthropic Workload Identity Federation
171
-
172
- Empty environment variables do not count as configured. Avoid setting both `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_API_KEY` accidentally.
106
+ 5. [Anthropic workload identity federation](#anthropic-workload-identity-federation)
173
107
 
174
- Claude Opus 5 models are included in the Anthropic and Amazon Bedrock catalogs. With bearer-only Anthropic auth, select an exact entry such as `anthropic/claude-opus-5` or `anthropic/claude-opus-5-5` in `/model`; Bedrock uses its catalog inference profile. `xhigh` appears only when the selected entry advertises it.
175
-
176
- Claude Fable 5.2 (`anthropic/claude-fable-5-2`, $8 input / $40 output per million tokens, 1M context, 128K max output) is included in the Anthropic catalog. Like Fable 5.1, it supports per-message effort and mid-conversation system messages, and restricts server-side fallback to Claude Opus 5 because Claude Opus 4.8 does not accept per-message effort. Mirrors such as OpenRouter's `anthropic/claude-fable-5.2` receive the same per-message effort support.
177
-
178
- ### Anthropic workload identity federation
179
-
180
- When no Anthropic API key, bearer token, or subscription login is configured, Atomic enables workload identity federation if `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID`, and `ANTHROPIC_IDENTITY_TOKEN_FILE` are all set.
181
-
182
- The Anthropic SDK exchanges the identity token for a short-lived access token and rereads the token file on each refresh, so keep that file updated during long sessions. `ANTHROPIC_SERVICE_ACCOUNT_ID` and `ANTHROPIC_WORKSPACE_ID` are sent when set.
183
-
184
- API keys, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_OAUTH_TOKEN`, and custom authorization headers take precedence over federation. Federation applies only to the `anthropic` provider.
108
+ Claude Opus 5 (`anthropic/claude-opus-5`, `anthropic/claude-opus-5-5`) and Claude Fable 5.2 (`anthropic/claude-fable-5-2`, $8 input / $40 output per million tokens, 1M context, 128K max output) are included in the Anthropic catalog. Both Fable 5.1 and Fable 5.2 support per-message effort and mid-conversation system messages and restrict server-side fallback to Claude Opus 5.
185
109
 
186
110
  ### GitHub Copilot
187
111
 
188
- - Press Enter for `github.com`, or enter your GitHub Enterprise Server domain.
189
- - Personal access tokens also work: store one with `/login github-copilot` (choose **Use an API key**) or set `COPILOT_GITHUB_TOKEN`. A stored key takes precedence over the environment variable.
190
- - Models come from Atomic's built-in GitHub Copilot catalog plus models advertised by your account's `/models` endpoint. Once Atomic reads your account list via OAuth or a saved API key, it shows only models in that list; see [Which models are shown](#which-models-are-shown).
191
- - If Copilot returns "model not supported", enable the model in VS Code under Copilot Chat's model selector.
192
-
193
- Copilot includes `github-copilot/gpt-6.2-astra`, `github-copilot/gpt-6.2-sol`, `github-copilot/gpt-6.1-sol`, `github-copilot/gpt-6.1-terra`, and `github-copilot/gpt-6-astra`. See [OpenAI built-in models](/models/reference#openai-built-in-models) for context windows and reasoning levels. Account policy still controls actual availability.
194
-
195
- Atomic reads your account's `/models` list on every network catalog refresh (at interactive startup, from `/model`, and via `atomic update --models`) and caches it in `models-store.json` for offline and `atomic -p` runs. If a refresh fails, previously cached models remain available.
196
-
197
- Each discovered model:
112
+ - Run `/login github-copilot` and press `Enter` for `github.com` or enter your GitHub Enterprise Server domain.
113
+ - Personal access tokens also work: save one via `/login github-copilot` (**Use an API key**) or export `COPILOT_GITHUB_TOKEN` (a stored key takes precedence).
114
+ - If Copilot returns "model not supported", enable the model in VS Code under Copilot Chat's model selector, then run `/login` or `atomic update --models`.
198
115
 
199
- - Keeps its advertised ID unchanged upstream and shows the account's display name in `/model`.
200
- - Carries limits, vision settings, and reasoning efforts from the account list (adjustable via `modelOverrides`).
201
- - Omits 24-hour prompt-cache retention by default; set `compat.supportsLongCacheRetention` in `modelOverrides` if the model accepts it.
202
- - Never overwrites a built-in entry with the same ID.
203
- - Is skipped if disabled by policy, hidden from the picker, or lacking tool-call support.
116
+ Copilot serves models from multiple vendors—including OpenAI GPT-6 (`gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-sol`, `gpt-6.1-terra`, `gpt-6-astra`), Gemini 3.8/4, Kimi K3, Grok 4.5–4.7, and Claude—plus any additional chat models your account advertises on its `/models` endpoint. Atomic refreshes your account's model list at interactive startup, in `/model`, and via `atomic update --models`, caching it in `models-store.json` for offline and `atomic -p` runs.
204
117
 
205
- Copilot fast models appear only when advertised by your account's `/models` list and pair with their base model when the entry's `family` field names it. Each refresh saves the model lists alongside your OAuth login or saved API key so accounts never bleed models into each other.
206
-
207
- If an SDK session or `atomic -p` run has no cached Copilot catalog and cannot find its saved default model locally, it queries the account list once for that session. Run `atomic update --models` to refresh the shared cached list.
118
+ Discovered account models keep their advertised IDs unchanged, inherit account-reported limits, vision settings, and reasoning efforts (adjustable via `modelOverrides`), omit 24-hour prompt-cache retention by default, never overwrite built-in entries, and skip models disabled by policy or lacking tool-call support. Copilot fast models appear only when advertised by your account.
208
119
 
209
120
  #### Which models are shown
210
121
 
211
- After Atomic reads your account's `/models` list with an OAuth login or saved API key, built-in Copilot models absent from that list are hidden across `/model`, `--list-models`, [scoped models](/settings#enabledmodels), and cycling. Discovered models stay visible.
212
-
213
- Each credential keeps its own saved list (stored beside the key in `auth.json`), and provider aliases created with `registerProviderAlias` filter by their own credential's list. Saving a new API key with `/login` clears the previous list until the next network refresh.
122
+ Once Atomic reads your account's `/models` list using an OAuth login or saved API key, built-in Copilot models absent from that list are hidden across `/model`, `--list-models`, [scoped models](/settings#enabledmodels), and model cycling. Each saved credential and [extension provider alias](/custom-provider/registration) maintains its own filter list so accounts never mix models.
214
123
 
215
- Atomic hides nothing on a guess:
124
+ Atomic never hides models on a guess:
216
125
 
217
- - Before the first successful refresh (such as an offline first start), the entire built-in catalog and any cached models stay visible.
218
- - If a refresh fails offline or with HTTP 401, nothing new is hidden; credentials with earlier saved lists keep them.
219
- - An API key whose list returns no usable models falls back to showing the full catalog.
126
+ - Before the first successful refresh (such as an offline first start), the full built-in catalog and any cached models remain visible.
127
+ - If a refresh fails offline or with HTTP 401, earlier saved lists stay intact and nothing new is hidden.
220
128
  - Models defined in `models.json` are never hidden.
221
- - Tokens from `COPILOT_GITHUB_TOKEN`, `--api-key`, env-var references, or shell commands are not paired with saved filter lists; save the token directly via `/login github-copilot` and **Use an API key** to enable per-account filtering.
222
- - Provider aliases receive discovered models from the `github-copilot` catalog filtered by each alias's own account list.
129
+ - Tokens supplied only via `COPILOT_GITHUB_TOKEN`, `--api-key`, env-var references, or shell commands do not maintain saved filter lists; save the token with `/login github-copilot` (**Use an API key**) to enable per-account filtering.
223
130
 
224
131
  #### Model families
225
132
 
226
- Copilot serves models from multiple vendors through one provider. Built-in entries use the API declared in Atomic's catalog; discovered entries use the first endpoint Atomic supports from `supported_endpoints` (Messages, Responses, then Chat Completions). Unsupported endpoints such as `/interactions` and `ws:/responses` are ignored.
133
+ Built-in entries use the API declared in Atomic's catalog; discovered models automatically select the highest-priority endpoint Atomic supports from your account's listing (Messages, Responses, then Chat Completions):
227
134
 
228
135
  | Family | Bundled models | API | Thinking levels | Reasoning on next turn | Context / max output |
229
136
  | --- | --- | --- | --- | --- | --- |
230
137
  | Gemini | `gemini-3.8-flash`, `gemini-4-argon`, `gemini-4-carbon`, `gemini-4-hydrogen`, `gemini-4-neon` | Chat Completions | `low`, `medium`, `high` (`gemini-4-hydrogen` and `gemini-4-neon` add `xhigh`) | Opaque reasoning token replayed to the same model | 1,000,000 / 64,000; 1,048,576 / 65,536 for Gemini 4 |
231
138
  | Kimi | `kimi-k3` | Chat Completions | `low`, `high`, `max` | Readable reasoning replayed to the same model | 1,048,576 / 1,048,576 |
232
139
  | Grok | `grok-4.5`, `grok-4.6`, `grok-4.7` | Responses | `low`, `medium`, `high` (`4.6` and `4.7` add `xhigh`) | Encrypted reasoning item replayed to the same model | 500,000 / 128,000 |
233
- | Discovered | Any chat model the account lists | From `supported_endpoints` | From `reasoning_effort` | Matches the selected API | From the entry's limits |
234
-
235
- Shared behavior across Copilot families:
140
+ | Discovered | Any chat model your account advertises | Messages, Responses, or Chat Completions | Account-advertised reasoning efforts | Matches the selected API | Account-advertised limits |
236
141
 
237
- - Parallel tool calls work, empty tool arguments normalize to `{}`, and streamed JSON deltas join before execution. Responses tool-call IDs are shortened to valid `call_id` values on replay.
238
- - Strict tool schemas are enabled for built-in Gemini and Kimi models, and for discovered models whose entry advertises `structured_outputs`.
239
- - Reasoning tokens count toward output tokens, including for Gemini models.
240
- - All built-in entries above accept images; discovered models take vision flags and image size/count limits from `vision` and `limits.vision`.
241
- - Prompts rejected below the nominal context window trigger compaction and retry like any context overflow.
242
- - Chat Completions and Responses turns that finish with no text and no tool calls fail as `empty-response` and retry.
243
-
244
- Run `/login` again or `atomic update --models` after plan changes.
142
+ All built-in entries above accept images (discovered models read vision flags and image limits from your account listing), support parallel tool calls and strict tool schemas where advertised, count reasoning tokens toward output tokens, compact on prompts rejected below the nominal context window, and retry empty responses.
245
143
 
246
144
  #### Errors
247
145
 
248
- Atomic classifies every failed Copilot request into a typed error class so [retries](/settings#retry) and [model fallback](/settings#fallbackmodels) react to the failure cause rather than error text:
146
+ Atomic classifies every failed Copilot request into one of 11 typed error classes so [retries](/settings#retry) and [model fallback](/settings#fallbackmodels) react to the failure cause rather than message text:
249
147
 
250
148
  - **Immediate fallback (no retry):** unavailable model, exhausted quota, invalid request, or authentication failure.
251
149
  - **Retry, then fallback:** rate limit (honors `Retry-After`), service unavailable (408/5xx/529), cut stream, empty response, or unrecognized response.
252
150
  - **Compaction (no fallback):** prompt exceeds the model's prompt-token limit (or HTTP 413).
253
151
  - **Content filter:** retries or falls back according to `retry.fallbackOnContentFilter`.
254
152
 
255
- For the full 11-class error table, error codes, fields, and SDK helper functions, see [GitHub Copilot errors](/providers/reference#github-copilot-errors).
153
+ For SDK error inspection helpers, see [Provider errors](/providers/reference#provider-errors).
256
154
 
257
155
  #### Streams cut after a long attempt
258
156
 
259
- A `stream-ended-early` error reports `requestId` (`x-request-id`), `durationMs`, and `startedContent` (whether any stream event arrived before the cut):
157
+ A `stream-ended-early` error reports the Copilot request ID (`x-request-id`), attempt duration, and whether any response content arrived before the cut:
260
158
 
261
159
  ```text
262
160
  GitHub Copilot response stream ended early: claude-opus-5.5 (stream-ended-early). Attempt ran 312.4 s, response started, request ID <id>. If the stream keeps ending early, split the work into smaller steps, lower the thinking effort, or add a fallback model with the fallbackModels setting.
263
161
  ```
264
162
 
265
- Streams cut during long thinking or very large tool calls often fail at the same point on retry. Atomic treats any attempt that ran **5 minutes or more** before cutting off as a long attempt:
163
+ Streams cut during long thinking or large tool calls often fail at the same point on retry. Atomic treats any attempt that ran **5 minutes or more** before cutting off as a long attempt:
266
164
 
267
165
  - A long cut gets at most one more retry on the same model; shorter cuts keep the normal [`retry.maxRetries`](/settings#retry) budget.
268
166
  - A second consecutive long cut stops retrying that model and moves to [`fallbackModels`](/settings#fallbackmodels) (which can include the same model at a lower effort, such as `github-copilot/claude-opus-5.5:medium`), or ends with the error.
269
167
  - Partial output from a cut stream is never replayed; every retry restarts the turn.
270
168
 
271
- Messages stream error events follow their provider error type (`invalid_request_error` is non-retryable; `rate_limit_error`, `overloaded_error`, and `api_error` are retryable; unknown event types become `unrecognized-response`). Cancelled requests and pre-response connection failures use Atomic's standard network handling.
272
-
273
- For SDK extraction and serialization helpers, see [GitHub Copilot error helpers](/providers/reference#github-copilot-error-helpers).
274
-
275
169
  #### Responses that end without a finish reason
276
170
 
277
- Copilot occasionally ends a Chat Completions stream cleanly without a finish reason (commonly on Gemini models). Because a cut-off stream never sends `data: [DONE]`, Atomic uses `[DONE]` to distinguish normal completion from a cut stream:
278
-
279
- - Complete tool calls with valid JSON object arguments finish as `toolUse`; text without tool calls finishes as `stop`.
280
- - No text and no tool calls fail as `empty-response` and retry.
281
- - Incomplete tool calls or streams ending without `[DONE]` fail as `stream-ended-early`.
282
-
283
- When Atomic infers the stop reason, `rawStopReason` stays unset and an inferred stop-reason diagnostic is recorded in `/debug` and session exports (see [GitHub Copilot error helpers](/providers/reference#github-copilot-error-helpers)).
171
+ Copilot occasionally closes a Chat Completions stream cleanly without a finish reason (commonly on Gemini models). Because an abnormally cut stream never sends `data: [DONE]`, Atomic uses `[DONE]` to distinguish normal completion from a cut stream: complete tool calls finish as `toolUse`, text finishes as `stop`, empty responses fail as `empty-response` and retry, and incomplete tool calls or streams ending without `[DONE]` fail as `stream-ended-early`. When Atomic infers the stop reason, the raw provider stop reason stays unset and an inferred stop-reason diagnostic appears in `/debug` and session exports.
284
172
 
285
173
  #### Endpoint routing for personal access tokens
286
174
 
287
- OAuth logins receive their Copilot host from GitHub's token exchange. Raw personal access tokens (saved via `/login` as an API key or set in `COPILOT_GITHUB_TOKEN`) resolve their host in this order:
175
+ OAuth logins receive their Copilot host from GitHub's token exchange. Personal access tokens (saved via `/login` as an API key or set in `COPILOT_GITHUB_TOKEN`) resolve their host in order:
288
176
 
289
177
  1. `COPILOT_API_TARGET`, then `GITHUB_COPILOT_BASE_URL` (explicit host or full URL)
290
178
  2. The `proxy-ep=` segment embedded in the token
291
179
  3. `GITHUB_SERVER_URL`: `<tenant>.ghe.com` routes to `copilot-api.<tenant>.ghe.com`; other non-`github.com` hosts route to `https://api.enterprise.githubcopilot.com`
292
180
  4. `https://api.githubcopilot.com` (public routing hub)
293
181
 
294
- A `models.json` `baseUrl` for `github-copilot` overrides all of the above. Without a saved API key or `COPILOT_GITHUB_TOKEN`, the provider uses Atomic's default GitHub Copilot configuration.
295
-
296
- Raw tokens (`github_pat_`, `ghp_`, `gho_`, `ghu_`) send `Copilot-Integration-Id: copilot-developer-cli` unless overridden by `models.json`, `modelOverrides`, or request headers (such as `vscode-chat`). OAuth tokens keep their OAuth headers.
297
-
298
- Business and enterprise tokens sent to the individual host return `421 Misdirected Request`; set `COPILOT_API_TARGET` to your organization's Copilot host to fix it.
182
+ A `models.json` `baseUrl` for `github-copilot` overrides all of the above. Raw tokens (`github_pat_`, `ghp_`, `gho_`, `ghu_`) send `Copilot-Integration-Id: copilot-developer-cli` unless overridden via headers (such as `vscode-chat`). Business and enterprise tokens sent to the individual host return `421 Misdirected Request`; set `COPILOT_API_TARGET` to your organization's Copilot host to fix it.
299
183
 
300
184
  ### xAI (Grok/X subscription)
301
185
 
302
- Run `/login xai`, then select **Use a subscription**. `XAI_API_KEY` remains available through **Use an API key**.
303
-
304
- Atomic defaults xAI sessions to `grok-4.7`. Builtin subagents default to `model: "auto"`, running your saved default chat model (or the launching session's model) unless overridden. GitHub Copilot also exposes Grok 4.7 when account policy enables it. Network catalogs refresh and cache newer entries independently of the bundled snapshot.
186
+ Run `/login xai`, then select **Use a subscription** to start the device-code sign-in flow. `XAI_API_KEY` remains available through **Use an API key**.
305
187
 
306
- `xai/grok-4.7-fast` and other `xai/*-fast` choices request xAI Priority Processing for faster time-to-first-token and streaming. xAI bills priority at twice standard token rates only when the response confirms the priority tier; fallback to default processing is priced at standard rates.
188
+ Atomic defaults xAI sessions to `grok-4.7`. `xai/grok-4.7-fast` and other `xai/*-fast` choices request xAI Priority Processing, billed at twice standard token rates only when the response confirms priority processing (fallback to default processing bills at standard rates).
307
189
 
308
190
  ### Meta (Muse subscription)
309
191
 
310
- Run `/login meta`, then choose **Sign in with Meta** to start the device authorization flow. The login mints a Model API key that refreshes automatically about once a day. `META_API_KEY` remains available through **Use an API key**.
311
-
312
- ### Radius (removed)
313
-
314
- Atomic removed the `radius` provider. If your `models.json`, `settings.json`, or `--model` flag references `radius` or `"oauth": "radius"`, remove it and pick another provider with `/login` and `/model`. To connect a custom gateway that speaks the same protocol, register it as a custom provider with `"api": "pi-messages"`.
192
+ Run `/login meta`, then choose **Use a subscription** to start the device authorization flow. The login mints a Model API key that refreshes automatically about once a day. `META_API_KEY` remains available through **Use an API key**.
315
193
 
316
194
  ### OpenRouter
317
195
 
318
- Authenticate with `/login openrouter` or `OPENROUTER_API_KEY`.
319
-
320
- With a key configured, Atomic queries OpenRouter's `/models/user` endpoint and lists only the chat models that key can access, with your key's context window, max output, and pricing. Image and classifier models are not filtered.
196
+ Authenticate with `/login openrouter` (**Use an account** or **Use an API key**) or `OPENROUTER_API_KEY`.
321
197
 
322
- Atomic refreshes this list in the background at interactive startup, on `/model`, after `/login`, and via `atomic update --models`, caching it for offline, `atomic -p`, and RPC runs. Switching keys outside `/login` keeps the previous list until the next refresh. Saved sessions still restore models omitted by the current key.
198
+ With a key configured, Atomic queries OpenRouter's `/models/user` endpoint and lists only the chat models that key can access, with your key's context window, max output, and pricing (image and classifier models are not filtered). Atomic caches this list for offline, `atomic -p`, and RPC runs; saved sessions still restore models omitted by the current key.
323
199
 
324
200
  To route through a regional endpoint, override `baseUrl` in [`models.json`](/models/reference#overriding-built-in-providers):
325
201
 
@@ -333,109 +209,109 @@ To route through a regional endpoint, override `baseUrl` in [`models.json`](/mod
333
209
 
334
210
  If `/models/user` rejects the key or does not exist on a custom proxy URL, Atomic falls back to listing all OpenRouter models.
335
211
 
212
+ ## Fast models
213
+
214
+ Fast inference is a selectable model ID, not a toggle. When a provider enables fast mode via a request parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives a `<id>-fast` (and eligible `<id>-ultrafast`) variant that sends the base model ID with that tier parameter. When a provider publishes fast models under their own IDs (GitHub Copilot), Atomic exposes those exact IDs without derivation.
215
+
216
+ Fast models appear alongside their normal siblings in `/model` and `atomic --list-models` and work with thinking suffixes such as `anthropic/claude-opus-5-fast:high`.
217
+
218
+ | Provider path | Derived variants | Request tier and billing |
219
+ | --- | --- | --- |
220
+ | **OpenAI and Codex** (`openai`, `openai-api`, `openai-codex`) | Eligible `-fast` and `-ultrafast` models (see [Fast and Ultrafast tiers](#fast-and-ultrafast-tiers)) | `service_tier: priority` or `service_tier: "ultrafast"` |
221
+ | **xAI** (`xai`) | Every Grok model gets a `-fast` variant (such as `xai/grok-4.7-fast`) | xAI [Priority Processing](https://docs.x.ai/developers/advanced-api-usage/priority-processing) (`service_tier: priority`, 2x when confirmed) |
222
+ | **Anthropic** (`anthropic`, `anthropic-api`) | `claude-opus-5-5-fast`, `claude-opus-5-fast`, `claude-opus-4-8-fast` | [Anthropic fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) (`speed: "fast"`, up to 2.5x throughput at 2x standard rates; HTTP 429 retries normally instead of downgrading; switching between fast and normal invalidates prompt cache) |
223
+
224
+ - **Eligibility and proxies:** Custom provider IDs (including proxy providers registered under a custom name), Azure, Bedrock, Vertex, OpenRouter, Vercel AI Gateway, generic OpenAI- or Anthropic-compatible providers, and providers with a custom extension `streamSimple` handler never receive derived `-fast` variants. Overriding only `baseUrl` on built-in `openai`, `openai-api`, `openai-codex`, `anthropic`, `anthropic-api`, or `xai` preserves their derived variants.
225
+ - **Canonical IDs and collisions:** Atomic persists and displays the `-fast` / `-ultrafast` ID in sessions, usage, fallbacks, and subagents. Fast routing never comes from a name suffix alone: if a provider, `models.json`, or an extension defines that exact ID, your definition wins and startup warns about the collision. Provider-owned IDs such as Vercel AI Gateway's `openai/gpt-6-astra-fast` or OpenRouter's `openai/gpt-6-astra-pro` remain ordinary catalog IDs with their own rates.
226
+ - **Extension hooks:** A derived fast variant locks its upstream model ID and tier field (`service_tier` or `speed`). Extension request hooks (`before_provider_request`, see [Extension events](/extensions/events)) may edit other fields, but altering either locked field or returning a non-object fails the request.
227
+ - **Subagents:** Choose fast variants deliberately for subagents, because parallel runs multiply token usage at priority rates.
228
+
336
229
  ## API keys
337
230
 
338
231
  ### Environment variables or auth file
339
232
 
340
- Run `/login` to save an API key in `auth.json`, or export an environment variable before starting Atomic:
233
+ Run `/login` and choose **Use an API key** to store a key in `~/.atomic/agent/auth.json`, or export an environment variable before starting Atomic:
341
234
 
342
235
  ```bash
343
236
  export ANTHROPIC_API_KEY=sk-ant-...
344
237
  atomic
345
238
  ```
346
239
 
347
- For the full precedence order (`--api-key` > `auth.json` > extension or `models.json` `apiKey` > built-in environment variable), see [Credential resolution order](/providers/reference#resolution-order). For non-provider environment variables, see [Environment variables](/environment-variables).
348
-
349
- After login, `/model` uses the cached catalog immediately while a background refresh runs with a 15-second deadline. If a provider is slow or offline, Atomic keeps the last usable snapshot; see [Catalog freshness and precedence](/models/reference#catalog-freshness-and-precedence).
350
-
351
- Logout returns immediately without waiting for catalog refresh. Earlier background refreshes cannot undo a later login or logout. If an environment variable or runtime override still authenticates the provider, remove that source separately.
240
+ For full credential precedence (`--api-key` > `auth.json` > extension or `models.json` `apiKey` > built-in environment variable), see [Credential resolution order](/providers/reference#resolution-order). For non-provider variables, see [Environment variables](/environment-variables).
352
241
 
353
242
  | Provider | Environment variable | `auth.json` key |
354
243
  | --- | --- | --- |
244
+ | Amazon Bedrock | `AWS_PROFILE`, `AWS_BEARER_TOKEN_BEDROCK`, or `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` (+ optional `AWS_SESSION_TOKEN`) | `amazon-bedrock` |
355
245
  | Anthropic | `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_OAUTH_TOKEN`, or `ANTHROPIC_API_KEY` | `anthropic` |
356
246
  | Anthropic (API key only) | `ANTHROPIC_API_KEY` | `anthropic-api` |
357
247
  | Ant Ling | `ANT_LING_API_KEY` | `ant-ling` |
358
248
  | Azure | `AZURE_OPENAI_API_KEY` | `azure` |
359
- | OpenAI | `OPENAI_API_KEY` | `openai` |
360
- | OpenAI (API key only) | `OPENAI_API_KEY` | `openai-api` |
361
- | GitHub Copilot | `COPILOT_GITHUB_TOKEN` | `github-copilot` |
249
+ | Baseten | `BASETEN_API_KEY` | `baseten` |
250
+ | Cerebras | `CEREBRAS_API_KEY` | `cerebras` |
251
+ | Cloudflare AI Gateway | `CLOUDFLARE_API_KEY` (+ `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_GATEWAY_ID`) | `cloudflare-ai-gateway` |
252
+ | Cloudflare Workers AI | `CLOUDFLARE_API_KEY` (+ `CLOUDFLARE_ACCOUNT_ID`) | `cloudflare-workers-ai` |
362
253
  | DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
363
- | NVIDIA NIM | `NVIDIA_API_KEY` | `nvidia` |
254
+ | Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
255
+ | GitHub Copilot | `COPILOT_GITHUB_TOKEN` | `github-copilot` |
364
256
  | Google Gemini | `GEMINI_API_KEY` | `google` |
365
257
  | Google Vertex AI | `GOOGLE_CLOUD_API_KEY` (or ADC / service account) | `google-vertex` |
366
- | Mistral | `MISTRAL_API_KEY` | `mistral` |
367
258
  | Groq | `GROQ_API_KEY` | `groq` |
368
- | Cerebras | `CEREBRAS_API_KEY` | `cerebras` |
369
- | Cloudflare AI Gateway | `CLOUDFLARE_API_KEY` (+ `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_GATEWAY_ID`) | `cloudflare-ai-gateway` |
370
- | Cloudflare Workers AI | `CLOUDFLARE_API_KEY` (+ `CLOUDFLARE_ACCOUNT_ID`) | `cloudflare-workers-ai` |
371
- | xAI | `XAI_API_KEY` | `xai` |
372
- | OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
373
- | Vercel AI Gateway | `AI_GATEWAY_API_KEY` | `vercel-ai-gateway` |
374
- | ZAI | `ZAI_API_KEY` | `zai` |
375
- | ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` | `zai-coding-cn` |
376
- | OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
377
- | OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
378
259
  | Hugging Face | `HF_TOKEN` | `huggingface` |
379
- | TypeSafe Jev | `TYPESAFE_API_KEY` | `typesafe` |
380
- | Morph | `MORPH_API_KEY` | `morph` |
381
- | Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
382
- | Together AI | `TOGETHER_API_KEY` | `together` |
383
- | Baseten | `BASETEN_API_KEY` | `baseten` |
384
260
  | Kimi For Coding | `KIMI_API_KEY` | `kimi-coding` |
261
+ | llama.cpp | `LLAMA_BASE_URL` (+ optional `LLAMA_API_KEY`) | `llama.cpp` |
385
262
  | Meta | `META_API_KEY` | `meta` |
386
263
  | MiniMax | `MINIMAX_API_KEY` | `minimax` |
387
264
  | MiniMax (China) | `MINIMAX_CN_API_KEY` | `minimax-cn` |
265
+ | Mistral | `MISTRAL_API_KEY` | `mistral` |
388
266
  | Moonshot AI | `MOONSHOT_API_KEY` | `moonshotai` |
389
267
  | Moonshot AI (China) | `MOONSHOT_API_KEY` | `moonshotai-cn` |
390
- | Qwen Token Plan Team | `QWEN_TOKEN_PLAN_TEAM_API_KEY` | `qwen-token-plan` |
268
+ | Morph | `MORPH_API_KEY` | `morph` |
269
+ | NVIDIA NIM | `NVIDIA_API_KEY` | `nvidia` |
270
+ | OpenAI | `OPENAI_API_KEY` | `openai` |
271
+ | OpenAI (API key only) | `OPENAI_API_KEY` | `openai-api` |
272
+ | OpenAI Decisions | Reuses `openai-api`, `openai` API key, or `OPENAI_API_KEY` (skips ChatGPT sign-in) | *(uses `openai-api` / `openai`)* |
273
+ | OpenAI Images | Reuses `openai-api`, `openai` API key, or `OPENAI_API_KEY` (skips ChatGPT sign-in) | *(uses `openai-api` / `openai`)* |
274
+ | OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
275
+ | OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
276
+ | OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
391
277
  | Qwen Token Plan Individual | `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` | `qwen-token-plan-individual` |
392
- | Qwen Token Plan Team (China) | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` | `qwen-token-plan-cn` |
393
278
  | Qwen Token Plan Individual (China) | `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` | `qwen-token-plan-individual-cn` |
279
+ | Qwen Token Plan Team | `QWEN_TOKEN_PLAN_TEAM_API_KEY` | `qwen-token-plan` |
280
+ | Qwen Token Plan Team (China) | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` | `qwen-token-plan-cn` |
281
+ | Together AI | `TOGETHER_API_KEY` | `together` |
282
+ | TypeSafe Jev | `TYPESAFE_API_KEY` | `typesafe` |
283
+ | Vercel AI Gateway | `AI_GATEWAY_API_KEY` | `vercel-ai-gateway` |
284
+ | xAI | `XAI_API_KEY` | `xai` |
394
285
  | Xiaomi MiMo | `XIAOMI_API_KEY` | `xiaomi` |
395
- | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
396
286
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
287
+ | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` | `xiaomi-token-plan-cn` |
397
288
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
398
- | llama.cpp | `LLAMA_BASE_URL` (+ optional `LLAMA_API_KEY`) | `llama.cpp` |
289
+ | ZAI | `ZAI_API_KEY` | `zai` |
290
+ | ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` | `zai-coding-cn` |
399
291
 
400
292
  Provider notes:
401
293
 
402
- - **Z.AI and Baseten:** Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`) and also expose multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3` and also exposes `zai-org/GLM-5.3-Fast` and multimodal `zai-org/GLM-5.3-Flash`; OpenRouter exposes `z-ai/glm-5.3` and `z-ai/glm-5.3-flash`. GLM-5.3 entries support `low`, `high`, and `max` reasoning (not `off`); use `zai-org/GLM-5.2` or `zai/glm-5.2` when disabled reasoning is required.
403
- - **Qwen Token Plan:** Separate Team (`qwen-token-plan`, `qwen-token-plan-cn`) and Individual (`qwen-token-plan-individual`, `qwen-token-plan-individual-cn`) providers exist per region, all defaulting to `qwen3.8-max`. Set your plan's variable above; `QWEN_TOKEN_PLAN_API_KEY` and `QWEN_TOKEN_PLAN_CN_API_KEY` still work as fallbacks.
294
+ - **Z.AI and Baseten:** Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` and also expose multimodal `glm-5.3-flash`. Baseten defaults to `zai-org/GLM-5.3` and exposes `zai-org/GLM-5.3-Fast` and `zai-org/GLM-5.3-Flash`. GLM-5.3 entries support `low`, `high`, and `max` reasoning (not `off`); use `GLM-5.2` when disabled reasoning is required.
295
+ - **Qwen Token Plan:** Separate Team and Individual providers exist per region, all defaulting to `qwen3.8-max`. Legacy `QWEN_TOKEN_PLAN_API_KEY` and `QWEN_TOKEN_PLAN_CN_API_KEY` still work as fallbacks.
404
296
  - **Xiaomi MiMo:** Reasoning models on `xiaomi` and `xiaomi-token-plan-*` support only `off` and `high`.
405
- - **Kimi For Coding:** Uses OpenAI Chat Completions at `https://api.kimi.com/coding/v1`. Include `/v1` when overriding `baseUrl` in `models.json`. Kimi Code models always think, so `off` is not selectable.
297
+ - **Kimi For Coding:** Uses OpenAI Chat Completions at `https://api.kimi.com/coding/v1` (include `/v1` if overriding `baseUrl` in `models.json`). Kimi Code models always think, so `off` is not selectable.
406
298
 
407
- Use [`--list-models`](/reference/cli#model-options) to check the latest catalog entries for any provider.
299
+ Use [`--list-models`](/reference/cli#model-options) to inspect the latest catalog for any provider.
408
300
 
409
- #### Auth file
301
+ ### Auth file
410
302
 
411
- Store credentials in `~/.atomic/agent/auth.json` (Atomic also reads legacy `~/.pi/agent/auth.json` as a fallback):
303
+ Store credentials in `~/.atomic/agent/auth.json` (written with owner-only `0600` permissions; Atomic also reads legacy `~/.pi/agent/auth.json` as a fallback):
412
304
 
413
305
  ```json
414
306
  {
415
307
  "anthropic": { "type": "api_key", "key": "sk-ant-..." },
416
- "ant-ling": { "type": "api_key", "key": "..." },
417
308
  "openai": { "type": "api_key", "key": "sk-..." },
418
- "deepseek": { "type": "api_key", "key": "sk-..." },
419
- "nvidia": { "type": "api_key", "key": "nvapi-..." },
420
- "google": { "type": "api_key", "key": "..." },
421
- "opencode": { "type": "api_key", "key": "..." },
422
- "baseten": { "type": "api_key", "key": "..." },
423
- "opencode-go": { "type": "api_key", "key": "..." },
424
- "together": { "type": "api_key", "key": "..." },
425
- "qwen-token-plan": { "type": "api_key", "key": "sk-sp-..." },
426
- "qwen-token-plan-individual": { "type": "api_key", "key": "sk-sp-..." },
427
- "qwen-token-plan-cn": { "type": "api_key", "key": "sk-sp-..." },
428
- "qwen-token-plan-individual-cn": { "type": "api_key", "key": "sk-sp-..." },
429
- "xiaomi": { "type": "api_key", "key": "..." },
430
- "xiaomi-token-plan-cn": { "type": "api_key", "key": "..." },
431
- "xiaomi-token-plan-ams": { "type": "api_key", "key": "..." },
432
- "xiaomi-token-plan-sgp": { "type": "api_key", "key": "..." }
309
+ "openrouter": { "type": "api_key", "key": "sk-or-..." },
310
+ "deepseek": { "type": "api_key", "key": "$DEEPSEEK_API_KEY" }
433
311
  }
434
312
  ```
435
313
 
436
- Atomic creates `auth.json` with `0600` permissions (owner read/write only). Stored credentials take precedence over `models.json` keys and environment variables.
437
-
438
- API-key entries may also carry a provider-scoped `env` map. Those values override process environment variables while resolving the key, headers, provider settings (Cloudflare, Azure, Vertex, Bedrock), cache retention, and `HTTP_PROXY`/`HTTPS_PROXY`:
314
+ API-key entries can also carry a provider-scoped `env` map whose values override process environment variables when resolving keys, headers, cloud settings (Cloudflare, Azure, Vertex, Bedrock), cache retention, and `HTTP_PROXY`/`HTTPS_PROXY`:
439
315
 
440
316
  ```json
441
317
  {
@@ -451,64 +327,37 @@ API-key entries may also carry a provider-scoped `env` map. Those values overrid
451
327
  }
452
328
  ```
453
329
 
454
- ### Key resolution
455
-
456
- The `key` field accepts shell commands, environment interpolation, escapes, and literal values:
457
-
458
- - **Shell command:** `"!command"` executes the command and uses trimmed stdout (10-second timeout, 1 MiB stdout cap; non-zero exit or empty stdout fails resolution). On Windows, Atomic runs commands through your configured shell (`shellPath` or Git Bash) first and falls back to the default shell if unavailable.
459
- ```json
460
- { "type": "api_key", "key": "!security find-generic-password -ws 'anthropic'" }
461
- { "type": "api_key", "key": "!op read 'op://vault/item/credential'" }
462
- ```
463
- - **Caching difference between `auth.json` and `models.json`:** In `auth.json`, `!command` results are cached for the lifetime of the process, **including failed runs** (if a password manager prompt times out or fails once, restart Atomic to retry). In `models.json`, `!command` runs uncached on every request.
464
- - **Environment interpolation:** `"$ENV_VAR"` or `"${ENV_VAR}"` reads the variable and works inside larger strings (`${FOO}_BAR` separates `FOO` from literal `_BAR`). Empty environment variables (`VAR=""`) count as unset. If any variable in a composite string is unset or empty, the entire value fails to resolve.
465
- ```json
466
- { "type": "api_key", "key": "$MY_ANTHROPIC_KEY" }
467
- { "type": "api_key", "key": "${KEY_PREFIX}_${KEY_SUFFIX}" }
468
- ```
469
- - **Escapes (non-command values only):** `"$$"` produces a literal `"$"`; `"$!"` produces a literal `"!"` without running a command.
470
- ```json
471
- { "type": "api_key", "key": "$$literal-dollar-prefix" }
472
- { "type": "api_key", "key": "$!literal-bang-prefix" }
473
- ```
474
- - **Literal value:** Used directly.
475
- ```json
476
- { "type": "api_key", "key": "sk-ant-..." }
477
- { "type": "api_key", "key": "public" }
478
- ```
479
-
480
- Legacy bare uppercase variable names such as `MY_API_KEY` migrate to `$MY_API_KEY` on startup only when that variable is present in the environment; otherwise they remain literals. When resolution fails, Atomic omits `!command` text; braced `${NAME}` references always report the unset variable name, while unbraced `$NAME` references report the name only when it reads like a POSIX environment variable name so literal secrets containing `$` do not leak fragments. The same syntax applies to `apiKey` and `headers` in `models.json`; see [Value resolution](/models/reference#value-resolution). OAuth tokens from `/login` are also stored in `auth.json`.
481
-
482
- ## Cloud and gateway providers
483
-
484
- The providers below need extra settings or support platform-supplied credentials.
330
+ **Key value syntax:** Every `key` value supports literal strings, environment interpolation (`"$ENV_VAR"` or `"${ENV_VAR}"`, with `$$` and `$!` escapes for literal `$` and `!`), and shell commands (`"!op read 'op://vault/item/credential'"`). In `auth.json`, `!command` results (including failures) are cached for the lifetime of the process—restart Atomic if a password-manager prompt fails once—whereas `!command` in `models.json` runs uncached on every request. See [Value resolution](/models/reference#value-resolution) for full syntax, timeout, and redaction rules.
331
+
332
+ ## Cloud and enterprise providers {#cloud-and-gateway-providers}
333
+
334
+ The providers below support cloud identity chains, enterprise gateways, or extra account parameters.
335
+
336
+ ### Anthropic workload identity federation
337
+
338
+ When no Anthropic API key, bearer token, or subscription login is configured, Atomic enables workload identity federation if `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID`, and `ANTHROPIC_IDENTITY_TOKEN_FILE` are all set.
339
+
340
+ The Anthropic SDK exchanges the identity token for a short-lived access token and rereads the token file on each refresh, so keep that file updated during long sessions. `ANTHROPIC_SERVICE_ACCOUNT_ID` and `ANTHROPIC_WORKSPACE_ID` are sent when set. API keys, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_OAUTH_TOKEN`, and custom authorization headers take precedence over federation. Federation applies only to the `anthropic` provider.
485
341
 
486
342
  ### NVIDIA NIM
487
343
 
488
- NVIDIA NIM defaults to `nvidia/nemotron-3.5-super-vl-120b-a12b`. Saved and explicit model choices still take precedence. Select it explicitly with:
344
+ NVIDIA NIM defaults to `nvidia/nemotron-3.5-super-vl-120b-a12b` when selected automatically:
489
345
 
490
346
  ```bash
491
347
  atomic --provider nvidia --model nvidia/nemotron-3.5-super-vl-120b-a12b
492
348
  ```
493
349
 
494
- Use `--list-models` or `/model` to inspect the current catalog. A catalog listing does not verify account access or serving availability.
350
+ Use `--list-models` or `/model` to inspect the current catalog; a catalog listing does not verify account access or serving availability.
495
351
 
496
352
  ### Azure
497
353
 
498
- Use the `azure` provider for OpenAI Responses models and Microsoft Foundry Chat Completions models, including `azure/deepseek-v4-pro`. Use `azure` as the key in `auth.json`, `models.json`, and `settings.json`:
499
-
500
- ```bash
501
- atomic --model azure/deepseek-v4-pro:high
502
- ```
503
-
504
- DeepSeek V4 Pro supports `low`, `medium`, and `high` reasoning effort. Azure OpenAI models use the `azure-openai-responses` API; Microsoft Foundry Chat Completions models use `openai-completions`.
354
+ Use the `azure` provider for Azure OpenAI Responses models and Microsoft Foundry Chat Completions models (including `azure/deepseek-v4-pro`, which supports `low`, `medium`, and `high` reasoning):
505
355
 
506
356
  ```bash
507
357
  export AZURE_OPENAI_API_KEY=...
508
358
  export AZURE_OPENAI_BASE_URL=https://your-resource.openai.azure.com
509
359
  # Also supported: https://your-resource.cognitiveservices.azure.com
510
- # and Azure Foundry endpoints such as https://your-resource.services.ai.azure.com
511
- # Root endpoints auto-normalize to /openai/v1
360
+ # and Foundry endpoints: https://your-resource.services.ai.azure.com
512
361
  # Or set resource name instead of base URL:
513
362
  export AZURE_OPENAI_RESOURCE_NAME=your-resource
514
363
 
@@ -517,83 +366,43 @@ export AZURE_OPENAI_API_VERSION=2024-02-01
517
366
  export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
518
367
  ```
519
368
 
520
- `AZURE_OPENAI_API_VERSION` applies to Responses requests and defaults to `v1`. Chat Completions uses the normalized `/openai/v1` endpoint.
521
-
522
- Deployment names default to model IDs. Set `AZURE_OPENAI_DEPLOYMENT_NAME_MAP` when your Azure deployment names differ; it applies to both APIs without changing the model ID shown in sessions.
523
-
524
- Custom Azure models in `models.json` or extensions default to `azure-openai-responses` when `api` is omitted and the model ID is not built in. Set `"api": "openai-completions"` at provider or model level for unlisted Foundry Chat Completions models. Custom models require a `baseUrl`, though `AZURE_OPENAI_BASE_URL` and `AZURE_OPENAI_RESOURCE_NAME` override it when set:
525
-
526
- ```json
527
- {
528
- "providers": {
529
- "azure": {
530
- "baseUrl": "https://your-resource.services.ai.azure.com",
531
- "models": [
532
- { "id": "your-deployment", "api": "openai-completions" }
533
- ]
534
- }
535
- }
536
- }
537
- ```
369
+ Root URLs auto-normalize to `/openai/v1`. `AZURE_OPENAI_API_VERSION` applies to Responses requests (default `v1`), and `AZURE_OPENAI_DEPLOYMENT_NAME_MAP` maps model IDs to custom Azure deployment names across both APIs without changing session display IDs.
538
370
 
539
- The former provider ID `azure-openai-responses` remains accepted in CLI flags, saved sessions, and SDK lookups. Startup migrates it to `azure` in `auth.json`, `settings.json`, and `models.json` (only after project trust for project files), with existing `azure` entries winning on collision. Use `azure` in new configuration.
371
+ Custom Azure models in `models.json` default to `azure-openai-responses`; set `"api": "openai-completions"` for unlisted Foundry Chat Completions deployments. Startup automatically migrates the legacy provider ID `azure-openai-responses` to `azure`.
540
372
 
541
373
  ### Amazon Bedrock
542
374
 
375
+ Run `/login amazon-bedrock` to walk through Bedrock's guided setup (**Bearer token**, **AWS profile**, or **Existing AWS credential chain**), or configure AWS credentials via environment variables:
376
+
543
377
  ```bash
544
- # Option 1: AWS Profile
378
+ # Option 1: AWS profile
545
379
  export AWS_PROFILE=your-profile
546
380
 
547
- # Option 2: IAM Keys
381
+ # Option 2: IAM keys (add AWS_SESSION_TOKEN for temporary credentials)
548
382
  export AWS_ACCESS_KEY_ID=AKIA...
549
383
  export AWS_SECRET_ACCESS_KEY=...
384
+ export AWS_SESSION_TOKEN=...
550
385
 
551
- # Option 3: Bearer Token
386
+ # Option 3: Bedrock bearer token
552
387
  export AWS_BEARER_TOKEN_BEDROCK=...
553
388
 
554
- # Optional region (defaults to us-east-1)
389
+ # Optional region (falls back to AWS_DEFAULT_REGION, then us-east-1)
555
390
  export AWS_REGION=us-west-2
556
391
  ```
557
392
 
558
393
  ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`) also work.
559
394
 
560
- ```bash
561
- atomic --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
562
- ```
563
-
564
- GPT-6 Astra uses three Bedrock IDs under the `amazon-bedrock` provider:
565
-
566
- ```text
567
- openai.gpt-6-astra
568
- global.openai.gpt-6-astra
569
- us.openai.gpt-6-astra
570
- ```
571
-
572
- Atomic passes the chosen ID unchanged to Bedrock Converse and maps `low`, `medium`, `high`, `xhigh`, and `max` to OpenAI's `reasoning_effort` field. `openai.gpt-6-astra` is the direct entry; `global.` and `us.` are Bedrock inference profiles. Bedrock offers no Astra Fast variant.
573
-
574
- Catalog pricing for `global.openai.gpt-6-astra` is $10 input, $1 cache read, $12.50 cache write, and $50 output per million tokens (above 272,000 input tokens: $20 / $2 / $25 / $75). Pricing for `openai.gpt-6-astra` and `us.openai.gpt-6-astra` is $11 / $1.10 / $13.75 / $55 (above 272,000 input tokens: $22 / $2.20 / $27.50 / $82.50). See [OpenAI built-in models](/models/reference#openai-built-in-models). Region and account availability still vary.
575
-
576
- Other Bedrock GPT models receive thinking effort as `reasoning.effort` (`minimal` maps to `low`). GPT-oss uses `reasoning_effort`, mapping `minimal` to `low` and `xhigh`/`max` to `high`. Give custom application inference profiles a recognizable GPT name in `models.json` so reasoning effort is sent.
577
-
578
- Prompt caching turns on automatically for Claude models whose ID includes a recognizable model name. For application inference profiles (whose ARNs omit the model name), set `AWS_BEDROCK_FORCE_CACHE=1`:
395
+ <Note>
396
+ **Bedrock credential precedence:** A bearer token saved in `auth.json` takes highest priority. If no bearer token key is saved in `auth.json`, an ambient `AWS_BEARER_TOKEN_BEDROCK` environment variable takes precedence over an `AWS_PROFILE` saved in `auth.json`.
397
+ </Note>
579
398
 
580
399
  ```bash
581
- export AWS_BEDROCK_FORCE_CACHE=1
582
- atomic --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
400
+ atomic --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
583
401
  ```
584
402
 
585
- For a Bedrock API proxy, use:
586
-
587
- ```bash
588
- # Proxy URL (standard AWS SDK env var)
589
- export AWS_ENDPOINT_URL_BEDROCK_RUNTIME=https://my.corp.proxy/bedrock
590
-
591
- # Skip AWS signing when your proxy needs no authentication
592
- export AWS_BEDROCK_SKIP_AUTH=1
593
-
594
- # Force HTTP/1.1 if your proxy does not support HTTP/2
595
- export AWS_BEDROCK_FORCE_HTTP1=1
596
- ```
403
+ - **Bedrock GPT-6 Astra:** Available as `openai.gpt-6-astra` (direct) plus `global.openai.gpt-6-astra` and `us.openai.gpt-6-astra` (inference profiles), with `low`, `medium`, `high`, `xhigh`, and `max` reasoning effort and no Fast variant. See [OpenAI built-in models](/models/reference#openai-built-in-models) for per-profile pricing.
404
+ - **Application inference profiles and caching:** Prompt caching turns on automatically when a Claude model ID contains a recognizable model name. For application inference profile ARNs that omit the model name, export `AWS_BEDROCK_FORCE_CACHE=1` (and give custom GPT inference profiles a recognizable GPT name in `models.json` so reasoning effort is sent).
405
+ - **Bedrock API proxies:** Set `AWS_ENDPOINT_URL_BEDROCK_RUNTIME=https://my.corp.proxy/bedrock`, `AWS_BEDROCK_SKIP_AUTH=1` if the proxy handles signing, and `AWS_BEDROCK_FORCE_HTTP1=1` if your proxy does not support HTTP/2.
597
406
 
598
407
  ### Cloudflare AI Gateway
599
408
 
@@ -606,95 +415,32 @@ export CLOUDFLARE_GATEWAY_ID=... # create in Cloudflare dashboard under A
606
415
  atomic --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
607
416
  ```
608
417
 
609
- Cloudflare AI Gateway routes to Workers AI (`/compat` with `workers-ai/@cf/...` IDs), OpenAI (`/openai` with native OpenAI IDs such as `gpt-5.1`), and Anthropic (`/anthropic` with native Anthropic IDs such as `claude-sonnet-4-5`).
610
-
611
- Gateway authentication sends `CLOUDFLARE_API_KEY` in `cf-aig-authorization`. Upstream authentication supports four modes:
612
-
613
- | Mode | Request auth | Upstream auth |
614
- | --- | --- | --- |
615
- | Workers AI | Cloudflare token only | Cloudflare-native |
616
- | Unified billing | Cloudflare token only | Cloudflare handles upstream auth and deducts credits |
617
- | Stored BYOK | Cloudflare token only | Cloudflare injects keys stored in the AI Gateway dashboard |
618
- | Inline BYOK | Cloudflare token plus upstream `Authorization` header | Request supplies the upstream provider key |
418
+ Cloudflare AI Gateway routes to Workers AI (`/compat` with `workers-ai/@cf/...` IDs), OpenAI (`/openai`), and Anthropic (`/anthropic`). Gateway auth sends `CLOUDFLARE_API_KEY` in `cf-aig-authorization`; prefer **unified billing** or **stored BYOK** in the Cloudflare dashboard over inline BYOK (which requires adding an upstream `Authorization` header in `models.json`).
619
419
 
620
- Prefer unified billing or stored BYOK. Inline BYOK requires configuring an extra upstream `Authorization` header via a `models.json` override.
621
-
622
- #### Workers AI binding (no API token)
623
-
624
- When Atomic runs inside a Cloudflare Worker in the gateway's account, requests can use the [Workers AI binding](https://developers.cloudflare.com/ai-gateway/usage/workers-ai-binding/) (`env.AI`) instead of HTTPS. Binding calls are pre-authenticated in-account and need no `CLOUDFLARE_API_KEY` or `CLOUDFLARE_ACCOUNT_ID`. Atomic re-exports the transport as `createGatewayBindingFetch` from `@bastani/atomic`.
625
-
626
- Declare the binding and gateway slug in `wrangler.toml`:
627
-
628
- ```toml
629
- [ai]
630
- binding = "AI"
631
-
632
- [vars]
633
- CLOUDFLARE_GATEWAY_ID = "your-gateway-slug"
634
- ```
635
-
636
- Register an inline provider override where `env` is in scope so `streamSimple` uses the binding transport (see [SDK](/sdk) and [`@bastani/atomic-ai`](/libraries/ai)):
420
+ **Cloudflare Workers AI binding (no API token):** Inside a Cloudflare Worker in the gateway's account, bind `env.AI` in `wrangler.toml` (`[ai]\nbinding = "AI"` plus `CLOUDFLARE_GATEWAY_ID`) and override `cloudflare-ai-gateway` via `atomic.registerProvider()` using `createGatewayBindingFetch({ binding: env.AI })` and `CLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL` exported from `@bastani/atomic`:
637
421
 
638
422
  ```typescript
639
423
  import {
640
424
  CLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,
641
- createAgentSession,
642
425
  createGatewayBindingFetch,
643
- DefaultResourceLoader,
644
426
  type AiGatewayBinding,
645
427
  } from "@bastani/atomic";
646
428
  import { streamSimple as anthropicStreamSimple } from "@bastani/atomic-ai/api/anthropic-messages";
647
429
 
648
- // `AiGatewayBinding` matches the Workers AI binding structurally without `@cloudflare/workers-types`.
649
- interface Env {
650
- AI: AiGatewayBinding;
651
- CLOUDFLARE_GATEWAY_ID: string;
652
- }
653
-
654
- export default {
655
- async fetch(request: Request, env: Env): Promise<Response> {
656
- const bindingPrefix = `https://workers-binding.ai/ai-gateway/gateways/${env.CLOUDFLARE_GATEWAY_ID}`;
657
- const loader = new DefaultResourceLoader({
658
- cwd: "/workspace",
659
- agentDir: "/workspace/.atomic/agent",
660
- extensionFactories: [
661
- {
662
- name: "cloudflare-gateway-binding",
663
- factory: async (atomic) => {
664
- await atomic.registerProvider("cloudflare-ai-gateway", {
665
- // Placeholder credential; Cloudflare's gateway recognizes and strips it on binding fetch.
666
- apiKey: CLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,
667
- api: "anthropic-messages",
668
- streamSimple: (model, context, options) =>
669
- anthropicStreamSimple(
670
- {
671
- ...model,
672
- baseUrl: `${bindingPrefix}/anthropic`
673
- },
674
- context,
675
- {
676
- ...options,
677
- fetch: createGatewayBindingFetch({
678
- binding: env.AI
679
- })
680
- }
681
- )
682
- });
683
- }
684
- }
685
- ]
686
- });
687
- await loader.reload();
688
-
689
- const { session } = await createAgentSession({
690
- resourceLoader: loader
691
- });
692
- // Run the session and return a Response
693
- }
694
- };
430
+ // Inside an inline SDK extension factory where `env: { AI: AiGatewayBinding; CLOUDFLARE_GATEWAY_ID: string }` is in scope:
431
+ const bindingPrefix = `https://workers-binding.ai/ai-gateway/gateways/${env.CLOUDFLARE_GATEWAY_ID}`;
432
+ await atomic.registerProvider("cloudflare-ai-gateway", {
433
+ apiKey: CLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,
434
+ api: "anthropic-messages",
435
+ streamSimple: (model, context, options) =>
436
+ anthropicStreamSimple({ ...model, baseUrl: `${bindingPrefix}/anthropic` }, context, {
437
+ ...options,
438
+ fetch: createGatewayBindingFetch({ binding: env.AI }),
439
+ }),
440
+ });
695
441
  ```
696
442
 
697
- `createGatewayBindingFetch` requires a binding with `fetch()` and forwards requests untouched to `https://workers-binding.ai/ai-gateway/gateways/{gateway}/{provider}/...`. `baseUrl` and `gateway` options are ignored, and bindings exposing only `gateway(id).run(...)` are not supported. Repeat the same pattern with `@bastani/atomic-ai/api/openai-completions` or `openai-responses`, pointing `baseUrl` at `${bindingPrefix}/openai` or `${bindingPrefix}/compat`.
443
+ `createGatewayBindingFetch` requires a binding exposing `fetch()` (bindings with only `gateway(id).run(...)` are not supported) and forwards requests untouched to `${bindingPrefix}/{provider}/...`. Swap in `openai-completions` or `openai-responses` targeting `${bindingPrefix}/compat` or `${bindingPrefix}/openai` for other routes. See [TypeScript SDK](/sdk) and [Override a built-in provider](/custom-provider/override).
698
444
 
699
445
  ### Cloudflare Workers AI
700
446
 
@@ -703,16 +449,14 @@ Save `CLOUDFLARE_API_KEY` via `/login` or export it with `CLOUDFLARE_ACCOUNT_ID`
703
449
  ```bash
704
450
  export CLOUDFLARE_API_KEY=... # or use /login
705
451
  export CLOUDFLARE_ACCOUNT_ID=...
706
- atomic --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.7-code"
452
+ atomic --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
707
453
  ```
708
454
 
709
- Atomic sets `x-session-affinity` automatically for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/).
710
-
711
- Workers AI also includes classifiers using the same credentials: Cloudflare Clef (`@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash`, `@cf/cloudflare/clef-omni`) and TypeSafe Jev (`typesafe/jev`, `typesafe/jev-1.14.0`). Select them in `decisionModel`, `structured_output`, or `generateStructuredOutput()`; they do not appear in `/model`. Clef takes up to four PNG, JPEG, or WebP images; Jev takes PNG or JPEG images. See [Structured decisions](/sdk/structured-decisions).
455
+ Atomic sets `x-session-affinity` automatically for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/). Workers AI also includes built-in classifiers using the same credentials: Cloudflare Clef (`@cf/cloudflare/clef`, `@cf/cloudflare/clef-flash`, `@cf/cloudflare/clef-omni`, up to four PNG/JPEG/WebP images) and TypeSafe Jev (`typesafe/jev`, `typesafe/jev-1.14.0`, PNG/JPEG images). See [Use classifier models](/models#use-classifier-models).
712
456
 
713
457
  ### Google Vertex AI
714
458
 
715
- Run `/login google-vertex` to configure a **Google Cloud API key** (`GOOGLE_CLOUD_API_KEY`), **Application Default Credentials**, or a **Service account credentials file**, or configure environment variables directly:
459
+ Run `/login google-vertex` to configure a **Google Cloud API key**, **Application Default Credentials**, or a **Service account credentials file**, or set environment variables directly:
716
460
 
717
461
  ```bash
718
462
  # Option 1: Application Default Credentials
@@ -727,46 +471,70 @@ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
727
471
  export GOOGLE_CLOUD_API_KEY=your-api-key
728
472
  ```
729
473
 
730
- ## llama.cpp {#llama-cpp}
731
-
732
- For router-mode discovery, load/unload management, and Hugging Face downloads with a local llama.cpp server, see [Local models with llama.cpp](/llama-cpp). Configure the server with `/login llama.cpp` or `LLAMA_BASE_URL` and manage models with `/llama`.
733
-
734
- ## TypeSafe Jev
474
+ ## Specialized providers
735
475
 
736
- `typesafe/jev-latest` and `typesafe/jev-1.14.0` are the built-in direct TypeSafe classifiers. `jev-latest` tracks the latest stable Jev release; `jev-1.14.0` pins Jev 1.14.
476
+ Classifiers, image models, and remote compactors never appear in `/model` and never run as your chat model.
737
477
 
738
- Name a classifier explicitly in `decisionModel`, `structured_output`, or `generateStructuredOutput()`. An unset or `auto` decision model uses the active chat model; saving TypeSafe credentials never switches decisions automatically. Classifiers never appear in `/model` or work with `--model`. Compaction does not use classifiers; a `compactionModel` naming one resets to `auto` (see [Compaction model](/compaction#compaction-model)).
478
+ ### TypeSafe Jev {#typesafe-jev}
739
479
 
740
- Both direct TypeSafe classifiers enable TypeSafe's [long-context](https://docs.typesafe.ai/models.md) (up to 262K tokens) and [image](https://docs.typesafe.ai/images.md) previews. Requests above TypeSafe's default 64K window are slower and less accurate. Images must be PNG or JPEG, 280 to 1568 pixels per side. Atomic attaches an `images` array to the state so questions can reference `images` or `images[0]`; a state that already defines `images` cannot send images.
480
+ `typesafe/jev-latest` and `typesafe/jev-1.14.0` are Atomic's direct TypeSafe classifiers. Save your key with `/login typesafe` or set `TYPESAFE_API_KEY` (stored credentials take precedence).
741
481
 
742
- Save your key with `/login typesafe` or set `TYPESAFE_API_KEY` (stored credentials take precedence). `/logout typesafe` clears the stored key without unsetting environment variables. Do not put keys in prompts, decision state, or `settings.json`.
482
+ - **Selection:** Pin a classifier explicitly in [`decisionModel`](/settings#decisionmodel) (`/settings` → **Decision model**), `structured_output`, or `generateStructuredOutput()`. Leaving `decisionModel` unset or `"auto"` uses your active chat model; saving TypeSafe credentials never switches decisions automatically. Compaction never uses classifiers—a `compactionModel` naming one resets to `"auto"` (see [Select a compaction model](/compaction/custom-compactors#select-a-compaction-model)).
483
+ - **Context and images:** Direct TypeSafe classifiers support up to 262K tokens (requests above TypeSafe's default 64K window are slower and less accurate) and PNG/JPEG images (280 to 1568 px per side). Atomic attaches images under an `images` array on the state; states that already define `images` cannot attach images.
484
+ - **Gateway Jev:** Atomic also registers Jev classifiers on **OpenRouter** (`openrouter/~typesafe/jev-latest`, `typesafe/jev-1.13`, `typesafe/jev-1.14`, 262K with images), **Vercel AI Gateway** (`vercel-ai-gateway/typesafe-ai/jev`, `jev-1.13.0`, `jev-1.14.0`, 32K text only), and **OpenCode Zen** (`opencode/jev-1.13`, `jev-1.13-free`, 32K text only).
485
+ - **Failures and fallback:** Classifier candidates are skipped when a schema is not a finite Choice. Missing credentials, size rejections, refusals, or malformed classifier output fall back to your chat model or next candidate (HTTP 401 indicates an invalid key, HTTP 422 a contract error, HTTP 429/529 rate limit or overload). See [Structured decision limits](/sdk/structured-decisions#provider-behavior-and-limits).
743
486
 
744
- Atomic also registers Jev classifiers on gateways:
487
+ For all built-in classifiers (including OpenAI Decisions, Cloudflare Clef, OpenRouter, Vercel AI Gateway, and local `llama.cpp`) and image models (`openai-images`, `openrouter`), see [Use classifier models](/models#use-classifier-models) and [Use image models](/models#use-image-models).
745
488
 
746
- - **OpenRouter:** `openrouter/~typesafe/jev-latest`, `openrouter/typesafe/jev-1.13`, and `openrouter/typesafe/jev-1.14` (262K context, text and image input; uses `OPENROUTER_API_KEY` or `/login openrouter`).
747
- - **Vercel AI Gateway:** `vercel-ai-gateway/typesafe-ai/jev`, `vercel-ai-gateway/typesafe-ai/jev-1.13.0`, and `vercel-ai-gateway/typesafe-ai/jev-1.14.0` (32K context, text only; uses `AI_GATEWAY_API_KEY` or `/login vercel-ai-gateway`).
748
- - **OpenCode Zen:** `opencode/jev-1.13` and `opencode/jev-1.13-free` (32K context, text only; uses `OPENCODE_API_KEY` or `/login opencode`).
489
+ ### Morph compaction {#morph-compaction}
749
490
 
750
- Gateway Jev uses the gateway's classifier endpoint rather than Chat Completions and does not appear in `/model`.
491
+ Run `/login morph` to store a Morph API key in `~/.atomic/agent/auth.json`, or export `MORPH_API_KEY` (stored credentials take precedence).
751
492
 
752
- An explicit `decisionModel` other than `auto` applies to `decide()` and `structured_output` calls that omit `model`. A `structured_output` call with its own `model` checks that model, then `fallbackModels`, then the current chat model. `generateStructuredOutput()` uses only the models passed to it.
493
+ Select `morph/morph-compactor` (or any custom remote compactor) under `/settings` → **Compaction model** (switches live without `/reload`), or set `"compactionModel": "morph/morph-compactor"` in `settings.json`. Customize parameters such as `compression_ratio` or `preserve_recent` via `modelOverrides` in `~/.atomic/agent/models.json`; see [Configure Morph or add a custom compactor](/compaction/custom-compactors#configure-morph-or-add-a-custom-compactor).
753
494
 
754
- One decision sends one classify request to a registered classifier or up to three repair attempts to a chat model, all within [`httpIdleTimeoutMs`](/settings#http). Classifier candidates are skipped when the schema is not a finite Choice. Missing credentials, unavailable providers, size rejections, refusals, or malformed classifier answers fall back to the chat model or next candidate; cancellation stops immediately. See [Structured decision limits](/sdk/structured-decisions#provider-behavior-and-limits).
495
+ During compaction, Morph receives the conversation without thinking blocks and returns a replacement summary while the agent retains verbatim session history for recovery. Use Morph only if your policy permits sending conversation content to Morph. Missing credentials, HTTP errors, timeouts, or unusable output automatically fall back to memory compaction (see [Custom compaction models](/compaction/custom-compactors)).
755
496
 
756
- HTTP 401 indicates an invalid key (`TYPESAFE_API_KEY` or `/login typesafe`), HTTP 422 indicates a question/state contract error, and HTTP 429 or 529 indicates rate limiting or overload. See [TypeSafe's API](https://docs.typesafe.ai/api.md) and [Choice reference](https://docs.typesafe.ai/primitives/choice.md).
497
+ ## Local and custom providers
757
498
 
758
- ## Morph compaction
499
+ ### llama.cpp {#llama-cpp}
759
500
 
760
- Run `/login morph` to store a Morph API key in `~/.atomic/agent/auth.json`, or set `MORPH_API_KEY` (stored credentials take precedence). Do not place keys in prompts or `settings.json`.
501
+ Connect Atomic to a local `llama.cpp` router server with `/login llama.cpp` or `LLAMA_BASE_URL` and manage local GGUF models with `/llama`. See [Run local models with llama.cpp](/llama-cpp).
761
502
 
762
- Select `morph/morph-compactor` (or any custom remote compactor configured in `models.json` or an extension) in `/settings` under **Compaction model** (switches live with no `/reload`), or set `"compactionModel": "morph/morph-compactor"` in `settings.json`. Without credentials, the selector marks it as `requires /login morph`. Customize Morph parameters such as `compression_ratio` or `preserve_recent` via `modelOverrides` in `~/.atomic/agent/models.json`; see [Customize Morph or add a remote compactor](/compaction#customize-morph-or-add-a-remote-compactor).
503
+ ### Custom providers {#custom-providers}
763
504
 
764
- During compaction, Morph receives the conversation without thinking blocks and returns a replacement summary; the agent can recover omitted details from session history. Use Morph only if your policy permits sending conversation content to Morph.
505
+ - **Via `models.json`:** Add Ollama, LM Studio, vLLM, API proxies, or custom remote compactors using OpenAI Completions, OpenAI Responses, Anthropic Messages, or Google Generative AI. See [Configure custom models](/models).
506
+ - **Via extensions:** Implement custom streaming, image, classifier, or compactor APIs, dynamic model discovery, or OAuth flows. See [Build custom providers](/custom-provider) and [examples/extensions/custom-provider-gitlab-duo](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo).
765
507
 
766
- Morph is a compactor, not a chat model: it does not appear in `/model` and is never picked by `model: "auto"`. Missing credentials, HTTP errors, timeouts, or unusable output fall back to clearing the context with `Compaction model not used (<reason>); context cleared instead`. `/logout morph` removes the saved credential. See [Context compacted](/compaction#context-compacted).
508
+ ## Verify credentials before a session {#verify-readiness-before-a-session}
767
509
 
768
- ## Custom providers
510
+ Run `atomic auth check` to verify effective credentials in CI, scripts, or before launching a session:
769
511
 
770
- **Via `models.json`:** Add Ollama, LM Studio, vLLM, or any provider using OpenAI Completions, OpenAI Responses, Anthropic Messages, or Google Generative AI. See [Configure custom models](/models).
512
+ ```bash
513
+ atomic auth check --provider anthropic
514
+ atomic auth check --model openai-codex/gpt-6.2-sol --json
515
+ atomic auth check --provider anthropic --no-refresh
516
+ ```
771
517
 
772
- **Via extensions:** Build custom APIs, dynamic model discovery, or OAuth flows in an extension. See [Build custom providers](/custom-provider) and [examples/extensions/custom-provider-gitlab-duo](https://github.com/bastani-inc/atomic/tree/main/packages/coding-agent/examples/extensions/custom-provider-gitlab-duo).
518
+ - **Status and exit codes:** Prints `ready` (exit `0`), `not_ready` (exit `1`), or `invalid` (exit `2`).
519
+ - **JSON output (`--json`):** Returns `{ status, provider, authType?, reason?, credentials? }`. Possible `reason` values are `provider_not_found`, `credentials_not_configured`, `credential_expired`, `credential_not_available`, and `invalid_state`.
520
+ - **OAuth refresh vs. read-only probe:** Checks refresh expired OAuth tokens by default through the locked `auth.json` path. Pass `--no-refresh` for a read-only check that never creates, locks, or writes files.
521
+ - **Opt-in credential export (`--credentials`):** Readiness output omits secret values by default. Pass `--credentials` with `--provider` or an exact `--model` to emit the resolved credential on stdout (or in JSON `credentials`); OAuth exports require at least 30 minutes of remaining lifetime when `--no-refresh` prevents a refresh. Non-ready/invalid statuses write to **stderr** so stdout stays empty—except exit `9`, which reports a partial write to stdout (discard those bytes; exit `8` means nothing was written).
522
+
523
+ For external tools or proxies that need a raw API key or refreshed OAuth bearer token on stdout, use `atomic auth print-api-key --model <model>` or `atomic auth print-bearer-token --model <model> [--min-expiry 30m]`. See [CLI credential commands](/reference/cli#credential-commands) and [Security: credential export](/security#credential-export).
524
+
525
+ ## Next steps
526
+
527
+ <Columns cols={2}>
528
+ <Card title="Choose a model" href="/models/choose-a-model">
529
+ Switch models and thinking levels, scope models, set fallbacks, and troubleshoot selection.
530
+ </Card>
531
+ <Card title="Run local models with llama.cpp" href="/llama-cpp">
532
+ Connect a local llama.cpp router server for local chat models and classifiers.
533
+ </Card>
534
+ <Card title="Configure custom models" href="/models">
535
+ Add Ollama, vLLM, proxies, image models, classifiers, and remote compactors.
536
+ </Card>
537
+ <Card title="Provider reference" href="/providers/reference">
538
+ Credential precedence order, normalized stop reasons, and GitHub Copilot error classes.
539
+ </Card>
540
+ </Columns>