Skip to content

fix: fall back when a node summary hits the output limit - #731

Open
tsumon wants to merge 1 commit into
VectifyAI:mainfrom
tsumon:fix/truncated-node-summary
Open

tsumon wants to merge 1 commit into
VectifyAI:mainfrom
tsumon:fix/truncated-node-summary

Conversation

@tsumon

@tsumon tsumon commented Nov 30, 2026

Copy link
Copy Markdown

What changes

Addresses the second report in #728 (truncated node summaries). When LiteLLM reports finish_reason="length", the node summary scheduler no longer stores the partial text as a summary. It uses the existing fallback instead: subsection titles for a parent, source text for a leaf. The existing all-model-calls-failed check is unchanged. Completed plain-text and JSON replies, async calls outside the summary scheduler, and usage accounting are unchanged. This does not change the example model defaults discussed in #728.

Validation

  • With only the provider response mocked, the length regression fails before the fix: the summary is the literal {"summary": "truncated. Afterward it falls back to A; B. The completed JSON and plain-text controls pass.
  • python -m pytest -q tests/test_summary_finish_reason.py tests/test_tree_format.py: 36 passed.
  • python -m pytest -q tests/test_client.py -k 'summary or summarize': 21 passed.
  • git diff --check passed. No live model requests; full suite not run.

AI assistance was used for investigation, implementation, and testing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant