fix: strip Anthropic params from 3P resume paths#479
Merged
kevincodex1 merged 5 commits intomainfrom Apr 7, 2026
Merged
Conversation
Three silent failure modes affecting all third-party provider users: 1. Thinking blocks serialized as <thinking> text corrupt multi-turn context — strip them instead of converting to raw text tags. 2. Unknown models fall through to 200k context window default, so auto-compact never triggers — use conservative 8k for unknown 3P models with a warning log. 3. Session resume with thinking blocks causes 400 or context corruption on 3P providers — strip thinking/redacted_thinking content blocks from deserialized messages when resuming against a non-Anthropic provider. Addresses findings 2, 3, and 5 from #248.
Keep the focused provider-resume test diff clean so the regression branch stays easy to review. Co-Authored-By: Claude Opus 4.6 <noreply@openclaude.dev>
gnanam1990
approved these changes
Apr 7, 2026
Collaborator
gnanam1990
left a comment
There was a problem hiding this comment.
Thanks for the PR! This looks good to me. The scope is tight, the fix addresses the actual 3P resume/context failure paths, and the focused regression coverage is solid. CI is green as well. LGTM.
kevincodex1
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
bun test src/utils/conversationRecovery.test.ts src/utils/conversationRecovery.hooks.test.ts src/services/api/openaiShim.test.ts src/utils/context.test.tsbun run test:providerbun run smoke🤖 Generated with OpenClaude