Add brief/verbose output mode to endpoint tools - #5
Open
KamiV2 wants to merge 2 commits into
Open
Conversation
Endpoint responses were a raw passthrough pretty-printed with indent=2,
echoing back the full (often unchanged) input content on every call. Add
an optional per-call `verbosity` knob ("verbose" default, "brief") so
token-conscious callers can opt into a trimmed response.
brief drops timings, empty message buckets, and content that merely
echoes the submitted input, and emits compact JSON. It keeps all
errors/warnings/infos -- infos carries exact?/apply?/rw? "Try this:"
suggestions and #eval/#check output that consumers rely on. The knob is
consumed server-side and never forwarded to the AXLE API. Default stays
verbose, so existing callers are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jxin31415
approved these changes
Jun 8, 2026
jxin31415
left a comment
Contributor
There was a problem hiding this comment.
I think this is fine but I'm a liiiil dubious about whether this will be confusing (particularly the content field removal)? Maybe it's worth adding a placeholder, but that might be overkill
I'm fine with merging if Simon wants to try it out
| "Output detail level. \"verbose\" (default): the raw AXLE response, " | ||
| "pretty-printed. \"brief\": drops timings, empty message buckets, and " | ||
| "content that just echoes the input; emits compact JSON. Keeps all " | ||
| "errors/warnings/infos. Use \"brief\" to save tokens." |
Contributor
There was a problem hiding this comment.
"Keeps all errors/warnings/infos." <-- ? seems kinda misleading
| out[key] = brief | ||
| continue | ||
| if key == "content" and submitted_content is not None and value == submitted_content: | ||
| continue |
Contributor
There was a problem hiding this comment.
I feel like this might be kind of misleading -- if repair proofs fails, for example, and there is no content field returned, that seems rather confusing
Contributor
There was a problem hiding this comment.
same goes for the messages but less so
Author
There was a problem hiding this comment.
adding a content_unchanged field solves this I think?
- Inline one-caller helpers (_inject_verbosity, _brief_messages, _serialize_result); drop narration comments and duplicated docstrings - Replace silently-dropped echoed content with content_unchanged=true so brief output is unambiguous (review feedback) - Reword verbosity description: empty buckets are dropped, non-empty errors/warnings/infos always survive Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
In the spirit of token-reduction -- adds an optional per-call
verbosityparameter to every endpoint tool, so token-conscious callers can opt into a trimmed response. Mostly matters forcheck/verify_proof.verbosity: "verbose"(default) — the current behavior: raw AXLE response, pretty-printed withindent=2. Existing callers are unaffected.verbosity: "brief"— dropstimings, empty message buckets, andcontentthat merely echoes the submitted input; emits compact JSON.What brief keeps
briefkeeps all non-emptyerrors/warnings/infos. Thecontentdrop only fires when the response echoes the input, so transformed output fromrename/merge/normalize/etc. always survives.