Increase default max-tokens from 1000 to 8192#204
Merged
Conversation
Long --llm-reduce summaries and other LLM-Gateway replies were being clipped at ~1000 tokens. Bump the shared DEFAULT_MAX_TOKENS ceiling so multi-source reduces and summaries finish instead of cutting off mid-sentence. The gateway only bills tokens actually generated, so a higher cap is free on short replies, and --max-tokens still overrides per call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8Qzjnepp1yyViyopgeVYq
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.
Raises the default maximum tokens per LLM reply from 1000 to 8192 across all commands that support the
--max-tokensoption.Summary
This change increases the default token ceiling to prevent long reduces/summaries from being clipped mid-sentence. Since the LLM Gateway only bills for tokens actually generated, a higher cap has no cost impact on short replies while providing more headroom for longer outputs. Users can still override this per-call with the
--max-tokensflag.Changes
DEFAULT_MAX_TOKENSinaai_cli/core/llm.pyfrom 1000 to 8192run,history, and others) to reflect the new default valueImplementation Details
The change is centralized in a single constant definition, with all command help text automatically reflecting the new default through the snapshot tests. No functional logic changes were needed—this is purely a configuration adjustment.
https://claude.ai/code/session_01Y8Qzjnepp1yyViyopgeVYq