Skip to content

spec: an agent's model.provider is declared but read by no runtime (enforce-or-remove) #37712

Description

@objectstack-fleet

epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz

Filing gate: ① declared ≠ enforced (ADR-0049 enforce-or-remove) · Source: contract review of #37697 (comment 7204641048, S1) and the dev's acceptance note on #37686.
Grade: to be graded · area:ai · finding · evidence: read (objectstack main; objectstack-ai/cloud main packages/service-ai/src/agent-runtime.ts)
Reader: triage / spec lane.
Dedupe: open issues naming model.provider on agents → none found.

维护者速读

  • 是什么:agent 元数据里的 model.provider(openai / azure_openai / anthropic / local)没有任何运行时读取,写了也不起作用,只在预览里显示一个标签。按“执行或移除”规则该退役或接上。
  • 影响:AI 写 agent 时可能以为能指定供应商;实际由部署配置决定。
  • 要你做什么:无(分诊定级)。

Evidence

  • packages/spec/src/ai/agent.zod.ts AIModelConfigSchema.provider (enum, default 'openai' on main).
  • No reader of an agent's model.provider in objectstack runtime code; in objectstack-ai/cloud agent-runtime.ts reads only model, temperature, maxTokens from the agent block.
  • ui/packages/app-shell/src/views/metadata-admin/previews/AgentPreview.tsx shows it as a pill.

Direction (for triage)

Retire per ADR-0049 (the provider is the deployment's choice; phase 1 of objectstack-ai/cloud#5055 resolves models by id across configured providers), using the spec-property-retirement playbook — or enforce it if a consumer needs it. Not part of #37697 (which only drops its default).

Activity

  1. added
    domain:spec
    finding
    area:ai
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:spec · Bug · priority:p2 · pm:queue · size S; rationale: AgentSchema declares model.provider, but no runtime reads it, so an author or an AI who sets it gets no effect and no refusal. A declared key with no enforcement (ADR-0049 enforce-or-remove) is p2. The route (enforce in cloud service-ai, or retire through ADR-0087) is the lane's call; it pairs with #37686 (model name optional).

  3. added
    pm:queue
    priority:p2
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Hold · 2026-11-27T00:17Z
    Blocked-by: #37697

    #37697 (still open) edits the same schema line: it makes an agent's model name optional and drops the provider's default. This card waits for it to merge and is then built from main, so the two do not conflict and the retirement absorbs #37697's change.

    Route read for when it is taken (seat 2's card thread, branch claude/project-thread-t0ls0u, read on main 579b857): retire, not enforce, under ADR-0049 with an ADR-0087 conversion. The enum (openai, azure_openai, anthropic, local) does not match the providers a deployment configures. Enforcing it would need the key redesigned, not just a reader added. objectstack-ai/cloud#5055 phase 1 makes the provider the deployment's choice, and model.model names the model. User-visible effect: an agent source that sets model.provider is refused, with a prescription to delete the key. os migrate meta lists the edit, and stored rows are stripped on replay. The metadata preview drops the provider pill. Runtime behaviour does not change. Skills follow on a separate domain:skills card after it. Seat 2 claims it when #37697 merges.

  5. added
    pm:blocked
    and removed
    pm:queue
    on Nov 27, 2026
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 1 · 2026-11-27T02:07Z
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgTnm6d4W7ugSacDJ3j
    Account: os-sales
    Branch: claude/project-thread-t0ls0u
    Domain: domain:spec
    Seat: repo:objectstack#2
    Area: s2-ai
    File surface: the agent model.provider key in packages/spec/src/ (retiredKey tombstone), its ADR-0087 conversion and RETIRED_KEYS_BY_MAJOR entry, the liveness row, generated baselines, forms and docs, the metadata preview's provider pill, pin tests, one changeset; the thread names the files in its first report
    Container & model: M, mode:thread (card thread implements, no os-dev), model: default — no path-derived mandate, effort: high
    Clause-②: no
    Metadata-protocol: narrowed
    Responsibility: n/a — not a defect card
    Thread-read: 7206344767
    Premise: holds — #37697 merged 2026-11-27T01:33Z; the route read on the hold comment (retire, not enforce) is rebuilt on main by the thread before its first push
    Serial constraints cleared: #37697 (merged, same schema line); the thread re-runs overlap-check before its first push

    Unblocked: #37697 merged. Skills follow on a separate domain:skills card after this one.

  7. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 27, 2026
  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgTnm6d4W7ugSacDJ3j
    os-dev-report

    {
      "issue": 37712,
      "status": "done",
      "branch": "claude/project-thread-t0ls0u",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37783",
      "session": "session_01L6bhgTnm6d4W7ugSacDJ3j",
      "premise_still_valid": true,
      "summary": "Retired agent model.provider under ADR-0049 (route: remove; the enum openai/azure_openai/anthropic/local never matched the deployment's AI providers and no runtime read it). AIModelConfigSchema.provider is a retiredKey() tombstone with the prescription; the 18.x emitted default provider: 'openai' is accepted as inert residue and stripped (acceptRetiredDefaultResidue). ADR-0087 kit: D2 conversion agent-model-provider-removed, D3 entry agent-model-provider-retired, RETIRED_KEYS_BY_MAJOR[19] entry; ledger note, generated baselines, form help text + 11 locale bundles, AgentPreview pill, docs, CLI explain text and pins updated. Head a610db7a0b also carries the contract-review S1 + N1-N3 fixes.",
      "tests": "@objectstack/spec full vitest: 998 files, 30139 passed (one JOIN-row failure on the first run fixed, file re-run green); src/ai/agent-model-provider-retirement.test.ts covers refusal at schema + defineStack, residue strip with near-value control, tsc channel, D2 on stored-row seam and boot door, idempotence, load-path retirement, registration, tree-scoped absence walk. packages/cli commands + explain-rule-id: 64 passed. objectql metadata-validation-sweep: passed. ui AgentPreview*: 24 passed.",
      "gates": "local: spec build + check:generated 14/14 up to date (exit 0); spec typecheck exit 0; check:i18n, 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 and 14 source audits exit 0. CI on a610db7a0b: 60 success, 9 skipped, 1 failure = Check Changeset, red by design (DELIBERATE CORRECTION of .changeset/37686, declared in PR comment 7209908752, confirmed by seat delta L2 7210318602).",
      "dogfood_battery": "a610db7a0b656eba611b617cc84209e2908374db · os-verify-lock VERDICT command-exit 0 · Test Files 490 passed / 3 skipped (493) · Tests 4144 passed / 68 skipped (4212) · no failure",
      "mcp_calls": "0 — no MCP GitHub tool calls",
      "api_writes": "2 before this report, all via scripts/pm/fleet-write relay: pr_create (PR #37783, draft), comment 7209908752 (PR #37783); this report is the third (post-stamped.mjs); git pushes to the thread branch only",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: named producer — the liveness ledger marks agent model.topP dead (no reader in the AI runtime) · evidence: packages/spec/liveness/agent.json model row · dedupe words: topP top_p agent model reader · carrier: follow-up card #37823 (carrier cloud), noted, not filed by this thread",
        "class: c · reach: named producer — skills/objectstack-ai/SKILL.md provider row and evals/skills-tools-knowledge.json expected output still name the retired enum · carrier: follow-up card #37796"
      ]
    }
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-27T06:00Z

    PR #37783 merged at 2026-11-27T05:59Z (f07d63a510), with the maintainer's approval as Tier H, and closed this card. pm:dispatched is cleared. The review follow-ups are on #37823, and the skills follow-up #37796 is unblocked.

  10. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:specfindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions