Skip to content

Add OpenAI chat-latest model metadata - #27478

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

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

Conversation

@PeterDaveHello

Copy link
Copy Markdown
Contributor

Relevant issues

N/A

Linear ticket

N/A

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

Tested locally:

uv run pytest tests/test_litellm/test_openai_chat_latest_model_metadata.py -vv
uv run pytest tests/test_litellm/test_utils.py -k "model_prices" -vv
uv run pytest tests/test_litellm/litellm_core_utils/llm_cost_calc/test_tool_call_cost_tracking.py -k "web_search or file_search" -vv

Automated review:

cr --agent
findings: 0

Reference docs:

Type

✅ Test

Changes

Adds OpenAI chat-latest metadata to the root model pricing map and the
packaged backup map.

The new entry includes token limits, pricing, endpoint support, modal
support, and hosted tool capability metadata, including file search and
web search cost tracking.

Adds a focused test covering:

  • chat-latest model metadata and routing through the OpenAI provider
  • root model map and packaged backup map parity

@codecov

codecov Bot commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.28440% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/router.py 86.00% 7 Missing ⚠️
litellm/cost_calculator.py 14.28% 6 Missing ⚠️
litellm/integrations/opentelemetry.py 90.69% 4 Missing ⚠️
...integrations/opentelemetry_utils/gen_ai_semconv.py 98.50% 1 Missing ⚠️
litellm/proxy/proxy_server.py 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@greptile-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds chat-latest model metadata to the root and backup pricing JSON files, along with a focused test suite verifying the new entry.

  • Token limits, pricing ($5.00/$0.50/$30.00 per M tokens confirmed against OpenAI docs), capability flags, and endpoint support are all present and match existing conventions (e.g., 272K input + 128K output for a 400K-window model follows the same pattern as other GPT-5.x entries).
  • The uniform $0.01 per query for all three search_context_size tiers correctly reflects the flat $10.00/1k-call pricing for the standard web search tool (as opposed to the tiered per-context-size pricing used only by the dedicated search-preview models).
  • The test file exercises metadata correctness, provider routing, and root/backup parity without making any real network calls.

Confidence Score: 5/5

Safe to merge — the change is a JSON metadata addition with no logic changes and a dedicated test confirming correctness.

All three files make isolated, additive changes: two JSON entries and one new test file. The pricing values were verified against the OpenAI pricing page, token limits follow the established GPT-5.x convention, and the backup JSON mirrors the root exactly as confirmed by the parity test. No existing behavior is modified.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds chat-latest entry with correct pricing ($5/$0.50/$30 per M tokens), token limits (272K input / 128K output), and capability flags; consistent with existing GPT-5.x conventions.
litellm/model_prices_and_context_window_backup.json Identical chat-latest entry as the root JSON; backup stays in sync, verified by the new parity test.
tests/test_litellm/test_openai_chat_latest_model_metadata.py New focused tests: one validates all metadata fields for chat-latest and its provider routing; a second asserts parity between root and backup JSON. No network calls — passes the mock-only rule.

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

Comment thread model_prices_and_context_window.json
Comment thread litellm/model_prices_and_context_window_backup.json
Comment thread tests/test_litellm/test_openai_chat_latest_model_metadata.py
@ishaan-berri

Copy link
Copy Markdown
Contributor

@greptile review again

@PeterDaveHello

Copy link
Copy Markdown
Contributor Author

@ishaan-berri, is there anything else I can do for it? Thanks.

@oss-pr-review-agent-shin

Copy link
Copy Markdown
Contributor

🤖 litellm-agent: Auto-merge skipped — the staging branch shin_agent_oss_staging_05_15_2026 has 217 commit(s) not in your branch. Merging as-is would produce a confusing diff on the staging PR.

Please rebase your branch onto shin_agent_oss_staging_05_15_2026 and push; the agent will re-review automatically.

@PeterDaveHello
PeterDaveHello force-pushed the add-openai-chat-latest-metadata branch from 3df8efe to bb78d02 Compare May 16, 2026 11:18
@PeterDaveHello
PeterDaveHello changed the base branch from litellm_internal_staging to shin_agent_oss_staging_05_16_2026 May 16, 2026 16:40
@PeterDaveHello
PeterDaveHello force-pushed the add-openai-chat-latest-metadata branch from bb78d02 to d3c484e Compare May 16, 2026 16:40
@Sameerlite
Sameerlite deleted the branch BerriAI:shin_agent_oss_staging_05_16_2026 May 22, 2026 12:07
@Sameerlite Sameerlite closed this May 22, 2026
@PeterDaveHello

Copy link
Copy Markdown
Contributor Author

@Sameerlite, is there anything I can do to make it right?

@PeterDaveHello

Copy link
Copy Markdown
Contributor Author

Hi @Sameerlite, I opened a fresh replacement PR targeting litellm_internal_staging: #28649. Thanks again for the guidance.

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.

4 participants