Skip to content

fix(prices): fix xai/grok-4 capabilities - #41376

Open
HoosseinRahimi wants to merge 1 commit into
BerriAI:mainfrom
HoosseinRahimi:fix-xai-grok-4-metadata
Open

HoosseinRahimi wants to merge 1 commit into
BerriAI:mainfrom
HoosseinRahimi:fix-xai-grok-4-metadata

Conversation

@HoosseinRahimi

@HoosseinRahimi HoosseinRahimi commented Sep 16, 2026 •

Copy link
Copy Markdown

TLDR

Problem this solves:

  • In model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json, capability flags (supports_reasoning, supports_vision, and supports_response_schema) were missing on xai/grok-4 and its snapshot aliases.

How it solves it:

  • Flags xai/grok-4, xai/grok-4-0709, xai/grok-4-latest, and xai/grok-4-fast-reasoning with "supports_reasoning": true, "supports_vision": true, and "supports_response_schema": true.
  • Flags xai/grok-4-fast-non-reasoning with "supports_vision": true and "supports_response_schema": true.
  • Retains existing "deprecation_date": "2026-05-15" in accordance with xAI redirected slug requirements and regression tests.
  • Keeps model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json byte-for-byte identical.

Relevant issues

Fixes #41370

Type

🐛 Bug Fix

Pre-Submission checklist

  • I have verified file parity between root and backup price maps.
  • My PR passes the cost map guard check (python ci_cd/cost_map_guard.py).
  • My PR's scope is as isolated as possible; it only solves 1 specific problem.

@HoosseinRahimi
HoosseinRahimi requested a review from a team September 16, 2026 05:06
@CLAassistant

CLAassistant commented Sep 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates Grok-4 capability metadata and removes deprecation dates from ten xAI model entries. The root and backup maps remain byte-for-byte identical, but an existing xAI registry test still classifies those entries as retired and will fail

Confidence Score: 4/5

This PR is not safe to merge until the xAI retired-slug test and intended lifecycle classification are made consistent

Removing deprecation_date from the Grok-4 entries makes the unchanged registry assertion disagree with the price maps, causing the xAI test suite to fail

Files Needing Attention: model_prices_and_context_window.json, litellm/model_prices_and_context_window_backup.json

Important Files Changed
Filename Overview
model_prices_and_context_window.json Adds Grok-4 capability flags and removes deprecation dates, conflicting with the existing retired-slug registry test
litellm/model_prices_and_context_window_backup.json Mirrors the root metadata changes exactly and therefore carries the same test-breaking conflict

Reviews (1): Last reviewed commit: "fix(prices): fix xai/grok-4 capabilities..." | Re-trigger Greptile

Comment on lines +50203 to +50205
"supports_reasoning": true,
"supports_response_schema": true,
"supports_vision": true,

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.

P1 Retired-slug test fails

Removing these dates leaves the unchanged registry test expecting every Grok-4 slug to be marked retired, causing the xAI test suite to fail

@codspeed

codspeed Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing HoosseinRahimi:fix-xai-grok-4-metadata (6832ba5) with main (5960881)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (a8979fe) during the generation of this report, so 5960881 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@HoosseinRahimi HoosseinRahimi changed the title fix(prices): fix xai/grok-4 capabilities and remove incorrect deprecation date fix(prices): fix xai/grok-4 capabilities Sep 16, 2026

This branch has not been deployed

No deployments
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.

Fix "xai/grok-4" entry in "model_prices_and_context_window.json"

2 participants