[ChatLiteLLM] litellm.UnsupportedParamsError: VertexAI doesn't support tool_choice=any. Supported tool_choice values=['auto', 'required', json object] #29308
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
An error occured for litellm: litellm.UnsupportedParamsError: VertexAI doesn't support tool_choice=any. Supported tool_choice values=['auto', 'required', json object]. To drop it from the call, set `litellm.drop_params = True.
{'raw': AIMessage(content='', additional_kwargs={'function_call': {'name': 'Joke', 'arguments': '{"punchline": "They're always feline good!", "setup": "Why don't cats play poker in the wild?"}'}}, response_metadata={'prompt_feedback': {'block_reason': 0, 'safety_ratings': []}, 'finish_reason': 'STOP', 'safety_ratings': [{'category': 'HARM_CATEGORY_HATE_SPEECH', 'probability': 'NEGLIGIBLE', 'blocked': False}, {'category': 'HARM_CATEGORY_DANGEROUS_CONTENT', 'probability': 'NEGLIGIBLE', 'blocked': False}, {'category': 'HARM_CATEGORY_HARASSMENT', 'probability': 'NEGLIGIBLE', 'blocked': False}, {'category': 'HARM_CATEGORY_SEXUALLY_EXPLICIT', 'probability': 'NEGLIGIBLE', 'blocked': False}]}, id='run-1adbaf9b-ea9f-47f4-bbce-2fd6e93b9a65-0', tool_calls=[{'name': 'Joke', 'args': {'punchline': "They're always feline good!", 'setup': "Why don't cats play poker in the wild?"}, 'id': 'ad13c4ea-ec15-45e6-9c87-91487ed657c5', 'type': 'tool_call'}], usage_metadata={'input_tokens': 91, 'output_tokens': 22, 'total_tokens': 113, 'input_token_details': {'cache_read': 0}}), 'parsed': Joke(setup="Why don't cats play poker in the wild?", punchline="They're always feline good!", rating=None), 'parsing_error': None}
Description
As one can see, it works with ChatGoogleGenerativeAI but it does not work with ChatLiteLLM.
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: