Welcome to Portkey Forum

Updated last year

also getting this error: invalid value for 'tool_choice'

Also getting this error:
Plain Text
error
Error: Invalid value for 'tool_choice': 'tool_choice' is only allowed when 'tools' are specified.

whereas not using any tool etc, just plain Portkey Model
V
d
v
14 comments
Maybe refresh once and check.. not able to replicate this. cc @Sabbyasachi
Still giving the same error
Can you share screenshot of the prompt screen? Also check the Advanced Parameters once - maybe tool choice is enabled there by some fluke
sure, dont see any advanced parameters liks tool choice, where do I see this?
maybe try to do a hard refresh
Attachment
image.png
Oh you'll only see it if you have put in some value for Tool
Checking this as well
Dont see these tools
Also would like if we can keep "None" as default
Tried refreshing
Hey. We noticed a bug where even when there were no tools added, we were sending tool_choice as "none" which is compliant as per openAI docs. But somehow when we do this, openAI throws the error that you are getting. So we have pushed a fix to remove tool_choice from the body when there are no tool present. Can you please do a hard refresh and try once?
Add a reply
Sign up and join the conversation on Discord