feat(xai): add grok-4.3 and grok-4.3-latest to model_prices_and_context_window.json - #27153
feat(xai): add grok-4.3 and grok-4.3-latest to model_prices_and_context_window.json#27153ishaan-berri wants to merge 1 commit into
grok-4.3 and grok-4.3-latest to model_prices_and_context_window.json#27153Conversation
…xt_window.json xAI's docs page now lists grok-4.3 as the recommended chat / coding model: "We strongly recommend all API callers use grok-4.3. It is the most intelligent and fastest model we've built." (https://docs.x.ai/docs/models) Pricing/specs sourced from xAI's published model metadata: - input: $1.25 / 1M tokens (<=200k), $2.50 / 1M tokens (>200k) - output: $2.50 / 1M tokens (<=200k), $5.00 / 1M tokens (>200k) - cached: $0.20 / 1M tokens (<=200k), $0.40 / 1M tokens (>200k) - context: 1,000,000 tokens - capabilities: vision, reasoning, function calling, structured outputs, prompt caching, web search Adds two entries: `xai/grok-4.3` (canonical) and `xai/grok-4.3-latest` (alias), mirroring the pattern used for the rest of the xAI/Grok-4 family.
|
shin-watcher seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Greptile SummaryThis PR makes a surgical, 42-line addition of Confidence Score: 4/5Safe to merge — purely additive JSON data entry with no logic changes and no risk to existing models. No P0 or P1 issues found. Pricing arithmetic checks out ($1.25e-6, $2.5e-6, etc.), the JSON structure mirrors existing xAI entries, and the -latest alias pattern (full-copy entry) is consistent with how other aliases like xai/grok-4-latest are handled. The only uncertainty is whether the source URL (https://docs.x.ai/docs/models/grok-4.3) is live and whether all capability flags (e.g. audio input) are correctly captured — both are P2-level and unverifiable without docs access. No files require special attention beyond confirming the xAI model page is live and pricing is current.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds two new top-level entries — xai/grok-4.3 and xai/grok-4.3-latest — with pricing, context-window limits, and capability flags; JSON structure and pricing values are consistent with the file's existing xAI entries and the PR author's sourced math. |
Reviews (1): Last reviewed commit: "feat(xai): add grok-4.3 and grok-4.3-lat..." | Re-trigger Greptile
|
merge to internal staging, not main @ishaan-berri |
|
🤖 litellm-agent: This PR's commits have been merged into the staging branch Staging PR: #27162 |
What
Adds the missing
grok-4.3flagship (and its-latestalias) tomodel_prices_and_context_window.json.Why
xAI's docs/models page now leads with Grok 4.3 and explicitly says:
But it isn't currently listed in
model_prices_and_context_window.json, so cost tracking, context-window limits, and capability flags don't work for users hitting it through litellm. The other 30+ Grok models are all there.Pricing & specs (sourced from xAI's published model metadata)
input_cost_per_tokeninput_cost_per_token_above_200k_tokensoutput_cost_per_tokenoutput_cost_per_token_above_200k_tokenscache_read_input_token_costcache_read_input_token_cost_above_200k_tokensmax_tokens/max_input_tokens/max_output_tokensVerified against known anchors before encoding: xAI publishes raw token prices as fixed-point integers where
30000corresponds to grok-4's known$3/Mand3000corresponds to grok-3-mini's$0.30/M— so the unit isvalue / 10000per 1M tokens. grok-4.3's published values are12500 / 25000 / 25000 / 50000for prompt-short / completion-short / prompt-long / completion-long respectively, which decode to the table above.The 200k-token long-context threshold matches xAI's
longContextThreshold: 200000for grok-4.3 and uses the existing*_above_200k_tokenskeys already present in this file.Diff
42-line surgical insertion — only adds two new top-level entries, doesn't touch any existing model. JSON validity verified locally.
Out of scope
While auditing, I also noticed a couple of items not included in this PR (happy to follow up):
xai/grok-4-fast,xai/grok-4-fast-non-reasoning-latest,xai/grok-4-fast-reasoning-latest,xai/grok-3-fast.xai/grok-4.20-*entries currently priced at$2 / $6per 1M, but xAI's published metadata is$1.25 / $2.50short-ctx and$2.50 / $5.00long-ctx — could be a stale snapshot worth refreshing in a separate PR.🤖 Opened by shin-watcher in response to "check if we are missing any xAI models, if we are add them as a PR". Source: https://docs.x.ai/docs/models.