404 when using o1-preview model #5578

Closed
opened 2026-02-21 18:11:44 -05:00 by yindo · 3 comments
Owner

Originally created by @lucaseatp on GitHub (Sep 12, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

update to 0.8.1 and try to use o1-preview

✔️ Expected Behavior

o1-preview to run normally

Actual Behavior

Run failed: [openai] Bad Request Error, Error code: 404 - {'error': {'message': 'The model o1-preview does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Originally created by @lucaseatp on GitHub (Sep 12, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.8.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce update to 0.8.1 and try to use o1-preview ### ✔️ Expected Behavior o1-preview to run normally ### ❌ Actual Behavior Run failed: [openai] Bad Request Error, Error code: 404 - {'error': {'message': 'The model o1-preview does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}
yindo closed this issue 2026-02-21 18:11:44 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 12, 2024):

I found a similar issue related to a 404 error when using the o1-preview model in Dify version 0.8.1 with a self-hosted Docker setup. The issue is likely because the Ollama service is not accessible from the Docker container.

To resolve this, you need to expose the Ollama service to the network. Instead of using localhost, you should connect to host.docker.internal in the service URL. Update the Base URL in Dify's settings to:

http://host.docker.internal:11434

This change should make the Ollama service accessible from the Docker container, resolving the 404 error [1].

Additionally, ensure that the Dify container can access the LocalAI endpoint if you are integrating with LocalAI for local model deployment. Use the host IP address instead of localhost. For example, if LocalAI is running on http://127.0.0.1:8080, use the host domain or LAN IP address like http://192.168.1.100:8080 in Dify's settings [2].

For more detailed information on resolving local deployment issues, you can refer to the Self Host / Local Deployment Frequently Asked Questions (FAQs) [3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 12, 2024): <!-- Answer --> I found a similar issue related to a 404 error when using the o1-preview model in Dify version 0.8.1 with a self-hosted Docker setup. The issue is likely because the Ollama service is not accessible from the Docker container. To resolve this, you need to expose the Ollama service to the network. Instead of using `localhost`, you should connect to `host.docker.internal` in the service URL. Update the Base URL in Dify's settings to: ```bash http://host.docker.internal:11434 ``` This change should make the Ollama service accessible from the Docker container, resolving the 404 error <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/model-configuration/ollama.md)</sup>. Additionally, ensure that the Dify container can access the LocalAI endpoint if you are integrating with LocalAI for local model deployment. Use the host IP address instead of `localhost`. For example, if LocalAI is running on `http://127.0.0.1:8080`, use the host domain or LAN IP address like `http://192.168.1.100:8080` in Dify's settings <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/model-configuration/localai.md)</sup>. For more detailed information on resolving local deployment issues, you can refer to the [Self Host / Local Deployment Frequently Asked Questions (FAQs)](https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments) <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/faq/install-faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@laipz8200 commented on GitHub (Sep 12, 2024):

If you're using your own API key, please note that only users with Tier 5 or higher have access to this model.

@laipz8200 commented on GitHub (Sep 12, 2024): If you're using your own API key, please note that only users with Tier 5 or higher have access to this model.
Author
Owner

@laipz8200 commented on GitHub (Sep 12, 2024):

Here is a document: https://platform.openai.com/docs/guides/reasoning

@laipz8200 commented on GitHub (Sep 12, 2024): Here is a document: https://platform.openai.com/docs/guides/reasoning
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5578