Skip to content

Add Azure gpt-chat-latest model metadata - #27420

Closed
emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:add-azure-gpt-chat-latest
Closed

Add Azure gpt-chat-latest model metadata#27420
emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:add-azure-gpt-chat-latest

Conversation

@emerzon

@emerzon emerzon commented May 7, 2026

Copy link
Copy Markdown
Contributor

What

  • Add Azure gpt-chat-latest to the model cost map and bundled backup map.
  • Set pricing from the Microsoft Foundry announcement: 5 USD input / 0.50 USD cached input / 30 USD output per 1M tokens.
  • Add regression coverage for metadata lookup, Azure provider routing, and main/backup map parity.

Tests

  • python -m json.tool model_prices_and_context_window.json >/dev/null
  • python -m json.tool litellm/model_prices_and_context_window_backup.json >/dev/null
  • uv run pytest tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py -q
  • uv run ruff check tests/test_litellm/test_azure_gpt_chat_latest_model_metadata.py

Copilot AI review requested due to automatic review settings May 7, 2026 21:14
@codspeed-hq

codspeed-hq Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing emerzon:add-azure-gpt-chat-latest (db2e5f5) with main (8c9830e)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds metadata for the azure/gpt-chat-latest model to both the main and backup cost map JSON files, with pricing derived from the cited Microsoft Foundry announcement ($5/M input, $0.50/M cached, $30/M output).

  • Both JSON files receive an identical azure/gpt-chat-latest entry covering pricing, context window (128k input / 16k output), and a full capabilities matrix (supports_reasoning, supports_vision, prompt caching, etc.).
  • A new test file validates metadata lookup, litellm.get_model_info resolution (using LITELLM_LOCAL_MODEL_COST_MAP=True to stay offline), and main/backup parity — all three tests are network-call free and fit the tests/test_litellm/ folder policy.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-latest entry (pricing + capabilities + context window) to model_prices_and_context_window.json.
  • Kept litellm/model_prices_and_context_window_backup.json in 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.

Comment on lines +65 to +68

info = litellm.get_model_info(model="gpt-chat-latest", custom_llm_provider="azure")
_assert_gpt_chat_latest_metadata(info)
assert info["key"] == MODEL
Comment on lines +47 to +51
assert info["supported_endpoints"] == [
"/v1/chat/completions",
"/v1/batch",
"/v1/responses",
]
@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mihidumh

Copy link
Copy Markdown
Contributor

Any updates on this?

@emerzon

emerzon commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #30987

@emerzon emerzon closed this Jul 15, 2026
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.

3 participants