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] Unsupported value: 'messages[0].role' does not support 'developer' with this model for o1-preview in Tier 2 #5704

Open
MaySoMusician opened this issue Feb 3, 2025 · 5 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@MaySoMusician
Copy link

MaySoMusician commented Feb 3, 2025

📦 Environment

Other

📌 Version

1.50.0 (self-hosted)

💻 Operating System

Windows

🌐 Browser

Other

🐛 Bug Description

When I try to send a new message to a conversation hosted by "o1-preview" or "o1-mini", I got an error like below.

{
  "error": {
    "code": "unsupported_value",
    "type": "invalid_request_error",
    "param": "messages[0].role",
    "message": "Unsupported value: 'messages[0].role' does not support 'developer' with this model."
  },
  "endpoint": "https://api.openai.com/v1",
  "provider": "openai"
}

Image

I assume that this is likely to be caused by the changes in #5657 .
I got no errors when I was trying the same in v1.49.16.

📷 Recurrence Steps

  1. Select "o1-preview" or "o1-mini" as a model.
  2. Start a conversation.

🚦 Expected Behavior

Got no errors.

📝 Additional Information

If you need to pull my image, run docker pull ghcr.io/maysomusician/lobe-msm-build:1429495, but I believe that this can be caused in the official image.

@MaySoMusician MaySoMusician added the 🐛 Bug Something isn't working | 缺陷 label Feb 3, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 3, 2025
@lobehubbot
Copy link
Member

👀 @MaySoMusician

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Feb 3, 2025

Hey there, @MaySoMusician! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

The error you're encountering with the o1-preview or o1-mini models in version 1.50.0 is due to a change in how system messages are handled. The models now require the role parameter in system messages to be set to developer, which was not the case in version 1.49.16. This change likely stems from modifications introduced in pull request #5657, which altered the system role from user to developer for certain models [1].

To resolve this issue, you may need to adjust the configuration or code to ensure that the role parameter is set correctly for these models. If the Lobe Chat framework does not automatically handle this transformation for your setup, you might need to manually update the role in your implementation.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@arvinxx
Copy link
Contributor

arvinxx commented Feb 3, 2025

@hezhijie0327 看来还是不能用 developer…

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@hezhijie0327 seems to be able to use Developer ...

@Sen-CaPoo
Copy link

Sen-CaPoo commented Feb 3, 2025

@hezhijie0327 看来还是不能用 developer…

@hezhijie0327 提供以下測試結果參考
目前測試結果包含 GPT-4o,GPT-4o-mini,o3-mini 等所有 OpenAI 模型,以下三款模型出現錯誤:

o1 出現以下錯誤訊息:Unsupported value: 'stream' does not support true with this model. Supported values are: false.

o1-mini 出現以下錯誤訊息:Unsupported value: 'messages[0].role' does not support 'developer' with this model.

o1-preview 出現以下錯誤訊息:Unsupported value: 'messages[0].role' does not support 'developer' with this model.

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
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

4 participants