mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-17 04:34:25 +00:00
* feat(dd_span_tagger): emit litellm_user_email span tag for JWT-authenticated requests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(dd_span_tagger): use dotted litellm.user_email tag for consistency Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(model_hub): surface model_info.description in model group info and Model Hub UI Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(router): aggregate model group description without in-place mutation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(health): skip background health check DB writes when the latest-row read fails Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(bedrock_mantle): map the OpenAI-shaped context overflow envelope too Mantle reports context overflow in two envelopes. #37862 covered the structured `validation_error` one carrying token counts ("prompt tokens (N) exceed model maximum (M)"). Mantle also returns the OpenAI-shaped body: {"error":{"code":"context_length_exceeded","message":"Your input exceeds the context window of this model. ...","param":"input", "type":"invalid_request_error"}} That passes the existing `invalid_request_error` gate but matches neither the token-count pattern nor `is_error_str_context_window_exceeded`'s substring list, so it fell through to a generic BadRequestError. Clients such as Claude Code only reactive-compact on a recognised overflow phrase, so an overflowing request surfaced as an ordinary error with no recovery. Return the same normalised "prompt is too long: ..." message for this envelope when it carries no counts, keeping the numeric wording when the provider supplies them. * fix(bedrock_mantle): map the streamed context overflow and keep its 400 on /v1/messages streams * fix(anthropic_adapter): keep only the context overflow's 400 on streamed /v1/messages so other provider 4xx still fall back * test(anthropic_adapter): wrap a parametrize line over the 120 char limit * test(integration): audit Bedrock Mantle context overflow mapping across routes, clients, and fallbacks * test(integration): move the streamed /v1/messages overflow spend row into a BUG-skipped test * test(integration): keep every chaos cell in the burst and skip only the missing spend row * fix(bedrock_mantle): answer 400 on an in-stream context overflow The Mantle overflow mapper built its ContextWindowExceededError on the original exception's response, so an overflow that Mantle reports inside a 200 stream (the chat-mode token-count envelope, which the OpenAI chunk parser wraps as a 500) kept that 500 and the streamed /v1/messages route answered HTTP 500 api_error instead of 400 invalid_request_error. The mapper now builds the error on a 400 response that keeps the original headers and request, and the mapping test covers an in-stream 500 and 503. The integration suites pin the streamed /v1/messages overflow to the pre-content 400 route under a retry budget and to the message_start plus invalid_request_error event without one, drop the chaos carve-out that expected no spend row, and give the fallbacks file a timeout mark sized to the proxy's graceful stop. * fix(bedrock_mantle): keep the provider's 400 body and match the overflow code only as error.code --------- Co-authored-by: milan <milan@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: ryan-crabbe-berri <ryan@berri.ai> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| _support | ||
| base_sdk_tests | ||
| benchmarks | ||
| code_coverage_tests | ||
| documentation_tests | ||
| e2e | ||
| e2e_harness | ||
| fixtures | ||
| harness_e2e | ||
| integration | ||
| rust-python-harness | ||
| test_litellm_rust | ||
| typing | ||
| unit | ||
| windows_tests | ||
| __init__.py | ||
| _fake_openai_endpoint_server.py | ||
| _flush_vcr_cache.py | ||
| _live_test_helpers.py | ||
| _master_key.py | ||
| _openai_record_replay_proxy.py | ||
| _process_helpers.py | ||
| _vcr_conftest_common.py | ||
| _vcr_redis_persister.py | ||
| _wait_helpers.py | ||
| _ws_vcr.py | ||
| AGENTS.md | ||
| capturing_transport.py | ||
| eval_swe_bench.py | ||
| fake_openai_endpoint.py | ||
| gettysburg.wav | ||
| large_text.py | ||
| openai_batch_completions.jsonl | ||
| pyrightconfig.json | ||
| README.MD | ||
| test_logging.conf | ||
| test_rust_python_harness.py | ||
| VCR_TESTING.md | ||
| white_100x100.png | ||
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/unit
This folder can only run mock tests.