litellm/tests/unit/fine_tuning
Mateo Wang 1aef139c58
fix(azure): use config Entra ID credentials on file and fine-tuning calls (#55908)
* fix(azure): pass Entra ID credentials to file retrieve and list

* fix(azure): key cached clients by timeout and retries, pass Entra ID credentials to fine-tuning

The Azure client cache key ignored timeout and max_retries, so a later call with the same
credentials reused a client built with another call's settings. Fine-tuning create, cancel,
list and retrieve now pass litellm_params so Entra ID credentials given as kwargs reach the
Azure handler, and file retrieve and list now use the client the caller passed.

* fix(azure): stop caching a caller's client, prefer Entra ID credentials over env keys on file and fine-tuning calls

* fix(azure): keep an environment API key ahead of a config client secret on file and fine-tuning calls

* fix(azure): apply each call's timeout and retries with with_options instead of caching a client per value

* fix(azure): reuse the cached client when a call's timeout and retries match, accept string timeouts, ignore a non-OpenAI client on file reads

* fix(azure): keep fine-tuning job creates on the default timeout and retries so a caller value cannot resend a create

* fix(azure): treat an empty timeout as unset, accept whole-number float retries, return a caller's client before reading call options

* fix(files): accept every file status Azure reports so a lookup during import no longer fails

* fix(azure): treat a negative or blank max_retries as unset so file calls and streamed chats no longer fail on it

* fix(azure): read max_retries the same way on assistants calls so a blank, string or negative value uses the default

* fix(azure): treat a max_retries string that is not a whole number as unset so image generation still sends the request

* fix(azure): reject an unreadable max_retries before a streamed chat sends, and leave it out of image generation's auth setup
2026-12-04 13:54:25 -08:00
..
__init__.py fix(managed_files): send provider file ids when creating a fine-tuning job from managed files (#46552) 2026-10-19 14:40:15 -07:00
test_main.py fix(azure): use config Entra ID credentials on file and fine-tuning calls (#55908) 2026-12-04 13:54:25 -08:00