Repository navigation
feat(spec)!: retire an agent's model.provider — no runtime read it; the deployment's AI settings choose the provider - #37783
Conversation
…he deployment's AI settings choose the provider ADR-0049 enforce-or-remove. `AIModelConfigSchema.provider` (openai / azure_openai / anthropic / local) was parsed and never read: the AI runtime applies the model name, temperature and maxTokens only, and the providers a deployment turns on are its own AI settings, a list the enum never matched. - retiredKey() tombstone with the prescription; the 18.x emitted default `openai` is stripped as residue (acceptRetiredDefaultResidue) - D2 conversion agent-model-provider-removed (step 19, lossless, retired from the load path), RETIRED_KEYS_BY_MAJOR[19] entry, D3 semantic entry agent-model-provider-retired, step-19 rationale - liveness ledger note, authorable-surface + reference docs regenerated, agent form help text and its 11 locale bundles, removal-version JOIN row - agent metadata preview shows the model name only - docs, CLI explain, benchmark and test fixtures stop authoring the key - pin suite with a tree-scoped absence walk (radius declared in vitest.repo-tests.json) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
📓 Docs Drift CheckThis PR changes 3 package(s): 10 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 6 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 188 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 0a464e68ec78fbf141cea399c1474829a99f2b28 && git checkout 0a464e68ec78fbf141cea399c1474829a99f2b28
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 44ccf94a409362dbb3c16fc2f03b321d4e91b797 a610db7a0b656eba611b617cc84209e2908374db && git checkout -B drift-repro 44ccf94a409362dbb3c16fc2f03b321d4e91b797 && git merge --no-ff a610db7a0b656eba611b617cc84209e2908374db
node scripts/docs-audit/affected-docs.mjs --json 44ccf94a409362dbb3c16fc2f03b321d4e91b797
|
… preview pill reads the model name Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
…-up card named Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Gates: check-runs on this head read at 2026-11-27T04:24Z. All 70 are complete: 61 success, 9 skipped, none failed or still running. The skipped nine are the opt-in and queue-only lanes (the 18.x upgrade harness, the packed-tarball smoke, the dogfood shards and CLI verify, Temporal conformance, UI published artifacts, the two queue verdicts and the schedule gate), so dogfood is judged in the merge queue, not here. The head has not moved. Inputs: card #37712 with its three comments (triage 7205353375, hold 7206344767, claim 7207860184), the PR body, its 42-file list and net diff, the check-runs. The cited code was read in the live tree at ① Derived judgments
② Semver level
Clause-②: no (narrowing) is right: the accept set shrinks and nothing widens. ③ Boundary flags
④ Design judgmentNo must-fix. S1 (should-fix) — the agent's own wrong-layer guidance still prescribes the retired key. The diff does not touch it. An author who writes Per
Implementing files: the retirement pin asserts the tombstone at both doors, the residue with a near-value control, the stored and boot seams, and the registration; Nits:
Outside this diff, not graded: S1 earns a delta review of its fix. Implemented-by: VERDICT: PASS |
…etirement, never pointed at model.provider - AgentSchema's wrong-layer guidance for `provider` now says there is no provider key at either level and names `agent.model.model`; pinned - D3 reason names the judgement an upgrader really owes (is the named model one the deployment offers); the changeset drops the never-accepted provider-without-model row and says AIModelConfigSchema is a pipe now - DEFAULT_CHANGES_BY_MAJOR[19] reason and the unreleased model-optional changeset agree with the retirement Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j
|
DELIBERATE CORRECTION — This PR rewrites one pending release note it did not add:
Restoring the base text would put those false sentences back. The seat confirms by its same-head contract-review record. Session: session_01L6bhgTnm6d4W7ugSacDJ3j Generated by Claude Code |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Gates: check-runs on this head read at 2026-11-27T05:03Z. All 70 are complete: 60 success, 9 skipped (the same opt-in and queue-only lanes as on the first head), 1 failure. The failure is Delta round. This record follows 7209785394 on ① Derived judgments
② Semver levelUnchanged and still right: Clause-②: no (narrowing) is still right. ③ Boundary flagsDELIBERATE CORRECTION — confirmed. The commit rewrites
No other sentence of that note is made false by this PR: the default it describes is gone with the key, the block is still strict, and
④ Design judgmentNo must-fix, no should-fix.
No regression found. The new constant spells no authoring shape the absence walk matches, and the commit touches no conversion, registry entry or generated output.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head a610db7 · card #37712 · area s2-ai · 2026-11-27T05:09ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-27T05:26Z · head a610db7 · approver 席位更正: 前一条 ACCEPT(7210402548)把落地级别写成 Tier S,错了。这个 PR 声明 维护者速读
|
Requested by Sales · project thread
Fixes #37712
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37796
维护者速读
model.provider(openai / azure_openai / anthropic / local)从来没有运行时读取,按 ADR-0049「执行或移除」退役。供应商由部署的 AI 设置决定,agent 只写模型名。provider会报错,并提示删掉这一行;os migrate meta --from 18 --write会自动删。18.x 默认写进去的provider: 'openai'会被静默剥掉,已构建、已存储的 agent 照常加载。元数据预览不再显示供应商标签。运行时行为不变。What changes
packages/spec/src/ai/agent.zod.ts):AIModelConfigSchema.provideris aretiredKey()tombstone with the prescription, so writing it failstsc(input typenever) and the parse answers with the fix. The 18.x emitted defaultprovider: 'openai'is accepted as inert residue and stripped (acceptRetiredDefaultResidue, the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 rule for a retired defaulted key; same shape asViewSharingSchema). Every other value meets the tombstone.agent-model-provider-removed(conversions/entries/19/, step 19,retiredFromLoadPath: true,retiredAfter: '18.6.0', losslessstripKeys);RETIRED_KEYS_BY_MAJOR[19]entryai/AIModelConfig:provider; D3 semantic entryagent-model-provider-retired(relevanceagents); one sentence in the step-19 rationale; JOIN row inretired-key-removal-version.pin.test.ts.liveness/agent.jsonmodelrow note records the removal (a nested key has no row of its own). Evidence andverifiedAtunchanged: this session cannot read the cloud repository to re-verify it.authorable-surface/ai.json([RETIRED]row),content/docs/references/ai/agent.mdx.DEFAULT_CHANGES_BY_MAJOR[19](from feat(spec): an agent's model name becomes optional — absent means the environment's default model #37697): the reason no longer tells authors to writeprovider: 'openai'; it points at this retirement instead.modelhelp text no longer names a provider; the 11 locale bundles were regenerated (en) and hand-trimmed (the other ten drop the provider word only).AgentPreview.tsx): the preview shows the model name alone; a stale draft that still carries a provider never shows it.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 agenttext and example,benchmark.bench.ts,metadata-validation-sweep.test.ts,agent.test.ts.src/ai/agent-model-provider-retirement.test.ts: refusal at every door (schema,defineStack), residue strip with a near-value control,tscchannel, 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 tovitest.repo-tests.json)..changeset/37712-agent-model-provider-retired.md,@objectstack/specminor, BREAKING banner, FROM → TO table, ADR-0087 marker.Why
ADR-0049 enforce-or-remove. Removal, not enforcement, because:
AI_PROVIDERSinpackages/services/service-settings/src/manifests/ai-models.ts(gateway,openai,anthropic,google,deepseek,dashscope,cloudflare,siliconflow,openrouter).azure_openaiandlocalare not providers a deployment has, and most real ones cannot be written. Enforcing it would mean redesigning the key, not adding a reader.model.model, which is live.Acceptance notes
Decided in the thread (small things): the residue stage is adopted. Every released 18.x toolchain wrote
provider: 'openai'into each parsedmodelblock, so refusing that value would refuse agents nobody wrote a provider for; the feat(spec): retired-defaulted-key tolerance — the retired default parses as inert residue and strips; non-default values keep the loud refusal (#12497 class rule) #12840 rule names this case. Cost: an explicitprovider: 'openai'in untyped JSON is stripped silently (tscstill refuses it in TypeScript).Overlap:
overlap-checkagainstorigin/mainis clean. Against feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards #37676 there is one conflict inpackages/spec/src/conversions/registry.ts(both insert a line at the head of the sortedMAJOR_19_CONVERSIONSlist). 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.topPhas no reader either.top_pis a mainstream setting, so the fix is a reader in cloud's AI runtime (carrier: cloud, raised with the seat).Skills (follow-up skills: stop teaching an agent's model.provider after its retirement (#37712) #37796):
skills/objectstack-ai/SKILL.md:370(providertable row) andskills/objectstack-ai/evals/skills-tools-knowledge.json:17(expected output names the enum). The tombstone keeps the identifier inpackages/, 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#testalready declares and excludesui/; theui/agent fixtures were cleaned by hand (commit 8655944). They are untyped objects, so tsc did not catch them either.Verification
automationPreviews.i18n-10862and three more (emptyCollection-8526,ResourceListPage.servedListColumns-36860,apps/console/src/preview-samples.ts) stop writingprovider(commit 8655944); those 5 files 121 passed, console preview-samples 47 passed.pnpm --filter @objectstack/spec buildthencheck:generated: 14/14 up to date.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/specfull vitest: 998 files, 30139 passed; the one failure on the first run (retired-key-removal-version.pinJOIN 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/clitest/commands.test.ts+test/explain-rule-id.test.ts: 64 passed.packages/objectqlmetadata-validation-sweep.test.ts: passed.uiAgentPreview*: 24 passed.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses (changed files).main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Session: session_01L6bhgTnm6d4W7ugSacDJ3j
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTnm6d4W7ugSacDJ3j