feat(xai): cherry-pick grok-4.3 model entries onto main (#27154) - #27396
Conversation
#27154) * feat(xai): add grok-4.3 and grok-4.3-latest to model_prices_and_context_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. * test(xai): add model_info test for grok-4.3 + sync backup cost map - Mirror xai/grok-4.3 and xai/grok-4.3-latest entries into litellm/model_prices_and_context_window_backup.json so the bundled model cost map matches the canonical model_prices_and_context_window.json. - Add tests/test_litellm/test_xai_grok_4_3_model_metadata.py covering pricing tiers, capability flags, context window, provider routing, and parity between the main and backup cost maps. - Point 'source' at the live xAI models page (the per-model URL https://docs.x.ai/docs/models/grok-4.3 currently 404s). Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com> --------- Co-authored-by: shin-watcher <shin-watcher@berri.ai> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
|
|
Greptile SummaryCherry-picks the
Confidence Score: 4/5Safe to merge — the change is purely additive (two new JSON entries and a new test file), with no modifications to existing entries or logic. The added entries are accurate against xAI's published docs and the two JSON files are kept in sync. The one gap is that xAI lists a third alias ( Both
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds xai/grok-4.3 and xai/grok-4.3-latest entries with correct pricing and capabilities; missing the third published alias grok-latest |
| litellm/model_prices_and_context_window_backup.json | Backup file kept in sync with canonical file; same two entries added, same missing grok-latest alias |
| tests/test_litellm/test_xai_grok_4_3_model_metadata.py | New test file that reads JSON files locally and calls get_llm_provider; no network calls, CI-safe |
Reviews (1): Last reviewed commit: "feat(xai): add grok-4.3 and grok-4.3-lat..." | Re-trigger Greptile
| @@ -34932,6 +34932,48 @@ | |||
| "supports_vision": true, | |||
There was a problem hiding this comment.
Missing
grok-latest alias entry
xAI's published model page lists three aliases for this model: grok-4.3-latest, and grok-latest (alongside the canonical grok-4.3). This PR adds the first two but omits xai/grok-latest. Users who call xai/grok-latest (mirroring the provider alias) will get a model-not-found error. Consider adding the third alias entry with identical pricing/capabilities, or document the decision to skip it.
…aging Restore lineage between main and internal staging so the next staging->main promotion (BerriAI#27436) can merge without conflicts. main was 2 commits ahead: - 6ff668c squash-merge of the previous staging->main promotion (BerriAI#27245) - 8c9830e feat(xai): add grok-4.3 (BerriAI#27396), already present on staging The squash-merge has no shared lineage with the individual commits that went into staging, which is why git surfaced 13 textual conflicts despite both sides having the same logical content. Every conflicting file's main-side change came from 6ff668c only, and the matching staging-side changes are the post-promotion evolution. Resolved all 13 with --ours (staging's version is the latest evolution; main's snapshot is stale). The grok-4.3 entries auto-merged in model_prices_and_context_window.json and its backup, but were already on staging via an independent commit, so the net diff vs HEAD is empty for those files. Net new content from this merge: 12 lines added to ui/litellm-dashboard/package-lock.json -- npm 11 libc array tags on four existing entries, no functional impact.
BerriAI#27154) (BerriAI#27396) * feat(xai): add grok-4.3 and grok-4.3-latest to model_prices_and_context_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. * test(xai): add model_info test for grok-4.3 + sync backup cost map - Mirror xai/grok-4.3 and xai/grok-4.3-latest entries into litellm/model_prices_and_context_window_backup.json so the bundled model cost map matches the canonical model_prices_and_context_window.json. - Add tests/test_litellm/test_xai_grok_4_3_model_metadata.py covering pricing tiers, capability flags, context window, provider routing, and parity between the main and backup cost maps. - Point 'source' at the live xAI models page (the per-model URL https://docs.x.ai/docs/models/grok-4.3 currently 404s). --------- Co-authored-by: ishaan-berri <155045088+ishaan-berri@users.noreply.github.com> Co-authored-by: shin-watcher <shin-watcher@berri.ai> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
…aging Restore lineage between main and internal staging so the next staging->main promotion (BerriAI#27436) can merge without conflicts. main was 2 commits ahead: - 6ff668c squash-merge of the previous staging->main promotion (BerriAI#27245) - 8c9830e feat(xai): add grok-4.3 (BerriAI#27396), already present on staging The squash-merge has no shared lineage with the individual commits that went into staging, which is why git surfaced 13 textual conflicts despite both sides having the same logical content. Every conflicting file's main-side change came from 6ff668c only, and the matching staging-side changes are the post-promotion evolution. Resolved all 13 with --ours (staging's version is the latest evolution; main's snapshot is stale). The grok-4.3 entries auto-merged in model_prices_and_context_window.json and its backup, but were already on staging via an independent commit, so the net diff vs HEAD is empty for those files. Net new content from this merge: 12 lines added to ui/litellm-dashboard/package-lock.json -- npm 11 libc array tags on four existing entries, no functional impact.
Relevant issues
Cherry-picks #27154 from
litellm_internal_stagingontomainso thatxai/grok-4.3andxai/grok-4.3-latestshow up in/v1/modelsfor users running offmain.Linear ticket
Resolves LIT-2914
Pre-Submission checklist
tests/test_litellm/directory —tests/test_litellm/test_xai_grok_4_3_model_metadata.py(3 tests: pricing/capabilities forxai/grok-4.3andxai/grok-4.3-latest, plus parity between the canonical and bundled-backup cost maps).make test-unit(the new test file passes locally — see proof of fix below).grok-4.3model entries and the matching test.@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
Type
🆕 New Feature
Changes
Straight cherry-pick of fee5900 (PR #27154) — no conflicts, no edits. Adds
xai/grok-4.3andxai/grok-4.3-latestto both the canonicalmodel_prices_and_context_window.jsonand the bundledlitellm/model_prices_and_context_window_backup.json, and includes the metadata/parity test.Pricing/specs sourced from xAI's published model metadata (https://docs.x.ai/docs/models):
Slack Thread