-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: No config key to override dropReasoningFromHistory for openai-completions providers #88068
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
All openai-completions models have their reasoning/thinking blocks stripped from replayed conversation history by default, except two models in a whitelist - with no way to override.
Steps to reproduce
Expected behavior
Some models, e.g. Qwen3.6 series, make use of preserve_thinking and leverage reasoning content from prior turns. This requires the reasoning content be retained across turns. I was going to file as an RFE but unconditionally stripping all reasoning content seems to me more like a bug.
The issue #81058 suggested workaround (dropReasoningFromHistory: false in provider config) — does not work. The key is not in the schema (additionalProperties: false on provider schema), so validation rejects it.
Actual behavior
All openai-completions models have their reasoning/thinking blocks stripped from replayed conversation history by default, except two models in a whitelist - with no way to override.
OpenClaw version
2026.5.28
Operating system
Ubuntu 24.04
Install method
npm global
Model
Qwen3.6-35B-A3B
Provider / routing chain
openclaw -> llama.cpp (openai-completions API)
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected: users of openai-completions endpoint and a custom model provider
Severity: at best annoying, at worst can block workflow
Frequency: always
Consequence: degrades model response quality when in thinking mode
Additional information
Proposed Fix
Add a config path to
models.providers.*(and optionallymodels.providers.*.models.*) that flows intoresolveTranscriptPolicy().Option A: Provider-level config
{ "models": { "providers": { "my-provider": { "api": "openai-completions", "transcriptPolicy": { "dropReasoningFromHistory": false } } } } }Option B: Direct key (simpler)
{ "models": { "providers": { "my-provider": { "api": "openai-completions", "dropReasoningFromHistory": false } } } }Option C: Per-model config (most granular)
{ "models": { "providers": { "my-provider": { "api": "openai-completions", "models": [ { "id": "my-model", "reasoning": true, "transcriptPolicy": { "dropReasoningFromHistory": false } } ] } } } }Files to Modify
Schema (
config.schema): AddtranscriptPolicy(object withdropReasoningFromHistory?: boolean) tomodels.providers.*and/ormodels.providers.*.models.*resolveTranscriptPolicy() (attempt.tool-run-context.js): Read the config-level
transcriptPolicyfrom the provider/model context and pass it intomergeTranscriptPolicy()so it can override the hardcoded fallback defaults.Related