Skip to content

Context window size is hard-coded at 200k, which is wrong for most models #240

@shellicar

Description

@shellicar

Current behaviour: The status line shows ctx: 15.8k/200.0k (7.9%). The 200.0k denominator is hard-coded regardless of which model is active. This is wrong for most models.

Desired behaviour: The context window size shown should match the actual limit of the model in use.

Guidance:

The Anthropic API exposes a models endpoint:

GET https://api.anthropic.com/v1/models/{model_id}

This returns per-model metadata including max_input_tokens, max_tokens, display_name, and capability flags. For example, claude-opus-4-6 returns max_input_tokens: 1000000 and display_name: "Claude Opus 4.6". These fields may also be useful beyond just the context window fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions