-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid_request_error when using "chat_completions" with triage agent (gemini -> any other model) #237
Comments
using two gemini models works, even though the input_list still has empty call_id ids |
Using two anthropic models works as well, they generate 'call_id' value
|
Yeah looks like this is an issue with Gemini. Specifically, when I ran this curl snippet: https://ai.google.dev/gemini-api/docs/openai#function-calling The response has empty IDs for the tool call:
That is incompatible with openai, anthropic etc. I'm not totally sure how to work around this - any suggestions? |
Maybe for gemini specifically it would be possible to replace call_id with some random id? Feels hacky, but would be really nice to have all of the models available for agents 🙏 |
Describe the question
openai.BadRequestError: Error code: 400 - {'error': {'code': 'invalid_request_error', 'message': "messages.1.content.1.tool_use.id: String should match pattern '^[a-zA-Z0-9_-]+$'", 'type': 'invalid_request_error', 'param': None}}
I get this error when one agent passes it's tool usage info and other stuff to my anthropic agent.
I see that the input looks like this:
[{'content': 'Please search for my memory about smart cities', 'role': 'user'}, {'id': '__fake_id__', 'content': [{'annotations': [], 'text': '\n', 'type': 'output_text'}], 'role': 'assistant', 'status': 'completed', 'type': 'message'}, {'id': '__fake_id__', 'arguments': '{}', 'call_id': '', 'name': 'transfer_to_general_chat_agent', 'type': 'function_call'}, {'call_id': '', 'output': "{'assistant': 'General Chat Agent'}", 'type': 'function_call_output'}]
, and the fake ids are converted to empty strings afterwards, am i doing something wrong?Debug information
v0.0.4
)Repro steps
Ideally provide a minimal python script that can be run to reproduce the issue.
Expected behavior
A clear and concise description of what you expected to happen.
The text was updated successfully, but these errors were encountered: