Skip to content
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

Gemini OpenAI API error: Error code: 400 - [{'error': {'code': 400 #913

Open
athuljayaram opened this issue Mar 23, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@athuljayaram
Copy link

Bug Description

i am unable to use gemini api

2025-03-23 16:47:19.869 | ERROR | app.llm:ask_tool:762 - OpenAI API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]
2025-03-23 16:47:19.869 | ERROR | app.llm:ask_tool:768 - API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]
2025-03-23 16:47:21.399 | ERROR | app.llm:ask_tool:762 - OpenAI API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]
2025-03-23 16:47:21.399 | ERROR | app.llm:ask_tool:768 - API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]
2025-03-23 16:47:25.084 | ERROR | app.llm:ask_tool:762 - OpenAI API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]
2025-03-23 16:47:25.084 | ERROR | app.llm:ask_tool:768 - API error: Error code: 400 - [{'error': {'code': 400, 'message': 'Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini', 'status': 'INVALID_ARGUMENT'}}]

Bug solved method

Fix is to be found after determing the issue

Environment information

  • System version:
  • Python version:
  • OpenManus version or branch:
  • Installation method (e.g., pip install -r requirements.txt or pip install -e .):

Extra information

No response

@athuljayaram athuljayaram added the bug Something isn't working label Mar 23, 2025
@HRDI0
Copy link

HRDI0 commented Mar 24, 2025

https://github.com/mannaandpoem/OpenManus/issues/787#issuecomment-2735551810
If you refer to this answer, I think it will probably be resolved.
Pull request #864 proposes a solution by modifying the prompt(in browser_use tool) and token max limits, but that didn't work for me. I had to roll back to a specific version, as the link says.
It seems that this issue occurs especially in Gemini.

@HRDI0
Copy link

HRDI0 commented Mar 24, 2025

For reference, I rolled back to
fb0d1c0
I had the same issue in a similar environment as you and the rollback fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants