Skip to content

Max Tokens are Wrong for new Claude 4 models #208

Closed
@harrisreynolds

Description

@harrisreynolds

Currently set to 4096 for max output but they are actually 32 to 64K

This is a total blocker for me... I feel like the current model registry is a nice idea but just hard to keep up to date.

We need a way to override it.

See details below:

Image
#<RubyLLM::ModelInfo:0x000000012b4f7280 @id="claude-opus-4-20250514", @created_at=2025-05-22 00:00:00 UTC, @display_name="Claude Opus 4", @provider="anthropic", @context_window=200000, @max_tokens=4096, @type="chat", @family=:claude2, @supports_vision=true, @supports_functions=false, @supports_json_mode=false, @input_price_per_million=3.0, @output_price_per_million=15.0, @metadata={}>
#<RubyLLM::ModelInfo:0x000000012b4f70a0 @id="claude-sonnet-4-20250514", @created_at=2025-05-22 00:00:00 UTC, @display_name="Claude Sonnet 4", @provider="anthropic", @context_window=200000, @max_tokens=4096, @type="chat", @family=:claude2, @supports_vision=true, @supports_functions=false, @supports_json_mode=false, @input_price_per_million=3.0, @output_price_per_million=15.0, @metadata={}>

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