Skip to content

feat: describe decision capabilities in model catalogs - #156554

Merged
vincentkoc merged 3 commits into
mainfrom
openclaw/decision-inference-capabilities-f8fa117b
Oct 16, 2026
Merged

vincentkoc merged 3 commits into
mainfrom
openclaw/decision-inference-capabilities-f8fa117b

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Model catalogs cannot consistently describe Decision-only models or preserve their capabilities when manifest, configured, and discovered model entries are combined.

User Impact

Plugin authors can declare typed Decision capabilities, limits and billing facts. Catalog consumers retain those declarations on the matching route. An endpoint change removes stale hosted facts while preserving chat: false, so a Decision-only model does not become a chat choice. This metadata layer changes no model defaults, authentication, or execution behavior.

Why This Change Was Made

The canonical catalog owns validation, normalization and projection. Unknown prices and limits remain absent; explicit zero prices remain valid. Matching hosted declarations survive merges, while custom-route overrides cannot inherit another route’s facts. This resolves both route-inheritance findings on the original head.

The original contributor history is preserved. Design and requirements contributed by Vincent Koc and Peter Steinberger. Runtime, policy, auth and provider adapters remain separately reviewable stack layers.

Evidence

Candidate: 00d93bb011fd8ac55d72623d1bd9e5bbcdb7d301, integrated with main at 0dd9e0b7f7548ad751bd8e0dfdaed4d92e736ed7.

  • 50 focused tests passed across capability validation, catalog normalization/projection and manifest planning; the 19 planner tests passed again after the lint-only immutable-copy adjustment.
  • Focused production/test typecheck, typed lint, formatting and whitespace checks passed.
  • Full pnpm build passed, including packages, plugin SDK declarations/exports, CLI, plugins and UI (252 seconds).
  • Independent autoreview found no actionable P0–P2 findings. Source review covered catalog producers, configured/prepared consumers, route matching and malformed metadata.
  • Production delta: +235/-12 (net +223), tests +328, documentation +43. Growth implements the shared capability contract and route ownership checks; it adds no provider-specific policy.
  • CI on the preceding head found the new inference module missing from the extracted PR-wrapper inventory. The inventory now includes it; all 21 import-closure tests pass. The three CI provisioning failures reported the same missing module. Local provisioning replay was stopped after a fixture Git wrapper stalled for over six minutes; fresh exact-head CI now passes that surface. No full-build inputs changed in the one-line inventory repair.
  • A queued Testbox allocation was stopped before executing; proof ran in an isolated native maintainer checkout with its own frozen dependency install. Exact-head PR CI supplies the broad merge gate.

Exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/38877909429 (zero pending checks).

Keep task, protocol, modalities, reasoning, grounding, probability semantics,
abstention and route billing distinct without changing chat Model types.

Co-authored-by: steipete <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: M labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 8, 2026, 8:46 AM ET / 12:46 UTC (Revision 4).

ClawSweeper review

What this changes

Adds optional route-specific declarations of conversational and typed-decision capabilities to model catalogs and prepared catalog metadata.

Example: A provider declares fixture/typed with chat: false and decision token rates of 0.042 input and 0 output.

  • Before: Catalog normalization discards the inference declaration.
  • After: Normalized and prepared catalog rows retain the declaration, including the explicit zero output rate.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful scoped foundation, but unit-level evidence misses two unresolved production catalog paths.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This bot-authored metadata PR is outside the external-contributor proof gate. Its supplied evidence exercises normalization and overlay units, not shipped catalog preparation; no authority-bearing value or final side effect changes. Existing persisted bundle schema and legacy rows remain compatible without migration.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes
User problem: Provider authors cannot accurately describe typed decision models without conflating their capabilities and prices with conversational inference.
Reason: A generic optional catalog declaration addresses a concrete missing provider contract without adding execution or operator configuration surface. The PR records area-owner design requirements and explicitly bounds this foundation layer.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: both prior catalog-propagation findings remain unresolved on the unchanged head. This PR is not ready to merge.

Priority: P2
Reviewed head: 2ae065b9bc16763e8822f7a132a25ae7fbc1a0b5

Before merge

  • Clear decision facts when an alias changes the physical route (P2) - This prior finding remains unresolved. The new normalizer retains inference, but this planner spreads the normalized row before changing api or baseUrl. A typed row at https://fixture.invalid/direct therefore keeps its decision protocol, limits, and billing when an alias selects https://fixture.invalid/routed; the new entry projection copies those stale facts without calling the route-aware overlay. Clear the decision facts on a transport change while preserving explicit chat: false.
  • Preserve matching-route inference through hosted replacement (P2) - This prior finding also remains unresolved. When a hosted update contains id: "typed", the planner removes the matching manifest row and reconstructs it from the remote row, retaining only trusted endpoint and headers. Its manifest inference: { chat: false, decision: ... } disappears even when the physical route is unchanged. The hosted schema strips inference, so the remote row cannot restore it. Preserve the trusted declaration for matching effective routes rather than reverting a declared typed model to legacy metadata.
  • Resolve merge risk (P1) - The conflicted head has not been reconciled with current main's catalog refactors; the eventual merged behavior remains unverified.
  • Complete next step (P2) - Sync this draft with current main and resolve the catalog merge conflicts.

Findings

  • [P2] Clear decision facts when an alias changes the physical route — src/model-catalog/manifest-planner.ts:327-330
  • [P2] Preserve matching-route inference through hosted replacement — src/model-catalog/manifest-planner.ts:76-79

Tests

  • Missing end-to-end proof: No CLI or Gateway catalog-preparation run exercises inference through endpoint-changing aliases and matching-route hosted replacement. The supplied tests cover normalization, projection, and overlay helpers; this review did not execute base/head regressions.
Agent review details

How this fits together

Model catalogs describe the models supplied by installed provider plugins. Manifest declarations, hosted updates, and configured routes become prepared metadata used by model selection and browsing.

flowchart TD
  A[Provider manifest] --> C[Catalog normalization]
  B[Hosted catalog update] --> D[Manifest catalog planner]
  C --> D
  D --> E[Alias transport overrides]
  E --> F[Prepared catalog metadata]
  G[Configured route overlay] --> F
  F --> H[Model selection and browsing]
Loading

Technical review

Best possible solution:

Extend the existing catalog owner consistently across transport rewriting and hosted replacement, keeping capability facts separate from execution authority.

Do we have a high-confidence way to reproduce the issue?

Yes, by source tracing: an endpoint-changing alias retains inference, and a same-ID hosted replacement loses it. No failing runtime execution was performed in this read-only review.

Is this the best way to solve the issue?

Not yet: extending shared catalog metadata is appropriate, but the planner paths must honor the same route-binding and retention rules as the new overlay.

Full review comments:

  • [P2] Clear decision facts when an alias changes the physical route — src/model-catalog/manifest-planner.ts:327-330
    This prior finding remains unresolved. The new normalizer retains inference, but this planner spreads the normalized row before changing api or baseUrl. A typed row at https://fixture.invalid/direct therefore keeps its decision protocol, limits, and billing when an alias selects https://fixture.invalid/routed; the new entry projection copies those stale facts without calling the route-aware overlay. Clear the decision facts on a transport change while preserving explicit chat: false.
    Confidence: 0.99
  • [P2] Preserve matching-route inference through hosted replacement — src/model-catalog/manifest-planner.ts:76-79
    This prior finding also remains unresolved. When a hosted update contains id: "typed", the planner removes the matching manifest row and reconstructs it from the remote row, retaining only trusted endpoint and headers. Its manifest inference: { chat: false, decision: ... } disappears even when the physical route is unchanged. The hosted schema strips inference, so the remote row cannot restore it. Preserve the trusted declaration for matching effective routes rather than reverting a declared typed model to legacy metadata.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 89c01cd979ef.

Merge-risk options

Maintainer options:

  1. Reconcile with the current catalog owners (recommended)
    Sync the branch with main, resolve the catalog conflicts, and validate the repaired propagation paths against the resulting source.

Provenance checked

  • packages/model-catalog-core/src/model-catalog-normalize.ts changes intended behavior with a stated reason (b9da940: Centralize catalog validation and normalization so manifest, cache, listing, and later consumers share one owner.)
  • packages/model-catalog-core/src/model-catalog-types.ts keeps the original intent (5891cfe: Move catalog schema and normalization into the shared package while preserving existing public SDK declarations.)
  • src/agents/model-catalog-entry.ts keeps the original intent (cf457d0: Use one allowlisted metadata projection and keep capability enrichment bound to matching physical routes.)
  • src/agents/model-catalog-metadata.ts keeps the original intent (f3360e9: Share catalog overlays while preserving route-bound capabilities, coupled context defaults, and catalog-owned compatibility.)

Testing

Proof path: unit tests only. Added test files: 2.

Security

None.

Evidence

What I checked:

  • Verified introduced patch: Reviewed the complete pinned merge-base-to-head diff; the checkout matches the original PR head, rather than a synthetic merge. (2ae065b9bc16)
  • Alias propagation defect: Normalization now retains inference, but the planner spreads that declaration before replacing the alias API or endpoint. Prepared entry projection subsequently copies the stale declaration. (src/model-catalog/manifest-planner.ts:327, 2ae065b9bc16)
  • Hosted replacement defect: A remote row with the same model ID removes the manifest row; replacement preserves trusted endpoint and headers but omits trusted inference. The hosted bundle schema also strips inference, so supplying it remotely does not preserve the declaration. (src/model-catalog/manifest-planner.ts:76, 2ae065b9bc16)
  • Hosted schema and storage compatibility: The unchanged hosted model schema has no inference member. Persisted bundles retain their existing schema and storage envelope; existing declarations without inference follow the unchanged normalization path. This patch requires no stored-data migration. (packages/model-catalog-core/src/remote-catalog-bundle.ts:55, 2ae065b9bc16)
  • Current main still lacks the new contract: Current-main metadata overlay has no inference handling, and the current-main search found neither ModelInferenceCapabilities nor the new documentation section. No linked merged PR establishes that this feature has shipped. (src/agents/model-catalog-metadata.ts, 89c01cd979ef)
  • Existing route ownership intent: The introducing overlay refactor preserves route-bound capabilities and one metadata owner: refactor(models): share catalog metadata overlays #143715. Its raw commit records a parent, and its patch adds the overlay module. (src/agents/model-catalog-metadata.ts:67, f3360e97b02f)

Likely related people:

  • Peter Steinberger: Raw commit f3360e9 adds src/agents/model-catalog-metadata.ts:54 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f3360e97b02f; files: src/agents/model-catalog-metadata.ts)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Source +163, Tests +240, Docs +43. Total +446 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 166 3 +163
Tests 2 240 0 +240
Docs 1 43 0 +43
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 449 3 +446

Review metrics

Metric Value Why it matters
Public metadata additions 1 optional model-row declaration; 0 operator settings The additive inference contract expands provider authoring without introducing an operator configuration knob.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded provider-catalog feature with concrete metadata defects, without a demonstrated urgent user regression.
  • merge-risk: 🚨 compatibility: The new provider declaration can retain another route's facts or disappear during hosted replacement, violating its advertised catalog contract.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-23T14:05:02.327Z sha 2ae065b :: needs real behavior proof before merge. :: [P2] [P2] Clear inference when a manifest alias changes the route | [P2] [P2] Preserve explicit inference through remote row replacement
  • reviewed September 27, 2026, 7:52 PM ET / 23:52 UTC (Revision 2) sha unknown :: blocked before merge. :: [P2] Clear decision facts when an alias changes the endpoint | [P2] Retain matching-route inference through hosted replacement
  • reviewed 2026-10-08T12:37:19.491Z sha 2ae065b :: blocked before merge. :: [P2] Clear decision facts when an alias changes the physical route | [P2] Preserve matching-route inference through hosted replacement

Merge current main and reconcile the original Decision capability metadata with the canonical catalog. Preserve facts for matching hosted routes, clear stale facts on route changes, and retain chat:false. Validated 50 focused tests, planner replay, types, lint, formatting, and full build.
@vincentkoc
vincentkoc marked this pull request as ready for review October 16, 2026 08:42
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@vincentkoc
vincentkoc enabled auto-merge (squash) October 16, 2026 08:47
@vincentkoc
vincentkoc disabled auto-merge October 16, 2026 08:53
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 16, 2026
@vincentkoc
vincentkoc merged commit f864c66 into main Oct 16, 2026
156 checks passed
@vincentkoc
vincentkoc deleted the openclaw/decision-inference-capabilities-f8fa117b branch October 16, 2026 09:28
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* feat: describe decision capabilities in model catalogs

Keep task, protocol, modalities, reasoning, grounding, probability semantics,
abstention and route billing distinct without changing chat Model types.

Co-authored-by: steipete <[email protected]>
Co-authored-by: vincentkoc <[email protected]>

* fix(models): include inference metadata in extracted tooling

---------

Co-authored-by: steipete <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants