mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(otel): report the provider's response model under gen_ai_latest_experimental With OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental, gen_ai.response.model now uses the provider_response_model kept on the response hidden params, then the deployment model when the response only echoes the client alias. Legacy mode and litellm.model_group keep the alias. Fixes #51029 * fix(otel): type the semconv response model inputs and attach hidden params in tests Bind the request model once through as_str so the deployment fallback no longer reads untyped kwargs. Non-streamed fixtures now attach provider_response_model with set_hidden_params, since ModelResponse(hidden_params=...) does not keep it on the pydantic private attribute. * fix(otel): read the request model as object before narrowing it Binding kwargs.get("model") to a Final[object] stops basedpyright from reporting an unknown argument passed to as_str. * fix(otel): validate the untyped request model through a TypeAdapter boundary TypeAdapter(object).validate_python accepts the untyped kwargs value and returns a known object, the existing litellm/utils.py and router.py pattern, so as_str no longer receives an Unknown. * test(otel): stream the aliased response through a real Logging object Greptile flagged the MagicMock logging_obj as a double on our own code. The streamed fixture now builds a real Logging with a fixed start time, like test_streaming_handler.py. --------- Co-authored-by: Joshua Valluru <326636767+joshua-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 | ||
| _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.