[pull] main from danny-avila:main - #200
Merged
Merged
Conversation
* feat: add bounded compaction semantic index * perf: bound semantic index input text * fix: harden semantic index admission * fix: keep trace redaction local to appended index * fix: close semantic index review gaps * fix: identify generated semantic appendix * fix: preserve bounded provenance order * perf: derive compaction index during message formatting * perf: reuse parsed tool inputs for compaction labels * fix: balance bounded compaction guidance * fix: preserve semantic revision suppression * fix: renew retained semantic revisions * fix: align semantic revision validation * fix: preserve malformed semantic tombstones
An empty summarizer response compacts nothing, so the state the pruner sees next is identical to the one that just triggered. The summarize node reset the dedupe guard to `0` on that path, which made `shouldSkipSummarization` answer `false` for every later message count — the agent node re-triggered on the unchanged state, and the run looped through empty summary steps until the graph's recursion cap, billing a model call per pass and persisting a summary block with no content. Record the current message count instead, so the guard suppresses the identical state, and add a consecutive-failure tally on AgentContext that bounds the retries once new messages legitimately lift that count. The node returns before dispatching a run step once the tally is exhausted, so no further empty summary blocks are produced. A failed attempt the run declined to paper over with a metadata stub counts toward the tally too; a successful summary and `reset()` both clear it. Adds a regression spec that drives a real run with a summarizer returning nothing — it fails with GraphRecursionError before this change. Claude-Session: https://claude.ai/code/session_015qnA9kToNcuJhX8VH4GBsH Co-authored-by: Claude <noreply@anthropic.com>
* fix: flag output-token-truncated turns that carry no tool call toolsCondition only inspects tool_calls, so a plain-text/reasoning turn cut off at the provider's output token ceiling (finish_reason: length / stop_reason: max_tokens, etc.) has nothing for it to catch and routes to END exactly like an ordinary completion. assertNotTruncatedToolCall only guards the tool-call case, so this path was silently treated as finished — hosts persisted a genuinely cut-off answer as complete, with no error and no unfinished flag. routeMessage now checks getTruncationStopReason on the last message when toolsCondition resolves to END, and sets a new outputTruncatedIncomplete flag on StandardGraph (exposed via Run.getOutputTruncated()). Kept separate from preemptIncomplete/preemptHaltReason since the latter has a side effect at each model node's entry (declining the call) that must stay scoped to the preempt/seal machinery. FakeChatModel gains an opt-in finalChunkGenerationInfo so tests can drive a truncated finish through a real Run/StandardGraph instead of asserting against internals. * fix: surface truncated output as a halted run * docs: define truncated output halt semantics --------- Co-authored-by: Danny Avila <danny@librechat.ai>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )