mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-06 02:09:04 +00:00
The Swagger error descriptions wired up in swagger_utils.ERROR_RESPONSES were taken straight from exception.__doc__, which preserves the leading whitespace from the Python source (4 spaces per body line for any multi-line docstring). openapi-typescript renders that into JSDoc verbatim, so when RateLimitError grew a real multi-line docstring in #27687, every regenerated schema.d.ts now has a different indentation than the file committed by #29885. CI's Check UI API Types Sync flips back and forth between rebases on any PR that doesn't touch schema.d.ts itself. Pass __doc__ through inspect.cleandoc so the description stored in the OpenAPI spec is dedented at the source. The committed schema.d.ts is exactly what gen:api now produces, so no schema regen is needed in this commit; future docstrings on litellm exceptions won't reintroduce the drift either. Inherited docstrings from openai/Exception are still ignored (we keep the existing __doc__-not-getdoc fallback to the class name) so the description of every other 4xx/5xx response stays the class name like 'AuthenticationError'. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| test_cache_codec.py | ||
| test_callback_utils.py | ||
| test_custom_openapi_spec.py | ||
| test_expired_ui_session_key_cleanup_manager.py | ||
| test_get_routes.py | ||
| test_http_parsing_utils.py | ||
| test_key_rotation_e2e.py | ||
| test_key_rotation_integration.py | ||
| test_key_rotation_lock.py | ||
| test_key_rotation_manager.py | ||
| test_load_config_utils.py | ||
| test_openai_endpoint_utils.py | ||
| test_path_utils.py | ||
| test_reset_budget_job.py | ||
| test_static_asset_utils.py | ||
| test_swagger_utils.py | ||
| test_timezone_utils.py | ||
| test_upsert_budget_membership.py | ||
| test_user_api_key_cache.py | ||