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] Azure OpenAI o1-mini not support? #5885

Closed
YizhixiaoMoJun opened this issue Feb 8, 2025 · 9 comments · Fixed by #6222
Closed

[Bug] Azure OpenAI o1-mini not support? #5885

YizhixiaoMoJun opened this issue Feb 8, 2025 · 9 comments · Fixed by #6222
Labels
azure 🐛 Bug Something isn't working | 缺陷 released

Comments

@YizhixiaoMoJun
Copy link

YizhixiaoMoJun commented Feb 8, 2025

📦 Environment

Docker

📌 Version

v1.49.12

💻 Operating System

Ubuntu

🌐 Browser

Chrome

🐛 Bug Description

connect to azure openai o1-mini model failed with this error, while others model (4o, 4o-mini) could work as expected.
the configuration looks like: AZURE_MODEL_LIST: gpt-4o->gpt-4o=gpt-4o,gpt-4o-mini->gpt-4o-mini=gpt-4o-mini,o1-mini->o1-mini=o1-mini

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

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

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

👀 @YizhixiaoMoJun

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 8, 2025

Hey @YizhixiaoMoJun! I'm here to assist with bugs, questions, and contributions. Let's tackle this together while we wait for a human maintainer.

The Azure OpenAI o1-mini model does not support the 'system' role in the configuration. Instead, it requires the system role message to use "role": "developer". Using the standard system role results in an "unsupported value" error [1].

To continue talking to Dosu, mention @dosu.


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

@dosubot dosubot bot added the azure label Feb 8, 2025
@Sen-CaPoo
Copy link

請更新至版本 v1.50.2
#5714

@wolph
Copy link

wolph commented Feb 15, 2025

As a workaround you can use litellm to create a proxy that behaves like OpenAI. That way LobeChat will think it is talking to OpenAI o1/o3 (mini) and it will work.

@arvinxx
Copy link
Contributor

arvinxx commented Feb 15, 2025

@wolph try with the latest version? I think it should be fixed

@wolph
Copy link

wolph commented Feb 15, 2025

@wolph try with the latest version? I think it should be fixed

Unfortunately not. I think Lobe-Chat assumes that the model name and the deployment name are identical which is not always the case and in this case I cannot modify it.

I'm not entirely sure what is currently happening, whenever I press generate/regenerate it just appears to be loading for a long time but never generates any results. The logs don't give any output either.

@YizhixiaoMoJun
Copy link
Author

Version v1.60.4 has same issue.

{
  "error": {
    "status": 400,
    "headers": {
      "apim-request-id": "8aa27550-8a1f-4a6d-8cb5-342662685a4e",
      "azureml-model-session": "d034-20250212090334",
      "content-length": "221",
      "content-type": "application/json",
      "date": "Mon, 17 Feb 2025 09:52:19 GMT",
      "ms-azureml-model-error-reason": "model_error",
      "ms-azureml-model-error-statuscode": "400",
      "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
      "x-content-type-options": "nosniff",
      "x-envoy-upstream-service-time": "247",
      "x-ms-client-request-id": "8aa27550-8a1f-4a6d-8cb5-342662685a4e",
      "x-ms-rai-invoked": "true",
      "x-ms-region": "East US 2",
      "x-ratelimit-remaining-requests": "63",
      "x-ratelimit-remaining-tokens": "639984",
      "x-request-id": "ebbee39e-7fec-48ae-a503-4bafa8f5d6dc"
    },
    "request_id": "ebbee39e-7fec-48ae-a503-4bafa8f5d6dc",
    "error": {
      "message": "Unsupported value: 'messages[0].role' does not support 'system' with this model.",
      "type": "invalid_request_error",
      "param": "messages[0].role",
      "code": "unsupported_value"
    },
    "code": "unsupported_value",
    "param": "messages[0].role",
    "type": "invalid_request_error"
  },
  "endpoint": "https://***.openai.azure.com/",
  "provider": "azure"
}

@lobehubbot
Copy link
Member

@YizhixiaoMoJun

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 1.62.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure 🐛 Bug Something isn't working | 缺陷 released
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants