mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Merge 6bb26bd6a3 into 5337c68dd3
This commit is contained in:
commit
47d4539d66
2 changed files with 9 additions and 0 deletions
|
|
@ -1109,6 +1109,7 @@ class WebSearchInterceptionLogger(CustomLogger):
|
|||
k: v
|
||||
for k, v in kwargs.items()
|
||||
if not k.startswith("_websearch_interception")
|
||||
and k not in optional_params_clean
|
||||
and k
|
||||
not in {
|
||||
"_agentic_loop_api_surface",
|
||||
|
|
|
|||
|
|
@ -218,12 +218,16 @@ async def test_build_responses_plan_produces_responses_input():
|
|||
optional_params={
|
||||
"tools": [{"type": "function", "name": "litellm_web_search"}],
|
||||
"tool_choice": {"type": "function", "name": "litellm_web_search"},
|
||||
"prompt_cache_key": "cache-key",
|
||||
"prompt_cache_retention": "24h",
|
||||
},
|
||||
logging_obj=MagicMock(),
|
||||
stream=False,
|
||||
kwargs={
|
||||
"custom_llm_provider": "openai",
|
||||
"_agentic_loop_api_surface": RESPONSES_AGENTIC_SURFACE,
|
||||
"prompt_cache_key": "cache-key",
|
||||
"prompt_cache_retention": "24h",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -249,6 +253,10 @@ async def test_build_responses_plan_produces_responses_input():
|
|||
assert patch_obj.tools == [{"type": "function", "name": "litellm_web_search"}]
|
||||
assert "tool_choice" not in patch_obj.optional_params
|
||||
assert "_agentic_loop_api_surface" not in patch_obj.kwargs
|
||||
assert patch_obj.optional_params["prompt_cache_key"] == "cache-key"
|
||||
assert patch_obj.optional_params["prompt_cache_retention"] == "24h"
|
||||
assert "prompt_cache_key" not in patch_obj.kwargs
|
||||
assert "prompt_cache_retention" not in patch_obj.kwargs
|
||||
assert patch_obj.model == "openai/gpt-4o"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue