mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-03 01:38:46 +00:00
* fix(completions): send fields the OpenAI SDK has no keyword for in the request body A /v1/completions request carrying response_format, tools, tool_choice, functions, function_call or top_logprobs failed with a 500 TypeError before anything was sent, because every request field was passed to the SDK's completions.create() as a keyword. Those fields now travel in extra_body, so the provider receives them and its own answer comes back. Fixes #47951 * test(completions): type the monkeypatch fixture parameter * fix(completions): send body-only fields on Azure text completions and clear the lint gates Azure text completions called the SDK the same way, so response_format, tools and tool_choice hit the same TypeError there. They now go in the request body too. The helper returns an Any-valued dict because that is the only thing the SDK's typed keywords accept from a splatted dict, which clears the reportArgumentType and LIT001 gate failures. * fix(completions): give the Any import its lint suppression reason |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_completion_handler.py | ||
| test_handler.py | ||
| test_text_completion_guardrail_handler.py | ||
| test_text_completion_token_ids.py | ||