failed to add openai key with access to limited models #6110

Closed
opened 2026-02-21 18:14:07 -05:00 by yindo · 2 comments
Owner

Originally created by @liqila on GitHub (Oct 15, 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.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I attempted to add my OpenAI key to my self-hosted Dify but was unsuccessful.
My key only has access to a few models listed below.

  • gpt-4o-mini
  • gpt-4o-mini-2024-07-18
  • text-embedding-3-small
  • text-embedding-3-large
  • text-embedding-ada-002

Here is the error message.
Error code: 403 - {'error': {'message': 'Project proj_MhlSHizxcsefwefwehmzDf0M9e does not have access to model gpt-3.5-turbo', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @liqila on GitHub (Oct 15, 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.9.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I attempted to add my OpenAI key to my self-hosted Dify but was unsuccessful. My key only has access to a few models listed below. - gpt-4o-mini - gpt-4o-mini-2024-07-18 - text-embedding-3-small - text-embedding-3-large - text-embedding-ada-002 Here is the error message. **Error code: 403 - {'error': {'message': 'Project `proj_MhlSHizxcsefwefwehmzDf0M9e ` does not have access to model `gpt-3.5-turbo`', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}** ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 18:14:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 15, 2024):

Hello @liqila! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue!

I found a similar discussion regarding the issue of not finding certain models in the model settings after adding an OpenAI API key. The discussion mentions that some models, like gpt-4o-mini, may not be supported if you are using the Docker version of Dify [1].

For the error code 403 you are encountering, it indicates that the request is denied due to missing access permissions. The error message suggests that the project does not have access to the gpt-3.5-turbo model, which might be a default model Dify tries to access. You should ensure that your Dify configuration is set to use only the models your key has access to. Unfortunately, I couldn't find specific configuration settings in the Dify codebase that specify which OpenAI models are accessible, so you might need to check your Dify settings or documentation for any model configuration options.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 15, 2024): <!-- Greeting --> Hello @liqila! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue! <!-- Answer --> I found a similar discussion regarding the issue of not finding certain models in the model settings after adding an OpenAI API key. The discussion mentions that some models, like `gpt-4o-mini`, may not be supported if you are using the Docker version of Dify <sup>[[1]](https://github.com/langgenius/dify/discussions/6518)</sup>. For the error code 403 you are encountering, it indicates that the request is denied due to missing access permissions. The error message suggests that the project does not have access to the `gpt-3.5-turbo` model, which might be a default model Dify tries to access. You should ensure that your Dify configuration is set to use only the models your key has access to. Unfortunately, I couldn't find specific configuration settings in the Dify codebase that specify which OpenAI models are accessible, so you might need to check your Dify settings or documentation for any model configuration options. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@liqila commented on GitHub (Oct 15, 2024):

Hello @liqila! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue!

I found a similar discussion regarding the issue of not finding certain models in the model settings after adding an OpenAI API key. The discussion mentions that some models, like gpt-4o-mini, may not be supported if you are using the Docker version of Dify [1].

For the error code 403 you are encountering, it indicates that the request is denied due to missing access permissions. The error message suggests that the project does not have access to the gpt-3.5-turbo model, which might be a default model Dify tries to access. You should ensure that your Dify configuration is set to use only the models your key has access to. Unfortunately, I couldn't find specific configuration settings in the Dify codebase that specify which OpenAI models are accessible, so you might need to check your Dify settings or documentation for any model configuration options.

To continue talking to Dosu, mention @dosu.

I did not find the source code where I can change the default openai model. Any thoughts?

@liqila commented on GitHub (Oct 15, 2024): > Hello @liqila! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to solve this issue! > > I found a similar discussion regarding the issue of not finding certain models in the model settings after adding an OpenAI API key. The discussion mentions that some models, like `gpt-4o-mini`, may not be supported if you are using the Docker version of Dify [[1]](https://github.com/langgenius/dify/discussions/6518). > > For the error code 403 you are encountering, it indicates that the request is denied due to missing access permissions. The error message suggests that the project does not have access to the `gpt-3.5-turbo` model, which might be a default model Dify tries to access. You should ensure that your Dify configuration is set to use only the models your key has access to. Unfortunately, I couldn't find specific configuration settings in the Dify codebase that specify which OpenAI models are accessible, so you might need to check your Dify settings or documentation for any model configuration options. > > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._ I did not find the source code where I can change the default openai model. Any thoughts?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6110