Text Generator Application to Embedding In Websites Error #12223

Closed
opened 2026-02-21 19:06:26 -05:00 by yindo · 6 comments
Owner

Originally created by @lifw555 on GitHub (Mar 27, 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.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

error message: Please check if your app mode matches the right API route.

Image

Image

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @lifw555 on GitHub (Mar 27, 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.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce error message: Please check if your app mode matches the right API route. ![Image](https://github.com/user-attachments/assets/3b8c9115-1a66-479f-90c1-fbc7fce9f668) ![Image](https://github.com/user-attachments/assets/3acbe818-facb-441a-aaff-1d22bba64fdd) ![Image](https://github.com/user-attachments/assets/466c97c5-226c-44eb-9686-5678ac3ed3f4) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 buggood first issue labels 2026-02-21 19:06:26 -05:00
yindo closed this issue 2026-02-21 19:06:26 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 27, 2025):

Hello @lifw555! I'm here to help you with bugs, answer questions, and guide you on becoming a contributor. Let's tackle this issue together!

I found a similar closed issue where the error was resolved by ensuring that the app mode matched the correct API route. The solution involved changing the URL in the generated embed code to match the app mode. For text generation applications, you should use the completion-messages API route. Make sure your API calls are configured correctly for the text generation app mode [1][2].

Additionally, you can refer to the Dify documentation for embedding applications into websites, which provides guidance on configuring the window.difyChatbotConfig object and customizing the iframe settings [3][4].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Mar 27, 2025): <!-- Greeting --> Hello @lifw555! I'm here to help you with bugs, answer questions, and guide you on becoming a contributor. Let's tackle this issue together! <!-- Answer --> I found a similar closed issue where the error was resolved by ensuring that the app mode matched the correct API route. The solution involved changing the URL in the generated embed code to match the app mode. For text generation applications, you should use the `completion-messages` API route. Make sure your API calls are configured correctly for the text generation app mode <sup>[[1]](https://github.com/langgenius/dify/issues/10830)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/10792)</sup>. Additionally, you can refer to the Dify documentation for embedding applications into websites, which provides guidance on configuring the `window.difyChatbotConfig` object and customizing the iframe settings <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-publishing/README.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-publishing/embedding-in-websites.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b74a8c45-28f4-4b44-8d6b-6e1860169f47?feedback_type=other)</sup>
Author
Owner

@lifw555 commented on GitHub (Mar 27, 2025):

@dosu

All operations are completed by clicking on the relevant functions on the web page. Is this a page bug?

@lifw555 commented on GitHub (Mar 27, 2025): @dosu All operations are completed by clicking on the relevant functions on the web page. Is this a page bug?
Author
Owner

@dosubot[bot] commented on GitHub (Mar 27, 2025):

The error message you're encountering, "Please check if your app mode matches the right API route," suggests that there might be a mismatch between the app mode and the API route being used. This is not necessarily a page bug but rather a configuration issue.

Ensure that the API routes you are using correspond to the correct app mode. For example, if you are working with a text generation application, you should use the completion-messages API route. Double-check the embed code and any API calls to confirm they are correctly configured for the specific app mode you are using [1].

If the issue persists despite correct configuration, it might be worth checking for any known bugs in the current version of Dify you are using. However, based on the information provided, this seems more like a configuration issue rather than a bug in the web page itself.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Mar 27, 2025): <!-- Answer --> The error message you're encountering, "Please check if your app mode matches the right API route," suggests that there might be a mismatch between the app mode and the API route being used. This is not necessarily a page bug but rather a configuration issue. Ensure that the API routes you are using correspond to the correct app mode. For example, if you are working with a text generation application, you should use the `completion-messages` API route. Double-check the embed code and any API calls to confirm they are correctly configured for the specific app mode you are using <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/app/error.py)</sup>. If the issue persists despite correct configuration, it might be worth checking for any known bugs in the current version of Dify you are using. However, based on the information provided, this seems more like a configuration issue rather than a bug in the web page itself. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/81b7b017-6209-47c1-95ec-98089d2ac9c7?feedback_type=other)</sup>
Author
Owner

@gstrat88 commented on GitHub (Mar 27, 2025):

Change the chatbot part of the url to completion

the error is caused from here

https://github.com/langgenius/dify/blob/ea1d45942399ca08ca2a5ce411eb792ded4b676c/api/controllers/service_api/app/conversation.py#L27

altough i believe completion is not meant to be used as embed

@gstrat88 commented on GitHub (Mar 27, 2025): Change the chatbot part of the url to completion the error is caused from here https://github.com/langgenius/dify/blob/ea1d45942399ca08ca2a5ce411eb792ded4b676c/api/controllers/service_api/app/conversation.py#L27 altough i believe completion is not meant to be used as embed
Author
Owner

@crazywoola commented on GitHub (Mar 28, 2025):

altough i believe completion is not meant to be used as embed

Yes

@crazywoola commented on GitHub (Mar 28, 2025): > altough i believe completion is not meant to be used as embed Yes
Author
Owner

@lifw555 commented on GitHub (Mar 30, 2025):

ok,thanks

@lifw555 commented on GitHub (Mar 30, 2025): ok,thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12223