@bastani/atomic 0.10.9 → 0.10.10-alpha.2
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.
- package/CHANGELOG.md +83 -0
- package/README.md +226 -163
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +87 -116
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +61 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +74 -141
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +61 -88
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +2 -2
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +2 -2
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/agent-session-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +2 -2
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.code.js +1 -1
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/provider-composer-internal.d.ts +11 -2
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +2 -2
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.code.js +2 -2
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- package/dist/utils/startup-database-spare.code.js +3 -3
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +238 -243
- package/docs/build.md +21 -15
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +68 -51
- package/docs/compaction/reference.md +65 -26
- package/docs/compaction.md +118 -66
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +87 -33
- package/docs/custom-provider/api-reference.md +152 -13
- package/docs/custom-provider/oauth.md +45 -28
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +77 -67
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +26 -62
- package/docs/development.md +81 -42
- package/docs/docs.json +54 -38
- package/docs/environment-variables.md +92 -64
- package/docs/extensions/api-reference.md +326 -735
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +189 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +62 -20
- package/docs/guides/intercom.md +20 -12
- package/docs/guides/non-interactive.md +31 -16
- package/docs/guides/orchestration.md +17 -9
- package/docs/guides/resume-on-any-machine.md +63 -52
- package/docs/guides/subagents.md +26 -14
- package/docs/guides/team-setup.md +49 -27
- package/docs/guides.md +30 -23
- package/docs/herdr.md +22 -17
- package/docs/index.md +24 -17
- package/docs/intercom/operations.md +90 -66
- package/docs/intercom/reference.md +219 -192
- package/docs/intercom.md +111 -92
- package/docs/json.md +73 -71
- package/docs/keybindings.md +74 -48
- package/docs/libraries/agent-core.md +52 -9
- package/docs/libraries/ai.md +90 -63
- package/docs/libraries/codemode.md +31 -8
- package/docs/libraries/schema.md +12 -9
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +42 -9
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +25 -8
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +140 -88
- package/docs/models/reference.md +53 -36
- package/docs/models-configuration.md +19 -13
- package/docs/models.md +102 -87
- package/docs/orchestration/migrating-workflows.md +22 -20
- package/docs/orchestration/patterns.md +36 -21
- package/docs/orchestration.md +24 -21
- package/docs/packages/authoring.md +29 -18
- package/docs/packages/reference.md +77 -16
- package/docs/packages.md +34 -34
- package/docs/programmatic.md +28 -21
- package/docs/prompt-templates.md +65 -41
- package/docs/providers/reference.md +36 -20
- package/docs/providers.md +78 -76
- package/docs/quickstart.md +42 -54
- package/docs/reference/cli.md +256 -254
- package/docs/reference.md +30 -23
- package/docs/rpc/examples.md +121 -17
- package/docs/rpc/extension-ui.md +86 -63
- package/docs/rpc/protocol.md +817 -358
- package/docs/rpc.md +78 -152
- package/docs/sdk/reference.md +309 -73
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +168 -65
- package/docs/sdk/web-server.md +80 -46
- package/docs/sdk.md +168 -215
- package/docs/security.md +117 -44
- package/docs/session-format.md +127 -76
- package/docs/sessions.md +155 -113
- package/docs/settings.md +293 -205
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +148 -97
- package/docs/storage.md +172 -260
- package/docs/subagents/authoring.md +148 -15
- package/docs/subagents/reference.md +105 -29
- package/docs/subagents.md +247 -250
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +52 -55
- package/docs/tmux.md +38 -21
- package/docs/tools.md +209 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +94 -86
- package/docs/verification.md +25 -25
- package/docs/web-access.md +106 -54
- package/docs/windows.md +55 -57
- package/docs/worktree-snapshots.md +82 -74
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +58 -7
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/models/reference.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Model configuration reference
|
|
3
|
-
sidebarTitle: "Model
|
|
4
|
-
description:
|
|
2
|
+
title: "Model configuration reference"
|
|
3
|
+
sidebarTitle: "Model overrides"
|
|
4
|
+
description: "Supported APIs, value resolution, overrides, pricing tiers, thinking maps, derived fast variants, and API compatibility rules."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This page covers provider and model behavior, compatibility rules, and built-in model details. For the complete schema-generated field list for `models.json`, see [`models.json` field reference](/models-configuration). For custom streaming APIs or OAuth flows, see [Build custom providers](/custom-provider).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Jump to: [Supported APIs](#supported-apis) · [Provider configuration](#provider-configuration) · [Model configuration](#model-configuration) · [Overriding built-in providers](#overriding-built-in-providers) · [Per-model overrides](#per-model-overrides) · [Derived fast model variants](#derived-fast-model-variants) · [Anthropic messages compatibility](#anthropic-messages-compatibility) · [OpenAI compatibility](#openai-compatibility) · [Catalog freshness and precedence](#catalog-freshness-and-precedence).
|
|
10
10
|
|
|
11
11
|
## Supported APIs
|
|
12
12
|
|
|
@@ -17,9 +17,11 @@ This page covers provider and model behavior, compatibility rules, and built-in
|
|
|
17
17
|
| `anthropic-messages` | Anthropic Messages API |
|
|
18
18
|
| `google-generative-ai` | Google Generative AI |
|
|
19
19
|
|
|
20
|
-
Set `api` at provider level (default for
|
|
20
|
+
Set `api` at provider level (default for chat and compactor models) or model level (override per model).
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Atomic also registers six provider-specific chat APIs (`mistral-conversations`, `azure-openai-responses`, `openai-codex-responses`, `bedrock-converse-stream`, `google-vertex`, and `pi-messages`). You can use them in `models.json` when connecting to a compatible gateway or proxy, such as `"api": "pi-messages"` for a gateway speaking the `pi-messages` protocol or `"api": "mistral-conversations"` for a native Mistral endpoint.
|
|
23
|
+
|
|
24
|
+
Models with `"type": "compactor"` declare their own compactor `api` string (such as `"custom-compact"` or `"morph-compact"`). See [Customize Morph or add a remote compactor](/compaction#customize-morph-or-add-a-remote-compactor).
|
|
23
25
|
|
|
24
26
|
## Provider configuration
|
|
25
27
|
|
|
@@ -29,23 +31,26 @@ See [Providers fields](/models-configuration#providers) for the full list of pro
|
|
|
29
31
|
|
|
30
32
|
`apiKey` and `headers` values accept three formats:
|
|
31
33
|
|
|
32
|
-
- **Shell command:** `"!command"` executes the command and uses stdout.
|
|
34
|
+
- **Shell command:** `"!command"` executes the command and uses trimmed stdout (10-second timeout, 1 MiB stdout limit; 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.
|
|
33
35
|
```json
|
|
34
36
|
"apiKey": "!security find-generic-password -ws 'anthropic'"
|
|
35
37
|
"apiKey": "!op read 'op://vault/item/credential'"
|
|
36
38
|
```
|
|
37
|
-
- **Environment variable:** `"$MY_API_KEY"` or `"${MY_API_KEY}"` interpolates the variable from the environment.
|
|
39
|
+
- **Environment variable:** `"$MY_API_KEY"` or `"${MY_API_KEY}"` interpolates the variable from the environment. Empty environment variables (`MY_API_KEY=""`) count as unset. If any variable in a composite string (`"${A}_${B}"`) is unset or empty, the entire value fails to resolve.
|
|
38
40
|
```json
|
|
39
41
|
"apiKey": "$MY_API_KEY"
|
|
40
42
|
```
|
|
41
|
-
- **Literal value:** Used directly when neither syntax matches.
|
|
43
|
+
- **Literal value:** Used directly when neither syntax matches. In non-command values, use `$$` for a literal `$` and `$!` for a literal `!`.
|
|
42
44
|
```json
|
|
43
45
|
"apiKey": "sk-..."
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
Legacy bare uppercase names such as `MY_API_KEY` migrate to `$MY_API_KEY` on startup only when that variable is set in the environment; otherwise Atomic keeps them as literals. Use explicit `${ENV_VAR}` or `$ENV_VAR` syntax in new configs. When resolution fails, Atomic omits `!command` text; braced `${NAME}` references always report the unset variable name, whereas unbraced `$NAME` references report the name only when it reads like a POSIX environment variable name so literal secrets containing `$` do not leak fragments.
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
Important runtime differences:
|
|
51
|
+
|
|
52
|
+
- **Uncached `!command` in `models.json` vs cached in `auth.json`:** In `models.json`, shell commands run uncached on every request. If a command is slow, rate-limited, or needs caching, wrap that logic in a local script. By contrast, `auth.json` caches `!command` results (including failures) for the lifetime of the process. `/model` availability checks verify auth presence without running shell commands.
|
|
53
|
+
- **Built-in provider `apiKey` precedence:** Setting `apiKey` on a built-in provider in `models.json` takes precedence over that provider's built-in environment variable. If you set `"apiKey": "$UNSET_VAR"` and `UNSET_VAR` is unset or empty, resolution stops and returns no credential instead of falling back to the built-in environment variable. See [Credential resolution order](/providers/reference#resolution-order).
|
|
49
54
|
|
|
50
55
|
### Custom headers
|
|
51
56
|
|
|
@@ -70,28 +75,41 @@ In `models.json`, every header value must be a string. A `null` header value sup
|
|
|
70
75
|
|
|
71
76
|
## Model configuration
|
|
72
77
|
|
|
73
|
-
See [Models fields](/models-configuration#models) for the complete schema table (`id`, `name`, `api`, `baseUrl`, `reasoning`, `thinkingLevelMap`, `input`, `inputLimits`, `cost`, `promptCache`, `contextWindow`, `maxTokens`, `samplingParams`, `samplingParamsByThinkingLevel`, `headers`, and `compat`).
|
|
78
|
+
See [Models fields](/models-configuration#models) for the complete schema table (`id`, `name`, `type`, `api`, `baseUrl`, `endpointPath`, `reasoning`, `thinkingLevelMap`, `input`, `inputLimits`, `cost`, `promptCache`, `contextWindow`, `maxTokens`, `timeoutMs`, `samplingParams`, `samplingParamsByThinkingLevel`, `compactionParams`, `headers`, and `compat`).
|
|
74
79
|
|
|
75
80
|
Key display and modality rules:
|
|
76
81
|
|
|
77
|
-
- `/model`, `--list-models
|
|
78
|
-
- `name` is used for `--model`
|
|
82
|
+
- `/model`, [`--list-models`](/reference/cli#model-options), the footer, fallback notices, and subagent labels show the raw `provider/id` (or `id` when the provider is clear) followed by the active thinking level, such as `anthropic/claude-sonnet-4-5 high`. That is the exact value `--model provider/id:level` accepts.
|
|
83
|
+
- `name` is used for `--model` and `enabledModels` fuzzy matching and secondary text in `/model`; it never replaces `id`.
|
|
79
84
|
- `input` declares the modalities Atomic sends: `["text"]`, `["text", "image"]`, or `["text", "image", "pdf"]`.
|
|
80
85
|
|
|
81
|
-
Anthropic documents that [all active Claude models support PDF input](https://platform.claude.com/docs/en/build-with-claude/pdf-support). Atomic advertises `"pdf"` only where
|
|
86
|
+
Anthropic documents that [all active Claude models support PDF input](https://platform.claude.com/docs/en/build-with-claude/pdf-support). Atomic advertises `"pdf"` only where it serializes document blocks (Anthropic Messages and Amazon Bedrock Converse); Claude mirrors on other providers stay at `["text", "image"]` and turn attached PDFs into a visible placeholder rather than dropping them silently. Bedrock Converse needs citations enabled for visual PDF processing and otherwise extracts text. Only `application/pdf` is accepted for `"pdf"`.
|
|
82
87
|
|
|
83
88
|
### OpenAI built-in models
|
|
84
89
|
|
|
85
90
|
Prices are in USD per million tokens as `input / cached input / cache write / output`. An empty cell means the tier does not apply or has no published rate.
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
| GPT-6 Astra | `openai/gpt-6-astra`, `openai-api/gpt-6-astra`, `openai-codex/gpt-6-astra`, `github-copilot/gpt-6-astra` | 272,000 on `openai`, `openai-api`,
|
|
92
|
-
| GPT-6
|
|
93
|
-
| GPT-6
|
|
94
|
-
| GPT-6
|
|
92
|
+
#### Context windows and pricing
|
|
93
|
+
|
|
94
|
+
| Model | Provider IDs | Context window | Standard (up to 272,000 input) | Standard (above 272,000 input) | Fast | Ultrafast |
|
|
95
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
96
|
+
| GPT-6.2 Astra | `openai/gpt-6.2-astra`, `openai-api/gpt-6.2-astra`, `openai-codex/gpt-6.2-astra`, `azure/gpt-6.2-astra`, `github-copilot/gpt-6.2-astra` | 272,000 on `openai`, `openai-api`, `openai-codex`; 1,050,000 on `azure`, `github-copilot` | $8 / $0.40 / $10 / $40 | $16 / $0.80 / $20 / $60 | `-fast` on `openai`, `openai-api`, `openai-codex`: $16 / $0.80 / $20 / $80 (above 272K: $32 / $1.60 / $40 / $120) | `-ultrafast` on `openai`, `openai-api`, `openai-codex`: $24 / $1.20 / $30 / $120 (above 272K: $48 / $2.40 / $60 / $180) |
|
|
97
|
+
| GPT-6.2 Sol | `openai/gpt-6.2-sol`, `openai-api/gpt-6.2-sol`, `openai-codex/gpt-6.2-sol`, `azure/gpt-6.2-sol`, `github-copilot/gpt-6.2-sol` | 500,000 on `openai-codex` and `openai` (ChatGPT sign-in); 272,000 on `openai` and `openai-api` (API key); 1,050,000 on `azure`, `github-copilot` | $2 / $0.10 / $2.50 / $10 | $4 / $0.20 / $5 / $15 (including Codex) | `-fast` on `openai`, `openai-api`, `openai-codex`: $4 / $0.20 / $5 / $20 (above 272K: $8 / $0.40 / $10 / $30) | `-ultrafast` on `openai`, `openai-api`, `openai-codex`: $6 / $0.30 / $7.50 / $30 (above 272K: $12 / $0.60 / $15 / $45) |
|
|
98
|
+
| GPT-6 Astra | `openai/gpt-6-astra`, `openai-api/gpt-6-astra`, `openai-codex/gpt-6-astra`, `github-copilot/gpt-6-astra` | 272,000 on `openai`, `openai-api`, `openai-codex`; 1,000,000 on `github-copilot` | $10 / $1 / $12.50 / $50 | $20 / $2 / $25 / $75 | `-fast` on `openai`, `openai-api`, `openai-codex`: $20 / $2 / $25 / $100 (above 272K: $40 / $4 / $50 / $150) | `-ultrafast` on `openai`, `openai-api`, `openai-codex`: $60 / $6 / $75 / $300 (above 272K: $120 / $12 / $150 / $450) |
|
|
99
|
+
| GPT-6 Astra (Bedrock) | `amazon-bedrock/openai.gpt-6-astra`, `amazon-bedrock/global.openai.gpt-6-astra`, `amazon-bedrock/us.openai.gpt-6-astra` | 1,050,000 | `global.`: $10 / $1 / $12.50 / $50; `openai.`, `us.`: $11 / $1.10 / $13.75 / $55 | `global.`: $20 / $2 / $25 / $75; `openai.`, `us.`: $22 / $2.20 / $27.50 / $82.50 | | |
|
|
100
|
+
| GPT-6.1 Sol | `openai/gpt-6.1-sol`, `openai-api/gpt-6.1-sol`, `openai-codex/gpt-6.1-sol`, `azure/gpt-6.1-sol`, `github-copilot/gpt-6.1-sol` | 500,000 on `openai-codex` and `openai` (ChatGPT sign-in); 272,000 on `openai` and `openai-api` (API key); 1,050,000 on `azure`, `github-copilot` | $2 / $0.10 / $2.50 / $10 | $4 / $0.20 / $5 / $15 with API key; none with ChatGPT sign-in | `-fast` on `openai`, `openai-api`, `openai-codex`: $4 / $0.20 / $5 / $20 (above 272K with API key: $8 / $0.40 / $10 / $30) | `-ultrafast` on `openai`, `openai-api`, `openai-codex`: $12 / $0.60 / $15 / $60 (above 272K with API key: $24 / $1.20 / $30 / $90) |
|
|
101
|
+
| GPT-6.1 Terra | `openai/gpt-6.1-terra`, `openai-api/gpt-6.1-terra`, `openai-codex/gpt-6.1-terra`, `azure/gpt-6.1-terra`, `github-copilot/gpt-6.1-terra` | 500,000 on `openai-codex`; 272,000 on `openai` and `openai-api`; 1,050,000 on `azure`, `github-copilot` | $1 / $0.05 / $1.25 / $5 | $2 / $0.10 / $2.50 / $7.50 (including Codex) | `-fast` on `openai` and `openai-api`: $2 / $0.10 / $2.50 / $10 (above 272K: $4 / $0.20 / $5 / $15) | |
|
|
102
|
+
|
|
103
|
+
#### Reasoning levels and capabilities
|
|
104
|
+
|
|
105
|
+
| Model | Reasoning levels | `off` | `minimal` | Tool search | Additional tools | Mid-conversation effort |
|
|
106
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
107
|
+
| GPT-6.2 Astra | `low`, `medium`, `high`, `xhigh`, `max` | No | No | `openai`, `openai-api`, `openai-codex` | `openai`, `openai-api`, `openai-codex`, `github-copilot` | `openai` and `openai-api` with API key |
|
|
108
|
+
| GPT-6.2 Sol | `low`, `medium`, `high`, `xhigh`, `max` | No | No | `openai`, `openai-api`, `openai-codex` | `openai`, `openai-api`, `openai-codex`, `github-copilot` | `openai` and `openai-api` with API key |
|
|
109
|
+
| GPT-6 Astra | `low`, `medium`, `high`, `xhigh`, `max` | No | No | `openai`, `openai-api`, `openai-codex` | `openai`, `openai-api`, `openai-codex`, `github-copilot` | `openai` and `openai-api` with API key |
|
|
110
|
+
| GPT-6 Astra (Bedrock) | `low`, `medium`, `high`, `xhigh`, `max` | No | No | No | No | No |
|
|
111
|
+
| GPT-6.1 Sol | `low`, `medium`, `high`, `xhigh`, `max` | No | Codex UI alias sending `low`; no elsewhere | `openai`, `openai-api`, `openai-codex` | `openai`, `openai-api`, `openai-codex`, `github-copilot` | `openai` and `openai-api` with API key |
|
|
112
|
+
| GPT-6.1 Terra | `off`, `low`, `medium`, `high`, `xhigh`, `max` | Yes (sends `none`) | Codex UI alias sending `low`; no elsewhere | `openai`, `openai-api`, `openai-codex` | `openai`, `openai-api`, `openai-codex`, `github-copilot` | `openai` and `openai-api` with API key |
|
|
95
113
|
|
|
96
114
|
Notes for every row:
|
|
97
115
|
|
|
@@ -179,8 +197,6 @@ Atomic clamps unsupported thinking levels to the nearest supported level, then m
|
|
|
179
197
|
|
|
180
198
|
For OpenAI-compatible servers that share reasoning and answer budgets (vLLM, Qwen/DashScope/SGLang, llama.cpp), set `compat.thinkingTokenBudgetField` (or its vLLM alias `compat.supportsThinkingTokenBudget: true`). Atomic sends the capped thinking budget and reserves at least 1024 tokens for the answer. Atomic's default budgets are 1024 (`minimal`), 2048 (`low`), 8192 (`medium`), and 16384 (`high`), overridable via `thinkingBudgets`; `xhigh` and `max` use the `high` budget, and the field is omitted if no positive budget remains. Avoid putting a fixed thinking-token cap in `samplingParams`, because it ignores `thinkingBudgets` and answer reservation.
|
|
181
199
|
|
|
182
|
-
Model references check for an exact unmodified ID before interpreting thinking suffixes or glob characters. If a catalog contains `provider/literal[free]:high`, that literal ID matches first without stripping `:high` or treating `[free]` as a glob. Only when the literal ID is absent does Atomic parse a thinking suffix and then apply glob or fuzzy matching.
|
|
183
|
-
|
|
184
200
|
### Request-wide cost tiers
|
|
185
201
|
|
|
186
202
|
Declare request-wide long-context pricing in `cost.tiers`. Both base `cost` and every tier require all four USD-per-million-token rates (`input`, `output`, `cacheRead`, `cacheWrite`); each tier also requires `inputTokensAbove`:
|
|
@@ -229,7 +245,7 @@ In `modelOverrides`, scalar cost fields merge individually and preserve inherite
|
|
|
229
245
|
|
|
230
246
|
### Thinking level map
|
|
231
247
|
|
|
232
|
-
Use `thinkingLevelMap` to map Atomic thinking levels (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`) to provider values. Levels are selectable only when the active model supports them.
|
|
248
|
+
Use `thinkingLevelMap` to map Atomic thinking levels (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`) to provider values. Levels are selectable only when the active model supports them. In `modelOverrides`, `thinkingLevelMap` merges per key with the base model's map, so you only need to specify the keys you want to change or hide with `null`.
|
|
233
249
|
|
|
234
250
|
| Value | Meaning |
|
|
235
251
|
| --- | --- |
|
|
@@ -268,11 +284,11 @@ Model where thinking cannot be disabled:
|
|
|
268
284
|
|
|
269
285
|
Requesting `off` on a model with `"off": null` runs it at its lowest supported level rather than leaving effort to the provider's default. Sessions, `:off` subagents, and branch summaries select the lowest supported level in the map, so mark unsupported levels `null`.
|
|
270
286
|
|
|
271
|
-
SDK requests arriving without a reasoning level fall back
|
|
287
|
+
SDK requests arriving without a reasoning level fall back automatically. OpenAI Responses, OpenAI Completions, and Mistral send the lowest mapped string value (or keep the provider default if none is mapped); `thinkingFormat: "openrouter"` sends the lowest supported level even without an explicit string value; budget-based Gemini models use that level's `thinkingBudgets` value. The response records `thinking_off_fallback` in `diagnostics`.
|
|
272
288
|
|
|
273
289
|
Move older `compat.reasoningEffortMap` entries to model-level `thinkingLevelMap`.
|
|
274
290
|
|
|
275
|
-
Running `/thinking` opens the thinking-level selector, and `/thinking <level>` selects a level directly. Choosing a level applies it immediately and saves it as the startup default in both `settings.modelThinkingLevels` (for the active model) and `settings.defaultThinkingLevel`. Open `/settings` and select **Default thinking level per model** to review saved per-model levels.
|
|
291
|
+
Running `/thinking` opens the thinking-level selector, and `/thinking <level>` selects a level directly (case-insensitive, matching `:level` suffixes in `--model`, `enabledModels`, and `fallbackModels`). Choosing a level applies it immediately and saves it as the startup default in both `settings.modelThinkingLevels` (for the active model) and `settings.defaultThinkingLevel`. Open `/settings` and select **Default thinking level per model** to review saved per-model levels.
|
|
276
292
|
|
|
277
293
|
### Context window
|
|
278
294
|
|
|
@@ -286,7 +302,7 @@ Running `/thinking` opens the thinking-level selector, and `/thinking <level>` s
|
|
|
286
302
|
}
|
|
287
303
|
```
|
|
288
304
|
|
|
289
|
-
Built-in models inherit `contextWindow` from Atomic's built-in
|
|
305
|
+
Built-in models inherit `contextWindow` from Atomic's built-in model catalog, and discovered GitHub Copilot models read it from your account's `/models` list. Override one with `modelOverrides`:
|
|
290
306
|
|
|
291
307
|
```json
|
|
292
308
|
{
|
|
@@ -355,7 +371,7 @@ Merge rules:
|
|
|
355
371
|
|
|
356
372
|
## Per-model overrides
|
|
357
373
|
|
|
358
|
-
Use `modelOverrides` to patch specific built-in or extension-registered models without replacing the provider's model list. See [Model overrides fields](/models-configuration#model-overrides) for all supported fields.
|
|
374
|
+
Use `modelOverrides` to patch specific built-in, custom, or extension-registered chat and compactor models without replacing the provider's model list. See [Model overrides fields](/models-configuration#model-overrides) for all supported fields.
|
|
359
375
|
|
|
360
376
|
```json
|
|
361
377
|
{
|
|
@@ -380,18 +396,19 @@ Override rules:
|
|
|
380
396
|
|
|
381
397
|
- Atomic reads a single `models.json` from the active agent directory and never merges `.pi` and `.atomic` model files.
|
|
382
398
|
- Atomic retains parsed `modelOverrides` for models registered later by extensions through `atomic.registerProvider()`; unknown IDs are ignored otherwise.
|
|
383
|
-
- `modelOverrides`
|
|
384
|
-
-
|
|
399
|
+
- `modelOverrides` runs after `models` and extension registrations, so it applies to built-in, extension-registered, and same-ID custom chat and compactor models (as well as derived `-fast` and `-ultrafast` variants). Image and classifier models are unaffected.
|
|
400
|
+
- Nested objects merge per key rather than wiping siblings: `compat` (including `openRouterRouting`, `vercelGatewayRouting`, `chatTemplateKwargs`, and `chatTemplateArgs`), `inputLimits` (including `images` and `images.resize`), `promptCache`, `thinkingLevelMap`, `samplingParams`, `samplingParamsByThinkingLevel` (per level), and `compactionParams` (on compactor models).
|
|
401
|
+
- `headers` shallow-merges (when both a custom `models` entry and `modelOverrides` set the same header key, the custom `models` entry's header wins). Provider-level headers stay separate and combine at request time.
|
|
385
402
|
- Scalar `cost` overrides preserve inherited `tiers`; providing `cost.tiers` replaces the entire array (`[]` clears it).
|
|
386
403
|
|
|
387
404
|
## Derived fast model variants
|
|
388
405
|
|
|
389
|
-
For providers that enable fast mode via a request parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives `<id>-fast` variants after composing built-in catalogs, `models.json` entries, extension models, and base `modelOverrides`. Any `modelOverrides` entry keyed on the derived `-fast` ID then applies to that derived entry. GitHub Copilot publishes its own fast IDs without derivation. See [Fast models](/providers#fast-models) for eligibility.
|
|
406
|
+
For providers that enable fast mode via a request parameter (OpenAI and xAI `service_tier`, Anthropic `speed`), Atomic derives `<id>-fast` (and eligible `<id>-ultrafast`) variants after composing built-in catalogs, `models.json` entries, extension models, and base `modelOverrides`. Any `modelOverrides` entry keyed on the derived `-fast` or `-ultrafast` ID then applies to that derived entry. GitHub Copilot publishes its own fast IDs without derivation. See [Fast models](/providers#fast-models) for eligibility.
|
|
390
407
|
|
|
391
408
|
Rules for `models.json`:
|
|
392
409
|
|
|
393
|
-
- **Custom entries in `models` never get derived fast variants**, even when replacing a built-in model ID. Use `modelOverrides` instead of `models` to customize a built-in model while keeping its derived
|
|
394
|
-
- **Exact IDs win.** If a provider, `models.json`, or an extension defines the exact `<base>-fast` ID, Atomic keeps that entry without deriving a duplicate and warns at startup. The `-fast` suffix alone never adds fast routing.
|
|
410
|
+
- **Custom entries in `models` never get derived fast or ultrafast variants**, even when replacing a built-in model ID. Use `modelOverrides` instead of `models` to customize a built-in model while keeping its derived sibling.
|
|
411
|
+
- **Exact IDs win.** If a provider, `models.json`, or an extension defines the exact `<base>-fast` or `<base>-ultrafast` ID, Atomic keeps that entry without deriving a duplicate and warns at startup. The `-fast` or `-ultrafast` suffix alone never adds fast routing.
|
|
395
412
|
- **`modelOverrides` works on derived IDs.** Overriding the base model flows down to its derived sibling; overriding the derived ID (such as `modelOverrides["gpt-5.6-sol-fast"]`) wins while keeping fast-route metadata intact.
|
|
396
413
|
|
|
397
414
|
Derived `-fast` variants inherit the base model's `cost` because the adapter applies the priority/speed multiplier at request time. Do not pre-multiply costs in overrides. Ultrafast variants carry their published Ultrafast rates directly and can be overridden by their own ID.
|
|
@@ -599,6 +616,6 @@ Atomic checks explicit model capability metadata rather than guessing from provi
|
|
|
599
616
|
|
|
600
617
|
### Catalog freshness and precedence
|
|
601
618
|
|
|
602
|
-
Atomic caches remote catalogs in `~/.atomic/agent/models-store.json`, keeps each provider's last usable snapshot on refresh failure, and prefers newer built-in data over stale remote caches. Final resolution layers built-in catalogs, fresh persisted
|
|
619
|
+
Atomic caches remote catalogs in `~/.atomic/agent/models-store.json`, keeps each provider's last usable snapshot on refresh failure, and prefers newer built-in data over stale remote caches. Final resolution layers built-in catalogs, fresh persisted or remote data, the active agent directory's single `models.json`, and extension provider registrations and overrides. Project `.atomic`/`.pi` model files and legacy agent-directory model files are never merged. For catalog URL and offline variables, see [Environment variables](/environment-variables); for programmatic catalog control, see [SDK](/sdk) and [Model catalog persistence and refresh](/sdk/reference#model-catalog-persistence-and-refresh).
|
|
603
620
|
|
|
604
621
|
Built-in Claude Opus 5 entries on Anthropic and Amazon Bedrock carry adaptive-thinking, prompt-caching, strict-tool, and `xhigh` metadata where advertised. Custom entries for similar models must declare matching `compat` capabilities explicitly rather than relying on the display name.
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: models.json field reference
|
|
3
3
|
sidebarTitle: "models.json fields"
|
|
4
|
-
description:
|
|
4
|
+
description: Complete field reference for providers, models, overrides, and API compatibility in models.json.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Models Configuration
|
|
8
|
-
|
|
9
7
|
{/* This file is generated from TypeScript source. Do not edit it manually; run npm run generate:references --workspace=@bastani/atomic. */}
|
|
10
8
|
|
|
11
|
-
This reference lists
|
|
9
|
+
This reference lists every field accepted in `models.json`. See [Configure custom models](/models) for examples and file locations (normally `~/.atomic/agent/models.json`).
|
|
12
10
|
|
|
13
11
|
Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json"` to `models.json` for editor validation and completion.
|
|
14
12
|
|
|
@@ -36,9 +34,11 @@ Each `models` entry adds a model to the provider. An entry whose `id` matches an
|
|
|
36
34
|
|---|---|---|---|
|
|
37
35
|
| `id` | string | | Required. Model ID sent to the API. |
|
|
38
36
|
| `name` | string | | Display name, also matched by --model patterns. |
|
|
37
|
+
| `type` | `"chat" \| "compactor"` | `"chat"` | Model kind: "chat" (default) or "compactor" for a dedicated remote compaction endpoint. |
|
|
39
38
|
| `api` | string | | Overrides the provider api. |
|
|
40
39
|
| `baseUrl` | string | | Overrides the provider baseUrl. |
|
|
41
|
-
| `
|
|
40
|
+
| `endpointPath` | string | | Endpoint path appended to baseUrl for compactor requests (default "/compact"). Set to "" to POST directly to baseUrl. Applies only to compactor models. |
|
|
41
|
+
| `reasoning` | boolean | `false` | Whether the model supports thinking. Applies only to chat models. |
|
|
42
42
|
| `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
|
|
43
43
|
| `input` | `("text" \| "image" \| "pdf")[]` | `["text"]` | |
|
|
44
44
|
| `inputLimits` | [object](#input-limits) | | |
|
|
@@ -54,10 +54,12 @@ Each `models` entry adds a model to the provider. An entry whose `id` matches an
|
|
|
54
54
|
| `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
|
|
55
55
|
| `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
|
|
56
56
|
| `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
|
|
57
|
-
| `contextWindow` | number | `128000` | Context window in tokens. |
|
|
58
|
-
| `maxTokens` | number | `16384` | Maximum output tokens. |
|
|
57
|
+
| `contextWindow` | number | `128000` | Context window in tokens. Applies only to chat models. |
|
|
58
|
+
| `maxTokens` | number | `16384` | Maximum output tokens. Defaults to 16384 for chat models. When omitted on compactor models, defaults to 32000 estimated tokens, capped at 50% of the automatic trigger. |
|
|
59
|
+
| `timeoutMs` | number | | Wall-clock timeout in milliseconds for one compactor request (default 120000). Applies only to compactor models. |
|
|
59
60
|
| `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
|
|
60
61
|
| `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
|
|
62
|
+
| `compactionParams` | object | | API-specific request-body parameters merged into { messages, query, model } for compactor requests. Omit to let the remote API use its own defaults. Applies only to compactor models. |
|
|
61
63
|
| `headers` | object | | Request headers. Values resolve like apiKey. |
|
|
62
64
|
| `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
|
|
63
65
|
|
|
@@ -68,7 +70,9 @@ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown ID
|
|
|
68
70
|
| Field | Type | Default | Description |
|
|
69
71
|
|---|---|---|---|
|
|
70
72
|
| `name` | string | | Display name, also matched by --model patterns. |
|
|
71
|
-
| `
|
|
73
|
+
| `baseUrl` | string | | Overrides the model baseUrl. |
|
|
74
|
+
| `endpointPath` | string | | Endpoint path appended to baseUrl for compactor requests (default "/compact"). Set to "" to POST directly to baseUrl. Applies only to compactor models. |
|
|
75
|
+
| `reasoning` | boolean | | Whether the model supports thinking. Applies only to chat models. |
|
|
72
76
|
| `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
|
|
73
77
|
| `input` | `("text" \| "image" \| "pdf")[]` | | |
|
|
74
78
|
| `inputLimits` | [object](#input-limits) | | |
|
|
@@ -84,16 +88,18 @@ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown ID
|
|
|
84
88
|
| `cost.tiers[].cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
|
|
85
89
|
| `cost.tiers[].cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
|
|
86
90
|
| `promptCache` | object | | Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Atomic warms only tiers with a known lifetime. |
|
|
87
|
-
| `contextWindow` | number | | Context window in tokens. |
|
|
88
|
-
| `maxTokens` | number | | Maximum output tokens. |
|
|
91
|
+
| `contextWindow` | number | | Context window in tokens. Applies only to chat models. |
|
|
92
|
+
| `maxTokens` | number | | Maximum output tokens. On compactor models, sets the upper bound on compacted output in estimated tokens, capped at 50% of the automatic trigger. |
|
|
93
|
+
| `timeoutMs` | number | | Wall-clock timeout in milliseconds for one compactor request (default 120000). Applies only to compactor models. |
|
|
89
94
|
| `samplingParams` | object | | Fields merged into every request body. Applies only to OpenAI-compatible APIs. |
|
|
90
95
|
| `samplingParamsByThinkingLevel` | object | | samplingParams per thinking level, merged over samplingParams. |
|
|
96
|
+
| `compactionParams` | object | | API-specific request-body parameters merged into { messages, query, model } for compactor requests. Omit to let the remote API use its own defaults. Applies only to compactor models. |
|
|
91
97
|
| `headers` | object | | Request headers. Values resolve like apiKey. |
|
|
92
98
|
| `compat` | [object](#compatibility) | | Provider and model compatibility overrides. |
|
|
93
99
|
|
|
94
100
|
## Input limits
|
|
95
101
|
|
|
96
|
-
See [Image
|
|
102
|
+
See [Image input limits](/models/reference#image-input-limits).
|
|
97
103
|
|
|
98
104
|
| Field | Type | Default | Description |
|
|
99
105
|
|---|---|---|---|
|
|
@@ -209,7 +215,7 @@ Also applies to `cloudflare-workers-ai-system-one`.
|
|
|
209
215
|
|
|
210
216
|
| Field | Type | Default | Description |
|
|
211
217
|
|---|---|---|---|
|
|
212
|
-
| `imageInput` | `"assets" \| "images" \| "state-image-urls"` | | How the service takes classifier images. "assets" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. "images" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. "state-image-urls" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models
|
|
218
|
+
| `imageInput` | `"assets" \| "images" \| "state-image-urls"` | | How the service takes classifier images. "assets" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. "images" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. "state-image-urls" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat and compactor models. |
|
|
213
219
|
| `sendImageOptInHeader` | boolean | | Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter. |
|
|
214
220
|
|
|
215
221
|
### Atomic compatibility aliases
|
package/docs/models.md
CHANGED
|
@@ -1,60 +1,23 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
|
|
2
|
+
title: "Configure custom models"
|
|
3
|
+
sidebarTitle: "Custom models"
|
|
4
|
+
description: "Add local or proxied models and remote compactors in models.json, override built-in providers, and use classifier models."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Add custom providers, chat models, and remote compactors (such as Ollama, vLLM, LM Studio, and API proxies) through `~/.atomic/agent/models.json`. Set `ATOMIC_CODING_AGENT_DIR` (or legacy `PI_CODING_AGENT_DIR`) to use another directory.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
| If you want to | Edit or use | Read |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Add custom chat or compactor models, proxy endpoints, headers, or `modelOverrides` | `~/.atomic/agent/models.json` | This page and [Model configuration reference](/models/reference) |
|
|
12
|
+
| Choose default models, model scopes (`enabledModels`), `fallbackModels`, `decisionModel`, or `compactionModel` | `settings.json` or CLI flags (`--model`, `--models`) | [Settings reference](/settings#models-and-thinking) and [CLI model options](/reference/cli#model-options) |
|
|
13
|
+
| Configure subscriptions, API keys, or cloud credentials | `/login`, `~/.atomic/agent/auth.json`, or env vars | [Model providers](/providers) |
|
|
14
|
+
| Register custom streaming, image, classifier, or compactor APIs, OAuth flows, dynamic discovery, or account aliases | Extension calling `atomic.registerProvider()` | [Build custom providers](/custom-provider) |
|
|
9
15
|
|
|
10
|
-
Atomic does not read project-scoped `.atomic/models.json`, fall back to `~/.pi/agent/models.json`, or merge `.pi` and `.atomic` model files
|
|
16
|
+
- **Single file, no merging.** Atomic reads only `models.json` from the active agent directory. It does not read project-scoped `.atomic/models.json`, fall back to `~/.pi/agent/models.json`, or merge `.pi` and `.atomic` model files (unlike files that fall back to `~/.pi/agent/`, such as `settings.json` and `auth.json`).
|
|
17
|
+
- **Syntax and schema.** `models.json` allows `//` line comments, trailing commas, and leading UTF-8 BOMs (`/* */` block comments are not supported). Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json"` for editor completion and validation.
|
|
18
|
+
- **Reloading and errors.** Open `/model`, open `/scoped-models`, or run `/reload` after saving `models.json` to reload changes without restarting. If `models.json` has a JSON or schema error, Atomic ignores the file, keeps built-in providers working, and shows the error banner in `/model`.
|
|
11
19
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
If a refresh times out or fails, the selector reports that it is using cached models; you do not need to reset `auth.json` or `~/.atomic`. Login and logout changes stay in effect even if an earlier refresh finishes afterward.
|
|
15
|
-
|
|
16
|
-
A `defaultProvider`/`defaultModel` pair in `settings.json` resolves after built-in, `models.json`, and extension providers register. If the provider is still unsupported:
|
|
17
|
-
|
|
18
|
-
- **Interactive mode** warns about the saved configuration and leaves model selection open instead of silently switching providers.
|
|
19
|
-
- **Print and JSON modes** write the error to stderr and exit nonzero before prompting, keeping JSON stdout valid JSONL.
|
|
20
|
-
- **RPC mode** rejects `prompt` with the same error until `set_model` selects an available model or model cycling returns a different available model.
|
|
21
|
-
|
|
22
|
-
If the provider is supported but the model is unknown or lacks credentials, automatic selection picks an available authenticated model. See [Settings](/settings#model-&-thinking).
|
|
23
|
-
|
|
24
|
-
Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json"` to `models.json` for editor completion and validation.
|
|
25
|
-
|
|
26
|
-
## Where to go next
|
|
27
|
-
|
|
28
|
-
This page gives minimal and full `models.json` examples. [Models Configuration](/models-configuration) lists every provider, model, override, and compatibility field generated from the schema. For API compatibility behavior, cost tiers, and derived fast variants, see the [Model configuration reference](/models/reference).
|
|
29
|
-
|
|
30
|
-
## Use classifier models
|
|
31
|
-
|
|
32
|
-
Classifier models answer typed questions about JSON state instead of chatting and do not appear in `/model`. In [codemode](/tools#codemode), list them with `models.getAvailableOfType("classifier")` and call `models.classify(model, { state, questions })`. See [Codemode](/codemode#classify) for question and answer shapes.
|
|
33
|
-
|
|
34
|
-
Built-in classifiers:
|
|
35
|
-
|
|
36
|
-
- **GitHub Copilot:** `github-copilot/microsoft-decision-1` (text only, 32,768-token context) through Copilot's System One endpoint, authenticated with Copilot OAuth or `COPILOT_GITHUB_TOKEN`.
|
|
37
|
-
- **OpenAI Decisions:** `openai-decisions/gpt-6-luna` via OpenAI's [Decisions API](https://developers.openai.com/api/docs/guides/decisions). It has no `/login` entry and reuses the first OpenAI API key found (`openai-api`, `openai` API key, then `OPENAI_API_KEY`), skipping ChatGPT sign-in. It accepts up to 128 images and up to 922K tokens; requests above roughly 600K tokens may hit a gateway 504 timeout that is not retried. (`openai/gpt-6-luna` always selects the chat model.)
|
|
38
|
-
- **TypeSafe Jev and Cloudflare Clef:** Direct TypeSafe (`typesafe/jev-latest`, `typesafe/jev-1.14.0`, up to 262K tokens with PNG/JPEG images; see [TypeSafe Jev](/providers#typesafe-jev)); Cloudflare Workers AI (`typesafe/jev`, `typesafe/jev-1.14.0` with PNG/JPEG images; Clef, Clef Flash, and Clef Omni with up to four PNG/JPEG/WebP images); OpenRouter (`~typesafe/jev-latest`, `typesafe/jev-1.13`, `typesafe/jev-1.14`, and Clef models with image input where listed); Vercel AI Gateway and OpenCode Zen (text-only Jev).
|
|
39
|
-
- **Local llama.cpp:** Native decision models and a next-token-probability fallback for chat models; see [Local classification](/llama-cpp#classification).
|
|
40
|
-
|
|
41
|
-
System One services expect different image request formats, controlled by `compat.imageInput`. Built-in models configure it automatically, so overriding `baseUrl` preserves it. For a custom proxy that reaches another classifier service, set `imageInput` and `sendImageOptInHeader` in provider-level `compat`; see [System One compatibility](/models-configuration#typesafe-system-one). A proxy in front of OpenRouter needs `"imageInput": "state-image-urls"` and `"sendImageOptInHeader": false` so OpenRouter does not silently drop images.
|
|
42
|
-
|
|
43
|
-
## Fallbacks and credentials
|
|
44
|
-
|
|
45
|
-
A model chain starts with a pinned model followed by `fallbackModels` in a session or subagent; `model: "auto"` starts with your configured default model:
|
|
46
|
-
|
|
47
|
-
- Candidates whose providers lack credentials are skipped before any request (`fallback.skipped` on session `model_change` entries; `modelAttempts` on subagents). `auto` never selects an unauthenticated default model.
|
|
48
|
-
- A provider that rejects credentials (HTTP 401 or an invalid, expired, revoked, or restricted key/token) is skipped for the rest of that walk. A model-scoped HTTP 403 skips only that model.
|
|
49
|
-
- A chain with no usable candidate fails immediately and names each skipped model and provider. A single pinned model with no fallbacks is never replaced.
|
|
50
|
-
|
|
51
|
-
## Contents
|
|
52
|
-
|
|
53
|
-
- [Minimal example](#minimal-example)
|
|
54
|
-
- [Full example](#full-example)
|
|
55
|
-
- [Google AI Studio example](#google-ai-studio-example)
|
|
56
|
-
- [Model configuration fields](/models-configuration)
|
|
57
|
-
- [Model configuration reference](/models/reference)
|
|
20
|
+
This page gives minimal and full `models.json` examples. For every schema field, see [`models.json` field reference](/models-configuration). For compatibility rules, value resolution, overrides, pricing tiers, and derived fast variants, see [Model configuration reference](/models/reference). For SDK catalog persistence and `modelsPath`, see [Model catalog persistence and refresh](/sdk/reference#model-catalog-persistence-and-refresh).
|
|
58
21
|
|
|
59
22
|
## Minimal example
|
|
60
23
|
|
|
@@ -62,6 +25,7 @@ For local servers (Ollama, LM Studio, vLLM), only `id` is required per model:
|
|
|
62
25
|
|
|
63
26
|
```json
|
|
64
27
|
{
|
|
28
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json",
|
|
65
29
|
"providers": {
|
|
66
30
|
"ollama": {
|
|
67
31
|
"baseUrl": "http://localhost:11434/v1",
|
|
@@ -76,9 +40,12 @@ For local servers (Ollama, LM Studio, vLLM), only `id` is required per model:
|
|
|
76
40
|
}
|
|
77
41
|
```
|
|
78
42
|
|
|
79
|
-
|
|
43
|
+
- **`apiKey` is optional in `models.schema.json`.** You can omit `apiKey` on a custom provider and save a key later via `/login <provider>` in `auth.json`. However, Atomic lists a provider's models as available only when some credential is configured, which is why local servers like Ollama use a placeholder such as `"apiKey": "ollama"`.
|
|
44
|
+
- **Non-empty provider entries.** Every provider object in `models.json` must include at least one of `baseUrl`, `headers`, `compat`, non-empty `models` or `modelOverrides`, `apiKey`, or `authHeader`. An empty `{}` entry, or an entry with only `"models": []` or `"modelOverrides": {}`, fails validation.
|
|
80
45
|
|
|
81
|
-
|
|
46
|
+
### Proxy a built-in provider
|
|
47
|
+
|
|
48
|
+
To route a built-in provider through a proxy while keeping its built-in models and authentication, set only `baseUrl`:
|
|
82
49
|
|
|
83
50
|
```json
|
|
84
51
|
{
|
|
@@ -88,6 +55,8 @@ To route a built-in provider through a proxy while keeping its models and authen
|
|
|
88
55
|
}
|
|
89
56
|
```
|
|
90
57
|
|
|
58
|
+
### OpenAI-compatible server compatibility
|
|
59
|
+
|
|
91
60
|
Some OpenAI-compatible servers (such as Ollama, vLLM, or SGLang) do not accept the `developer` role or `reasoning_effort`. Set `compat.supportsDeveloperRole` or `compat.supportsReasoningEffort` to `false` at the provider level (applies to all models) or model level (overrides provider defaults):
|
|
92
61
|
|
|
93
62
|
```json
|
|
@@ -139,8 +108,6 @@ Override defaults when you need explicit limits, modalities, or pricing:
|
|
|
139
108
|
}
|
|
140
109
|
```
|
|
141
110
|
|
|
142
|
-
Open `/model` after saving `models.json` to reload changes without restarting. Invalid files report a schema error.
|
|
143
|
-
|
|
144
111
|
## Google AI Studio example
|
|
145
112
|
|
|
146
113
|
Use `google-generative-ai` with a `baseUrl` to add Google AI Studio models such as Gemma 4:
|
|
@@ -166,35 +133,83 @@ Use `google-generative-ai` with a `baseUrl` to add Google AI Studio models such
|
|
|
166
133
|
}
|
|
167
134
|
```
|
|
168
135
|
|
|
169
|
-
`baseUrl`
|
|
170
|
-
|
|
171
|
-
##
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<a
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
136
|
+
Any custom provider that defines `models` requires a `baseUrl` (unless overriding a built-in provider that already has one) and an `api` at the provider or model level.
|
|
137
|
+
|
|
138
|
+
## Catalog refresh and startup defaults
|
|
139
|
+
|
|
140
|
+
`/model` and `/scoped-models` show the cached authenticated catalog immediately while refreshing network-backed catalogs in the background for up to 15 seconds. Closing either selector cancels the refresh. From the shell, use [`--model`, `--models`, `--list-models`](/reference/cli#model-options), and `atomic update --models` to inspect or refresh catalogs; SDK hosts can configure `ModelRuntime` and `modelsPath` (see [Model catalog persistence and refresh](/sdk/reference#model-catalog-persistence-and-refresh)).
|
|
141
|
+
|
|
142
|
+
- **Direct `/model <model_name>`:** When no model scope (`enabledModels` / `--models`) is active, `/model <model_name>` checks the cache first and waits for refresh only on a miss. When a model scope is active, `/model <model_name>` searches only the scoped models and does not trigger a refresh.
|
|
143
|
+
- **Failed or slow refreshes:** If a refresh times out or fails, the selector reports that it is using cached models; you do not need to reset `auth.json` or `~/.atomic`. Login and logout changes stay in effect even if an earlier refresh finishes afterward.
|
|
144
|
+
- **Unsupported `defaultProvider`/`defaultModel`:** Saved defaults in `settings.json` resolve after built-in, `models.json`, and extension providers load. If the saved provider is still unsupported:
|
|
145
|
+
- **Interactive mode** warns about the saved configuration and leaves model selection open instead of silently switching providers.
|
|
146
|
+
- **Print and JSON modes** write the error to stderr and exit nonzero before prompting, keeping JSON stdout valid JSONL.
|
|
147
|
+
- **RPC mode** rejects `prompt` with the same error until `set_model` selects an available model or model cycling returns a different available model.
|
|
148
|
+
|
|
149
|
+
If the provider is supported but the model is unknown or lacks credentials, automatic selection picks an available authenticated model. See [Models and thinking](/settings#models-and-thinking).
|
|
150
|
+
|
|
151
|
+
## Remote compaction models
|
|
152
|
+
|
|
153
|
+
Add a custom remote compaction endpoint by setting `"type": "compactor"` on a model entry, or override built-in `morph/morph-compactor` parameters under `modelOverrides`. Custom compactor models are excluded from `/model` and appear automatically in `/settings` under **Compaction model**:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"providers": {
|
|
158
|
+
"my-compactor": {
|
|
159
|
+
"baseUrl": "https://compact.example.com/v1",
|
|
160
|
+
"apiKey": "$MY_COMPACTOR_API_KEY",
|
|
161
|
+
"headers": {
|
|
162
|
+
"X-Team": "platform"
|
|
163
|
+
},
|
|
164
|
+
"models": [
|
|
165
|
+
{
|
|
166
|
+
"id": "compact-v2",
|
|
167
|
+
"name": "Internal Compactor v2",
|
|
168
|
+
"type": "compactor",
|
|
169
|
+
"api": "custom-compact",
|
|
170
|
+
"endpointPath": "/compress",
|
|
171
|
+
"compactionParams": {
|
|
172
|
+
"target_ratio": 0.4,
|
|
173
|
+
"preserve_recent": 2
|
|
174
|
+
},
|
|
175
|
+
"timeoutMs": 180000,
|
|
176
|
+
"maxTokens": 48000
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Every custom compactor requires `"api"` at the provider or model level (just like custom chat models; built-in Morph defines its own `"api": "morph-compact"`). Atomic sends `{ messages, query, model }` plus any keys in `compactionParams` (omitting `compactionParams` lets the remote API use its own defaults). See [Customize Morph or add a remote compactor](/compaction#customize-morph-or-add-a-remote-compactor) and [Compaction reference](/compaction/reference#compactor-request-contract).
|
|
185
|
+
|
|
186
|
+
## Use classifier models
|
|
187
|
+
|
|
188
|
+
Classifier models answer typed questions about JSON state instead of chatting and do not appear in `/model`. Configure one for `structured_output` and `decide()` with [`decisionModel`](/settings#decisionmodel) (see [Structured decisions](/sdk/structured-decisions)), or call classifiers from [codemode](/tools#codemode) using `models.getAvailableOfType("classifier")` and `models.classify(model, { state, questions })` (see [Codemode](/codemode#classify)).
|
|
189
|
+
|
|
190
|
+
Built-in classifiers:
|
|
191
|
+
|
|
192
|
+
- **GitHub Copilot:** `github-copilot/microsoft-decision-1` (text only, 32,768-token context) through Copilot's System One endpoint, authenticated with Copilot OAuth or `COPILOT_GITHUB_TOKEN`.
|
|
193
|
+
- **OpenAI Decisions:** `openai-decisions/gpt-6-luna` via OpenAI's [Decisions API](https://developers.openai.com/api/docs/guides/decisions). It has no `/login` entry and reuses the first OpenAI API key found (`openai-api`, `openai` API key, then `OPENAI_API_KEY`), skipping ChatGPT sign-in. It accepts up to 128 images and up to 922K tokens; requests above roughly 600K tokens may hit a gateway 504 timeout that is not retried. (`openai/gpt-6-luna` always selects the chat model.)
|
|
194
|
+
- **TypeSafe Jev and Cloudflare Clef:** Direct TypeSafe (`typesafe/jev-latest`, `typesafe/jev-1.14.0`, up to 262K tokens with PNG/JPEG images; see [TypeSafe Jev](/providers#typesafe-jev)); Cloudflare Workers AI (`typesafe/jev`, `typesafe/jev-1.14.0` with PNG/JPEG images; Clef, Clef Flash, and Clef Omni with up to four PNG/JPEG/WebP images); OpenRouter (`~typesafe/jev-latest`, `typesafe/jev-1.13`, `typesafe/jev-1.14`, and Clef models with image input where listed); Vercel AI Gateway and OpenCode Zen (text-only Jev).
|
|
195
|
+
- **Local llama.cpp:** Native decision models and a next-token-probability fallback for chat models; see [Local classification](/llama-cpp#classification).
|
|
196
|
+
|
|
197
|
+
System One services expect different image request formats, controlled by `compat.imageInput`. Built-in models configure it automatically, so overriding `baseUrl` preserves it. For a custom proxy that reaches another classifier service, set `imageInput` and `sendImageOptInHeader` in provider-level `compat`; see [System One compatibility](/models-configuration#typesafe-system-one). A proxy in front of OpenRouter needs `"imageInput": "state-image-urls"` and `"sendImageOptInHeader": false` so OpenRouter does not silently drop images.
|
|
198
|
+
|
|
199
|
+
## Fallbacks and credentials
|
|
200
|
+
|
|
201
|
+
A model chain starts with a pinned model followed by `fallbackModels` in a session or subagent; `model: "auto"` starts with your configured default model:
|
|
202
|
+
|
|
203
|
+
- Candidates whose providers lack credentials are skipped before any request (recorded in session history and subagent run details). `auto` never selects an unauthenticated default model.
|
|
204
|
+
- A provider that rejects credentials (HTTP 401 or an invalid, expired, revoked, or restricted key/token) is skipped for the rest of that chain. A model-scoped HTTP 403 skips only that model.
|
|
205
|
+
- A chain with no usable candidate fails immediately and names each skipped model and provider. A single pinned model with no fallbacks is never replaced.
|
|
206
|
+
|
|
207
|
+
For full fallback, model-scope, and subagent selection rules, see [`fallbackModels`](/settings#fallbackmodels), [`enabledModels`](/settings#enabledmodels), [CLI model options](/reference/cli#model-options), and [Automatic model selection](/subagents/reference#automatic-model-selection).
|
|
208
|
+
|
|
209
|
+
## Related reference
|
|
210
|
+
|
|
211
|
+
- [`models.json` field reference](/models-configuration): every provider, model, override, and compatibility field.
|
|
212
|
+
- [Model configuration reference](/models/reference): supported APIs, value resolution, custom headers, OpenAI built-in models, image limits, sampling parameters, cost tiers, thinking level maps, overrides, fast variants, and API compatibility rules.
|
|
213
|
+
- [Model providers](/providers): subscription sign-ins, API keys, `auth.json`, and credential precedence.
|
|
214
|
+
- [Build custom providers](/custom-provider): register custom streaming, image, classifier, or compactor APIs and OAuth flows in an extension.
|
|
215
|
+
- [Model catalog persistence and refresh](/sdk/reference#model-catalog-persistence-and-refresh): programmatic `ModelRuntime` and `modelsPath` configuration.
|