litellm/tests/unit/decisions
devin-ai-integration[bot] 197afe4e4b
fix(cost): bill OpenRouter and Perplexity v1.1 decisions models (#45476)
* fix(cost): bill OpenRouter and Perplexity v1.1 decisions models

Every decisions model OpenRouter serves except typesafe/jev-1.13, and
Perplexity's pplx-decider-v1.1-27b, had no cost map row, so /v1/decisions
and /v1/systemone calls through them returned no x-litellm-response-cost
header and logged $0 spend. Add the 15 openrouter/ rows from OpenRouter's
decisions catalog (prompt price, free output, max_input_tokens from
context_length) and the perplexity/pplx-decider-v1.1-27b row from
Perplexity's pricing page, which also lists v1 at $0.02/1M, so that row
moves from $0.04/1M to $0.02/1M.

The Together size-bucket branch of the cost calculator rewrote any model
whose name contains "togethercomputer" to a bucket name even when the model
had its own cost map row, which left openrouter/togethercomputer/tev1-4b-experimental
unpriced; the guard now honours the model's own row too.

* test(cost): type the monkeypatch fixture in the Together guard test

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-18 15:47:20 +00:00
..
__init__.py feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers (#44236) 2026-10-03 17:38:38 +00:00
test_call.py fix(decisions): forward OpenAI prompt cache fields (#51457) 2026-11-18 03:25:09 +00:00
test_main.py fix(cost): bill OpenRouter and Perplexity v1.1 decisions models (#45476) 2026-11-18 15:47:20 +00:00