Skip to content

feat(config): add context_1m_models for models that default to 1M - #187

Open
kleinmatic wants to merge 1 commit into
graykode:mainfrom
kleinmatic:context-1m-models
Open

kleinmatic wants to merge 1 commit into
graykode:mainfrom
kleinmatic:context-1m-models

Conversation

@kleinmatic

Copy link
Copy Markdown

Follow-up to #109. Current Claude models (Fable 5, Opus 5, Sonnet 5, Haiku 5.5) have a 1M window by default, so the model name never carries [1m] and abtop assumes 200K until a session passes 200K tokens. A session at 199K tokens shows 99.7% context used. The real figure is about 20%.

This adds a config key listing model-name prefixes that should get a 1M window:

context_1m_models = ["claude-fable-5", "claude-opus-5", "claude-sonnet-5", "claude-haiku-5"]

I made it a setting rather than a hardcoded model list so it doesn't need a release every time a new model ships.

Tested with cargo test and against my own live sessions on macOS. Listed models now show 1M; unlisted models stay at 200K.

🤖 Generated with Claude Code

Claude Fable models are 1M by default, so their names never carry [1m]
and abtop shows context % against 200K until usage passes 200K.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant