【Dify 1.4.1】【 DockerCompose Deployment 】Fails to Load Specific Model "grok-3-beta" via Grok Proxy #14415

Closed
opened 2026-02-21 19:17:08 -05:00 by yindo · 3 comments
Owner

Originally created by @zyfhg on GitHub (Jun 4, 2025).

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

1.4.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Issue Overview

I'm encountering an issue while configuring a Grok proxy server using Dify 1.4.1 deployed via Docker Compose. Although the model interface communication test was successful, the system reports "Base model grok-3-beta not found" when fetching the model list. However, I've confirmed through API responses that the model does exist, so I'm seeking help to resolve this problem.

Detailed Description

  1. Issue Manifestation
    • When attempting to add "grok-3-beta" in the frontend model page, the system errors with: "Base model grok-3-beta not found"
    • To troubleshoot, I set the log level of the docker-api-1 service to DEBUG and found it handles the relevant logic

Image

Image

  1. Verification Steps
    • I used a curl command to call the /v1/models API, and the response clearly included "grok-3-beta"
    • Further validation with jsonpath queries also confirmed the model's presence in the response
    • The API response was relatively large (~240KB), with only 49 models actually loaded
      curl --location -g --request GET '{{BASE_URL}}/v1/models' \ --header 'Authorization: Bearer your-key' --output response.txt

Image

  1. My Hypotheses
    • Could the issue be due to the large size of the API response, preventing some models like "grok-3-beta" from being properly loaded?
    • Are there any other constraints that might cause Dify to fail recognizing the model despite its presence in the API response?

Environment

  • Dify Version: 1.4.1
  • Deployment: Docker Compose
  • Proxy Server: Grok

My Actions

  1. Encountered an error when adding the model via the frontend
  2. Set the docker-api-1 service log level to DEBUG for tracing
  3. Verified the model's existence using curl and jsonpath
  4. Noticed the large API response size (240KB) and speculated it might cause partial model loading failure

Attachments (Optional)

  • Debug logs from the docker-api-1 service
  • Complete model list from the curl command

docker-api-1.log

response.txt

Most Accurate Bug Description

I believe the error might be related to how Dify processes API results from proxy servers, potentially due to a response size limitation. The /v1/models endpoint does return "grok-3-beta" in a ~240KB response, but Dify's model loading mechanism seems to fail in processing all models, resulting in the "not found" error despite the model existing in the API response. This suggests there might be an issue with how Dify handles large model lists in its current implementation. I'm not certain about the exact cause, but these are my observations and hypotheses based on the troubleshooting steps I've taken so far. Any insights or solutions would be greatly appreciated.

✔️ Expected Behavior

Expected Behavior:
The system should correctly identify and load all models returned by the API, including "grok-3-beta", without any error messages when fetching the model list.

Actual Behavior

Actual Behavior:
The system reports an error "Base model grok-3-beta not found" when attempting to fetch the model list, despite the model being present in the API response.

Originally created by @zyfhg on GitHub (Jun 4, 2025). ### 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 1.4.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce **Issue Overview** I'm encountering an issue while configuring a Grok proxy server using Dify 1.4.1 deployed via Docker Compose. Although the model interface communication test was successful, the system reports "Base model grok-3-beta not found" when fetching the model list. However, I've confirmed through API responses that the model does exist, so I'm seeking help to resolve this problem. **Detailed Description** 1. **Issue Manifestation** - When attempting to add "grok-3-beta" in the frontend model page, the system errors with: "Base model grok-3-beta not found" - To troubleshoot, I set the log level of the docker-api-1 service to DEBUG and found it handles the relevant logic ![Image](https://github.com/user-attachments/assets/16925b1b-af5e-4b03-a7f2-4ff4c5488571) ![Image](https://github.com/user-attachments/assets/2c471a6a-23a3-429a-9279-3b1178b9c00d) 2. **Verification Steps** - I used a curl command to call the `/v1/models` API, and the response clearly included "grok-3-beta" - Further validation with jsonpath queries also confirmed the model's presence in the response - The API response was relatively large (~240KB), with only 49 models actually loaded `curl --location -g --request GET '{{BASE_URL}}/v1/models' \ --header 'Authorization: Bearer your-key' --output response.txt ` ![Image](https://github.com/user-attachments/assets/7bcd6a97-4ba8-4fed-b7f2-518d06727964) 3. **My Hypotheses** - Could the issue be due to the large size of the API response, preventing some models like "grok-3-beta" from being properly loaded? - Are there any other constraints that might cause Dify to fail recognizing the model despite its presence in the API response? **Environment** - Dify Version: 1.4.1 - Deployment: Docker Compose - Proxy Server: Grok **My Actions** 1. Encountered an error when adding the model via the frontend 2. Set the docker-api-1 service log level to DEBUG for tracing 3. Verified the model's existence using curl and jsonpath 4. Noticed the large API response size (240KB) and speculated it might cause partial model loading failure **Attachments (Optional)** - Debug logs from the docker-api-1 service - Complete model list from the curl command [docker-api-1.log](https://github.com/user-attachments/files/20590555/docker-api-1.log) [response.txt](https://github.com/user-attachments/files/20590571/response.txt) ### Most Accurate Bug Description I believe the error might be related to how Dify processes API results from proxy servers, potentially due to a response size limitation. The `/v1/models` endpoint does return "grok-3-beta" in a ~240KB response, but Dify's model loading mechanism seems to fail in processing all models, resulting in the "not found" error despite the model existing in the API response. This suggests there might be an issue with how Dify handles large model lists in its current implementation. I'm not certain about the exact cause, but these are my observations and hypotheses based on the troubleshooting steps I've taken so far. Any insights or solutions would be greatly appreciated. ### ✔️ Expected Behavior Expected Behavior: The system should correctly identify and load all models returned by the API, including "grok-3-beta", without any error messages when fetching the model list. ### ❌ Actual Behavior Actual Behavior: The system reports an error "Base model grok-3-beta not found" when attempting to fetch the model list, despite the model being present in the API response.
yindo added the 🐞 bug label 2026-02-21 19:17:08 -05:00
yindo closed this issue 2026-02-21 19:17:08 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 4, 2025):

Based on your description and the investigation into Dify's model loading mechanism, the error "Base model grok-3-beta not found" is most likely not caused by the large size of the /v1/models API response. Instead, Dify's model recognition is strictly schema-driven: only models explicitly declared in the provider's schema (either as source code or via plugin) are recognized and can be loaded or used. There is no mechanism for Dify to accept arbitrary or unknown model names, even if they appear in the API response from your proxy server. If the provider or the specific model (grok-3-beta) is not referenced in the schema, Dify will not recognize it, resulting in the error you see, regardless of the API response content [source].

To resolve this, ensure that the provider and the grok-3-beta model are correctly defined in the relevant schema files or plugin configuration. Also, check that the model is not marked as deprecated in the schema, as deprecated models are hidden from the list unless already configured [source].

There is no evidence in the code or documentation that large API responses (~240KB) cause partial model loading failures. The model loading process relies on explicit schema definitions and not on the size or content of the remote model list.

If you have confirmed that the model is present in the API response but not in the schema, you will need to update the provider's schema or plugin to include grok-3-beta for Dify to recognize and load it.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 4, 2025): <!-- Answer --> Based on your description and the investigation into Dify's model loading mechanism, the error "Base model grok-3-beta not found" is most likely not caused by the large size of the `/v1/models` API response. Instead, Dify's model recognition is strictly schema-driven: only models explicitly declared in the provider's schema (either as source code or via plugin) are recognized and can be loaded or used. There is no mechanism for Dify to accept arbitrary or unknown model names, even if they appear in the API response from your proxy server. If the provider or the specific model (`grok-3-beta`) is not referenced in the schema, Dify will not recognize it, resulting in the error you see, regardless of the API response content [[source]](https://github.com/langgenius/dify/blob/d22c351221522ed095d02636ac0f7f5aa1286524/api/core/model_runtime/model_providers/model_provider_factory.py). To resolve this, ensure that the provider and the `grok-3-beta` model are correctly defined in the relevant schema files or plugin configuration. Also, check that the model is not marked as deprecated in the schema, as deprecated models are hidden from the list unless already configured [[source]](https://github.com/langgenius/dify/blob/d22c351221522ed095d02636ac0f7f5aa1286524/api/core/model_runtime/docs/en_US/schema.md). There is no evidence in the code or documentation that large API responses (~240KB) cause partial model loading failures. The model loading process relies on explicit schema definitions and not on the size or content of the remote model list. If you have confirmed that the model is present in the API response but not in the schema, you will need to update the provider's schema or plugin to include `grok-3-beta` for Dify to recognize and load it. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1fc1b18e-c4bb-4ebc-8eac-a8d85c71496e?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20650)
Author
Owner

@zyfhg commented on GitHub (Jun 4, 2025):

Hey @dosu,
Thank you for your detailed explanation. I understand now. If I want to proxy a certain service, I need to modify the URL and API in the relevant model service. The issue has been resolved. Thanks again for your help!
Best regards

@zyfhg commented on GitHub (Jun 4, 2025): Hey @dosu, Thank you for your detailed explanation. I understand now. If I want to proxy a certain service, I need to modify the URL and API in the relevant model service. The issue has been resolved. Thanks again for your help! Best regards
Author
Owner

@dosubot[bot] commented on GitHub (Jun 4, 2025):

You're welcome! Happy to help. If you have any more questions or run into other issues, feel free to reach out.

To reply, just mention my name @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 4, 2025): <!-- Answer --> You're welcome! Happy to help. If you have any more questions or run into other issues, feel free to reach out. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f44e30b0-a515-4613-af2c-1e49d3b6fa25?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20650)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14415