mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
test(bedrock): assert empty additionalModelRequestFields is omitted
The Converse transformer now drops an empty additionalModelRequestFields
block instead of sending it as `{}`. Update test_bedrock_top_k_param so
models without top_k support (llama3) assert the key is absent rather than
equal to an empty dict.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1af055fe86
commit
cec83c1788
1 changed files with 4 additions and 0 deletions
|
|
@ -2712,6 +2712,10 @@ def test_bedrock_top_k_param(model, expected_params):
|
|||
data = json.loads(mock_post.call_args.kwargs["data"])
|
||||
if "mistral" in model:
|
||||
assert data["top_k"] == 2
|
||||
elif expected_params == {}:
|
||||
# Models that don't support top_k produce no additionalModelRequestFields;
|
||||
# the empty block is now omitted entirely rather than sent as `{}`.
|
||||
assert "additionalModelRequestFields" not in data
|
||||
else:
|
||||
assert data["additionalModelRequestFields"] == expected_params
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue