Skip to content

feat(bedrock): add bedrock_mantle google.gemma-4-e4b - #33930

Open
Atharvanair09 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
Atharvanair09:feat/add-bedrock-mantle-gemma-4-e4b
Open

feat(bedrock): add bedrock_mantle google.gemma-4-e4b#33930
Atharvanair09 wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
Atharvanair09:feat/add-bedrock-mantle-gemma-4-e4b

Conversation

@Atharvanair09

Copy link
Copy Markdown

Summary

Adds support for the bedrock_mantle/google.gemma-4-e4b model.

Changes

  • Added bedrock_mantle/google.gemma-4-e4b to:
    • model_prices_and_context_window.json
    • litellm/model_prices_and_context_window_backup.json
  • Added the model to the existing Bedrock Mantle transformation tests.

Notes

  • Pricing is set to 0.0 because there is currently no official published provider pricing for this provider/model combination.
  • Token limits and capabilities mirror the documented characteristics of the Gemma 4 E4B model and follow the existing Bedrock Mantle implementation pattern.

Testing

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds bedrock_mantle/google.gemma-4-e4b to the model registry (both model_prices_and_context_window.json and its backup) and extends three existing parameterized mock tests to cover the new model.

  • The new entry follows the established bedrock_mantle/google.gemma-4-e2b pattern exactly: 128k context, use_openai_responses_path: true, and the same capability flags (supports_reasoning, supports_vision, supports_function_calling).
  • Pricing is deliberately set to 0.0 because no official published pricing exists yet; this is documented in the PR but not in the JSON itself.
  • All test changes are additive — three parametrize lists gain one new entry, no existing assertions are altered.

Confidence Score: 4/5

Safe to merge; the change is additive and isolated to the model registry and its tests.

The only non-trivial concern is that storing 0.0 as the pricing values is indistinguishable at runtime from a model that genuinely costs nothing, which could silently mislead spend-tracking consumers. Everything else — the capability flags, context window, routing path, and test coverage — follows the established pattern for sibling Gemma 4 bedrock_mantle entries without introducing any regressions.

model_prices_and_context_window.json and its backup around the new entry's zero-cost fields

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds bedrock_mantle/google.gemma-4-e4b entry with 0.0 pricing, 128k context, and capability flags mirroring google.gemma-4-e2b
litellm/model_prices_and_context_window_backup.json Backup copy of the same new model entry — identical to the changes in model_prices_and_context_window.json
tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_transformation.py Extends three existing parameterized tests to include google.gemma-4-e4b; all tests are mock-only with local_cost_map fixture; pricing test asserts 0.0 for both input and output cost

Reviews (1): Last reviewed commit: "feat(bedrock): add bedrock_mantle google..." | Re-trigger Greptile

Comment on lines 44690 to 44713
"supports_vision": true
},
"bedrock_mantle/google.gemma-4-e4b": {
"input_cost_per_token": 0.0,
"output_cost_per_token": 0.0,
"litellm_provider": "bedrock_mantle",
"max_input_tokens": 128000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"use_openai_responses_path": true,
"supported_endpoints": [
"/v1/chat/completions",
"/v1/responses"
],
"supports_function_calling": true,
"supports_parallel_function_calling": false,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
},
"bedrock_mantle/xai.grok-4.3": {
"use_openai_responses_path": true,
"input_cost_per_token": 1.25e-06,

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.

P2 Zero pricing may silently break cost tracking

input_cost_per_token: 0.0 and output_cost_per_token: 0.0 are stored as valid numbers, so any downstream consumer that checks if cost > 0 to decide whether cost data is meaningful (e.g. budget enforcement, spend dashboards, alert thresholds) will silently treat all usage of this model as free rather than as "pricing unknown." If pricing becomes available later, users who have accumulated spend against this model will see no historical cost. Consider using a sentinel value or a pricing_unknown: true flag instead, if the model registry supports such a concept — otherwise at minimum a JSON comment (via a _note sibling key) would make the intent explicit and grep-able.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

"supports_vision": true
},
"bedrock_mantle/google.gemma-4-e4b": {
"input_cost_per_token": 0.0,

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.

Medium: Zero pricing bypasses spend limits

An API user with access to this model can repeatedly invoke it without consuming their LiteLLM budget because cost calculation returns zero and budget enforcement increments spend using that calculated cost. Populate the actual non-zero input and output rates before registering the model, or prevent it from being used where spend limits are enforced; the duplicate entry in litellm/model_prices_and_context_window_backup.json needs the same correction.

@veria-ai

veria-ai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

PR overview

This pull request adds configuration for the Bedrock Mantle google.gemma-4-e4b model, including its model pricing and context-window metadata. The touched files indicate it is registering the model for LiteLLM’s Bedrock-backed model catalog.

There is one open security issue: the new model is currently configured with zero pricing, which would let authorized API users invoke it without spend being counted against LiteLLM budgets. That creates a concrete budget-enforcement bypass and potential cost-control failure until non-zero input and output rates are populated consistently. No issues have been fixed yet, so the PR still needs this correction before it is safe for budget-enforced deployments.

Open issues (1)

Fixed/addressed: 0 · PR risk: 6/10

@codspeed-hq

codspeed-hq Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing Atharvanair09:feat/add-bedrock-mantle-gemma-4-e4b (aa1246e) with litellm_internal_staging (bd44c9e)

Open in CodSpeed

@Atharvanair09

Copy link
Copy Markdown
Author

Hi! Just checking whether this PR is ready for review or if there are any changes you'd like me to make. Thanks!

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.

Add "Claude — Gemma 4-e4n" in "model_prices_and_context_window.json"

1 participant