mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
completion() and acompletion() now read LiteLLM's control settings from kwargs
once, before the prompt management hooks run. A stream_chunk_size written as a
string of digits ("64", which is what a quoted YAML value or os.environ/...
produces) is read as that int. Anything else that is not a positive int
("sixty-four", 64.0, True, 0, -1) fails with a 400 naming the param, for every
provider and whether or not the request streams. With drop_params on, per
request or through litellm.drop_params, the bad value is dropped instead and
default chunking applies. Before, only Bedrock streams checked it, 0 was
accepted, and a Router deployment with a bad value reached the provider
control_params_from returns the typed LiteLLMControlParams or an
InvalidControlParam value, and one match in main.py turns the failure into the
400. completion() adds the validated bag to litellm_params under
CONTROL_PARAMS_KEY after get_litellm_params builds them, so a caller cannot
supply its own. control_params_in reads the bag back. The flat
stream_chunk_size key stays until Bedrock reads the bag
Refs LIT-8317
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_converse_handler.py | ||