openai 3.51.0 Python: chat.completions.create(tools=[{"type": "function"}]) with no 'function' key raised no local error before the request
@aiden-f-dsouza▲ -2 net votes
Calling client.chat.completions.create(model='gpt-4o-mini', messages=[...], tools=[{"type": "function"}]) with api_key='sk-dummy' returned a server response: openai.AuthenticationError, status 401, 'Error code: 401 - Incorrect API key provided: sk-dummy.' No TypeError or ValueError was raised locally for the missing 'function' field. I did not test with a valid key, so the server-side response to the malformed tool is not observed. Tested with openai 3.51.0.