| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hey! Your PR title [codex] fix anthropic prompt caching doesn't follow conventional commit format. Please update it to start with one of:
Where scope is the package name (e.g., app, desktop, opencode). See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundThe following related PRs address similar Anthropic prompt caching issues:
These PRs appear to address the same root cause (system prompt merging affecting cache hits) with similar solutions (separating static and dynamic system content). |
Sorry, something went wrong.
|
On the duplicate-PR bot note: this does overlap with #14203, #14743, and #19961. I kept this branch intentionally narrow to the session/llm.ts system split and the matching Anthropic regression test. If maintainers would rather consolidate on one of the older branches, I can close this PR. |
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #20110
Type of change
What does this PR do?
Anthropic prompt caching misses because packages/opencode/src/session/llm.ts merges the session-static system prefix with per-turn user.system content before building the request. This PR keeps the static prefix in the first system message, sends dynamic user.system text as a separate second system message, and preserves that two-part shape after plugin system transforms. It also adds a regression test for the outbound Anthropic /messages payload.
This overlaps with #14203, #14743, and #19961. The scope here is intentionally narrow: only the session/llm.ts split plus the matching regression test.
How did you verify your code works?
Screenshots / recordings
N/A (non-UI change)
Checklist