Skip to content

spec: an agent's model name becomes optional — absent means the environment's default model #37686

Description

@objectstack-fleet

epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz

Filing gate: ③ maintainer-directed task · Source: objectstack-ai/cloud#5055 — Jack 2026-11-26, decision card in the epic seat thread, chose 「框架允许省略 model」 (the agent's model.model becomes optional; absent = follow the environment's default model).
Grade: p2 · area:ai · Task · evidence: read (objectstack main dedc16c)
Reader: epic:#5055 seat (objectstack-ai/cloud#5055) → card thread. Milestone M1.
Dedupe: open objectstack issues on AIModelConfigSchema → none with this change.

维护者速读

  • 是什么:agent 元数据里 model.model(具体模型名)现在必填,temperature 也只能写在同一个块里。改成可以省略模型名,省略就跟随部署的默认模型。
  • 影响:云端内置 agent 可以去掉残留的 gpt-4、保留 temperature: 0.2;AI 写自定义 agent 时也不必编一个模型名。第二阶段的档位字段接在这里。
  • 要你做什么:无(你已在决策卡上选定这条路)。

Current state (objectstack main dedc16c)

  • packages/spec/src/ai/agent.zod.ts:27-42 AIModelConfigSchema (strict object): provider enum default 'openai', model: z.string() required, temperature default 0.7, maxTokens, topP. AgentSchema.model is AIModelConfigSchema.optional() (:340).
  • So an agent that only wants temperature must still name a model; cloud's built-in ask and metadata-assistant declare model: 'gpt-4' for that reason (objectstack-ai/cloud packages/service-ai-studio/src/agents/ask-agent.ts:116, metadata-assistant-agent.ts:79), which the cloud chat route has to neutralise.
  • packages/spec/src/system/metadata-list-registry.ts:203 lists model.model as a column; generated metadata-form translations carry model.model.

Re-check: git grep -n "model: z.string().describe('Model name" -- packages/spec/src/ai/agent.zod.ts → 1 hit.

What to do

  1. Make model inside AIModelConfigSchema optional; its description says that absent means the host's default model for this environment.
  2. Regenerate whatever the spec change regenerates (JSON schema, forms, translations, baselines) per AGENTS.md; the list column shows an empty/"default" value for an agent with no model.
  3. Do not add a tier or sentinel value; tiers are phase 2 of objectstack-ai/cloud#5055.
  4. If provider turns out to be read by no runtime (declared, not enforced), note it in the PR's Acceptance notes for the seat; do not remove it here.

Acceptance

  • An agent with model: { temperature: 0.2 } parses; one with model: { model: 'x' } parses as before; unknown keys are still refused.
  • Metadata-protocol: line from the diff (this widens what an author may write; the dev names the kind per AGENTS.md) and the Skills-docs: line it owes; changeset for @objectstack/spec.
  • Spec gates per AGENTS.md (pnpm check:all phases the diff triggers).

Fences

  • File surface: packages/spec/** and the generated files the spec gates require, skills/** only if the docs line says updated here on a domain:skills-owned path (otherwise follow-up). Stop on breach.
  • Cloud picks this up after a pin move; the cloud card of objectstack-ai/cloud#5055 removes the built-ins' gpt-4.

References

Plan: https://claude.ai/artifact/3sJqSZVv3Lf3NoViD9Q4cU (方案 5 框架). Parent objectstack-ai/cloud#5055.

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:spec
    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 · Feature · priority:p2 · pm:queue · size S; rationale: an agent's model.model becomes optional, and an absent value follows the environment's default model. Maintainer-directed (「框架允许省略 model」, cloud#5055). It widens a spec field: declare Clause-②. p2.

  3. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz

    Claim: PM loop round 1
    Session: session_01Q4EjjMmczBEaeiAQ48oDtz
    Thread session: session_01Q4EjjQgJ62YaG4EAxNLuqP
    Account: hotlong
    Branch: claude/project-thread-ygkjxt
    Worktree: objectstack-issue-37686
    Domain: domain:spec
    Seat: epic:#5055#1
    File surface: packages/spec/** + generated artefacts + changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default, effort: high
    Clause-②: no
    Metadata-protocol: added (an author may now omit model.model)
    Responsibility: n/a — not a defect card
    Thread-read: none
    Premise: holds
    Serial constraints cleared: none

    Order: project files pm-orders/cloud/model-tiers/ (_common.md + this card's order). Epic #5027 has priority; overlap-check before every push.

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#5055#1 · hotlong · session_01Q4EjjQgJ62YaG4EAxNLuqP
    os-dev-report

    {
      "issue": 37686,
      "status": "done",
      "branch": "claude/project-thread-ygkjxt",
      "pr": 37697,
      "head": "d36940ae4ba86aac90b8223334d50290e21a1dbd",
      "session": "session_01Q4EjjQgJ62YaG4EAxNLuqP",
      "premise_still_valid": true,
      "files_changed": [
        "packages/spec/src/ai/agent.zod.ts (+5 -1)",
        "packages/spec/src/ai/agent.test.ts (+34 -0)",
        "content/docs/references/ai/agent.mdx (+3 -3, gen:docs)",
        ".changeset/37686-agent-model-name-optional.md (+15, new)"
      ],
      "line_budget": "57 additions / 4 deletions, 4 files; under the 3000-line human-merge threshold",
      "gates": {
        "local": "dispatch-gates --commands derived 111 families at 41516d1b; 111 run, all exit 0 (8 first exited 3 on unbuilt prerequisites / shallow clone, re-run exit 0 after building and unshallowing); --ran: 111 derived, 111 run, 0 NOT-MEASURED (derived zero). spec test: 903 files / 28556 tests passed; spec typecheck exit 0; check:generated exit 0 after gen:docs. Commit d36940ae changes only the changeset Clause-② line; check-changeset-no-major and check-adr-0087-registration re-run locally on it, exit 0.",
        "ci": "PR check-runs at d36940ae, latest per name: 58 success, 12 skipped, 0 failure. Check Changeset job 140168672940 (failure) read the pre-edit body; the edited-event job 140169089771 is success.",
        "dogfood_battery": "n/a: no ! in the title, no (narrowing) arm"
      },
      "deviations": [
        "PR body first carried Clause-② no (as the order defaulted); Check Changeset refused it beside Metadata-protocol added. Corrected to yes (widening) in the changeset (commit d36940ae) and the PR body (relay issue_patch). With Clause-② yes the PR owes a contract-tier review before the queue.",
        "No reviewer requested on the PR: the relay pr_create sends none by design; the seat requests at hand-off.",
        "PR body ends with the relay's signed trailer line, which issue_patch requires on a PR body edit."
      ],
      "mcp_calls": "read-only: issue_read x2, pull_request_read x2, get_job_logs x3, subscribe_pr_activity x1; no MCP writes",
      "api_writes": "3 relay writes: pr_create (POST pulls + POST issues/37697/assignees), issue_patch (PATCH issues/37697), this os-dev-report comment; 4 git pushes",
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: objectstack-ai/cloud#5055 · noted, not filed: agent model.provider is declared, not enforced (no runtime reads it in objectstack or cloud agent-runtime)",
        "carrier: seat (Skills-docs follow-up owed) · skills/objectstack-ai/SKILL.md Model Configuration still teaches model as required and cites agent.zod.ts:36-40; the skills-tools-knowledge eval expects a free-string model"
      ]
    }
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    epic:#5055#1 · hotlong · session_01Q4EjjMmczBEaeiAQ48oDtz

    Queue kick of PR #37697 — signature, reading and disposition. 2026-11-27T00:17Z

    • Signature (new, not in the flake ledger): merge-group CI run 45912640840 (queue commit 319c54b8, base 579b8577), Test Core (6/10), packages/cli/src/commands/migrate/plan.boot-parity.integration.test.ts › "a host config …": os migrate plan --json reported create_table sys_activity after serve's provision-and-exit boot. First error is an assertion, not a timeout.
    • Reading: flake, not this diff. The diff touches no CLI, serve/migrate composition, plugin-audit or SQL code; the test passes locally at b3238ea8 (3/3, card thread triage comment 7206293430); and the next queue group, built ON 319c54b8 (so with this PR's change in it), passed the same shard: run 45912764603, job 140225479776.
    • Disposition: the three re-enqueue facts are not all met (assertion, and @objectstack/spec is in the CLI's import closure), so ⛔ no re-enqueue at this head. The card thread pushes a merge of origin/main for a fresh head; the seat re-lands it once PR CI is green there. A second hit of this signature anywhere gets an anchor card.
  7. 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:specenhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions