litellm/tests/unit/decisions
saruar-dev 216a330712
feat(nace): add Drex Max decisions and inline images (#48426)
* feat(nace): add drex-max to the catalog, image support, and the complexity router

Nace released drex-max, the Drex decision model that also reads images,
and the existing nace provider could not use it: the catalog had no row,
so cost tracking and the dashboard did not know the model, and image
input was refused before the request left the gateway.

Add the nace/drex-max catalog row to both cost map files with
supports_vision and the per-question token limit, let the nace decisions
provider forward images as the top-level images array Nace reads
(inline images as data URLs, remote URLs fetched and inlined, at most 8
per request), and accept provider nace in the Auto Router classifier
config so a tier can be chosen by drex-max with NACE_API_KEY.

Also: resolve os.environ/ references for the classifier's nace api_key
and api_base once, and refuse an unset one instead of falling back to
NACE_API_KEY; price drex-max at $0.03 per 1M input tokens and add
drex-max-v1.1; mark the retired drex-v1.0, now served by drex-max, as
vision-capable; and accept provider nace in the dashboard's classifier
config (default drex-max), the generated API types and the member
auto-router permission check.

* feat(nace): send X-Nace-Client attribution header

Nace requests, including the Auto Router classifier, identify litellm and its version in X-Nace-Client for Nace's usage attribution. Other providers do not receive it

* fix(nace): list Nace in the classifier UI and follow the test conventions

The dashboard's classifier config widened its provider type to nace without a
description entry, so the type check failed, and the Auto Router's inline
provider picker did not offer Nace. Both now include it, with tests

The header test reads the request respx captured instead of appending to a
list, and the drex-max catalog tests move into the existing catalog test file

* fix(nace): bound image downloads and refresh Drex aliases

* test(images): exercise streaming transport in provider regressions

* fix(nace): preserve text-only Drex v2 image handling

* refactor(nace): scope Drex Max to decisions integration

---------

Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-11-12 21:27:37 -08: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 feat(gemini): support gemini-decision-1 on /v1/decisions and /v1/systemone (#51220) 2026-11-11 18:33:22 -08:00
test_main.py feat(nace): add Drex Max decisions and inline images (#48426) 2026-11-12 21:27:37 -08:00