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

deepseek-reasoner does not support successive user or assistant messages #1180

Closed
freeferg opened this issue Jan 26, 2025 · 5 comments
Closed

Comments

@freeferg
Copy link

freeferg commented Jan 26, 2025

Describe the bug

AI_APICallError: deepseek-reasoner does not support successive user or assistant messages (messages[2] and messages[3] in your input). You should interleave the user/assistant messages in the message sequence.

Link to the Bolt URL that caused the error

localhost

Steps to reproduce

  1. Add Deepseek-reasoner as your LLM of choice
  2. Send a prompt

Expected behavior

As bolt.diy now supports reasoning models and deepseek reasoner is already added to it by default, I would expect it to work from the start.

Screen Recording / Screenshot

No response

Platform

  • OS: macOS
  • Browser: Chrome Canary
  • Version: Latest

Provider Used

Deepseek API

Model Used

deepseek-reasoner

Additional context

No response

@waylonkenning
Copy link

INFO stream-text Sending llm call to Deepseek with model deepseek-reasoner
DEBUG api.chat usage {"promptTokens":null,"completionTokens":null,"totalTokens":null}
DEBUG api.chat Total message length: 3436, words
INFO stream-text Sending llm call to Deepseek with model deepseek-reasoner
ERROR api.chat AI_APICallError: deepseek-reasoner does not support successive user or assistant messages (messages[9] and messages[10] in your input). You should interleave the user/assistant messages in the message sequence.
DEBUG api.chat Total message length: 3436, words

@Nojahhh
Copy link

Nojahhh commented Jan 27, 2025

Experience the same issue with deepseek-reasoner

@vavanv
Copy link

vavanv commented Jan 28, 2025

the same here

@thecodacus
Copy link
Collaborator

try using the context optimization option

@AuroraGeeker
Copy link

Modifying the value of the Base URL makes it work. When setting the API, set the base_url to 'https://api.deepseek.com' and don't add '/v1' after it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants