The declaration column in the plugin_declarations table has values, but the models field is []. #228

Open
opened 2026-02-16 01:15:02 -05:00 by yindo · 1 comment
Owner

Originally created by @imamiao on GitHub (Jan 6, 2026).

Originally assigned to: @fatelei on GitHub.

Self Checks

To make sure we get to you in time, please check the following :)

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

Versions

  1. dify-plugin-daemon Version 0.5.1
  2. dify-api Version 1.11.2
    build in Windows by source code
    Describe the bug
    A clear and concise description of what the bug is.

I’ve handled many Windows path–related issues in dify-plugin-daemon, and now plugins can be downloaded, compiled, and run properly. However, in the dify-plugin database, the declaration field in the plugin_declarations table has values, but the models field is [], which results in 0 models being displayed. I also deployed a set in Docker and copied the models content from there into the corresponding fields, which fixed the 0 models issue. Could this problem still be related to Windows paths?

logs:
PS C:\dify\dify-plugin-daemon-0.5.1\cmd\server> go run .\main.go
2026/01/06 15:25:54 pool.go:34: ?[32m[INFO]init routine pool, size: 1024?[0m
2026/01/06 15:25:55 init.go:107: ?[32m[INFO]dify plugin db initialized?[0m
2026/01/06 15:25:55 manager.go:103: ?[32m[INFO]start plugin manager daemon...?[0m
2026/01/06 15:25:55 init.go:20: ?[32m[INFO]Persistence initialized?[0m
2026/01/06 15:25:55 server_local.go:15: ?[32m[INFO]start to handle new plugins in path: plugin?[0m
2026/01/06 15:25:55 server_local.go:16: ?[32m[INFO]launch plugins with max concurrency: 2?[0m
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

[gnet] 2026-01-06T15:25:55.4190702+08:00 INFO logging/logger.go:256 Launching gnet with 8 event-loops, listening on: tcp://127.0.0.1:5003
[GIN-debug] GET /health/check --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).server.HealthCheck.func4 (4 handlers)
[GIN-debug] HEAD /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func1 (4 handlers)
[GIN-debug] POST /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func2 (4 handlers)
[GIN-debug] GET /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func3 (4 handlers)
[GIN-debug] PUT /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func4 (4 handlers)
[GIN-debug] DELETE /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func5 (4 handlers)
[GIN-debug] OPTIONS /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func6 (4 handlers)
[GIN-debug] POST /plugin/:tenant_id/debugging/key --> github.com/langgenius/dify-plugin-daemon/internal/server/controllers.GetRemoteDebuggingKey (6 handlers)
2026/01/06 15:25:55 logger.go:13: ?[32m[INFO]local runtime starting: langgenius/tongyi:0.1.16@d8bffbe45418f0c117fb3393e5e40e61faee98f9a2183f062e5a280e74b15d21?[0m
[GIN-debug] POST /plugin/:tenant_id/dispatch/agent_strategy/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeAgentStrategy.func5 (9 handlers)
2026/01/06 15:25:55 logger.go:13: ?[32m[INFO]local runtime starting: langgenius/echarts:0.0.1@e390de4320a5ab32ef24899983f84c31aa39e4690c7b294be11f2c10268c3a68?[0m
[GIN-debug] POST /plugin/:tenant_id/dispatch/tool/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTool.func1 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/tool/validate_credentials --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.ValidateToolCredentials.func2 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/tool/get_runtime_parameters --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetToolRuntimeParameters.func3 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/llm/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeLLM.func4 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/llm/num_tokens --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetLLMNumTokens.func5 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/text_embedding/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTextEmbedding.func6 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/multimodal_embedding/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeMultimodalEmbedding.func7 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/text_embedding/num_tokens --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetTextEmbeddingNumTokens.func8 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/rerank/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeRerank.func9 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/multimodal_rerank/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeMultimodalRerank.func10 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/tts/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTTS.func11 (9 handlers)
[GIN-debug] POST /plugin/:tenant_id/dispatch/tts/model/voices --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetTTSModelVoices.func12 (9 handlers)
......
no error!

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Originally created by @imamiao on GitHub (Jan 6, 2026). Originally assigned to: @fatelei on GitHub. **Self Checks** To make sure we get to you in time, please check the following :) - [T ] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/issues), including closed ones. - [T ] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [T ] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [T ] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version 0.5.1 2. dify-api Version 1.11.2 build in Windows by source code **Describe the bug** A clear and concise description of what the bug is. I’ve handled many Windows path–related issues in dify-plugin-daemon, and now plugins can be downloaded, compiled, and run properly. However, in the dify-plugin database, the declaration field in the plugin_declarations table has values, but the models field is [], which results in 0 models being displayed. I also deployed a set in Docker and copied the models content from there into the corresponding fields, which fixed the 0 models issue. Could this problem still be related to Windows paths? logs: PS C:\dify\dify-plugin-daemon-0.5.1\cmd\server> go run .\main.go 2026/01/06 15:25:54 pool.go:34: ?[32m[INFO]init routine pool, size: 1024?[0m 2026/01/06 15:25:55 init.go:107: ?[32m[INFO]dify plugin db initialized?[0m 2026/01/06 15:25:55 manager.go:103: ?[32m[INFO]start plugin manager daemon...?[0m 2026/01/06 15:25:55 init.go:20: ?[32m[INFO]Persistence initialized?[0m 2026/01/06 15:25:55 server_local.go:15: ?[32m[INFO]start to handle new plugins in path: plugin?[0m 2026/01/06 15:25:55 server_local.go:16: ?[32m[INFO]launch plugins with max concurrency: 2?[0m [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env: export GIN_MODE=release - using code: gin.SetMode(gin.ReleaseMode) [gnet] 2026-01-06T15:25:55.4190702+08:00 INFO logging/logger.go:256 Launching gnet with 8 event-loops, listening on: tcp://127.0.0.1:5003 [GIN-debug] GET /health/check --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).server.HealthCheck.func4 (4 handlers) [GIN-debug] HEAD /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func1 (4 handlers) [GIN-debug] POST /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func2 (4 handlers) [GIN-debug] GET /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func3 (4 handlers) [GIN-debug] PUT /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func4 (4 handlers) [GIN-debug] DELETE /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func5 (4 handlers) [GIN-debug] OPTIONS /e/:hook_id/*path --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).endpointGroup.(*App).Endpoint.func6 (4 handlers) [GIN-debug] POST /plugin/:tenant_id/debugging/key --> github.com/langgenius/dify-plugin-daemon/internal/server/controllers.GetRemoteDebuggingKey (6 handlers) 2026/01/06 15:25:55 logger.go:13: ?[32m[INFO]local runtime starting: langgenius/tongyi:0.1.16@d8bffbe45418f0c117fb3393e5e40e61faee98f9a2183f062e5a280e74b15d21?[0m [GIN-debug] POST /plugin/:tenant_id/dispatch/agent_strategy/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeAgentStrategy.func5 (9 handlers) 2026/01/06 15:25:55 logger.go:13: ?[32m[INFO]local runtime starting: langgenius/echarts:0.0.1@e390de4320a5ab32ef24899983f84c31aa39e4690c7b294be11f2c10268c3a68?[0m [GIN-debug] POST /plugin/:tenant_id/dispatch/tool/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTool.func1 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/tool/validate_credentials --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.ValidateToolCredentials.func2 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/tool/get_runtime_parameters --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetToolRuntimeParameters.func3 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/llm/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeLLM.func4 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/llm/num_tokens --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetLLMNumTokens.func5 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/text_embedding/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTextEmbedding.func6 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/multimodal_embedding/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeMultimodalEmbedding.func7 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/text_embedding/num_tokens --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetTextEmbeddingNumTokens.func8 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/rerank/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeRerank.func9 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/multimodal_rerank/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeMultimodalRerank.func10 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/tts/invoke --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.InvokeTTS.func11 (9 handlers) [GIN-debug] POST /plugin/:tenant_id/dispatch/tts/model/voices --> github.com/langgenius/dify-plugin-daemon/internal/server.(*App).setupGeneratedRoutes.GetTTSModelVoices.func12 (9 handlers) ...... no error! **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
yindo added the Windowsbug labels 2026-02-16 01:15:02 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 6, 2026):

This issue is likely related to Windows path handling. The code treats backslashes (\) in file paths as path traversal attempts and may ignore or reject such paths, which can prevent model files from being discovered and loaded on Windows deployments. Make sure all paths in your manifest.yaml and referenced model files use forward slashes (/) instead of backslashes, and check for any invisible formatting or encoding issues (like BOM, CRLF line endings, or tabs) that could affect parsing. The manifest.yaml should list model files under plugins.models as a list of valid relative paths, e.g., models: [provider/xxx.yaml]—these files must exist in your plugin package and be accessible to the daemon. If the manifest or referenced files are missing, malformed, or incorrectly specified, the models field will remain empty, even if the declaration field is populated and no errors appear in the logs. You can find more details about manifest requirements and path handling here and here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 6, 2026): <!-- Answer --> This issue is likely related to Windows path handling. The code treats backslashes (`\`) in file paths as path traversal attempts and may ignore or reject such paths, which can prevent model files from being discovered and loaded on Windows deployments. Make sure all paths in your manifest.yaml and referenced model files use forward slashes (`/`) instead of backslashes, and check for any invisible formatting or encoding issues (like BOM, CRLF line endings, or tabs) that could affect parsing. The manifest.yaml should list model files under `plugins.models` as a list of valid relative paths, e.g., `models: [provider/xxx.yaml]`—these files must exist in your plugin package and be accessible to the daemon. If the manifest or referenced files are missing, malformed, or incorrectly specified, the models field will remain empty, even if the declaration field is populated and no errors appear in the logs. You can find more details about manifest requirements and path handling [here](https://github.com/langgenius/dify-plugin-daemon/issues/540) and [here](https://github.com/langgenius/dify-plugin-daemon/blob/0d1c3abb581f7f6ee520a281010f5fdc66f51594/internal/core/persistence/persistence.go#L15-L176). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b8fec29f-8aa7-42b6-99f3-21cfcf18f019?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20issue%20is%20likely%20related%20to%20Windows%20path%20handling.%20The%20code%20treats%20backslashes%20%28%60%5C%60%29%20in%20file%20paths%20as%20path%20traversal%20attempts%20and%20may%20ignore%20or%20reject%20such%20paths%2C%20which%20can%20prevent%20model%20files%20from%20being%20discovered%20and%20loaded%20on%20Windows%20deployments.%20Make%20sure%20all%20paths%20in%20your%20manifest.yaml%20and%20referenced%20model%20files%20use%20forward%20slashes%20%28%60/%60%29%20instead%20of%20backslashes%2C%20and%20check%20for%20any%20invisible%20formatting%20or%20encoding%20issues%20%28like%20BOM%2C%20CRLF%20line%20endings%2C%20or%20tabs%29%20that%20could%20affect%20parsing.%20The%20manifest.yaml%20should%20list%20model%20files%20under%20%60plugins.models%60%20as%20a%20list%20of%20valid%20relative%20paths%2C%20e.g.%2C%20%60models%3A%20%5Bprovider/xxx.yaml%5D%60%E2%80%94these%20files%20must%20exist%20in%20your%20plugin%20package%20and%20be%20accessible%20to%20the%20daemon.%20If%20the%20manifest%20or%20referenced%20files%20are%20missing%2C%20malformed%2C%20or%20incorrectly%20specified%2C%20the%20models%20field%20will%20remain%20empty%2C%20even%20if%20the%20declaration%20field%20is%20populated%20and%20no%20errors%20appear%20in%20the%20logs.%20You%20can%20find%20more%20details%20about%20manifest%20requirements%20and%20path%20handling%20%5Bhere%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/issues/540%29%20and%20%5Bhere%5D%28https%3A//github.com/langgenius/dify-plugin-daemon/blob/0d1c3abb581f7f6ee520a281010f5fdc66f51594/internal/core/persistence/persistence.go%23L15-L176%29.)&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-plugin-daemon/issues/556)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#228