Skip to content

llm-council: max_tokens hardcoded to 4000 — can't be raised for reasoning models #88

Description

@23r2efewvcs

Bug / Enhancement

skills/llm-council/scripts/council.js hardcodes max_tokens: 4000 in both callOpenAICompat (line 87) and callAnthropic (line 103). This is too small for modern reasoning models (Nemotron-3-Ultra, GLM-5.2, DeepSeek-V4, Claude with thinking enabled) which routinely need 8K–32K output tokens for their reasoning chain, and either:

  • return an empty choices[0].message.content (the model exhausted its budget before emitting any final answer), or
  • silently truncate the chain, producing a degraded synthesis.

There's no way to override this from the CLI — users have to monkey-patch the constant.

Proposed fix

Introduce a --max-tokens N CLI flag (default 4000, preserving current behavior) sourced into a small RUN_OPTS struct that the two call* functions read from. Documented in usage().

Usage after fix

node $SKILL_ROOT/scripts/council.js run "<query>" --models "..." --chairman "..." --max-tokens 16000

Reproduction

# Reasoning on nemotron-ultra: returns "" because 4000 tokens is eaten by internal reasoning
node council.js run "Compare top 3 criteria Georgian diaspora in EU uses to pick a bank." \
  --provider openrouter --models "nvidia/nemotron-3-ultra-550b-a55b:free" --chairman "..." \
  --timeout 300000
# phase1_responses.json: { "success": true, "content": "", "latency_ms": 18916 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions