litellm/tests/test_litellm/llms/custom_httpx
ryan-crabbe-berri e7f3f58f96
refactor(agentic-loop): build follow-up kwargs in one place so no executor can repeat a request param (#42307)
* refactor(agentic-loop): build follow-up kwargs in one place so no executor can repeat a request param

The Responses and both chat completions follow-up executors each rebuilt the follow-up kwargs by hand and then expanded them next to the request params, so a plan whose kwargs repeated a request param raised a duplicate keyword TypeError. They now share build_agentic_followup_kwargs, which drops any key already sent as a request param (and the explicitly passed model/input/messages) from both the request kwargs and the plan kwargs. Each executor keeps its own internal-key filter unchanged, and the /v1/messages executor is untouched because it merges into a single dict and cannot hit this.

* test(agentic-loop): move follow-up regressions into their mapped test files

Greptile review: the executor regressions belong in test_llm_http_handler.py and test_chat_completion_agentic_loop.py rather than a split-off file, and the builder test helper returned a read-only mapping while promising a dict. The Responses overlap test is dropped because #41560 already added the same one to the mapped file.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-21 20:06:01 -07:00
..
test_aiohttp_cleanup_closed.py fix(http): stop pooled clients persisting cookies on the aiohttp jar too (#36149) 2026-08-07 11:05:59 -07:00
test_aiohttp_handler.py fix(aiohttp): honor global ssl_verify on the aiohttp_openai handler path 2026-08-26 13:24:36 -07:00
test_aiohttp_so_keepalive.py fix(http): stop pooled clients persisting cookies on the aiohttp jar too (#36149) 2026-08-07 11:05:59 -07:00
test_aiohttp_transport.py fix(aiohttp_transport): map transport-internal CancelledError to a retryable ConnectError (#39240) 2026-09-01 17:55:47 -07:00
test_async_client_cleanup.py fix(async_client_cleanup): stop cleanup from resurrecting healed clients 2026-08-04 22:43:40 -07:00
test_container_handler.py fix(containers): surface provider errors from container file content endpoint (#37737) 2026-08-20 16:46:26 -07:00
test_credential_leak_prevention.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_gemini_session_leak.py Fix __main__ exit bug, close litellm_async_client, restore global state 2026-03-14 18:14:42 -07:00
test_http_handler.py Merge pull request #34829 from max-sixty/bugfix/http-handler-del-closes-streaming-client 2026-09-16 13:39:04 -07:00
test_llm_http_handler.py refactor(agentic-loop): build follow-up kwargs in one place so no executor can repeat a request param (#42307) 2026-09-21 20:06:01 -07:00
test_mock_transport.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00