Skip to content

fix(model_prices): add Azure AI Claude Mythos 5.1 pricing - #49866

Closed
emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:litellm_azure_anthropic_pricing
Closed

emerzon wants to merge 1 commit into
BerriAI:mainfrom
emerzon:litellm_azure_anthropic_pricing

Conversation

@emerzon

@emerzon emerzon commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude Mythos 5.1 calls through Azure AI can report token usage while their cost lookup fails and spend is recorded as zero.
This adds the missing Azure AI catalog entry, including prompt-cache prices, and checks it through the existing catalog regression tests

Details

TLDR

Problem this solves

  • Azure Mythos 5.1 usage cannot resolve catalog prices
  • Missing prices leave provider spend recorded as zero

How it solves it

  • Add the Azure entry to both catalog copies
  • Exercise routing, pricing, casing and backup consistency

User Flow

Before, a developer cannot calculate the Azure model's cost

  1. Configure azure_ai/claude-mythos-5-1 with no custom prices
  2. Pass reported usage to litellm.cost_per_token with custom_llm_provider="azure_ai"
  3. Receive ModelNotMappedError, despite an existing Anthropic catalog entry

After, the same usage resolves to the Azure catalog prices

  1. Configure azure_ai/claude-mythos-5-1 with no custom prices
  2. Pass reported usage to litellm.cost_per_token with custom_llm_provider="azure_ai"
  3. Receive nonzero input and output costs from the Azure entry

Relevant issues

Fixes #49865

Catalog data

The entry includes input, output, five-minute cache-write, one-hour cache-write and cache-read prices, plus the model's context limits and Claude capabilities. The bundled backup contains the same entry

Anthropic's model reference publishes the rates and context limits and lists Microsoft Foundry availability. Microsoft's billing documentation confirms that Foundry uses Anthropic's published per-model token rates. Sources checked November 3, 2026

Provider-matching rules and request execution are unchanged. This addresses missing catalog-default prices, separate from custom deployment overrides in #49625

Screenshots / Proof of Fix

The reproduction uses the bundled catalog and requires no provider credentials

LITELLM_LOCAL_MODEL_COST_MAP=true python - <<'PY'
from litellm import cost_per_token

print(cost_per_token(
    model="claude-mythos-5-1",
    custom_llm_provider="azure_ai",
    prompt_tokens=1271,
    completion_tokens=389,
))
PY

Before (baddc67041e0888b8bcdc32d43e86c946c867c76)

ModelNotMappedError: This model isn't mapped yet. model=claude-mythos-5-1, custom_llm_provider=azure_ai. Add it here - https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json.

Adding the Mythos test parameter before changing either catalog produces three failing regressions and one passing routing case

After (ac0b86bf3e2f86f3063258d54ddc4c30e2c42f01)

(0.01271, 0.019450000000000002)

The same usage now totals USD 0.03216. The Azure entry resolves through both a provider-prefixed model name and the bare name with an explicit provider

Validation

uv run --no-sync pytest \
  tests/unit/llms/azure_ai/test_azure_ai_foundry_catalog_model_metadata.py \
  tests/unit/llms/azure_ai/test_azure_ai_cost_calculator.py \
  tests/unit/test_model_prices_and_context_window.py -q

175 tests pass. The four Mythos cases also pass in the isolated locked Python 3.13 environment

The repository check runner passes test-tree Ruff, the test-quality gate, lazy OpenAPI snapshot regeneration and dashboard API-type consistency. Dependencies were provisioned separately in an isolated environment, then checks ran with make -o bootstrap check-inner LINT_DEP_INSTALL= LINT_E2E_DEP_INSTALL= BASE_REF=baddc67041e0888b8bcdc32d43e86c946c867c76. git diff --check also passes

Pre-Submission checklist

  • Meaningful regressions fail before the catalog addition
  • Focused test files pass locally
  • Required GitHub CI checks pass on the latest commit
  • The change addresses one missing provider-specific catalog entry
  • Automated reviews finish before maintainer review is requested

Type

Bug Fix

Caveats

Medium

  • Historical zero-spend records need separate reconciliation

Final Attestation

The regression cases detect the original missing entry and pass with the addition. This PR remains a draft pending required GitHub checks and review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Thanks Emerson, this row is now in #49361 with credit. Foundry lists max effort as unsupported, so that flag is false there

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.

[Bug]: Azure AI Claude Mythos 5.1 has no cost-map entry and records zero spend

1 participant