litellm/tests/unit/decisions
dor db6c70e9ee feat(decisions): add Nadir as a Decisions provider for the auto router
Since the Add Auto Router form picks a deployed decision model (#45913),
a provider has to be a Decisions provider to appear there. Nadir now is:
`nadir/bucket` is a cost-map decision model, NadirDecisionsConfig serves
it from POST /v1/bucket, and a Nadir deployment answers /v1/decisions,
/v1/systemone, the health check and the auto router's Decision model.

Nadir is a tier classifier, not a general judge, so it answers exactly
one choice question whose choices include simple, medium and complex
(matched case-insensitively, answered on the question's own keys) and
refuses any other question set with a 400 before a call. A state shaped
{"messages": [...]} or OpenAI-format input goes out as the conversation,
any other state as the prompt.

When the auto router's decision deployment is Nadir it sends the
budgeted, role-tagged conversation as that state rather than the
LLM-judge payload, the same input `provider: nadir` already gets.

The `provider: nadir` path now uses the same config for its URL, key
scoping and verdict parsing, so litellm/llms/nadir/common_utils.py is
gone. NADIR_API_KEY still only goes to NADIR_API_BASE or the hosted API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:25:49 -04: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): log non-UTF-8 bytes as base64 so the request reaches validation and gets a 400 (#47564) 2026-10-20 08:22:06 -07:00
test_main.py feat(decisions): add Nadir as a Decisions provider for the auto router 2026-10-21 11:25:49 -04:00