Repository navigation
Description
Summary
api.runtime.llm.complete gives plugins catalog-routed completions (provider routing, auth profiles, app attribution), but the params surface has no way to request a reasoning effort. The parameter a plugin sends is structurally absent from LlmCompleteParams, so host-routed calls always reach the provider without a reasoning field. Depending on provider routing, that ranges from silent quality collapse on reasoning models to a hard request rejection.
Verified on both v2026.6.10 and v2026.7.1 (the relevant code is byte-identical across the two tags):
LlmCompleteParamshas no reasoning or effort field (src/plugins/runtime/types-core.ts, lines 155-167 on both tags).- The request options are built as
{ maxTokens, temperature, signal }with no reasoning key (src/plugins/runtime/runtime-llm.runtime.ts, lines 438-443). - The delegate one layer down already supports it:
completeWithPreparedSimpleCompletionModeldestructuresparams.options.reasoningand threads it into the completion call (src/agents/simple-completion-runtime.ts, lines 394-420; v2026.7.1 even adds an OpenAI effort clamp branch there).
So the capability exists one layer below the plugin API and is simply unreachable from it.
Observed impact (live, OpenRouter, gpt-oss-120b)
- Silent mode: with the reasoning field absent, some provider routes return reasoning-less output. A memory-extraction plugin lane that produces 5 candidates over its own direct client produced 0 over the host transport with identical input.
- Loud mode: other routes reject the request outright with "Reasoning is mandatory for this endpoint and cannot be disabled." (raw request captured showing the provider-bound body).
Either way a plugin that opts into the host transport for catalog benefits currently loses reasoning control entirely.
Proposed fix (small)
- Add an optional
reasoning(orreasoningEffort) field toLlmCompleteParams(src/plugins/runtime/types-core.ts). - Forward it in the options object at src/plugins/runtime/runtime-llm.runtime.ts:438-443.
No changes needed beneath that point; simple-completion-runtime already honors options.reasoning.
Happy to open a PR if useful.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 16, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 15, 2026, 11:10 PM ET / July 16, 2026, 03:10 UTC.
Summary
Keep this issue open. The released plugin runtime completion API omits reasoning control while its downstream completion helper already accepts and forwards that option, leaving catalog-routed plugin calls unable to use some reasoning models reliably; no merged replacement or current-main implementation was found.
Reproducibility: yes. at source level: call
api.runtime.llm.completefor a reasoning-mandatory catalog model and observe that the public params and forwarding options cannot carry reasoning, although the immediate callee supports it. A fresh live provider run would strengthen the already detailed report.Next step
The missing bridge is narrow, the owner boundary and likely files are clear, and the existing lower-level reasoning contract provides a concrete implementation target.
Review details
Best possible solution:
Add an optional canonically typed reasoning field to
LlmCompleteParams, forward it unchanged into the existing prepared-completion options, and cover both reasoning-mandatory and omitted-field compatibility paths in runtime tests and SDK documentation.Do we have a high-confidence way to reproduce the issue?
Yes at source level: call
api.runtime.llm.completefor a reasoning-mandatory catalog model and observe that the public params and forwarding options cannot carry reasoning, although the immediate callee supports it. A fresh live provider run would strengthen the already detailed report.Is this the best way to solve the issue?
Yes, with one refinement: thread the repository's existing canonical reasoning type through the current API rather than adding a parallel effort representation or provider-specific workaround.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 957cc81175a3.
Label changes
Label changes:
P2: The defect breaks or degrades a bounded plugin completion workflow for reasoning models, but it does not make the general OpenClaw runtime unusable.impact:auth-provider: The missing parameter changes model/provider request behavior and can cause selected reasoning endpoints to reject or silently alter completions.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: The defect breaks or degrades a bounded plugin completion workflow for reasoning models, but it does not make the general OpenClaw runtime unusable.impact:auth-provider: The missing parameter changes model/provider request behavior and can cause selected reasoning endpoints to reject or silently alter completions.Evidence reviewed
Acceptance criteria:
What I checked:
LlmCompleteParamsexposes completion controls such as token and temperature settings but no reasoning or effort field, matching the reported unreachable capability. (src/plugins/runtime/types-core.ts:155, 2d2ddc43d0dc)src/plugins/runtime/runtime-llm.runtime.ts:438, 2d2ddc43d0dc)options.reasoningand forwards it through the completion path, indicating that the missing link is confined to the plugin runtime API boundary. (src/agents/simple-completion-runtime.ts:394, 2d2ddc43d0dc)api.runtime.llm.completeand its model-override controls without documenting any reasoning parameter, so current main does not present an alternative supported path for plugins. Public docs:docs/plugins/sdk-runtime.md. (docs/plugins/sdk-runtime.md, 957cc81175a3)src/plugins/runtime/runtime-llm.runtime.ts, 3042195ff2c1)runtime.llm.completereasoning field or supplies an open fix PR.Likely related people:
runtime.llm.completehelper and its plugin runtime API surface. (role: introduced behavior; confidence: high; commits: 3042195ff2c1; files:src/plugins/runtime/types-core.ts,src/plugins/runtime/runtime-llm.runtime.ts,src/plugins/runtime/runtime-llm.runtime.test.ts)src/plugins/runtime/runtime-llm.runtime.ts,docs/plugins/sdk-runtime.md)src/plugins/runtime/runtime-llm.runtime.ts,src/agents/simple-completion-runtime.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.