@bastani/atomic 0.10.14-alpha.1 → 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.
- package/CHANGELOG.md +29 -0
- 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 +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- 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.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/compaction/compactor.d.ts +0 -8
- 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.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- 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.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- 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 +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- 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/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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- 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.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 +1 -1
- 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.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- 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.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- 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/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +9 -0
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +76 -63
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +116 -89
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +15 -16
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -18
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +50 -38
- package/docs/termux.md +67 -41
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
package/docs/models/reference.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Model
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "Supported APIs, value resolution,
|
|
2
|
+
title: "Model runtime & overrides"
|
|
3
|
+
sidebarTitle: "Runtime & Overrides"
|
|
4
|
+
description: "Supported APIs, credential and header value resolution, model capabilities, overrides, derived fast variants, and API compatibility rules."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
This page
|
|
7
|
+
This page explains how `models.json` behaves at runtime: supported APIs, secret and header resolution, model capabilities, overrides, derived fast variants, and API compatibility flags.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<Columns cols={2}>
|
|
10
|
+
<Card title="models.json field reference" href="/models-configuration">
|
|
11
|
+
Complete schema-generated table of every provider, model, override, and compatibility field.
|
|
12
|
+
</Card>
|
|
13
|
+
<Card title="Build custom providers" href="/custom-provider">
|
|
14
|
+
Register custom streaming, image, classifier, or compactor APIs and OAuth flows in an extension.
|
|
15
|
+
</Card>
|
|
16
|
+
</Columns>
|
|
10
17
|
|
|
11
18
|
## Supported APIs
|
|
12
19
|
|
|
@@ -19,9 +26,9 @@ Jump to: [Supported APIs](#supported-apis) · [Provider configuration](#provider
|
|
|
19
26
|
|
|
20
27
|
Set `api` at provider level (default for chat and compactor models) or model level (override per model).
|
|
21
28
|
|
|
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
|
|
29
|
+
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 Atomic's native `pi-messages` protocol, or `"api": "mistral-conversations"` for a native Mistral endpoint.
|
|
23
30
|
|
|
24
|
-
Models with `"type": "compactor"` declare their own compactor `api` string (such as `"custom-compact"` or `"morph-compact"`). See [
|
|
31
|
+
Models with `"type": "compactor"` declare their own compactor `api` string (such as `"custom-compact"` or `"morph-compact"`). See [Custom compaction models](/compaction/custom-compactors).
|
|
25
32
|
|
|
26
33
|
## Provider configuration
|
|
27
34
|
|
|
@@ -47,10 +54,12 @@ See [Providers fields](/models-configuration#providers) for the full list of pro
|
|
|
47
54
|
|
|
48
55
|
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.
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
<Note>
|
|
58
|
+
**Runtime nuances for `apiKey` resolution:**
|
|
51
59
|
|
|
52
|
-
- **Uncached `!command` in `models.json` vs cached in `auth.json`:**
|
|
60
|
+
- **Uncached `!command` in `models.json` vs. cached in `auth.json`:** Shell commands in `models.json` run uncached on every request. Wrap slow or rate-limited commands in a local caching 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
61
|
- **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).
|
|
62
|
+
</Note>
|
|
54
63
|
|
|
55
64
|
### Custom headers
|
|
56
65
|
|
|
@@ -65,7 +74,9 @@ Important runtime differences:
|
|
|
65
74
|
"x-portkey-api-key": "$PORTKEY_API_KEY",
|
|
66
75
|
"x-secret": "!op read 'op://vault/item/secret'"
|
|
67
76
|
},
|
|
68
|
-
"models": [
|
|
77
|
+
"models": [
|
|
78
|
+
{ "id": "claude-sonnet-4-6" }
|
|
79
|
+
]
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
82
|
}
|
|
@@ -82,6 +93,7 @@ Key display and modality rules:
|
|
|
82
93
|
- `/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
94
|
- `name` is used for `--model` and `enabledModels` fuzzy matching and secondary text in `/model`; it never replaces `id`.
|
|
84
95
|
- `input` declares the modalities Atomic sends: `["text"]`, `["text", "image"]`, or `["text", "image", "pdf"]`.
|
|
96
|
+
- `promptCache` accepts `{ "short": <seconds>, "long": <seconds> }` (positive numbers) declaring best-effort prompt-cache lifetimes for [cache warming](/settings#models-and-thinking); see [Prompt cache lifetimes](/models#prompt-cache-lifetimes).
|
|
85
97
|
|
|
86
98
|
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"`.
|
|
87
99
|
|
|
@@ -231,7 +243,7 @@ In `modelOverrides`, scalar cost fields merge individually and preserve inherite
|
|
|
231
243
|
"providers": {
|
|
232
244
|
"openai": {
|
|
233
245
|
"modelOverrides": {
|
|
234
|
-
"gpt-
|
|
246
|
+
"gpt-6.2-sol": {
|
|
235
247
|
"cost": {
|
|
236
248
|
"input": 4,
|
|
237
249
|
"tiers": []
|
|
@@ -284,7 +296,7 @@ Model where thinking cannot be disabled:
|
|
|
284
296
|
|
|
285
297
|
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`.
|
|
286
298
|
|
|
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.
|
|
299
|
+
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. When this fallback happens, Atomic records a `thinking_off_fallback` diagnostic entry on the assistant message.
|
|
288
300
|
|
|
289
301
|
Move older `compat.reasoningEffortMap` entries to model-level `thinkingLevelMap`.
|
|
290
302
|
|
|
@@ -358,7 +370,9 @@ Include `models` to upsert custom entries alongside built-in models:
|
|
|
358
370
|
"baseUrl": "https://my-proxy.example.com/v1",
|
|
359
371
|
"apiKey": "$ANTHROPIC_API_KEY",
|
|
360
372
|
"api": "anthropic-messages",
|
|
361
|
-
"models": [
|
|
373
|
+
"models": [
|
|
374
|
+
{ "id": "claude-custom-alias", "name": "Custom Claude" }
|
|
375
|
+
]
|
|
362
376
|
}
|
|
363
377
|
}
|
|
364
378
|
}
|
|
@@ -409,9 +423,9 @@ Rules for `models.json`:
|
|
|
409
423
|
|
|
410
424
|
- **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
425
|
- **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.
|
|
412
|
-
- **`modelOverrides` works on derived IDs.** Overriding the base model flows down to its derived sibling; overriding the derived ID (such as `modelOverrides["gpt-
|
|
426
|
+
- **`modelOverrides` works on derived IDs.** Overriding the base model flows down to its derived sibling; overriding the derived ID (such as `modelOverrides["gpt-6.2-sol-fast"]`) wins while keeping fast-route metadata intact.
|
|
413
427
|
|
|
414
|
-
|
|
428
|
+
Both derived `-fast` and `-ultrafast` variants inherit the base model's standard `cost` and its built-in `serviceTiers` pricing metadata. At request time, the adapter bills from the serving tier's `serviceTiers` rates (or applies the Fast multiplier when no tier table is defined), ignoring `model.cost` whenever a matching tier rate exists. Do not pre-multiply standard costs in `modelOverrides`, and note that overriding `cost` on a derived `-ultrafast` variant (or a `-fast` variant that carries `serviceTiers`) does not change billed tier rates because `modelOverrides` has no `serviceTiers` field. Other override fields (`name`, `contextWindow`, `thinkingLevelMap`, `headers`, `compat`) still apply to derived `-fast` and `-ultrafast` IDs.
|
|
415
429
|
|
|
416
430
|
## Anthropic messages compatibility
|
|
417
431
|
|
|
@@ -442,7 +456,7 @@ By default, Atomic sends per-tool `eager_input_streaming: true`. If a proxy reje
|
|
|
442
456
|
}
|
|
443
457
|
```
|
|
444
458
|
|
|
445
|
-
`supportsMidConvoEffort` and `enforcesPreservedThinkingBinding` compose independently. Enable `supportsMidConvoEffort` only for exact transports that accept effort-only system messages
|
|
459
|
+
`supportsMidConvoEffort` and `enforcesPreservedThinkingBinding` compose independently. Enable `supportsMidConvoEffort` only for exact transports that accept effort-only system messages; it also instructs Anthropic (`prefix_mismatch_behavior: "drop_block"`) to drop invalidated signed thinking blocks rather than rejecting the request when effort changes mid-conversation. Use `enforcesPreservedThinkingBinding` for transports that enforce preserved-thinking prefixes without supporting effort-only system messages.
|
|
446
460
|
|
|
447
461
|
`supportsForcedToolChoice` and `supportsTemperature` also apply on `bedrock-converse-stream` and `openai-completions` models because they describe model behavior across every mirror. On `openai-completions`, `supportsTemperature: false` strips `temperature`, `top_p`, and `top_k` after merging `samplingParams`.
|
|
448
462
|
|
|
@@ -482,9 +496,9 @@ Scope notes: Claude Fable 5 is not restricted (only Fable 5.1 / Mythos 5.1 restr
|
|
|
482
496
|
|
|
483
497
|
On first-party `anthropic` models, switching to Claude Fable 5.1 preserves earlier Claude reasoning blocks, and switching back drops unreadable blocks without billing for them. Text, tool calls, and tool results always remain intact. See [Anthropic's preserved-thinking guide](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking).
|
|
484
498
|
|
|
485
|
-
When changes to the system prompt, tools, or prefix invalidate signed reasoning, Atomic asks Fable 5.1 to drop affected blocks rather than fail the turn and records `anthropic_input_transformations`
|
|
499
|
+
When changes to the system prompt, tools, or prefix invalidate signed reasoning, Atomic asks Fable 5.1 to drop affected thinking blocks rather than fail the turn and records an `anthropic_input_transformations` diagnostic entry on the assistant message summarizing the dropped blocks. [Compaction](/compaction) resets the signed reasoning chain; earlier thinking blocks do not cross a compaction boundary.
|
|
486
500
|
|
|
487
|
-
Server-side fallback may continue a declined Fable 5
|
|
501
|
+
Server-side fallback may continue a declined Claude Fable 5 (`claude-fable-5`) response with Claude Opus 4.8 or Claude Opus 5. Both Fable 5.1 (`claude-fable-5-1`) and Fable 5.2 (`claude-fable-5-2`) fall back only to Claude Opus 5 (`claude-opus-5`) because Opus 4.8 does not accept per-message effort. When a server-side fallback answers a turn, the assistant message keeps a `fallback` metadata marker recording which model served the response so usage and cost tracking stay accurate; keep that marker intact when replaying history in SDK callers.
|
|
488
502
|
|
|
489
503
|
These behaviors apply automatically only on first-party `anthropic` routes. Enable `compat.delegatesThinkingModelBinding` and `compat.enforcesPreservedThinkingBinding` on custom providers only when the backend supports them.
|
|
490
504
|
|
|
@@ -502,7 +516,9 @@ Use provider-level or model-level `compat` overrides for partial OpenAI-compatib
|
|
|
502
516
|
"supportsUsageInStreaming": false,
|
|
503
517
|
"maxTokensField": "max_tokens"
|
|
504
518
|
},
|
|
505
|
-
"models": [
|
|
519
|
+
"models": [
|
|
520
|
+
{ "id": "llama-3.3-70b" }
|
|
521
|
+
]
|
|
506
522
|
}
|
|
507
523
|
}
|
|
508
524
|
}
|
|
@@ -510,18 +526,41 @@ Use provider-level or model-level `compat` overrides for partial OpenAI-compatib
|
|
|
510
526
|
|
|
511
527
|
### Thinking formats and gateway routing
|
|
512
528
|
|
|
513
|
-
Choose the `compat.thinkingFormat` your OpenAI-compatible endpoint expects:
|
|
529
|
+
Choose the `compat.thinkingFormat` your OpenAI-compatible endpoint expects (when omitted, Atomic auto-detects from the provider URL):
|
|
530
|
+
|
|
531
|
+
- `openai`: sends top-level `reasoning_effort`.
|
|
532
|
+
- `openrouter`: sends `reasoning: { effort }`.
|
|
533
|
+
- `deepseek`: sends `thinking: { type }` plus `reasoning_effort` when supported.
|
|
534
|
+
- `together`: sends `reasoning: { enabled }` plus `reasoning_effort` when `supportsReasoningEffort` is enabled.
|
|
535
|
+
- `baseten`: sends configurable `chat_template_args` via `chatTemplateArgs` plus `reasoning_effort` when supported.
|
|
536
|
+
- `zai`: sends `thinking: { type }`.
|
|
537
|
+
- `qwen`: sends top-level `enable_thinking`.
|
|
538
|
+
- `qwen-chat-template`: sends `chat_template_kwargs.enable_thinking` and `preserve_thinking` for local Qwen servers.
|
|
539
|
+
- `chat-template`: sends configurable `chat_template_kwargs` via `chatTemplateKwargs`.
|
|
540
|
+
- `string-thinking`: sends a top-level string `thinking` field.
|
|
541
|
+
- `ant-ling`: sends `reasoning: { effort }` only when the mapped effort is non-null.
|
|
542
|
+
|
|
543
|
+
Each entry in `chatTemplateKwargs` (`thinkingFormat: "chat-template"`) or `chatTemplateArgs` (`thinkingFormat: "baseten"`) accepts either a literal JSON primitive (`string`, `number`, `boolean`, or `null`) or a dynamic variable object:
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"compat": {
|
|
548
|
+
"thinkingFormat": "chat-template",
|
|
549
|
+
"chatTemplateKwargs": {
|
|
550
|
+
"thinking": { "$var": "thinking.enabled" },
|
|
551
|
+
"reasoning_effort": { "$var": "thinking.effort", "omitWhenOff": true },
|
|
552
|
+
"thinking_budget": { "$var": "thinking.budget", "omitWhenOff": true },
|
|
553
|
+
"preserve_thinking": true
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
```
|
|
514
558
|
|
|
515
|
-
|
|
516
|
-
- `together` sends `reasoning: { enabled }` (plus `reasoning_effort` when `supportsReasoningEffort` is enabled).
|
|
517
|
-
- `qwen` sends top-level `enable_thinking`.
|
|
518
|
-
- `qwen-chat-template` sends `chat_template_kwargs.enable_thinking` and `preserve_thinking` for local Qwen servers.
|
|
519
|
-
- `chat-template` sends configurable `chat_template_kwargs` via `chatTemplateKwargs` (for example `{ "thinking": { "$var": "thinking.enabled" } }` on vLLM DeepSeek V3.x templates).
|
|
520
|
-
- `baseten` sends configurable `chat_template_args` via `chatTemplateArgs` and optionally top-level `reasoning_effort`.
|
|
559
|
+
Set `"omitWhenOff": true` on a `$var` entry to omit that key completely when thinking is `off`.
|
|
521
560
|
|
|
522
561
|
`thinkingTokenBudgetField` is independent of `thinkingFormat`. Do not enable it on DashScope Qwen models that send `reasoning_effort`, because DashScope rejects both fields together. Set `cacheControlFormat: "anthropic"` for OpenAI-compatible proxies that accept Anthropic-style `cache_control` markers on text and tool definitions.
|
|
523
562
|
|
|
524
|
-
OpenRouter routing example:
|
|
563
|
+
OpenRouter routing example (`max_price` accepts `prompt`, `completion`, `image`, `audio`, and `request` as numbers or strings; `preferred_min_throughput` and `preferred_max_latency` accept `p50`, `p75`, `p90`, and `p99` cutoffs, or a single number shorthand applying to `p50`):
|
|
525
564
|
|
|
526
565
|
```json
|
|
527
566
|
{
|
|
@@ -551,14 +590,19 @@ OpenRouter routing example:
|
|
|
551
590
|
},
|
|
552
591
|
"max_price": {
|
|
553
592
|
"prompt": 10,
|
|
554
|
-
"completion": 20
|
|
593
|
+
"completion": 20,
|
|
594
|
+
"image": 1,
|
|
595
|
+
"audio": 1,
|
|
596
|
+
"request": 0.05
|
|
555
597
|
},
|
|
556
598
|
"preferred_min_throughput": {
|
|
557
599
|
"p50": 100,
|
|
600
|
+
"p75": 80,
|
|
558
601
|
"p90": 50
|
|
559
602
|
},
|
|
560
603
|
"preferred_max_latency": {
|
|
561
604
|
"p50": 1,
|
|
605
|
+
"p75": 2,
|
|
562
606
|
"p90": 3,
|
|
563
607
|
"p99": 5
|
|
564
608
|
}
|
|
@@ -608,13 +652,13 @@ With an API key on `openai` or `openai-api`, changing thinking effort mid-sessio
|
|
|
608
652
|
|
|
609
653
|
Enable `compat.supportsMidConvoEffort` on custom `openai-responses` endpoints only if they accept `configuration_update` items; set it to `false` if an endpoint rejects them.
|
|
610
654
|
|
|
611
|
-
|
|
655
|
+
## Constrained tool sampling
|
|
612
656
|
|
|
613
657
|
Tools may request `{ type: "json_schema", strict: "prefer" | "require" }` or `{ type: "grammar", variants: { openai_lark?: string, openai_regex?: string } }`. `prefer` falls back to standard tool calling when strict enforcement is unavailable; `require` fails the request. Grammar tools use OpenAI custom-tool syntax and fall back to ordinary functions when unsupported.
|
|
614
658
|
|
|
615
659
|
Atomic checks explicit model capability metadata rather than guessing from provider names. Strict JSON-schema sampling is supported on capable OpenAI, Anthropic, Bedrock Converse, Mistral, and Gemini 3 (Google/Vertex) models; earlier Gemini models fall back on `prefer` and fail on `require`. OpenAI grammar tools require capable GPT-5+ models on endpoints that preserve custom tools without gateway normalization.
|
|
616
660
|
|
|
617
|
-
|
|
661
|
+
## Catalog freshness and precedence
|
|
618
662
|
|
|
619
663
|
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).
|
|
620
664
|
|
package/docs/models.md
CHANGED
|
@@ -1,63 +1,84 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Configure custom models"
|
|
3
|
-
sidebarTitle: "Custom
|
|
4
|
-
description: "Add local or proxied
|
|
3
|
+
sidebarTitle: "Configure Custom Models"
|
|
4
|
+
description: "Add local or proxied chat and compactor models in models.json, configure prompt cache lifetimes, override built-in providers, and use image and classifier models."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
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.
|
|
8
8
|
|
|
9
|
-
| If you want to |
|
|
9
|
+
| If you want to | Use this | Read |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
| Register custom streaming, image, classifier, or compactor APIs, OAuth flows, dynamic discovery
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
11
|
+
| Pick a daily model, switch thinking levels, scope models, or set fallbacks | `/model`, `/thinking`, `/scoped-models`, or `settings.json` | [Choose a model](/models/choose-a-model) and [Settings reference](/settings#models-and-thinking) |
|
|
12
|
+
| Sign in with subscriptions, store API keys, or set up cloud providers | `/login`, `~/.atomic/agent/auth.json`, or env vars | [Connect model providers](/providers) |
|
|
13
|
+
| Add custom chat or compactor models, proxy URLs, headers, or `modelOverrides` | `~/.atomic/agent/models.json` | This page and [Model runtime & overrides](/models/reference) |
|
|
14
|
+
| Register custom streaming, image, classifier, or compactor APIs, OAuth flows, or dynamic discovery | Extension calling `atomic.registerProvider()` | [Build custom providers](/custom-provider) |
|
|
15
|
+
|
|
16
|
+
<Note>
|
|
17
|
+
- **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.
|
|
18
|
+
- **Syntax and schema.** `models.json` supports `//` 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 validation and completion.
|
|
19
|
+
- **Reloading and errors.** Open `/model`, open `/scoped-models`, or run `/reload` after saving `models.json` to reload without restarting. If `models.json` contains a JSON or schema error, Atomic ignores the file, keeps built-in providers working, and shows an error banner in `/model`.
|
|
20
|
+
</Note>
|
|
21
|
+
|
|
22
|
+
For every schema field, see [`models.json` field reference](/models-configuration). For compatibility flags, value resolution, overrides, cost tiers, and derived fast variants, see [Model runtime & overrides](/models/reference).
|
|
23
|
+
|
|
24
|
+
## Add a local or OpenAI-compatible model
|
|
25
|
+
|
|
26
|
+
For local servers such as Ollama, LM Studio, or vLLM, only `id` is required per model; add explicit limits, modalities, pricing, and prompt cache lifetimes when needed.
|
|
27
|
+
|
|
28
|
+
<Tabs>
|
|
29
|
+
<Tab title="Minimal">
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json",
|
|
33
|
+
"providers": {
|
|
34
|
+
"ollama": {
|
|
35
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
36
|
+
"api": "openai-completions",
|
|
37
|
+
"apiKey": "ollama",
|
|
38
|
+
"models": [
|
|
39
|
+
{ "id": "llama3.1:8b" },
|
|
40
|
+
{ "id": "qwen2.5-coder:7b" }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
```
|
|
46
|
+
</Tab>
|
|
47
|
+
<Tab title="Full">
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/models.schema.json",
|
|
51
|
+
"providers": {
|
|
52
|
+
"ollama": {
|
|
53
|
+
"baseUrl": "http://localhost:11434/v1",
|
|
54
|
+
"api": "openai-completions",
|
|
55
|
+
"apiKey": "ollama",
|
|
56
|
+
"models": [
|
|
57
|
+
{
|
|
58
|
+
"id": "llama3.1:8b",
|
|
59
|
+
"name": "Llama 3.1 8B (Local)",
|
|
60
|
+
"reasoning": false,
|
|
61
|
+
"input": ["text"],
|
|
62
|
+
"contextWindow": 128000,
|
|
63
|
+
"maxTokens": 32000,
|
|
64
|
+
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
|
|
65
|
+
"promptCache": { "short": 300, "long": 3600 }
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
</Tab>
|
|
73
|
+
</Tabs>
|
|
49
74
|
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
"anthropic": { "baseUrl": "https://proxy.example.com/v1" }
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
75
|
+
- **`apiKey` is optional in the schema**, so you can omit it and save a key later via `/login <provider>`. However, Atomic lists a provider's models as available only when some credential is present, which is why local servers such as Ollama use a placeholder like `"apiKey": "ollama"`.
|
|
76
|
+
- **Every provider entry must be non-empty** and include at least one of `baseUrl`, `headers`, `compat`, non-empty `models` or `modelOverrides`, `apiKey`, or `authHeader`. An empty `{}` object, or an entry containing only `"models": []` or `"modelOverrides": {}`, fails validation.
|
|
77
|
+
- **Required fields for custom `models`:** Any custom provider defining `models` requires `baseUrl` (unless overriding a built-in provider that already has one) and an `api` at either the provider or model level.
|
|
57
78
|
|
|
58
79
|
### OpenAI-compatible server compatibility
|
|
59
80
|
|
|
60
|
-
Some OpenAI-compatible servers (such as Ollama, vLLM, or SGLang)
|
|
81
|
+
Some OpenAI-compatible servers (such as Ollama, vLLM, or SGLang) reject the `developer` role or `reasoning_effort`. Set `compat` flags at the provider level (applies to every model under that provider) or the model level (overrides provider defaults):
|
|
61
82
|
|
|
62
83
|
```json
|
|
63
84
|
{
|
|
@@ -81,26 +102,24 @@ Some OpenAI-compatible servers (such as Ollama, vLLM, or SGLang) do not accept t
|
|
|
81
102
|
}
|
|
82
103
|
```
|
|
83
104
|
|
|
84
|
-
|
|
105
|
+
### Prompt cache lifetimes
|
|
85
106
|
|
|
86
|
-
|
|
107
|
+
Declare `promptCache` with positive lifetimes in seconds for `short` and `long` cache-retention tiers when configuring a custom model or overriding a built-in model:
|
|
87
108
|
|
|
88
109
|
```json
|
|
89
110
|
{
|
|
90
111
|
"providers": {
|
|
91
|
-
"
|
|
92
|
-
"baseUrl": "
|
|
93
|
-
"api": "
|
|
94
|
-
"apiKey": "
|
|
112
|
+
"my-gateway": {
|
|
113
|
+
"baseUrl": "https://gateway.example.com/v1",
|
|
114
|
+
"api": "anthropic-messages",
|
|
115
|
+
"apiKey": "$MY_GATEWAY_KEY",
|
|
95
116
|
"models": [
|
|
96
117
|
{
|
|
97
|
-
"id": "
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"maxTokens": 32000,
|
|
103
|
-
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
|
|
118
|
+
"id": "claude-sonnet-4-6",
|
|
119
|
+
"promptCache": {
|
|
120
|
+
"short": 300,
|
|
121
|
+
"long": 3600
|
|
122
|
+
}
|
|
104
123
|
}
|
|
105
124
|
]
|
|
106
125
|
}
|
|
@@ -108,7 +127,21 @@ Override defaults when you need explicit limits, modalities, or pricing:
|
|
|
108
127
|
}
|
|
109
128
|
```
|
|
110
129
|
|
|
111
|
-
|
|
130
|
+
Atomic's [cache warming](/settings#models-and-thinking) runs only for retention tiers with a declared lifetime. Omit a tier (or `promptCache` altogether) if your endpoint does not advertise a predictable prompt-cache TTL.
|
|
131
|
+
|
|
132
|
+
## Proxy a built-in provider
|
|
133
|
+
|
|
134
|
+
To route a built-in provider through an HTTP proxy while keeping its built-in models, authentication, and derived `-fast` variants, set only `baseUrl`:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"providers": {
|
|
139
|
+
"anthropic": { "baseUrl": "https://proxy.example.com/v1" }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Add a Google AI Studio model
|
|
112
145
|
|
|
113
146
|
Use `google-generative-ai` with a `baseUrl` to add Google AI Studio models such as Gemma 4:
|
|
114
147
|
|
|
@@ -133,24 +166,19 @@ Use `google-generative-ai` with a `baseUrl` to add Google AI Studio models such
|
|
|
133
166
|
}
|
|
134
167
|
```
|
|
135
168
|
|
|
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
169
|
## Catalog refresh and startup defaults
|
|
139
170
|
|
|
140
|
-
`/model` and `/scoped-models`
|
|
171
|
+
`/model` and `/scoped-models` display cached authenticated catalogs immediately while refreshing network-backed catalogs in the background for up to 15 seconds. Closing either picker cancels the refresh. From the shell, use [`--model`, `--models`, `--list-models`](/reference/cli#model-options) and `atomic update --models` to inspect or refresh catalogs.
|
|
141
172
|
|
|
142
|
-
- **Direct `/model <
|
|
143
|
-
- **Failed or slow refreshes:** If a refresh times out or fails,
|
|
144
|
-
- **Unsupported `defaultProvider`/`defaultModel`:** Saved defaults
|
|
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.
|
|
173
|
+
- **Direct `/model <name>`:** Without an active model scope (`enabledModels` / `--models`), `/model <name>` checks cached models first and waits for a network refresh only on a miss. With a scope active, `/model <name>` searches only scoped models without triggering a refresh.
|
|
174
|
+
- **Failed or slow refreshes:** If a refresh times out or fails, Atomic keeps showing cached models; you do not need to reset `auth.json` or `~/.atomic`. Login and logout changes stay in effect even if an earlier background refresh finishes afterward.
|
|
175
|
+
- **Unsupported `defaultProvider`/`defaultModel`:** Saved defaults resolve after built-in, `models.json`, and extension providers finish loading. If the saved provider is still unsupported, interactive mode warns and leaves model selection open, print and JSON modes write the error to stderr and exit nonzero (keeping JSON stdout valid JSONL), and RPC rejects `prompt` until a valid model is selected.
|
|
148
176
|
|
|
149
|
-
|
|
177
|
+
For the full startup priority order and daily model switching, see [Choose a model](/models/choose-a-model#how-atomic-picks-your-startup-model). For programmatic catalog persistence in SDK hosts, see [Model catalog persistence and refresh](/sdk/reference#model-catalog-persistence-and-refresh).
|
|
150
178
|
|
|
151
|
-
## Remote compaction models
|
|
179
|
+
## Remote compaction models {#remote-compaction-models}
|
|
152
180
|
|
|
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
|
|
181
|
+
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 never appear in `/model`; they appear automatically under `/settings` → **Compaction model**:
|
|
154
182
|
|
|
155
183
|
```json
|
|
156
184
|
{
|
|
@@ -180,22 +208,58 @@ Add a custom remote compaction endpoint by setting `"type": "compactor"` on a mo
|
|
|
180
208
|
}
|
|
181
209
|
```
|
|
182
210
|
|
|
183
|
-
Every custom compactor requires `"api"` at the provider or model level (
|
|
211
|
+
Every custom compactor requires `"api"` at the provider or model level (built-in Morph defines `"api": "morph-compact"`). Atomic sends `{ messages, query, model }` plus any keys in `compactionParams` (omitting `compactionParams` lets the remote API apply its own defaults). Compactor output has no built-in size cap; set `maxTokens` on the compactor model to reject output longer than that many estimated tokens, or pass the endpoint's own compression parameter in `compactionParams`. See [Configure Morph or add a custom compactor](/compaction/custom-compactors#configure-morph-or-add-a-custom-compactor) and [Compaction reference](/compaction/reference#compactor-request-contract).
|
|
184
212
|
|
|
185
|
-
## Use classifier models
|
|
213
|
+
## Use classifier models {#use-classifier-models}
|
|
186
214
|
|
|
187
|
-
Classifier models answer typed questions about JSON state instead of
|
|
215
|
+
Classifier models answer typed questions (`choice`, `bool`, `score`) about structured JSON state instead of generating chat replies, and they do not appear in `/model`. Pin a classifier for Atomic's structured-decision tool (`structured_output`) and SDK/extension decisions (`decide()`) via [`decisionModel`](/settings#decisionmodel) (see [Structured decisions](/sdk/structured-decisions)), or call classifiers directly from [codemode](/codemode#classify) with `models.getAvailableOfType("classifier")` and `models.classify()`.
|
|
188
216
|
|
|
189
217
|
Built-in classifiers:
|
|
190
218
|
|
|
191
|
-
- **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`.
|
|
192
219
|
- **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.)
|
|
193
|
-
- **TypeSafe Jev
|
|
220
|
+
- **TypeSafe Jev (direct):** `typesafe/jev-latest` and `typesafe/jev-1.14.0` (up to 262K tokens with PNG/JPEG images; see [TypeSafe Jev](/providers#typesafe-jev)).
|
|
221
|
+
- **Cloudflare Workers AI:** 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).
|
|
222
|
+
- **OpenRouter:** TypeSafe Jev (`~typesafe/jev-latest`, `typesafe/jev-1.13`, `typesafe/jev-1.14`), Cloudflare Clef, plus additional third-party classifiers such as Liquid D1 (`~liquid/d1-latest`), Perplexity Decider (`~perplexity/pplx-decider-latest`), Baseten (`baseten/bison-1`), Microsoft Decision (`microsoft/microsoft-decision-1.1`), Morph Reflex (`morph/reflex`), and Respan.
|
|
223
|
+
- **Vercel AI Gateway and OpenCode Zen:** Text-only TypeSafe Jev plus additional Vercel AI Gateway classifiers (including Baseten Bison/Mammoth, Liquid D1.2, Microsoft Decision 1/1.1, Perplexity Decider, Google Gemini Decision 1, and OpenAI GPT-6 Luna Decisions).
|
|
224
|
+
- **GitHub Copilot:** `github-copilot/microsoft-decision-1` (text only, 32,768-token context), authenticated with Copilot OAuth or `COPILOT_GITHUB_TOKEN`.
|
|
194
225
|
- **Local llama.cpp:** Native decision models and a next-token-probability fallback for chat models; see [Local classification](/llama-cpp#classification).
|
|
195
226
|
|
|
196
|
-
|
|
227
|
+
Open `/settings` → **Decision model** or run `models.getAvailableOfType("classifier")` in codemode to see every classifier available for your authenticated providers.
|
|
228
|
+
|
|
229
|
+
TypeSafe's **System One** classifier protocol (`/v1/systemone`)—also used by Cloudflare Workers AI, OpenRouter, GitHub Copilot, and Vercel AI Gateway classifiers—accepts different image request layouts depending on the host, controlled by `compat.imageInput` (`"assets"`, `"images"`, or `"state-image-urls"`). Built-in entries configure this automatically, so overriding `baseUrl` preserves it. For a custom proxy targeting another classifier service, set `imageInput` and `sendImageOptInHeader` in provider-level `compat` (for example, a proxy in front of OpenRouter needs `"imageInput": "state-image-urls"` and `"sendImageOptInHeader": false` so OpenRouter does not silently drop images). See [System One compatibility](/models-configuration#typesafe-system-one).
|
|
230
|
+
|
|
231
|
+
## Use image models {#use-image-models}
|
|
232
|
+
|
|
233
|
+
Image models generate and edit images instead of chatting and never appear in `/model`. Call them from [codemode](/codemode#generate-images) via `models.getAvailableOfType("image")` and `models.generateImages()`, or from an extension via `ctx.modelRegistry.generateImages()`.
|
|
197
234
|
|
|
198
|
-
|
|
235
|
+
Built-in image providers:
|
|
236
|
+
|
|
237
|
+
- **OpenAI Images (`openai-images`):**
|
|
238
|
+
- Models: `gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2.5-flare`, `gpt-image-2.5-sunburst`, `gpt-image-2.6-flare`, and `gpt-image-2.6-sunburst`.
|
|
239
|
+
- **Authentication:** No separate `/login` entry; reuses the first OpenAI API key found (`openai-api`, `openai` API key, then `OPENAI_API_KEY`), skipping ChatGPT sign-in. If you only signed in with ChatGPT, save a key via `/login openai-api` or set `OPENAI_API_KEY`.
|
|
240
|
+
- **Editing and options:** Pass text and image blocks in `input` (the first untagged image is the base image, extra untagged images are references, and optional `role: "markup"` on GPT Image 2.5+ or `role: "mask"` are mutually exclusive). Supported options include `size`, `quality`, `n`, `background` (`"transparent"` requires `"png"` or `"webp"`), `outputFormat` (`"png"`, `"jpeg"`, `"webp"`, plus `"svg"` and `"gif"` on GPT Image 2.6), `outputCompression` (`0`–`100` for JPEG/WebP), `complexity` (`"low"`, `"medium"`, or `"high"` on GPT Image 2.6), `moderation`, and `safetyIdentifier` (up to 128 characters).
|
|
241
|
+
- **SVG and animated GIF (GPT Image 2.6):** `outputFormat: "svg"` requires `n: 1` (or omitted); leave `svg` unset so Atomic retries automatically with `gpt-6.1-sol` if your account requires `svg.model`, or pass `svg: { model, reasoning }` to pin a specific authoring model. `outputFormat: "gif"` accepts `frameCount` (`2`–`16`, default `9`) and `frameDurationMs` (`20`–`2000`, default `200`, rounded to 10 ms).
|
|
242
|
+
- **OpenRouter (`openrouter`):**
|
|
243
|
+
- Reuses your OpenRouter credential (`/login openrouter` or `OPENROUTER_API_KEY`).
|
|
244
|
+
- Exposes multi-vendor image models through OpenRouter's image generation API—such as `google/gemini-2.5-flash-image`, `google/gemini-3-pro-image`, `black-forest-labs/flux.2-pro`, `black-forest-labs/flux-3-image`, `openai/gpt-image-2.6-flare`, and `recraft/recraft-v4-pro-vector`. OpenAI-specific `ImagesOptions` are ignored by OpenRouter image models.
|
|
245
|
+
|
|
246
|
+
Example in [codemode](/codemode#generate-images):
|
|
247
|
+
|
|
248
|
+
```javascript
|
|
249
|
+
// @options: {"timeout_ms": 180000}
|
|
250
|
+
const painter = await models.getModelOfType("image", "openai-images", "gpt-image-2.6-flare");
|
|
251
|
+
const result = await models.generateImages(
|
|
252
|
+
painter,
|
|
253
|
+
{ input: [{ type: "text", text: "A minimalist geometric compass icon, flat vector" }] },
|
|
254
|
+
{ outputFormat: "svg" }
|
|
255
|
+
);
|
|
256
|
+
if (result.stopReason !== "stop") return result.error ?? result.errorMessage;
|
|
257
|
+
return { svgModel: result.svgModel, mimeTypes: result.output.map((block) => block.mimeType) };
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
To register a custom image provider or API, see [Build custom providers](/custom-provider).
|
|
261
|
+
|
|
262
|
+
## Fallbacks and credentials {#fallbacks-and-credentials}
|
|
199
263
|
|
|
200
264
|
A model chain starts with a pinned model followed by `fallbackModels` in a session or subagent; `model: "auto"` starts with your configured default model:
|
|
201
265
|
|
|
@@ -205,10 +269,11 @@ A model chain starts with a pinned model followed by `fallbackModels` in a sessi
|
|
|
205
269
|
|
|
206
270
|
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).
|
|
207
271
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
272
|
+
<Columns cols={2}>
|
|
273
|
+
<Card title="Model runtime & overrides" href="/models/reference">
|
|
274
|
+
Supported APIs, secret/header resolution, overrides, cost tiers, fast variants, and API compatibility rules.
|
|
275
|
+
</Card>
|
|
276
|
+
<Card title="models.json field reference" href="/models-configuration">
|
|
277
|
+
Complete schema table for every provider, model, override, and compatibility field.
|
|
278
|
+
</Card>
|
|
279
|
+
</Columns>
|