Repository navigation
feat(pricing): add xAI Grok 4.3 on AWS Bedrock - #30775
krrish-berri-2 wants to merge 1 commit into
Conversation
Add xai.grok-4.3 and us.xai.grok-4.3 entries for bedrock_converse. Pricing: $1.25/M input, $2.50/M output (source: AWS Bedrock pricing page). Verified against full Bedrock (19 provider tabs) + Azure OpenAI scrape: - All other existing model prices match current provider pages - Azure >272k context pricing already handled via _above_272k_tokens fields
|
|
Greptile SummaryThis PR adds two new pricing entries —
Confidence Score: 2/5Not safe to merge as-is — both new entries report a 128K context window when Bedrock's own documentation confirms 1M, and neither entry signals prompt-caching support despite providing a cache-read cost. The context window is set to 128K when AWS documentation confirms it is 1M — an 8x undercount that would make the model appear severely limited to users. Prompt caching is also silently broken because the cost field exists without the flag that activates it. model_prices_and_context_window.json — both new xAI Grok 4.3 entries need the context window and prompt-caching flag corrected before merge.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds xai.grok-4.3 and us.xai.grok-4.3 Bedrock pricing entries, but max_input_tokens is set to 131,072 instead of the correct 1,000,000 (1M) per AWS docs, and supports_prompt_caching: true is absent despite cache_read_input_token_cost being present. |
Reviews (1): Last reviewed commit: "feat(pricing): add xAI Grok 4.3 on AWS B..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| "xai.grok-4.3": { | ||
| "input_cost_per_token": 1.25e-06, | ||
| "output_cost_per_token": 2.5e-06, | ||
| "cache_read_input_token_cost": 2e-07, | ||
| "litellm_provider": "bedrock_converse", | ||
| "max_input_tokens": 131072, | ||
| "max_output_tokens": 16384, | ||
| "max_tokens": 16384, |
There was a problem hiding this comment.
The
max_input_tokens value of 131072 is significantly under-reported. AWS's official model card for Grok 4.3 on Bedrock explicitly states the context window is 1M tokens, matching the xAI announcement. Setting this to 131,072 means litellm will reject any prompt exceeding 128K tokens — even though the model can handle up to 1,000,000 — giving users an incorrect capability boundary.
| "xai.grok-4.3": { | |
| "input_cost_per_token": 1.25e-06, | |
| "output_cost_per_token": 2.5e-06, | |
| "cache_read_input_token_cost": 2e-07, | |
| "litellm_provider": "bedrock_converse", | |
| "max_input_tokens": 131072, | |
| "max_output_tokens": 16384, | |
| "max_tokens": 16384, | |
| "xai.grok-4.3": { | |
| "input_cost_per_token": 1.25e-06, | |
| "output_cost_per_token": 2.5e-06, | |
| "cache_read_input_token_cost": 2e-07, | |
| "litellm_provider": "bedrock_converse", | |
| "max_input_tokens": 1000000, | |
| "max_output_tokens": 16384, | |
| "max_tokens": 16384, |
| "us.xai.grok-4.3": { | ||
| "input_cost_per_token": 1.25e-06, | ||
| "output_cost_per_token": 2.5e-06, | ||
| "cache_read_input_token_cost": 2e-07, | ||
| "litellm_provider": "bedrock_converse", | ||
| "max_input_tokens": 131072, | ||
| "max_output_tokens": 16384, | ||
| "max_tokens": 16384, |
There was a problem hiding this comment.
The
max_input_tokens for us.xai.grok-4.3 has the same incorrect value of 131072. Per the official AWS Bedrock model card, the context window is 1M tokens.
| "us.xai.grok-4.3": { | |
| "input_cost_per_token": 1.25e-06, | |
| "output_cost_per_token": 2.5e-06, | |
| "cache_read_input_token_cost": 2e-07, | |
| "litellm_provider": "bedrock_converse", | |
| "max_input_tokens": 131072, | |
| "max_output_tokens": 16384, | |
| "max_tokens": 16384, | |
| "us.xai.grok-4.3": { | |
| "input_cost_per_token": 1.25e-06, | |
| "output_cost_per_token": 2.5e-06, | |
| "cache_read_input_token_cost": 2e-07, | |
| "litellm_provider": "bedrock_converse", | |
| "max_input_tokens": 1000000, | |
| "max_output_tokens": 16384, | |
| "max_tokens": 16384, |
| "supports_function_calling": true, | ||
| "supports_reasoning": true, | ||
| "supports_response_schema": true, | ||
| "supports_vision": true, | ||
| "source": "https://aws.amazon.com/bedrock/pricing/" | ||
| }, | ||
| "us.xai.grok-4.3": { |
There was a problem hiding this comment.
supports_prompt_caching: true is missing despite cache_read_input_token_cost being set. Every other Bedrock entry in the file that carries a cache_read_input_token_cost (e.g., amazon.nova-2-lite-v1:0) also sets supports_prompt_caching: true. Without this flag, litellm may not expose prompt caching for this model even though the pricing field is present. The same omission applies to the us.xai.grok-4.3 entry.
| "supports_function_calling": true, | |
| "supports_reasoning": true, | |
| "supports_response_schema": true, | |
| "supports_vision": true, | |
| "source": "https://aws.amazon.com/bedrock/pricing/" | |
| }, | |
| "us.xai.grok-4.3": { | |
| "supports_function_calling": true, | |
| "supports_prompt_caching": true, | |
| "supports_reasoning": true, | |
| "supports_response_schema": true, | |
| "supports_vision": true, | |
| "source": "https://aws.amazon.com/bedrock/pricing/" | |
| }, | |
| "us.xai.grok-4.3": { |
| "supports_function_calling": true, | ||
| "supports_reasoning": true, | ||
| "supports_response_schema": true, | ||
| "supports_vision": true, | ||
| "source": "https://aws.amazon.com/bedrock/pricing/" | ||
| }, | ||
| "zai.glm-4.7": { |
There was a problem hiding this comment.
Same missing
supports_prompt_caching: true in the us.xai.grok-4.3 entry.
| "supports_function_calling": true, | |
| "supports_reasoning": true, | |
| "supports_response_schema": true, | |
| "supports_vision": true, | |
| "source": "https://aws.amazon.com/bedrock/pricing/" | |
| }, | |
| "zai.glm-4.7": { | |
| "supports_function_calling": true, | |
| "supports_prompt_caching": true, | |
| "supports_reasoning": true, | |
| "supports_response_schema": true, | |
| "supports_vision": true, | |
| "source": "https://aws.amazon.com/bedrock/pricing/" | |
| }, | |
| "zai.glm-4.7": { |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a228a861f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "input_cost_per_token": 1.25e-06, | ||
| "output_cost_per_token": 2.5e-06, | ||
| "cache_read_input_token_cost": 2e-07, | ||
| "litellm_provider": "bedrock_converse", |
There was a problem hiding this comment.
Route Grok 4.3 through Bedrock Mantle
AWS documents Grok 4.3 as not supporting the Converse API and only exposes it on the bedrock-mantle OpenAI-compatible endpoint (https://bedrock-mantle.{region}.api.aws/openai/v1, model xai.grok-4.3; see https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-xai-grok-4-3.html). Registering this entry as bedrock_converse puts it in litellm.bedrock_converse_models, so get_bedrock_route() sends calls through BedrockConverseLLM instead of the Mantle handler, making the newly added model fail at runtime for normal users.
Useful? React with 👍 / 👎.
| "supports_vision": true, | ||
| "source": "https://aws.amazon.com/bedrock/pricing/" | ||
| }, | ||
| "us.xai.grok-4.3": { |
There was a problem hiding this comment.
Remove the unsupported us-prefixed Grok ID
The AWS model card's Programmatic Access table lists only xai.grok-4.3 as the in-region model ID and says Geo and Global inference IDs are not supported for this model (same AWS page linked above). The us. prefix is a cross-region inference-profile style ID in this file, so registering us.xai.grok-4.3 advertises a Bedrock model ID that customers cannot invoke and will produce validation/model-not-found errors if selected.
Useful? React with 👍 / 👎.
|
Flagging a likely conflict before this merges. Grok 4.3 on Bedrock is served only through the Mantle OpenAI-compatible endpoint ( Verified against AWS in us-east-1: PR #31374 already registers this model as Two data points worth correcting regardless: the context window is 1M (not 131072), and there's a >200K-token tier where input/output/cache-read roughly double ($2.50 / $5.00 / $0.40 per 1M), per xAI's published pricing and LiteLLM's existing |
Summary
Adds missing Bedrock pricing for xAI Grok 4.3.
New entries
xai.grok-4.3us.xai.grok-4.3Verification
Scraped all 19 Bedrock provider tabs (AI21, Amazon, Anthropic, Cohere, DeepSeek, Google, Luma AI, Meta, MiniMax, Mistral, Moonshot, NVIDIA, OpenAI, Qwen, Stability AI, TwelveLabs, Writer, xAI, Z AI) + Azure OpenAI pricing page and compared against the full cost map.
_above_272k_tokensfieldsazure/gpt-5-chat-latestmay need a price update ($1.25→$5.00 input, $10→$30 output) if the alias now points to GPT-5.5 — flagging for reviewOpened by Viktor AI