Skip to content

v1.4.488

Choose a tag to compare

@github-actions github-actions released this 29 Sep 05:40
· 99 commits to main since this release

Changes

PR #2207 by scottidler and ksylvan: fix(anthropic): adaptive thinking on Claude 5 + add --maxTokens flag

  • Added a --maxTokens CLI flag that caps model output tokens, wiring the existing ChatOptions.MaxTokens field through to the provider; a value of 0 preserves the vendor default, so existing behavior is unchanged.
  • Fixed Anthropic thinking support on Claude 5 models (claude-sonnet-5, claude-opus-5, claude-fable-5), which rejected the legacy thinking.type=enabled plus budget_tokens shape and returned HTTP 400 for every --thinking value except off.
  • Reworked parseThinking to select the correct request shape per model: thinking.type=disabled for off, adaptive thinking with output_config.effort for Claude 5, and the legacy enabled/budget shape for older models.
  • Preserved numeric thinking budgets on adaptive models by bucketing them onto the nearest effort level using the same thresholds as the named levels, so --thinking=2048 and --thinking=medium behave consistently.
  • Added --maxTokens shell completion support for Bash, Zsh, and Fish, treating it as an option that requires an argument.