llamaIndex - ✅(Solved) Fix [Feature Request]: Missing gpt-5.3-chat support [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
run-llama/llama_index#21155Fetched 2026-04-08 01:31:21
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

The model context size map in utils.py skips gpt-5.3 entirely — it goes from gpt-5.2 to gpt-5.4. Any attempt to use a gpt-5.3 variant raises ValueError: Unknown model 'gpt-5.3-chat-latest'. Tested all versions up to llama-index-llms-openai==0.7.3, none include it. The only workaround is monkey-patching ALL_AVAILABLE_MODELS at runtime.

GPT-5.3 Chat is a production OpenAI model available since March 3, 2026. Without it in the model map, users cannot use gpt-5.3-chat-latest or other 5.3 variants through LlamaIndex without monkey-patching. This is a simple addition to the existing model dictionaries in utils.py — the model has a 128K context window, consistent with other chat-latest variants already in the map.

PR fix notes

PR #21190: feat(llama-index-integrations): add gpt-5.3 model family support to openai model mappings

Description (problem / solution / changelog)

New Feature

Problem

The utils.py file contains model context size mappings for OpenAI models. Currently, it skips the gpt-5.3 model family entirely, jumping from gpt-5.2 to gpt-5.4. This causes a ValueError when users try to use gpt-5.3-chat-latest or other gpt-5.3 variants. We need to add the missing gpt-5.3 model entries to the appropriate dictionaries (OPENAI_REASONING_MODELS, CHAT_MODELS, and ALL_AVAILABLE_MODELS).

Severity: medium File: llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py

Solution

Add the following entries to the model dictionaries in utils.py:

Changes

  • llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py (modified)

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods Contributed by Lê Thành Chỉnh Code is a tool. Mindset is the real value.

Closes #21155

Changed files

  • llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py (modified, +2/-0)
RAW_BUFFERClick to expand / collapse

Feature Description

The gpt-5.3 model family (released by OpenAI on March 3, 2026) is missing from the model context size map in llama-index-llms-openai. This causes a ValueError when trying to use any gpt-5.3 variant

The model map in utils.py jumps from gpt-5.2 directly to gpt-5.4, skipping the entire gpt-5.3 family.

Models to add

Based on the OpenAI models page, the following gpt-5.3 models should be added:

  • gpt-5.3-chat-latest (128K context window)

And any other gpt-5.3 variants available (e.g. gpt-5.3, gpt-5.3-codex, etc.).

Affected file

llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py

Specifically the OPENAI_REASONING_MODELS, CHAT_MODELS, and ALL_AVAILABLE_MODELS dictionaries.

Version

Tested up to llama-index-llms-openai==0.7.3 — none of the released versions include gpt-5.3.

Reason

The model context size map in utils.py skips gpt-5.3 entirely — it goes from gpt-5.2 to gpt-5.4. Any attempt to use a gpt-5.3 variant raises ValueError: Unknown model 'gpt-5.3-chat-latest'. Tested all versions up to llama-index-llms-openai==0.7.3, none include it. The only workaround is monkey-patching ALL_AVAILABLE_MODELS at runtime.

Value of Feature

GPT-5.3 Chat is a production OpenAI model available since March 3, 2026. Without it in the model map, users cannot use gpt-5.3-chat-latest or other 5.3 variants through LlamaIndex without monkey-patching. This is a simple addition to the existing model dictionaries in utils.py — the model has a 128K context window, consistent with other chat-latest variants already in the map.

extent analysis

Fix Plan

To fix the issue, we need to update the model context size map in utils.py to include the gpt-5.3 model family. Here are the steps:

  • Update the OPENAI_REASONING_MODELS, CHAT_MODELS, and ALL_AVAILABLE_MODELS dictionaries in llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py to include the gpt-5.3 models.
  • Add the following models to the dictionaries:
    • gpt-5.3-chat-latest with a context window of 128K
    • Other gpt-5.3 variants (e.g. gpt-5.3, gpt-5.3-codex, etc.)

Example code:

OPENAI_REASONING_MODELS = {
    # ... existing models ...
    'gpt-5.3': 4096,  # default context window for gpt-5.3
    'gpt-5.3-codex': 4096,  # default context window for gpt-5.3-codex
}

CHAT_MODELS = {
    # ... existing models ...
    'gpt-5.3-chat-latest': 128000,  # context window for gpt-5.3-chat-latest
}

ALL_AVAILABLE_MODELS = {
    # ... existing models ...
    'gpt-5.3': 'gpt-5.3',
    'gpt-5.3-codex': 'gpt-5.3-codex',
    'gpt-5.3-chat-latest': 'gpt-5.3-chat-latest',
}

Verification

To verify that the fix worked, try using a gpt-5.3 variant (e.g. gpt-5.3-chat-latest) through LlamaIndex. The model should be recognized and used correctly without raising a ValueError.

Extra Tips

  • Make sure to update the model dictionaries in the correct file (utils.py) and commit the changes to the repository.
  • If you're using a version of llama-index-llms-openai older than 0.7.3, you may need to upgrade to a newer version that includes the updated model dictionaries.
  • You can also consider adding a test case to ensure that the gpt-5.3 models are correctly recognized and used by LlamaIndex.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING