Skip to content

feat: add support for Claude Fable 5 on Vertex AI - #30050

Closed
emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:add-claude-fable-5-gcp
Closed

feat: add support for Claude Fable 5 on Vertex AI#30050
emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:add-claude-fable-5-gcp

Conversation

@emerzon

@emerzon emerzon commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Adds support for Claude Fable 5 on Google Cloud Vertex AI (Anthropic partner models).

Pricing

  • Online: $10 / 1M input tokens, $50 / 1M output tokens
  • Batch: $5 / 1M input tokens, $25 / 1M output tokens
  • Cache write (5m): $12.50 / 1M tokens
  • Cache write (1h): $20.00 / 1M tokens
  • Cache hit: $1.00 / 1M tokens

Model specs

  • Context window: 1,000,000 tokens
  • Max output: 128,000 tokens
  • Supports: vision, PDF, function calling, computer use, prompt caching, reasoning, native streaming

Files changed

  • model_prices_and_context_window.json
  • litellm/model_prices_and_context_window_backup.json
  • litellm/setup_wizard.py
  • tests/test_litellm/test_claude_fable_5_config.py (new)

Tests

  • All 4 new tests pass
  • Model resolves correctly for both anthropic and vertex_ai-anthropic_models providers

- 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
Copilot AI review requested due to automatic review settings June 9, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-5 entries (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.

Comment on lines +17 to +23
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)
Comment on lines +65 to +68
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
Comment on lines +83 to +84
assert info["input_cost_per_token_batches"] == 5e-06
assert info["output_cost_per_token_batches"] == 2.5e-05
@codspeed-hq

codspeed-hq Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing emerzon:add-claude-fable-5-gcp (74c579f) with main (9608dd5)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds claude-fable-5 to litellm's model cost map for both the direct Anthropic provider and Vertex AI (vertex_ai/claude-fable-5 and vertex_ai/claude-fable-5@default), along with a corresponding entry in the setup wizard and four new mock-only tests.

  • The anthropic claude-fable-5 entry includes search_context_cost_per_query (all three tiers at $0.01/query), but both vertex_ai/claude-fable-5 entries omit this field entirely, so search-context charges would be silently reported as $0 for Vertex AI routes.
  • The vertex_ai/claude-fable-5 entries correctly add batch pricing (input_cost_per_token_batches, output_cost_per_token_batches) that is absent from the anthropic entry, which is consistent with how other vertex_ai Claude models are structured.
  • The new tests validate pricing and capability flags but do not assert on search_context_cost_per_query, so the inconsistency is not caught at test time.

Confidence Score: 3/5

Safe 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.

Important Files Changed

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

Comment on lines +10225 to +10229
"search_context_cost_per_query": {
"search_context_size_high": 0.01,
"search_context_size_low": 0.01,
"search_context_size_medium": 0.01
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@emerzon

emerzon commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #30064

@emerzon emerzon closed this Jun 9, 2026
@emerzon
emerzon deleted the add-claude-fable-5-gcp branch June 10, 2026 00:40
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.

2 participants