mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
The managed hook returned the plain dict build_list_page builds, while every other GET /v1/files path returns an SDK page object. A post-call success hook or a logging callback that reads response.data off the listing raised AttributeError as soon as a request took the managed path FileListPage is a pydantic model over the same five fields, so hooks read .data again and the response body does not move: jsonable_encoder gives the same keys in the same order for the model and for the dict. It sits in litellm.types.llms.openai because base_llm/files/transformation.py already imports from there and cannot import proxy modules. It is deliberately not subscriptable, since the provider-backed path returns a page object that is not either, and dict access would be a third contract to keep alive Also reject a purpose the Files API never accepts. An unknown purpose matches no row, so the listing answered an empty page for what is really a bad request, while the upload route in this same file already refuses those values against get_args(OpenAIFilesPurpose). The check runs before the first query, and only in the managed hook, so providers that define their own purposes keep them Also put back the route's original except tail. Sending every error through handle_exception_on_proxy changed error.type on a bad target_model_names from "None" to the exception class name, which a caller matching on the body would read as a break. create_file in this file already pairs base's tail with a ProxyException passthrough, so list_files does the same and the handle_exception_on_proxy import is gone |
||
|---|---|---|
| .. | ||
| cloudformation_stack | ||
| dist | ||
| enterprise_hooks | ||
| enterprise_ui | ||
| litellm_enterprise | ||
| __init__.py | ||
| LICENSE.md | ||
| pyproject.toml | ||
| README.md | ||
LiteLLM Enterprise
Code in this folder is licensed under a commercial license. Please review the LICENSE file within the /enterprise folder
These features are covered under the LiteLLM Enterprise contract
👉 Using in an Enterprise / Need specific features ? Meet with us here
See all Enterprise Features here 👉 Docs