Skip to content

feat(oci): add xai.grok-4.3 model metadata#28776

Open
BobDu wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
BobDu:feat/oci-xai-grok-4-3-catalog
Open

feat(oci): add xai.grok-4.3 model metadata#28776
BobDu wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
BobDu:feat/oci-xai-grok-4-3-catalog

Conversation

@BobDu
Copy link
Copy Markdown

@BobDu BobDu commented May 25, 2026

Relevant issues

N/A — model is already listed as supported in the OCI provider docs
(BerriAI/litellm-docs#197, merged 2026-05-23), this PR only adds the
matching entry to the model cost catalog so the proxy UI surfaces it
and spend tracking attributes cost correctly.

Linear ticket

N/A (external contributor)

Pre-Submission checklist

  • I have added testing in tests/test_litellm/test_oci_xai_grok_4_3_model_metadata.py
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible — only adds the oci/xai.grok-4.3 entry to the model cost catalog (and its backup) + a metadata regression test
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Summary

Oracle Cloud Infrastructure Generative AI has launched the xAI Grok
4.3
model — a reasoning model with a 1M-token context window (shared
between prompt and response) and a knowledge cutoff of December 2025.
The model id xai.grok-4.3 is already listed as supported in the OCI
provider docs (link below), but the model cost catalog does not yet
have an entry for it, so it does not appear in the proxy UI "Add Model"
dropdown and spend is attributed to the default rate.

This PR adds oci/xai.grok-4.3 to both
model_prices_and_context_window.json and the bundled
litellm/model_prices_and_context_window_backup.json, with pricing and
capability metadata sourced from Oracle's public documentation and
pricing API.

Pricing (PAY_AS_YOU_GO)

Sourced from the Oracle public pricing API
(https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/,
SKUs B112080-B112085):

Dimension ≤200K context >200K context
Input / 1M tokens $1.25 $2.50
Output / 1M tokens $2.50 $5.00
Cached input / 1M tok. $0.20 $0.40

Capability flags

Per the OCI Grok 4.3 model documentation
(https://docs.oracle.com/en-us/iaas/Content/generative-ai/xai-grok-4-3.htm):

Flag Value Source
supports_function_calling true "Function Calling: Yes, through the API."
supports_vision true "Multimodal support: Input text and images and get a text output."
supports_prompt_caching true "Cached Input Tokens: Yes"
supports_reasoning true "reasoning model designed for complex … tasks"
supports_response_schema false Consistent with other OCI Grok entries
max_input_tokens 1,000,000 "Context Length: 1 million tokens"
max_output_tokens 1,000,000 API has no separate output-only limit beyond the shared context (playground cap of 131,000 does not apply to API)
max_tokens 1,000,000 Same shared context window

Sources

Testing

  • tests/test_litellm/test_oci_xai_grok_4_3_model_metadata.py covers:
    • All pricing, capability, and context-window fields on oci/xai.grok-4.3
    • The main + backup catalog files agree on this entry
  • Both tests pass locally.

Oracle Cloud Infrastructure Generative AI service has launched the
xAI Grok 4.3 model (reasoning model, 1M-token context window shared
between prompt and response, knowledge cutoff December 2025).

The model id `xai.grok-4.3` is already listed as a supported model in
the OCI provider docs (litellm-docs PR BerriAI#197, merged 2026-05-23), but
the model cost catalog has no entry for it, so it does not appear in
the proxy UI "Add Model" dropdown and spend is attributed to the
default rate.

Add cost + capability metadata for `oci/xai.grok-4.3` so the UI
surfaces the model and `litellm.cost_calculator` attributes spend
accurately.

Pricing is taken from the Oracle public pricing API
(apexapps.oracle.com/pls/apex/cetools/api/v1/products/, PAY_AS_YOU_GO
SKUs B112080-B112085):

  - 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)

Capability flags follow the OCI Grok 4.3 model documentation
(https://docs.oracle.com/en-us/iaas/Content/generative-ai/xai-grok-4-3.htm):

  - function_calling: yes ("Function Calling: Yes, through the API.")
  - vision: yes ("Multimodal support: Input text and images and get a text output.")
  - prompt_caching: yes ("Cached Input Tokens: Yes")
  - reasoning: yes ("reasoning model designed for complex … tasks")
  - response_schema: false (consistent with existing OCI Grok entries)

Context window:

  - 1,000,000 tokens shared between prompt + response
    ("Context Length: 1 million tokens (maximum prompt + response
     length is 1 million tokens for keeping the context).")
  - The playground caps a single response at 131,000 tokens, but the
    API has no separate output-only limit beyond the shared context.
    So max_input_tokens / max_output_tokens / max_tokens are all set
    to 1,000,000, matching the xai/grok-4.3 catalog entry pattern.

Tests follow the pattern from BerriAI#27154 (xai/grok-4.3 entry).

Signed-off-by: BobDu <i@bobdu.cc>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 25, 2026

Greptile Summary

Adds the oci/xai.grok-4.3 model entry to both the canonical and backup model cost catalogs so that spend tracking and the proxy UI surface the model correctly. No logic changes are made — this is a pure metadata addition.

  • Pricing: Two-tier pricing (≤200K / >200K tokens) for input, output, and cached-input tokens, sourced from Oracle's public pricing API and matching the canonical xai/grok-4.3 entry.
  • Capabilities: supports_vision, supports_function_calling, supports_prompt_caching, and supports_reasoning are all set to true; supports_response_schema is false, consistent with every other OCI Grok entry in the catalog.
  • Tests: New test file in tests/test_litellm/ reads only local JSON files (no network calls), validates all pricing and capability fields, and asserts the backup catalog is in sync with the main file.

Confidence Score: 5/5

Safe to merge — the change is a self-contained metadata addition to two JSON catalog files with no logic changes anywhere in the codebase.

All three changed files are narrow in scope: two JSON catalog files receive an identical new entry, and the test file uses only stdlib to read those files locally. The new entry's pricing values mirror the canonical xai/grok-4.3 entry exactly, capability flags are consistent with existing OCI Grok entries, and the backup file is kept in sync. There are no logic changes, no new code paths, and no risk of regressions.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds oci/xai.grok-4.3 entry with pricing tiers, 1M context window, and capability flags; correctly mirrors the canonical xai/grok-4.3 pricing and sets supports_response_schema: false consistent with other OCI Grok entries
litellm/model_prices_and_context_window_backup.json Backup copy updated with an identical oci/xai.grok-4.3 entry, kept in sync with the main catalog file
tests/test_litellm/test_oci_xai_grok_4_3_model_metadata.py New test file with two pure-stdlib tests; validates all pricing/capability fields on oci/xai.grok-4.3 and asserts the backup catalog matches the main one — no network calls, complies with the unit-test-only constraint for this directory

Reviews (1): Last reviewed commit: "feat(oci): add xai.grok-4.3 model metada..." | Re-trigger Greptile

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants