Skip to content

Add OpenAI chat-latest model metadata - #28649

Closed
PeterDaveHello wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
PeterDaveHello:add-openai-chat-latest-metadata
Closed

Add OpenAI chat-latest model metadata#28649
PeterDaveHello wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
PeterDaveHello:add-openai-chat-latest-metadata

Conversation

@PeterDaveHello

Copy link
Copy Markdown
Contributor

What

Adds openai/chat-latest model metadata to both model pricing metadata
files.

This replaces the old closed PR #27478 and targets
litellm_internal_staging.

Tests

  • .venv/bin/pytest tests/test_litellm/test_openai_chat_latest_model_metadata.py -q
  • .venv/bin/black --check tests/test_litellm/test_openai_chat_latest_model_metadata.py
  • .venv/bin/python -c "import json; [json.load(open(p)) for p in ['model_prices_and_context_window.json', 'litellm/model_prices_and_context_window_backup.json']]; print('json ok')"
  • git diff --check origin/litellm_internal_staging..HEAD

@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds chat-latest model metadata for the OpenAI provider to both pricing JSON files (model_prices_and_context_window.json and the backup), along with a new test to verify the entry's correctness and cross-file consistency.

  • JSON entries: Both files gain an identical "chat-latest" block under litellm_provider: "openai", including token costs, context window sizes, capability flags (supports_web_search, supports_vision, supports_pdf_input, etc.), and flat-rate web-search pricing.
  • Tests: test_openai_chat_latest_model_info validates all metadata fields and the provider routing for "chat-latest"; test_openai_chat_latest_backup_matches_main asserts the two JSON files are in sync. Both tests use only local file I/O — no network calls.

Confidence Score: 5/5

This is a pure metadata addition — no logic paths are changed, only JSON pricing data is extended and validated by a new offline test.

The change is confined to two JSON files and one new test file. The new entry follows the established naming and structure conventions used by adjacent OpenAI models (e.g., chatgpt-4o-latest). The test file reads only local files (no network calls), validates every declared field, and explicitly checks that the main and backup JSONs agree. No existing tests are modified.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds "chat-latest" metadata entry for the OpenAI provider; pricing, context window sizes, and capability flags are consistent with OpenAI documentation for this model.
litellm/model_prices_and_context_window_backup.json Mirror of the main JSON change; the "chat-latest" entry is byte-for-byte identical to the main file, as validated by the new test.
tests/test_litellm/test_openai_chat_latest_model_metadata.py New test file that validates chat-latest metadata fields and verifies the main/backup JSON files are in sync; reads only local files, no network calls.

Reviews (2): Last reviewed commit: "Add OpenAI chat-latest model metadata" | Re-trigger Greptile

Comment thread model_prices_and_context_window.json
Comment thread model_prices_and_context_window.json

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cd9194aef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread model_prices_and_context_window.json
@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@PeterDaveHello

Copy link
Copy Markdown
Contributor Author

@Sameerlite, @krrish-berri-2, would you please help review?

@PeterDaveHello

Copy link
Copy Markdown
Contributor Author

@greptileai review

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant