litellm/tests/unit/enterprise/proxy
yucheng-berri 6162184b1c
fix(managed_files): send provider file ids when creating a fine-tuning job from managed files (#46552)
* fix(managed_files): send provider file ids when creating a fine-tuning job from managed files

Fine-tuning job creation with a managed training file sent the gateway's managed id and the provider-prefixed deployment model to OpenAI, which rejected the job. The pre-call hook now builds the file id mapping for training_file and validation_file, the deployment hook swaps both, the SDK strips the provider prefix from the model, and the create response returns the caller's own file ids

* fix(managed_files): route managed fine-tuning creates only to deployments holding every file

Fine-tuning creates now narrow routing the same way managed batches do, so a
deployment added after the upload is never picked. Adds a two-worker chaos
integration test and runs tests/unit/fine_tuning in the endpoints shard.

* fix(managed_files): keep fine-tuning creates on the model group when no deployment holds the files

A managed file used on a model group it was never uploaded for kept failing
with the provider's 400 before the routing filter. The filter turned that into
a 429 no-deployments error, so fine-tuning now falls back to the whole group in
that case while batch input files keep routing only to deployments that hold
them.

* test(fine_tuning): cover the provider prefix strip for OpenAI and Azure creates through the proxy

* test(fine_tuning): start each multi-deployment case from an empty upstream log

* test(fine_tuning): boot both proxies of the late deployment cell on one scratch database

---------

Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-19 14:40:15 -07:00
..
auth refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
guardrails ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
hooks 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
management_endpoints fix(proxy): keep keys and projects on the same team (#44165) 2026-10-10 00:53:10 -07:00
__init__.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_afile_retrieve_returns_unified_id.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_audit_logging_endpoints.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_batch_retrieve_input_file_id.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
test_batch_retrieve_registers_missing_output_file_id.py fix(proxy): save file details for every batch output file so they list and retrieve (#41761) 2026-10-08 18:51:45 -07:00
test_batch_retrieve_returns_unified_input_file_id.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_batch_update_db_managed_output_file_id.py fix(responses): bill a background response once, on the first read or poll that sees it finished (#45703) 2026-10-15 11:00:14 -07:00
test_deleted_file_returns_403_not_404.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_enterprise_routes.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_file_deletion_blocking.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_liteadmin.py feat(enterprise): bundle LiteAdmin Slack with native gateway login (#44444) 2026-10-03 17:28:18 -07:00
test_managed_files_access_check.py fix(batches): preserve spend across malformed output and metadata failures (#47184) 2026-10-17 17:10:22 -07:00
test_managed_files_hook.py fix(responses): bill a background response once, on the first read or poll that sees it finished (#45703) 2026-10-15 11:00:14 -07:00