mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
* fix(gemini): replay each assistant image's thought signature on its own part Gemini image models sign every final image part and only accept a signature replayed inside its original part. Each generated image now carries its own signature in images[].provider_specific_fields.thought_signature, and the history converter sends it back on that image part. History from before this change falls back to the message-level list, right-aligned onto the images, and the text part keeps the first signature no image or tool call claimed * fix(gemini): keep a saved reply's text signature on the text and accept unsigned image fields A streamed reply saved before per-image signatures lists only the text's signature, and the history fallback moved it onto the image. The text now keeps the first unused message signature as before, and saved images take only what is left, matched from the end thought_signature is optional inside an image's provider_specific_fields, so a response whose image carries other provider fields, or none, parses again * fix(gemini): declare the image signature only on Gemini's own image type The shared response type no longer declares an image's provider_specific_fields, so an upstream response whose image carries other keys there, or a non-string signature, validates exactly as it did before. Gemini's own image items still type the signature * test(gemini): collect streamed images with one for clause per comprehension * fix(gemini): answer 400 for malformed assistant image history and keep list text signatures off images * fix(gemini): let an image take its signature when saved content is an empty string * fix(gemini): sign replayed images only for image models and keep drop_params in batch Text models reject an image model's signature on a replayed image with a 400 that the placeholder resend does not catch, so images go unsigned unless the target outputs images. An empty assistant reply keeps its text signature, Vertex batch lines honor drop_params, and the malformed history error names the right provider. * fix(gemini): strip image signatures for strict providers and follow drop_params for malformed images * refactor(gemini): return malformed assistant history as a value and raise it once --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| _support | ||
| audio_tests | ||
| base_sdk_tests | ||
| basic_proxy_startup_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 | ||
| _module_state.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.