feat(bedrock): add bedrock_mantle google.gemma-4-e4b - #33930
feat(bedrock): add bedrock_mantle google.gemma-4-e4b#33930Atharvanair09 wants to merge 1 commit into
Conversation
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe 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
|
| 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
| "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, |
There was a problem hiding this comment.
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 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, |
There was a problem hiding this comment.
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.
PR overviewThis pull request adds configuration for the Bedrock Mantle 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 |
|
Hi! Just checking whether this PR is ready for review or if there are any changes you'd like me to make. Thanks! |
Summary
Adds support for the
bedrock_mantle/google.gemma-4-e4bmodel.Changes
bedrock_mantle/google.gemma-4-e4bto:model_prices_and_context_window.jsonlitellm/model_prices_and_context_window_backup.jsonNotes
0.0because there is currently no official published provider pricing for this provider/model combination.Testing
Resolves Add "Claude — Gemma 4-e4n" in "model_prices_and_context_window.json" #33916