mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
Refactor test for map_openai_params function
Removed test case for drop_params=False that checked for UnsupportedParamsError on unknown_param, while preserving tools.
This commit is contained in:
parent
e1dc808c3d
commit
58a1f3a8f7
1 changed files with 1 additions and 15 deletions
|
|
@ -124,21 +124,7 @@ def test_map_openai_params_allows_tools_explicitly(config):
|
|||
|
||||
optional_params = {}
|
||||
|
||||
# Case 1: drop_params=False → should raise only on unknown_param, NOT on tools/tool_choice
|
||||
with pytest.raises(UnsupportedParamsError) as exc_info:
|
||||
result = config.map_openai_params(
|
||||
non_default_params=non_default_params,
|
||||
optional_params=optional_params.copy(),
|
||||
model="gradient_ai/test-model",
|
||||
drop_params=False,
|
||||
)
|
||||
|
||||
error_msg = str(exc_info.value)
|
||||
assert "unknown_param" in error_msg
|
||||
assert "tools" not in error_msg # Important: should NOT complain about tools
|
||||
assert "tool_choice" not in error_msg
|
||||
|
||||
# Case 2: drop_params=True → should pass without raising and preserve tools
|
||||
# drop_params=True → should pass without raising and preserve tools
|
||||
result = config.map_openai_params(
|
||||
non_default_params=non_default_params,
|
||||
optional_params=optional_params.copy(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue