feat: recognize Fable/Mythos model families with 1M context window - #133
Open
coocon wants to merge 2 commits into
Open
feat: recognize Fable/Mythos model families with 1M context window#133coocon wants to merge 2 commits into
coocon wants to merge 2 commits into
Conversation
Claude Fable 5 / Mythos 5 (claude-fable-5, claude-mythos-5) are not matched by any built-in family, so the context window falls back to the 200k default while these models ship with a 1M-token context window by default (no [1m] suffix in the model ID to trigger the context modifier). Add fable/mythos built-in families with a 1_000_000 limit, reusing the existing version-extraction regex (claude-fable-5 -> "Fable 5"). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds new built-in model families for Anthropic Claude Fable and Mythos models with 1M-token context windows and updates documentation comments describing which Claude families are auto-recognized. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider extracting the 1,000,000 context limit into a named constant so that future 1M families (or changes to the default window) can be updated in one place rather than hard-coded per family.
- The new comment "Mythos-class models (Fable 5 / Mythos 5)" may be confusing; consider rephrasing to more directly match Anthropic’s terminology (e.g., "Fable 5 and Mythos 5 models") for clarity.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider extracting the 1,000,000 context limit into a named constant so that future 1M families (or changes to the default window) can be updated in one place rather than hard-coded per family.
- The new comment "Mythos-class models (Fable 5 / Mythos 5)" may be confusing; consider rephrasing to more directly match Anthropic’s terminology (e.g., "Fable 5 and Mythos 5 models") for clarity.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Addressed the review:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Claude Fable 5 / Mythos 5 (
claude-fable-5,claude-mythos-5) don't match any built-in model family, soget_context_limit()falls back to the 200k default. These models ship with a 1M-token context window by default — no beta header needed, and the model ID carries no[1m]suffix, so the existing context modifier never triggers either.Verified against a real Claude Code session: the statusline stdin reports
model.id = "claude-fable-5", and the context bar rendersused/200kinstead ofused/1M(e.g. 38% shown when the real usage is 7%).Reference: Anthropic context windows docs — Fable 5 / Mythos 5 have a 1M window at standard pricing, on by default.
Change
Add two built-in families, reusing the existing version-extraction regex and keeping list order (specific third-party entries and context modifiers still take priority):
Regex behavior (verified with the generated pattern):
claude-fable-5claude-fable-5-20260609claude-fable-5-latestclaude-mythos-5claude-sonnet-5Also updated the two comments listing recognized families (models.toml template +
Defaultimpl).Not in scope
Newer Opus/Sonnet versions (Opus 4.6+/5, Sonnet 4.6/5) also moved to 1M-by-default on the API, but the
BuiltinModelFamilystruct has a single limit per family and older versions of those families are still 200k — making that version-aware is a larger design change, left out of this PR. Fable/Mythos are clean cases: every model in these families is 1M.🤖 Generated with Claude Code
Summary by Sourcery
Add built-in recognition of Claude Fable and Mythos model families with correct 1M-token context limits.
New Features:
Documentation: