Skip to content

fix: bedrock reasoning issue - #25303

Merged
rekram1-node merged 1 commit into
devfrom
bedrock-reasoning-fix
May 1, 2026
Merged

fix: bedrock reasoning issue#25303
rekram1-node merged 1 commit into
devfrom
bedrock-reasoning-fix

Conversation

@rekram1-node

@rekram1-noderekram1-node commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Closes#24648


Instead of passing different model reasoning traces as is without metadata, convert them to assistant text and drop their metadata

@rekram1-node

Copy link
Copy Markdown
CollaboratorAuthor

/review

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@rekram1-node
rekram1-node merged commit 29ec077 into devMay 1, 2026
17 checks passed
@rekram1-node
rekram1-node deleted the bedrock-reasoning-fix branch May 1, 2026 16:15
oleksii-honchar pushed a commit to oleksii-honchar/better-opencode that referenced this pull request May 6, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 9, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
ESRE-dev added a commit to ESRE-dev/opencode that referenced this pull request Jun 10, 2026
 * The branch existed solely as a defense-in-depth filter that
dropped reasoning/thinking parts when the compaction model
differed from the conversation model, avoiding Anthropic
HTTP 400s from orphaned thinking signatures.
* Upstream PR anomalyco#25303 (29ec077), landed after our last sync
base 26cc537, now performs this strip natively: the live
path skips reasoning parts on model mismatch in
message-v2.ts:373-380 and compact-v2 does the same in
to-llm-message.ts:76-81. Our base only stripped
providerMetadata while still emitting the part, so upstream
now fixes the exact bug we patched, more robustly.
* Keeping the branch would mean re-authoring a maintained
feature against the heavily rewritten upstream compaction
code for zero behavioral benefit, so it is dropped during
the 2026-06-10 catch-up (bd epic opencode-k4t).
* Retirement is at the manifest level only and reversible: the
ref is archived at tag
archive/compaction-thinking-signature-2026-06-10.
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
@malventano

malventano commented Jun 16, 2026

Copy link
Copy Markdown

This PR leads to mass KV cache invalidation when switching between models (the only way to specify different model params between plan/build/compact). Prior context should never be mass-edited outside of a compaction event, else the user potentially racks up costs with KV cache misses / large new prefill computation.

I submitted a PR to retain reasoning while still addressing the signature issue: #32604

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem with AWS Bedrock

2 participants

@rekram1-node@malventano