Add Azure gpt-chat-latest model metadata - #27420
Conversation
Greptile SummaryAdds metadata for the
Confidence Score: 5/5Safe to merge — the change is purely additive metadata with a cited source and full test coverage. The PR touches only two JSON data files and a new test file. Pricing values match the PR description, both JSON files are updated identically, and the tests verify correctness without any network access. No existing behavior is changed. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds azure/gpt-chat-latest entry with correct pricing ($5/M input, $0.50/M cached, $30/M output), capabilities, and a cited source URL; placed between existing azure/gpt-5-chat-latest and azure/gpt-5-codex entries. |
| litellm/model_prices_and_context_window_backup.json | Identical entry added as in the main JSON; the parity test in this PR will catch any future divergence. |
| tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py | New test file with three tests: direct JSON lookup + provider routing, litellm.get_model_info (using LITELLM_LOCAL_MODEL_COST_MAP=True to avoid network calls), and main/backup parity check. |
Reviews (1): Last reviewed commit: "Add Azure gpt-chat-latest model metadata" | Re-trigger Greptile
There was a problem hiding this comment.
Pull request overview
Adds metadata for Azure’s gpt-chat-latest model to LiteLLM’s model-cost registry (and the bundled backup) and introduces regression tests to ensure the metadata is discoverable via JSON lookup, provider routing, and get_model_info().
Changes:
- Added
azure/gpt-chat-latestentry (pricing + capabilities + context window) tomodel_prices_and_context_window.json. - Kept
litellm/model_prices_and_context_window_backup.jsonin sync with the canonical cost map. - Added tests covering metadata lookup,
get_llm_provider()routing,get_model_info()lookup, and main/backup map parity.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py | Adds regression tests for metadata presence, provider routing, get_model_info(), and backup parity. |
| model_prices_and_context_window.json | Adds the azure/gpt-chat-latest model metadata entry to the canonical cost map. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the new azure/gpt-chat-latest entry in the bundled backup cost map. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| info = litellm.get_model_info(model="gpt-chat-latest", custom_llm_provider="azure") | ||
| _assert_gpt_chat_latest_metadata(info) | ||
| assert info["key"] == MODEL |
| assert info["supported_endpoints"] == [ | ||
| "/v1/chat/completions", | ||
| "/v1/batch", | ||
| "/v1/responses", | ||
| ] |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Any updates on this? |
|
Closing in favor of #30987 |
What
gpt-chat-latestto the model cost map and bundled backup map.Tests
python -m json.tool model_prices_and_context_window.json >/dev/nullpython -m json.tool litellm/model_prices_and_context_window_backup.json >/dev/nulluv run pytest tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py -quv run ruff check tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py