Repository navigation
fix(opencode): strip MiniMax trailing tool_call leak suffix - #30849
ulises-jeremias wants to merge 5 commits into
Conversation
|
Self-review summary:
|
|
Wondering, should we strip it? Or should we try to parse it as normal tool call? Also for this:
just run |
|
Good call, thanks! You’re right on both points:
I installed deps (
It now passes. I also pushed a small follow-up test fix commit to align the processor return expectation in this test ( |
|
Rebased onto latest CI should re-run shortly. Happy to adjust the strip-vs-parse approach if you still prefer parsing as a structured tool call. |
1c3f139 to
9614b32
Compare
|
Rebased cleanly onto the latest During rebase, the sanitizer was adapted to the current
CI is green. Ready for re-review @rekram1-node. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #30684
Type of change
What does this PR do?
Adds a targeted sanitizer for a MiniMax response artifact where assistant text can end with a leaked tool-call marker suffix (e.g.
]<]minimax[>[</tool_call>).Changes:
packages/opencode/src/session/processor.tssanitizeTrailingToolCallLeak(text, modelID)text-end) afterexperimental.text.completeminimax]<]minimax[>[</tool_call>and trailing</tool_call>)packages/opencode/test/session/processor-effect.test.tssession.processor strips MiniMax trailing tool_call leak suffix from assistant textHow did you verify your code works?
bun iat repo rootbun test test/session/processor-effect.test.ts -t "session.processor strips MiniMax trailing tool_call leak suffix from assistant text"(frompackages/opencode) ✅Screenshots / recordings
Not included.
Checklist