Repository navigation
Conversation
…es and streams as text Enntity's literal tool-XML mechanism (b1b5381, 69d32d3, 1c1a8fe, AGPL-3.0-only): models whose tokenizers register tool-envelope XML as added tokens (glm5_next, qwen4_exp) get a tagged sentinel family so quoted <tool_call> markup in incoming message prose encodes as text, reasoning preserves bare/split markup until the think-end token, and detector-rejected envelopes stay content instead of being reparsed as bare/JSON calls. LeakMarkers.for_literal_xml preserves parseable- looking envelopes in the same models; bare-role literal filtering stays for all other families. Off for every other model type: glm_tool_markup_as_text only switches on for the two carriers.
Enntity/atlas fbda04d (AGPL-3.0-only): shared LiteralXmlState scanner plus _with_literal_state sanitizer/detector/grammar hooks so parseable- looking tool XML spelled as ordinary text stays prose end-to-end.
…00-LoC cap, no logic edits)
Contributor
Author
|
Re-cut onto main without the GLM dependency:
|
2 tasks done
Contributor
Author
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.
Replaces #245. GitHub closed #245 automatically during a restack: its branch briefly pointed at a commit its base already contained. It's the same branch (
stack/literal-tool-xml), now corrected; the history and receipts are on #245.Replaces #230. GitHub marked #230 as merged automatically: during a restack, its base branch was briefly pushed to a commit containing its head (an accident, reverted within minutes). A merged PR can't be reopened. Nothing reached main. The branch is the same (
stack/literal-tool-xml); #230 has the history and receipts.Stack: main ← #198 ← #223 ← #224 ← #226 ← #227 ← #229 ← this.
Summary
b1b53814,fbda04d1,69d32d3e,1c1a8fee) with credit. Literal tool markup that the model writes as prose, in quotes or in code fences is kept as text instead of being parsed as a call or stripped. Reasoning keeps bare/split tool XML until think-end. Rejected envelopes can't be re-parsed as bare/JSON calls (LeakMarkers::for_literal_xml).glm5_nextandqwen4_exp; every other model type is unchanged.Test plan (vs parent #229)
literal_xml24/24,glm_tool_boundary38/38,tool_security9/9 (reiner)Tracking: #220.
Generated with Devin