| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, here are potentially related PRs that address similar issues with Anthropic thinking/redacted_thinking blocks: Potentially Related PRs:
These PRs appear to be addressing similar or overlapping issues with Anthropic thinking/reasoning block preservation. I'd recommend reviewing them to check if any address the same issues or if this PR supersedes any of them. |
Sorry, something went wrong.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
@rekram1-node should be a fairly straightforward set of changes. Runtime changes are small, tests make up main part of the changes |
Sorry, something went wrong.
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #14332
Type of change
What does this PR do?
Fixes the Anthropic API error: messages.X.content.Y: 'thinking' or 'redacted_thinking' blocks in the latest assistant message cannot be modified.
The Anthropic API requires that thinking and redacted_thinking blocks in assistant messages are sent back byte-for-byte identical in subsequent requests. Three code paths in normalizeMessages / applyCaching in src/provider/transform.ts were inadvertently modifying these blocks:
How did you verify your code works?
Added tests covering all three fixes to test/provider/transform.test.ts. All 143 tests pass (130 existing + 13 new).
bun test test/provider/transform.test.ts
143 pass, 0 fail
Screenshots / recordings
N/A - not a UI change.
Checklist