Repository navigation
feat(spec): an agent's model name becomes optional — absent means the environment's default model - #37697
Conversation
… environment default Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 8e35a80aa656d584f7a0fe00e097d769a3b363b4 && git checkout 8e35a80aa656d584f7a0fe00e097d769a3b363b4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 579b85776d1abb6722df870eb2a652231ee4047e 2241d53bae9e432bf558f61d241a77255e154618 && git checkout -B drift-repro 579b85776d1abb6722df870eb2a652231ee4047e && git merge --no-ff 2241d53bae9e432bf558f61d241a77255e154618
node scripts/docs-audit/affected-docs.mjs --json 579b85776d1abb6722df870eb2a652231ee4047e
|
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Read: card #37686 (body, 3 comments), PR #37697 (body, 4 files, net diff against Gates, read off the head's check-runs (latest completed run per name): 0 failure. ① Derived judgments
② Semver level
Clause-②: yes (widening) — present line-initial in both the PR body and the changeset body, and it is the correct arm: nothing accepted before is refused now. The claim comment on the card still reads ③ Boundary flags
④ Design judgment
Attempts to break it:
Findings: S1 (should-fix) — not blocking, follow-up: N1 (nit) — No must-fix. Implemented-by: VERDICT: PASS |
Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
…artefacts Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Delta review: this record supersedes the one on Gates, read off this head's check-runs (latest completed run per name): 62 success, 12 skipped, 0 failure. ① Derived judgmentsCarried from the first record and re-read on this head, unchanged and still right: a block with no New in the delta:
② Semver level
Clause-②: yes (widening) — line-initial in both the PR body and the changeset body, and still the correct arm: no value accepted before is refused now, for either key. The default move is a semantic change to the parsed value, declared in ③ Boundary flags
④ Design judgment
Attempts to break the delta:
Findings: S2 (should-fix) — not blocking, follow-up outside this card's fence: N1 (nit) — carried, unchanged: N2 (nit) — the PR body's two-minute check still says No must-fix. Implemented-by: VERDICT: PASS |
… names no provider Claude-Session: https://claude.ai/code/session_01Q4EjjQgJ62YaG4EAxNLuqP Co-authored-by: Claude <noreply@anthropic.com>
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Contract reviewServed-tier: Second delta review: this record supersedes the ones on Gates, read off this head's check-runs (latest completed run per name): 63 success, 11 skipped, 0 failure. ① Derived judgmentsCarried from the two earlier records, re-read on this head, unchanged and still right:
New in this delta:
② Semver level
Clause-②: yes (widening) — line-initial in both the PR body and the changeset body; still the correct arm, since no value accepted before is refused now. ③ Boundary flags
④ Design judgment
Attempts to break the delta:
Findings: N1 (nit) — carried, unchanged: N3 (nit) — the PR body's acceptance note still describes No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz 维护者速读
Seat opinion: land. 席位核对Seat L1 verdict: ACCEPT · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45912640840 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
epic:#5055#1 · hotlong · session_01Q4EjjQgJ62YaG4EAxNLuqP Merge-queue red on this PR (run 45912640840) does not reproduce and does not touch this diff. Read at 2026-11-27T00:14Z.
Reading: a one-off failure in the boot-parity test, not a defect in this change. Re-arming is the seat's call. Nothing here needs a code change. Generated by Claude Code |
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz Queue kick of PR #37697 — signature, reading and disposition. 2026-11-27T00:16Z
|
|
epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz 维护者速读
Seat opinion: land. 席位核对Seat L1 verdict: ACCEPT (delta) · head
|
…stack-ai#37765) <!-- claude-projects-attribution: {"github_login":"hotlong"} --> _Requested by **Jack** · [project thread](https://claude.ai/code/project/chan_01EF41AQooqveF2DGD8nqPzS?thread=cmsg_01EF41AQooqveF2DGD8nqPzSVqcTHLLFPjviMwGsR87vDC)_ epic:objectstack-ai#5055#1 · hotlong · session_01Q4EjjPtiBXJZAqMqBPe3UD Fixes objectstack-ai#37711 Clause-②: no Metadata-protocol: none ## What The `objectstack-ai` skill still taught that an agent names its model and that `provider` defaults to `openai`. Since objectstack-ai#37697 (merge `3e87d7b6`) both are optional and `provider` has no default. This PR brings the published text and its eval in line. - `skills/objectstack-ai/SKILL.md`, Model Configuration: - `model` is an optional free-string name; absent means the host's default model for the environment. - `provider` is optional with no default (the deployment's choice, see objectstack-ai#37712). The inline enum list is unchanged and still accurate: `openai | azure_openai | anthropic | local`. - The schema citation moves from the stale `agent.zod.ts:36-40` to `:37-45`, the `AIModelConfigSchema` key list on main. - `skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2: accepts an omitted `model` and states the provider has no default. Assertions unchanged. - One `@objectstack/skills` patch changeset. No tier or sentinel wording (phase 2, not in the framework). ## Premise (on `origin/main` `cbc353ed`) `packages/spec/src/ai/agent.zod.ts`: ```ts 37 provider: z.enum(['openai', 'azure_openai', 'anthropic', 'local']).optional(), 38 model: z.string().optional().describe( 39 'Model name (e.g. gpt-4, claude-3-opus). Optional: when absent, the agent runs on the ' 40 + 'host\'s default model for this environment, so an agent that only tunes sampling ' 41 + '(e.g. `temperature`) need not name a model.', 42 ), 43 temperature: z.number().min(0).max(2).default(0.7), 44 maxTokens: z.number().optional(), 45 topP: z.number().optional(), ``` ## Token budget `skills/objectstack-ai/SKILL.md` sat at zero headroom (ceiling 6801). The new words are paid for by tightening the same section (shorter intro sentence, shorter registry and `maxTokens` rows); no fact is removed. The file now measures 6801 / 6801. ## Local gates - `node scripts/check-skills-token-ratchet.mjs` exit 0 (61 authored files within ceilings) - `pnpm check:skill-identifier-liveness` exit 0 - `pnpm check:skill-frame-sync` exit 0 - `pnpm check:skill-compatibility` exit 0 - `pnpm check:skill-top-level-keys` exit 0 (14 self-test cases) - `pnpm check:skill-links` exit 0 (272 links, 22 self-test cases) - `pnpm --filter @objectstack/spec check:skill-docs` exit 0 - `pnpm --filter @objectstack/spec check:skill-refs` exit 0 (10 generated files in sync) - `pnpm --filter @objectstack/spec check:skill-served-sections` exit 0 (33 self-test cases) - `pnpm --filter @objectstack/spec check:skill-examples` NOT MEASURED, exit 3: `@objectstack/client-react` dist not built in this container (spec was built). The diff touches no marked example block. - eval JSON parses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q4EjjPtiBXJZAqMqBPe3UD --------- Co-authored-by: Claude <noreply@anthropic.com>
…he deployment's AI settings choose the provider (objectstack-ai#37783) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu6xSMqJULJVMTrh5LMSQ4SD)_ Fixes objectstack-ai#37712 Clause-②: no (narrowing) Metadata-protocol: narrowed Skills-docs: follow-up objectstack-ai#37796 ## 维护者速读 - 是什么:agent 元数据里的 `model.provider`(openai / azure_openai / anthropic / local)从来没有运行时读取,按 ADR-0049「执行或移除」退役。供应商由部署的 AI 设置决定,agent 只写模型名。 - 影响:以后 agent 里写 `provider` 会报错,并提示删掉这一行;`os migrate meta --from 18 --write` 会自动删。18.x 默认写进去的 `provider: 'openai'` 会被静默剥掉,已构建、已存储的 agent 照常加载。元数据预览不再显示供应商标签。运行时行为不变。 - 要你做什么:无(座位已采纳退役路线,hold 记录 7206344767)。 ## What changes - **Schema** (`packages/spec/src/ai/agent.zod.ts`): `AIModelConfigSchema.provider` is a `retiredKey()` tombstone with the prescription, so writing it fails `tsc` (input type `never`) and the parse answers with the fix. The 18.x emitted default `provider: 'openai'` is accepted as inert residue and stripped (`acceptRetiredDefaultResidue`, the objectstack-ai#12840 rule for a retired defaulted key; same shape as `ViewSharingSchema`). Every other value meets the tombstone. - **ADR-0087 kit**: D2 conversion `agent-model-provider-removed` (`conversions/entries/19/`, step 19, `retiredFromLoadPath: true`, `retiredAfter: '18.6.0'`, lossless `stripKeys`); `RETIRED_KEYS_BY_MAJOR[19]` entry `ai/AIModelConfig:provider`; D3 semantic entry `agent-model-provider-retired` (relevance `agents`); one sentence in the step-19 rationale; JOIN row in `retired-key-removal-version.pin.test.ts`. - **Ledger**: `liveness/agent.json` `model` row note records the removal (a nested key has no row of its own). Evidence and `verifiedAt` unchanged: this session cannot read the cloud repository to re-verify it. - **Generated**: `authorable-surface/ai.json` (`[RETIRED]` row), `content/docs/references/ai/agent.mdx`. - **`DEFAULT_CHANGES_BY_MAJOR[19]`** (from objectstack-ai#37697): the reason no longer tells authors to write `provider: 'openai'`; it points at this retirement instead. - **Form**: the agent form's `model` help text no longer names a provider; the 11 locale bundles were regenerated (`en`) and hand-trimmed (the other ten drop the provider word only). - **UI** (`AgentPreview.tsx`): the preview shows the model name alone; a stale draft that still carries a provider never shows it. - **Docs and fixtures**: `content/docs/ai/agents.mdx` (table row + 4 examples), `getting-started/common-patterns.mdx`, `packages/spec/docs/MCP_GUIDE.md`, `docs/notes/crm-development-standards.mdx`, `os explain agent` text and example, `benchmark.bench.ts`, `metadata-validation-sweep.test.ts`, `agent.test.ts`. - **Pins**: `src/ai/agent-model-provider-retirement.test.ts`: refusal at every door (schema, `defineStack`), residue strip with a near-value control, `tsc` channel, D2 conversion on the stored-row seam and the boot door, idempotence, load-path retirement, registration, and a tree-scoped absence walk over the declared radius (added to `vitest.repo-tests.json`). - **Changeset**: `.changeset/37712-agent-model-provider-retired.md`, `@objectstack/spec` minor, BREAKING banner, FROM → TO table, ADR-0087 marker. ## Why ADR-0049 enforce-or-remove. Removal, not enforcement, because: 1. The enum does not match the deployment's providers. The deployment's list is `AI_PROVIDERS` in `packages/services/service-settings/src/manifests/ai-models.ts` (`gateway`, `openai`, `anthropic`, `google`, `deepseek`, `dashscope`, `cloudflare`, `siliconflow`, `openrouter`). `azure_openai` and `local` are not providers a deployment has, and most real ones cannot be written. Enforcing it would mean redesigning the key, not adding a reader. 2. objectstack-ai/cloud#5055 phase 1 resolves a model by its id among the providers the deployment turned on. The capability "pin an agent to a model" is `model.model`, which is live. 3. No reader in this repository (only the preview pill). Cloud side: the ledger's cross-repo row (cloud @cb8ee7ff) and the card's 11-26 read of cloud main; not re-verified here. ## Acceptance notes - **Decided in the thread (small things):** the residue stage is adopted. Every released 18.x toolchain wrote `provider: 'openai'` into each parsed `model` block, so refusing that value would refuse agents nobody wrote a provider for; the objectstack-ai#12840 rule names this case. Cost: an explicit `provider: 'openai'` in untyped JSON is stripped silently (`tsc` still refuses it in TypeScript). - **Overlap:** `overlap-check` against `origin/main` is clean. Against objectstack-ai#37676 there is one conflict in `packages/spec/src/conversions/registry.ts` (both insert a line at the head of the sorted `MAJOR_19_CONVERSIONS` list). It cannot be avoided by placement; whichever lands second keeps both lines sorted by identifier. The step-19 rationale sentence was placed so it does not conflict. - **Out of scope:** the ledger says `model.topP` has no reader either. `top_p` is a mainstream setting, so the fix is a reader in cloud's AI runtime (`carrier: cloud`, raised with the seat). - **Skills (follow-up objectstack-ai#37796):** `skills/objectstack-ai/SKILL.md:370` (`provider` table row) and `skills/objectstack-ai/evals/skills-tools-knowledge.json:17` (expected output names the enum). The tombstone keeps the identifier in `packages/`, so neither gate goes red on this PR; the skills card follows the retirement. - **Absence walk radius:** the tree-scoped absence walk covers the five roots `spec#test` already declares and excludes `ui/`; the `ui/` agent fixtures were cleaned by hand (commit 8655944). They are untyped objects, so tsc did not catch them either. ## Verification - ui fixtures: `automationPreviews.i18n-10862` and three more (`emptyCollection-8526`, `ResourceListPage.servedListColumns-36860`, `apps/console/src/preview-samples.ts`) stop writing `provider` (commit 8655944); those 5 files 121 passed, console preview-samples 47 passed. - `pnpm --filter @objectstack/spec build` then `check:generated`: 14/14 up to date. - Source audits: `check:empty-state`, `check:skill-examples`, `check:skill-served-sections`, `check:yaml-examples`, `check:template-manifests`, `check:variant-docs`, `check:error-code-provenance`, `check:duration-unit-keys`, `check:exported-any`, `check:dual-source-exports`, `check:entry-nameability`, `check:browser-reachable-entries`, `check:scripts-typecheck`, `check:llms-txt`: all exit 0. - `pnpm --filter @objectstack/spec typecheck` (tsc + scripts + test-typecheck): 0. - `@objectstack/spec` full vitest: 998 files, 30139 passed; the one failure on the first run (`retired-key-removal-version.pin` JOIN row) is fixed and that file re-run green. - `pnpm check:i18n`: all bundles in sync. `check:skill-identifier-liveness`, `check:doc-authoring`, `check:adr-0087-registration`, `check:empty-changeset`, `check:changeset-fixed`, `check:cross-package-test-inputs`, `check-changeset-no-major`: 0. - `packages/cli` `test/commands.test.ts` + `test/explain-rule-id.test.ts`: 64 passed. `packages/objectql` `metadata-validation-sweep.test.ts`: passed. `ui` `AgentPreview*`: 24 passed. - eslint on the new and changed source files: clean. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes (changed files). - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (the 维护者速读 block is the maintainer's standing exception). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. Session: session_01L6bhgTnm6d4W7ugSacDJ3j 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…bjectstack-ai#37841) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuNTptyd1j97p7dHXZLEeH2g)_ Fixes objectstack-ai#37796 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:照我们技能包写应用的 AI 助手,以后在代理的模型配置里只写模型名,不再写“提供方”这一项;想用哪家提供方,到部署的 AI 设置里打开。 - 为什么做:“提供方”这一项今天已经退役,写了会被平台拒收,而对外发布的技能页还在教它;这是那次退役欠下的技能页跟进。 - 出错会怎样:只改教学文字和一道评测题,运行时不变;最坏是 AI 助手照旧文字给出过时写法,把文字改回即可撤回。 - 要你做什么:这是对外发布的技能包,需要你批准后才能合并。 ## What changes - **`skills/objectstack-ai/SKILL.md`, Model Configuration.** The `provider` row leaves the agent model table. The paragraph above the table now says the `model` block names a model and never a provider: the deployment's AI settings choose the provider and match the model name among the providers turned on, and a written `provider` is a parse error whose fix is to delete the key (retired in protocol 19). The `model`, `temperature` and `maxTokens` / `topP` rows are untouched. - **The schema citation in the same paragraph** moves from `packages/spec/src/ai/agent.zod.ts:37-45` to `:87-95`. PR objectstack-ai#37783 added 50 lines above the key list, so the old range pointed into a comment block. `:87` is the `provider` tombstone and `:95` is `topP`. - **`skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2.** The prompt is unchanged: a copilot that should use Anthropic at temperature 0.3 with a 2000-token cap. The expected answer now writes no provider key, puts sampling under `model`, names the model in the free-string `model` or leaves it to the host's default, and sends the choice of Anthropic to the deployment's AI settings. `must_contain` goes from `provider`, `anthropic`, `temperature`, `maxTokens` to `temperature`, `maxTokens`, `deployment`. `must_not_contain` goes from empty to the written line `provider: 'anthropic',`. - **`.changeset/37796-skills-agent-model-provider-retired.md`**: one `@objectstack/skills` patch. - **`.changeset/37711-skills-agent-model-optional.md`**: a DELIBERATE CORRECTION, declared below. ## Why PR objectstack-ai#37783 (merge `f07d63a5`) retired an agent's `model.provider`. The published skill still listed the key with its enum, and eval case 2 graded an answer as correct only when it wrote `provider`. An AI that follows the skill would write a key the platform now refuses. The Model Registry's own provider list (`ModelProviderSchema`) is a live key and this PR does not describe it. Its only mention in the bundle was inside the removed row. ## DELIBERATE CORRECTION `Check Changeset` is red on purpose: this PR edits a pending release note it did not add, `.changeset/37711-skills-agent-model-optional.md` (from PR objectstack-ai#37765). That note ships in the same release as this change, and two of its sentences would be false on release day. Title, before: > docs(skills): an agent's model name and provider are optional Title, after: > docs(skills): an agent's model name is optional Body, before: > `skills/objectstack-ai/SKILL.md` (Model Configuration) now teaches that `model.model` is optional, and that an agent without one runs on the host's default model for the environment, and that `model.provider` is optional with no default (the deployment's choice) instead of defaulting to `openai`. The inline enum list is unchanged, and the schema citation now points at `packages/spec/src/ai/agent.zod.ts:37-45`. The `objectstack-ai` eval case on sampling settings accepts an omitted `model` and states the provider has no default. Published prose only: it teaches the optional `model` / `provider` already on main since objectstack-ai#37697. Body, after: > `skills/objectstack-ai/SKILL.md` (Model Configuration) now teaches that `model.model` is optional, and that an agent without one runs on the host's default model for the environment. It no longer says `model.provider` defaults to `openai`; the key itself leaves the page in the same release (see the changeset on the skill no longer teaching `model.provider`). The `objectstack-ai` eval case on sampling settings accepts an omitted `model`. Published prose only: it teaches the optional `model` already on main since objectstack-ai#37697. The note's last sentence (the token budget) is unchanged. The precedent is PR objectstack-ai#37783 itself, which corrected `.changeset/37686-agent-model-name-optional.md` the same way. ## Tests ### Skill eval run (recorded) `pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-ai --repeats 3 --concurrency 4`, on head `fb8b3f20`. 12 cases, 2 arms, 3 repeats: 72 of 72 turns ran in 8 min, none out of the denominator. Subscription login, no API key, CLI 2.1.332, the login's default model and effort. | case | with-skill | no-skill | |:--|--:|--:| | **case 2 (this PR)** | **3/3** | **0/3** | | bundle, all 12 cases | 30/36 (83%) | 1/36 (3%) | Case 2, read answer by answer: all three with-skill answers put `temperature` and `maxTokens` under `model`, write no provider key, and send Anthropic to the deployment's AI settings. All three no-skill answers write `provider: 'anthropic',` inside the `model` block, which is the refused spelling. <details> <summary>Per-case table, round 2 (head fb8b3f2)</summary> | case | with-skill | no-skill | with-skill missed | with-skill carried forbidden | |:--|--:|--:|:--|:--| | objectstack-ai#1 | 3/3 | 1/3 | | | | objectstack-ai#2 | 3/3 | 0/3 | | | | objectstack-ai#3 | 3/3 | 0/3 | | | | objectstack-ai#4 | 3/3 | 0/3 | | | | objectstack-ai#5 | 2/3 | 0/3 | `aiExposed` | | | objectstack-ai#6 | 1/3 | 0/3 | `signed-in session` `refused` | | | objectstack-ai#7 | 0/3 | 0/3 | `do not retry` | | | objectstack-ai#8 | 3/3 | 0/3 | | | | objectstack-ai#9 | 3/3 | 0/3 | | | | objectstack-ai#10 | 3/3 | 0/3 | | | | objectstack-ai#11 | 3/3 | 0/3 | | | | objectstack-ai#12 | 3/3 | 0/3 | | | </details> <details> <summary>Round 1 (head 789e0c7) and why the forbidden token changed</summary> The first commit graded case 2 with `must_not_contain: ["provider:"]`. Round 1 scored it 1/3 with-skill. The two failing answers were correct: each wrote no provider key and named the retired spelling only to warn against it ("writing `provider: 'anthropic'` now fails to parse"). A bare `provider:` graded that warning as a failure. The second commit narrows the token to the object-literal line `provider: 'anthropic',` (with its trailing comma), which a warning in prose does not carry and every no-skill answer in round 2 does. The three round 1 with-skill answers pass under the final tokens when read by hand. Round 1's no-skill arm is not a clean baseline for case 2. The turns inherited this container's project-memory variables, and all three no-skill answers quoted the team's notes on the retirement. Round 2 was started with `CLAUDE_COWORK_MEMORY_PATH_OVERRIDE` and `CLAUDE_MEMORY_STORES` unset, and no case 2 answer mentions memory. </details> Cases 5, 6 and 7 are not touched by this PR. Their with-skill misses are literal-phrase misses in both rounds and are listed under Acceptance notes. ### Local gates, on head `fb8b3f20` `node scripts/pm/dispatch-gates.mjs --commands` derived 49 families for this diff. `--ran` reconciliation: 49 derived, 48 run, 1 NOT-MEASURED, 0 unrun. - 47 exit 0, among them `check-skills-token-ratchet` (and its self-test), `check:skill-identifier-liveness`, `check:skill-links`, `check:skill-compatibility`, `check:skill-frame-sync`, `check:pm-skill-id-lint`, `check:doc-authoring`, `check:nul-bytes`, `check:published-files` and `@objectstack/spec` `check:skill-docs`. - `node scripts/check-empty-changeset.mjs --base origin/main` exit 1: the DELIBERATE CORRECTION above. It names `.changeset/37711-skills-agent-model-optional.md` and nothing else. - `pnpm check:dual-build-cjs-loads` exit 3, NOT MEASURED: it needs a full `pnpm build`, and this container built only the scenario runner's closure. CI runs it. - Outside the derived set, also exit 0: `@objectstack/spec` `check:skill-refs` and `check:skill-served-sections`. ### Size readings (`skills/**`) | reading | before | after | |:--|--:|--:| | `skills/objectstack-ai/SKILL.md`, lines | 485 | 487 | | `skills/objectstack-ai/SKILL.md`, tokens | 6801 | 6801 (ceiling 6801, no row moved) | | all `skills/*/SKILL.md`, lines | 4960 | 4962 | | `evals/skills-tools-knowledge.json`, tokens (measured, not ratcheted) | 3359 | 3411 | | bundle total, tokens | 301302 | 301354 | The new sentences in `SKILL.md` are paid for by the deleted row. The bundle total grows by the eval fixture alone. ## Acceptance notes - The branch is the harness-assigned `claude/project-thread-2rm2nh`, not `claude/issue-37796-…`. - The skill's `description` still lists "configuring an LLM provider" among its triggers. Left as is: a user who asks that is now told where the provider is chosen. Changing it would move when the skill loads, which this card does not ask for. - `SKILL.md:457` cites `packages/spec/src/ai/agent.zod.ts:234, :251` for the `agent.tools` / `agent.knowledge` tombstones. Those lines did not hold the tombstones before PR objectstack-ai#37783 either, so this PR leaves the citation alone. Noted, not filed. - Eval cases 6 and 7 miss literal phrases (`signed-in session`, `refused`, `do not retry`) on the with-skill arm in both rounds, case 7 in all six turns. That reads as a grading-token question on those cases, not as something this diff moved. Noted for the seat. - The eval runner passes its whole environment to each turn, so a round started inside a project container carries that project's memory into both arms. Noted for the seat with the round 1 records as evidence. ## Verification Read first, by risk: 1. `skills/objectstack-ai/SKILL.md`, the hunk under `## Model Configuration`: three new sentences that ship to every customer install. 2. `skills/objectstack-ai/evals/skills-tools-knowledge.json`, case 2: the token lists. 3. `.changeset/37711-skills-agent-model-optional.md`: the corrected note. Two-minute check: `sed -n '84,96p' packages/spec/src/ai/agent.zod.ts` shows `provider: retiredKey(...)` at `:87` and `topP` at `:95`, the range the skill now cites, and `node scripts/check-skills-token-ratchet.mjs` prints `skills/objectstack-ai/SKILL.md is 6801 tokens (ceiling 6801; headroom 0)`. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema change.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [ ] 3. No formatter ran. `pnpm lint` is read from CI on this prose-only diff. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` is not touched. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [ ] The *Before Submitting* list in CONTRIBUTING.md: lint and the test jobs are read from CI; the rest is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgUjtV7ahUH66wxpMk7)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgUjtV7ahUH66wxpMk7 --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Jack · project thread
Fixes #37686
Clause-②: yes (widening)
Metadata-protocol: semantic
Skills-docs: follow-up #37711
维护者速读
What changes
packages/spec/src/ai/agent.zod.ts:AIModelConfigSchema.modelgoes from a requiredz.string()toz.string().optional(). Its description now says that an absent model name means the host's default model for the environment. The block stays strict (unknown keys refused);temperaturestill defaults to0.7. No sentinel value, no tier key (phase 2 of objectstack-ai/cloud#5055).providerloses.default('openai')and becomes.optional(); key and enum unchanged. A block that names no model no longer parses toprovider: 'openai', which asserted a provider for a model the host picks. The default move is declared inDEFAULT_CHANGES_BY_MAJORunder19(packages/spec/scripts/lib/default-changes.ts) with its consumer-facing reason, andauthorable-defaults/ai.jsondrops the line. No runtime reads an agent'smodel.provider, so no deployed agent changes behaviour. Not retired: enforce-or-remove forprovideris spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove) #37712.packages/spec/src/ai/agent.test.ts: six new cases (temperature-only block parses withmodelundefined; an explicit name is carried as written; an unknown key is still refused asunrecognized_keys; a non-string name is still refused; a whole agent withmodel: { temperature: 0.2 }parses; a block with noproviderparses without one, a written one is carried, an off-enum one is refused), and the minimal-config case now expects noprovider.ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx(contract review S2, file surface widened by the seat): the model pill showed only whenmodel.providerwas set, so a block naming a model and no provider lost the model name once the default was gone. It now shows when a model or a provider is written and readsPROVIDER · MODEL,MODELorPROVIDER; a block that names neither shows no pill, so the environment default is not given a name. Two new cases inAgentPreview.test.tsx.content/docs/references/ai/agent.mdx(gen:docs) andpackages/spec/authorable-defaults/ai.json(written by the build). authorable-surface, api-surface, the JSON-schema manifest and the metadata-form translations needed no change: the key set is unchanged, and the translations carry only themodel.modellabel..changeset/37686-agent-model-name-optional.md:@objectstack/specminor and@object-ui/app-shellpatch, with the three declaration lines;semanticbecause a default moved (it outranksadded).Read first (by risk):
packages/spec/src/ai/agent.zod.ts(the two contract hunks),packages/spec/scripts/lib/default-changes.ts(the declared default move), then the changeset.Tests
All at head
b3238ea8, run throughscripts/pm/os-verify-lock.shon a shared container. The spec readings were taken atdb5f0e7d; the only later commit touchesui/and the changeset prose.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/ai/agent.test.ts→ Test Files 1 passed, Tests 70 passed.pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/AgentPreview.test.tsx packages/app-shell/src/views/metadata-admin/previews/AgentPreview.emptyCollection-8520.test.tsx→ Test Files 2 passed, Tests 24 passed.model's.optional(), Tests 2 failed / 67 passed; withprovider's.default('openai')restored, Tests 3 failed / 67 passed; with the preview pill keyed onprovideragain, Tests 1 failed / 17 passed (the name-only case). The other new cases pin behaviour that holds either way.pnpm --filter @objectstack/spec test→ Test Files 903 passed (903), Tests 28557 passed, 1 todo.pnpm --filter @objectstack/spec typecheck→ exit 0 (includescheck:test-typecheck, 52 files held in the ledger, unchanged).pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated→ exit 0 aftergen:docs; the build's default ratchet accepts the declaredai/AIModelConfig:providermove.@object-ui/app-shellhas notypecheckscript; its types areType Check UI's, read from this PR's check-runs.Local gate families: 117 derived, 117 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commandsderived 117 families for this change set atb3238ea8(the three new ones readui/:check-sdui-manifestand its self-test, andvitest run scripts/underui/); each was run and its exit code captured before any pipe, all 0.--ranreconciliation: "117 derived famil(ies) accounted for — 117 run, 0 NOT-MEASURED (a DERIVED zero — all 117 recorded an exit code and none of them is 3)". Families outside the derivation (repo-wide lint, UI lanes, Test Core's repo project) are CI's.Acceptance notes
origin/main6d106a1: the card'sRe-check:grep answers 1 hit atagent.zod.ts:38.model.modelin this repo:packages/spec/src/system/metadata-list-registry.ts(list column;valueAtPathanswersundefined, so the cell is empty for an agent with no model, which is the card's "empty/default" outcome);AgentPreview.tsx(its model pill, reworked here for S2, renders only what is written); tests only otherwise. None breaks onundefined. In cloud (read-only,origin/main63427ae),packages/service-ai/src/agent-runtime.ts:1028assignsoptions.model = agent.model.model, so an absent name leavesoptions.modelundefined there; how cloud resolves that to its default is the cloud card's (objectstack-ai/cloud#5055) after a pin move.provider: declared, not enforced. No runtime in this repo reads an agent'smodel.provider, and in cloudorigin/main63427aeagent-runtime.tsreads onlymodel,temperatureandmaxTokensfrom the agent's block (themodel.providerread invercel-adapter.ts:391is the AI SDK model object, not the agent config). Its default is dropped here (S1); keep-or-retire is spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove) #37712.openai.skills/objectstack-ai/SKILL.md"Model Configuration" still teachesmodelas a required free string withproviderdefaultopenai, and citesagent.zod.ts:36-40; theskills-tools-knowledgeeval expects "a free-stringmodel". Follow-up skills: teach that an agent's model name is optional (follow-up of #37697) #37711.19bucket indefault-changes.ts(and touchesauthorable-defaults/ai.json);mainmerges cleanly here, the two PRs conflict textually there, and whichever lands second keeps both entries.Verification
Two-minute check:
pnpm --filter @objectstack/spec exec vitest run src/ai/agent.test.ts→ 70 passed; revert themodel.optional()and two of the new cases go red; restore theproviderdefault and three go red.Generated by Claude Code