The <|fim_prefix|> tag of the Qwen2.5-Coder model cannot be recognized by dify. How should I deal with it? #12362

Closed
opened 2026-02-21 19:07:04 -05:00 by yindo · 1 comment
Owner

Originally created by @MinLg on GitHub (Mar 30, 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

0.6.16

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

This is the agent I configured and the content of the request.

Image
However, there are no tags such as <|fim_prefix|> in the model input prompt.

Image
Dify seems to automatically filter | tags. How to modify it?

✔️ Expected Behavior

Dify prompt words input to the model can contain <|fim_prefix|> tags

Actual Behavior

The <|fim_prefix|> tag is automatically filtered by dify

Originally created by @MinLg on GitHub (Mar 30, 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 0.6.16 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce This is the agent I configured and the content of the request. ![Image](https://github.com/user-attachments/assets/444dce65-6f67-48db-a7f2-2e2a3f1f9941) However, there are no tags such as <|fim_prefix|> in the model input prompt. ![Image](https://github.com/user-attachments/assets/caff3d1b-9ea2-409c-a402-1d95f769b072) Dify seems to automatically filter | tags. How to modify it? ### ✔️ Expected Behavior Dify prompt words input to the model can contain <|fim_prefix|> tags ### ❌ Actual Behavior The <|fim_prefix|> tag is automatically filtered by dify
yindo added the 🐞 bug label 2026-02-21 19:07:04 -05:00
yindo closed this issue 2026-02-21 19:07:04 -05:00
Author
Owner

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

@MinLg Hello! I'm here to help you with any bugs, questions, or contributions you have for dify. Let's tackle this issue together!

I found a similar unsolved discussion regarding the <|fim_prefix|> tag not being recognized by Dify. You can view the discussion here [1].

Currently, there is no specific information available on how Dify's prompt orchestration system processes and handles input prompts containing special tags like <|fim_prefix|>. Additionally, there is no documented configuration or setting in Dify that allows the inclusion of such special tags in model input prompts.

If you are looking to customize tag filtering behavior, Dify does offer different filtering modes, including "Manual Mode," which allows for manual configuration of filtering rules. However, this might not directly address the issue with the <|fim_prefix|> tag being filtered out [2][3][4].

You might want to explore the possibility of adjusting the filtering settings or checking if there are any updates or plugins that could support the inclusion of such tags.

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 30, 2025): <!-- Greeting --> @MinLg Hello! I'm here to help you with any bugs, questions, or contributions you have for dify. Let's tackle this issue together! <!-- Answer --> I found a similar unsolved discussion regarding the `<|fim_prefix|>` tag not being recognized by Dify. You can view the discussion [here](https://github.com/langgenius/dify/discussions/16788) <sup>[[1]](https://github.com/langgenius/dify/discussions/16788)</sup>. Currently, there is no specific information available on how Dify's prompt orchestration system processes and handles input prompts containing special tags like `<|fim_prefix|>`. Additionally, there is no documented configuration or setting in Dify that allows the inclusion of such special tags in model input prompts. If you are looking to customize tag filtering behavior, Dify does offer different filtering modes, including "Manual Mode," which allows for manual configuration of filtering rules. However, this might not directly address the issue with the `<|fim_prefix|>` tag being filtered out <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/knowledge-base/integrate-knowledge-within-application.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/knowledge-base/integrate-knowledge-within-application.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/external-knowledge-api-documentation.md)</sup>. You might want to explore the possibility of adjusting the filtering settings or checking if there are any updates or plugins that could support the inclusion of such tags. <!-- 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/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f5384299-514a-44b0-910f-d644685dcb24?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12362