feat: add support for Claude Fable 5 on Vertex AI - #30050
Conversation
- Add claude-fable-5 to model cost map (anthropic provider) - Add vertex_ai/claude-fable-5 and vertex_ai/claude-fable-5@default with Vertex AI Anthropic partner model pricing - Include batch pricing: input /Mtok, output 5/Mtok - Include prompt caching pricing: 5m 2.50/Mtok, 1h 0.00/Mtok, hit .00/Mtok - Add test coverage for model pricing, capabilities, and batch costs - Update setup_wizard with claude-fable-5
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Claude Fable 5 to LiteLLM’s model cost maps and verifies provider/pricing resolution across Anthropic and Vertex AI.
Changes:
- Add
claude-fable-5entries (plus Vertex variants and batch pricing) to the root and bundled backup cost maps. - Extend the setup wizard’s Anthropic provider listing to include Claude Fable 5.
- Add regression tests to validate pricing, capabilities, and provider resolution behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/test_litellm/test_claude_fable_5_config.py | Adds regression tests validating cost-map entries and provider resolution for Claude Fable 5. |
| model_prices_and_context_window.json | Adds root cost-map entries for claude-fable-5 and Vertex AI variants (incl. batch pricing). |
| litellm/setup_wizard.py | Updates Anthropic provider metadata to include Claude Fable 5 in the wizard. |
| litellm/model_prices_and_context_window_backup.json | Mirrors Claude Fable 5 entries into the bundled fallback cost map. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| REPO_ROOT = os.path.join(os.path.dirname(__file__), "../..") | ||
|
|
||
|
|
||
| def _load_root_cost_map() -> dict: | ||
| json_path = os.path.join(REPO_ROOT, "model_prices_and_context_window.json") | ||
| with open(json_path) as f: | ||
| return json.load(f) |
| assert info["input_cost_per_token"] == 1e-05 | ||
| assert info["output_cost_per_token"] == 5e-05 | ||
| assert info["cache_creation_input_token_cost"] == 1.25e-05 | ||
| assert info["cache_read_input_token_cost"] == 1e-06 |
| assert info["input_cost_per_token_batches"] == 5e-06 | ||
| assert info["output_cost_per_token_batches"] == 2.5e-05 |
Greptile SummaryThis PR adds
Confidence Score: 3/5Safe to merge only after clarifying whether claude-fable-5 supports search-context billing on Vertex AI and reconciling the cost map entries accordingly. The core model pricing and capability flags are well-structured and the tests are solid, but the search_context_cost_per_query field present in the anthropic entry and absent from both vertex_ai entries creates a real cost-reporting gap for Vertex AI users who incur web-search context charges — those charges would silently show up as $0 in cost tracking. Both JSON files (model_prices_and_context_window.json and its backup) need the search_context_cost_per_query field either added to the vertex_ai entries or removed from the anthropic entry, depending on what the model actually supports.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds claude-fable-5 entries for both anthropic and vertex_ai providers; the anthropic entry has search_context_cost_per_query but the vertex_ai entries do not, creating a cost-calculation inconsistency. |
| litellm/model_prices_and_context_window_backup.json | Mirror of root JSON with the same three claude-fable-5 entries; carries the same search_context_cost_per_query inconsistency between the anthropic and vertex_ai entries. |
| litellm/setup_wizard.py | Adds claude-fable-5 to the Anthropic provider list in the setup wizard; straightforward and consistent with how other Claude models are listed. |
| tests/test_litellm/test_claude_fable_5_config.py | Four new mock-only tests covering pricing, batch pricing, bundled backup presence, and get_model_info resolution; no network calls, but the test for search_context_cost_per_query is absent so the inconsistency in the JSON goes undetected. |
Reviews (1): Last reviewed commit: "feat: add support for Claude Fable 5 on ..." | Re-trigger Greptile
| "search_context_cost_per_query": { | ||
| "search_context_size_high": 0.01, | ||
| "search_context_size_low": 0.01, | ||
| "search_context_size_medium": 0.01 | ||
| }, |
There was a problem hiding this comment.
search_context_cost_per_query present in anthropic entry but absent from both Vertex AI entries
The claude-fable-5 (anthropic) entry carries search_context_cost_per_query while both vertex_ai/claude-fable-5 and vertex_ai/claude-fable-5@default do not. When a user routes through Vertex AI and incurs web-search context charges, litellm will see no cost entry and silently report $0 for that component. Other comparable Claude models that have this field in their direct entry also carry it in their vertex_ai counterparts. If this model genuinely supports search-context billing on Vertex AI, the field needs to be replicated in both vertex_ai entries; if the model does not support it at all, the field should be removed from the anthropic entry too.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Closing in favor of #30064 |
Adds support for Claude Fable 5 on Google Cloud Vertex AI (Anthropic partner models).
Pricing
Model specs
Files changed
Tests