litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: drop_params not working for response_format

Open toniengelhardt opened this issue 1 year ago • 3 comments

What happened?

The drop_params setting is not working for response_format. LiteLLM throws an error if the model doesn't support it:

Screenshot 2024-03-01 at 15 52 47

Relevant log output

No response

Twitter / LinkedIn details

No response

toniengelhardt avatar Mar 01 '24 15:03 toniengelhardt

Hey @toniengelhardt which model was this for? Looks like the error is raised by the api provider (not litellm)

krrishdholakia avatar Mar 05 '24 15:03 krrishdholakia

@krrishdholakia I think it was Perplexity, but not 100% sure. I'll send the model when I see it again. But in general, I would assume drop_parameters means that parameters that are not supported by the API are not sent in the API request, or what is the logic there?

Aka. for my case, I would add response_format to the completion() call and expect that when the model supports it, it is sent, otherwise not.

toniengelhardt avatar Mar 15 '24 11:03 toniengelhardt

makes sense @toniengelhardt

just bump me if you have a repro for this, i'll investigate on my end too

krrishdholakia avatar Mar 19 '24 01:03 krrishdholakia

I haven't ran into this when using response_format on unsupported models.

Manouchehri avatar Apr 12 '24 05:04 Manouchehri

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jan 29 '25 00:01 github-actions[bot]

We experienced something similiar with extra_body input_type using bedrock/amazon.titan-embed-text-v2:0. Input type is supported on vertex embeddings, but we use both.

wallies avatar Jan 29 '25 01:01 wallies

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Apr 30 '25 00:04 github-actions[bot]