Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

model-manifest.md

42 lines2.4 KB

1# Model manifest
2​
3`apps/server/src/provider/model-manifest.json` is bundled for offline startup and fetched from
4`main` at runtime. A remote fetch replaces the in-memory and on-disk cache only after generic
5catalog references and provider-owned adapter data validate. A failed or invalid fetch keeps the
6last successful remote manifest. The bundle is used when no valid remote cache exists, or when
7the bundle's `updatedAt` is later than the cached manifest's, so a release that edits the manifest
8takes effect before the next successful fetch. Bump `updatedAt` whenever you edit the file.
9​
10The top-level provider catalog is generic: models contain presentation metadata, aliases, status,
11an optional badge, and a reusable capability profile. The profile and model `adapter` fields are
12opaque until the owning provider validates them with its own allowlisted schema.
13​
14Claude Code uses the manifest as its complete built-in model catalog. To add a Claude model that
15uses an existing profile, add one object to `providers.claudeAgent.models`. Do not add a test or
16change application code. Add or change a profile in the same JSON file only when the model exposes
17a capability combination that does not already exist.
18​
19`currentModels.claudeAgent` is retained as a frozen compatibility field for releases that predate
20catalog discovery. New Claude models do not need to be added there. Codex still discovers models
21from its app server and uses `currentModels.codex` only as a legacy-classification overlay.
22​
23Claude model entries support:
24​
25- `aliases`, `status`, `badge`, and `profile` for client presentation and selection.
26- `adapter.claudeCode.minVersion` and `maxVersionExclusive` for installed-runtime compatibility.
27- Profile-level effort mappings, model suffixes, and context-window metadata for dispatch.
28​
29## Test policy
30​
31Changing model data does not require tests. Do not add or update tests for a model slug, display
32name, alias, legacy status, version boundary, badge, or profile assignment. The bundled manifest is
33configuration and is validated by its schema when imported.
34​
35Add tests only when implementation behavior changes:
36​
37- Fetching, caching, fallback, or schema-version handling changes in the manifest service.
38- Provider-neutral profile resolution gains new semantics.
39- A provider adapter gains a new compatibility or dispatch mapping type.
40​
41Resolver tests must use synthetic providers and model names so normal JSON edits never create test
42churn.