Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor(proxy): trim the multi_items comment to the non-obvious clause

ryan-crabbe-berriee935cec2302
diff --git a/litellm/proxy/common_utils/http_parsing_utils.py b/litellm/proxy/common_utils/http_parsing_utils.py
index 4cb55f6966e..96621b08ba1 100644
--- a/litellm/proxy/common_utils/http_parsing_utils.py
+++ b/litellm/proxy/common_utils/http_parsing_utils.py
@@ -275,9 +275,7 @@ async def get_form_data(request: Request) -> dict[str, Any]:
"""
form: Final = await request.form()
parsed_form_data: Final[dict[str, Any]] = {}
- # multi_items(), not dict(form): a dict drops every value but the last of a repeated key,
- # which is the whole array this function exists to rebuild
- for key, value in form.multi_items():
+ for key, value in form.multi_items(): # not dict(form), which keeps only the last repeat
if key.endswith("[]"):
clean_key = key[:-2]
parsed_form_data.setdefault(clean_key, []).append(value)