litellm/tests/test_litellm/proxy/common_utils
Cursor Agent fef0f219c2
fix(proxy): cleandoc exception docstrings used in OpenAPI ERROR_RESPONSES
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>
2026-06-08 14:30:57 +00:00
..
test_cache_codec.py Update test for CacheCodec serialization to clarify validation error handling. 2026-04-24 16:13:42 +00:00
test_callback_utils.py fix(proxy): strip LiteLLM policy tracking from OpenAI batch metadata (#28425) 2026-05-26 11:35:42 -07:00
test_custom_openapi_spec.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_expired_ui_session_key_cleanup_manager.py Handle cleanup delete races and accurate counts 2026-04-25 03:01:34 +03:00
test_get_routes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_http_parsing_utils.py chore(ci): merge dev branch (#28314) 2026-05-20 17:47:33 -07:00
test_key_rotation_e2e.py Litellm key rotation bug (#27756) 2026-05-12 17:16:37 -07:00
test_key_rotation_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_key_rotation_lock.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
test_key_rotation_manager.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_load_config_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openai_endpoint_utils.py fix(vector-stores): recurse into nested litellm_params; handle JSON-string shape 2026-04-29 18:56:40 +00:00
test_path_utils.py test: add unit tests for path_utils safe_join and safe_filename 2026-04-16 03:25:42 +00:00
test_reset_budget_job.py fix(reset_budget): write only {spend, budget_reset_at} and stop pre-zeroing counter (#29358) 2026-05-30 17:48:16 -07:00
test_static_asset_utils.py fix(static-assets): browser-load remote branding assets 2026-04-30 11:30:57 -07:00
test_swagger_utils.py fix(proxy): cleandoc exception docstrings used in OpenAPI ERROR_RESPONSES 2026-06-08 14:30:57 +00:00
test_timezone_utils.py fix(budget): fix timezone config lookup and replace hardcoded timezone map with ZoneInfo (#21754) 2026-02-21 19:35:06 -08:00
test_upsert_budget_membership.py feat(ui): add budget duration to edit team member form (#29717) 2026-06-06 17:24:55 -07:00
test_user_api_key_cache.py fix import error 2026-05-01 00:29:13 +00:00