Skip to content

Commit ff4ea78

Browse files
alexkromanclaude
andauthored
Increase default max-tokens from 1000 to 8192 (#204)
Raises the default maximum tokens per LLM reply from 1000 to 8192 across all commands that support the `--max-tokens` option. ## 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-tokens` flag. ## Changes - Updated `DEFAULT_MAX_TOKENS` in `aai_cli/core/llm.py` from 1000 to 8192 - Added explanatory comment clarifying the rationale: generous ceiling prevents clipping, gateway bills only actual tokens, and per-call override is available - Updated all help text snapshots across affected commands (`run`, `history`, and others) to reflect the new default value ## Implementation 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 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 67c7ec1 commit ff4ea78

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

aai_cli/core/llm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
# The LLM Gateway is OpenAI-compatible, so we talk to it through the OpenAI SDK
1515
# pointed at the active environment's gateway base (see _client / code_gen).
1616
DEFAULT_MODEL = "claude-haiku-4-5-20251001"
17-
DEFAULT_MAX_TOKENS = 1000
17+
# Generous ceiling so long reduces/summaries aren't clipped mid-sentence; the
18+
# gateway only bills tokens actually generated, so a high cap costs nothing on
19+
# short replies. Override per-call with --max-tokens.
20+
DEFAULT_MAX_TOKENS = 8192
1821

1922
# Exact tag the gateway substitutes with a transcript's text when `transcript_id`
2023
# is supplied. Must be exactly "{{ transcript }}" (spaces included).

tests/__snapshots__/test_snapshots_help_history.ambr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
│ transcript. │
103103
│ --model TEXT LLM Gateway model │
104104
│ [default: claude-haiku-4-5-20251001] │
105-
│ --max-tokens INTEGER Max tokens [default: 1000] │
105+
│ --max-tokens INTEGER Max tokens [default: 8192] │
106106
╰──────────────────────────────────────────────────────────────────────────────╯
107107

108108
Examples

tests/__snapshots__/test_snapshots_help_run.ambr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
│ [default: │
6868
│ claude-haiku-4-5-20251001] │
6969
│ --max-tokens INTEGER RANGE [x>=1] Max tokens per reply │
70-
│ [default: 1000] │
70+
│ [default: 8192] │
7171
│ --llm-config TEXT Set any LLM Gateway request field │
7272
│ as KEY=VALUE (repeatable) │
7373
╰──────────────────────────────────────────────────────────────────────────────╯
@@ -314,7 +314,7 @@
314314
│ --model TEXT LLM Gateway model for --llm │
315315
│ [default: claude-haiku-4-5-20251001] │
316316
│ --max-tokens INTEGER Max tokens for the --llm selection reply │
317-
│ [default: 1000] │
317+
│ [default: 8192] │
318318
╰──────────────────────────────────────────────────────────────────────────────╯
319319

320320
Examples
@@ -461,7 +461,7 @@
461461
│ utterances │
462462
│ [default: claude-haiku-4-5-20251001] │
463463
│ --max-tokens INTEGER Max tokens per utterance translation │
464-
│ [default: 1000] │
464+
│ [default: 8192] │
465465
╰──────────────────────────────────────────────────────────────────────────────╯
466466

467467
Examples
@@ -563,7 +563,7 @@
563563
│ previous one's output. │
564564
│ --model TEXT LLM Gateway model │
565565
│ [default: claude-haiku-4-5-20251001] │
566-
│ --max-tokens INTEGER Max tokens [default: 1000] │
566+
│ --max-tokens INTEGER Max tokens [default: 8192] │
567567
╰──────────────────────────────────────────────────────────────────────────────╯
568568

569569
Examples
@@ -621,7 +621,7 @@
621621
│ answer, pipe-friendly) or │
622622
│ json │
623623
│ --max-tokens INTEGER RANGE [x>=1] Max tokens to generate │
624-
│ [default: 1000] │
624+
│ [default: 8192] │
625625
│ --config TEXT Set any extra gateway request │
626626
│ field: KEY=VALUE, repeatable │
627627
│ (e.g. --config │
@@ -856,7 +856,7 @@
856856
│ --model TEXT LLM Gateway model │
857857
│ [default: │
858858
│ claude-haiku-4-5-20251001] │
859-
│ --max-tokens INTEGER RANGE [x>=1] Max tokens [default: 1000] │
859+
│ --max-tokens INTEGER RANGE [x>=1] Max tokens [default: 8192] │
860860
╰──────────────────────────────────────────────────────────────────────────────╯
861861
╭─ Advanced ───────────────────────────────────────────────────────────────────╮
862862
│ --config KEY=VALUE Set any StreamingParameters field as │
@@ -1067,7 +1067,7 @@
10671067
│ transcript. │
10681068
│ --model TEXT LLM Gateway model │
10691069
│ [default: claude-haiku-4-5-20251001] │
1070-
│ --max-tokens INTEGER Max tokens [default: 1000] │
1070+
│ --max-tokens INTEGER Max tokens [default: 8192] │
10711071
╰──────────────────────────────────────────────────────────────────────────────╯
10721072

10731073
Examples
@@ -1253,7 +1253,7 @@
12531253
│ transcript. │
12541254
│ --model TEXT LLM Gateway model │
12551255
│ [default: claude-haiku-4-5-20251001] │
1256-
│ --max-tokens INTEGER Max tokens [default: 1000] │
1256+
│ --max-tokens INTEGER Max tokens [default: 8192] │
12571257
╰──────────────────────────────────────────────────────────────────────────────╯
12581258

12591259
Examples

0 commit comments

Comments
 (0)