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

[Bug]: BadRequestError: DeepseekException - Invalid Message Sequence #6459

Open
1 task
nas-maker opened this issue Jan 25, 2025 · 2 comments
Open
1 task
Labels
bug Something isn't working

Comments

@nas-maker
Copy link

nas-maker commented Jan 25, 2025

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

Encountered the following error :

"litellm.BadRequestError: DeepseekException - Error code: 400 - {'error': {'message': 'deepseek-reasoner does not support successive user or assistant messages (messages[1] and messages[2] in your input). You should interleave the user/assistant messages in the message sequence.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_request_error'}}"

I encounter the error when I use the DeepSeek Reasoner.

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

@enyst
Copy link
Collaborator

enyst commented Jan 25, 2025

Thank you for the report! There is an issue on litellm repo on this: BerriAI/litellm#7972

Meanwhile, can you try to add to the command:

-e AGENT_ENABLE_PROMPT_EXTENSIONS=0

@nas-maker
Copy link
Author

Thanks, it works! ❤️❤️❤️❤️❤️

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