mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Cannot add model to OpenAI-API-compatible #797
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @simpsonyang on GitHub (Nov 11, 2025).
Self Checks
Dify version
1.9.2
Plugin version
0.0.24
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I add models to OpenAI-API-compatible, but there is no model list under it.
I get the error log from docker.
,
✔️ Error log
2025-11-11 13:19:34.091 INFO [Dummy-5022] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:35.477 INFO [Dummy-5022] [_client.py:1038] - HTTP Request: POST http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/dispatch/model/validate_model_credentials "HTTP/1.1 200 OK"
2025-11-11 13:19:35.670 INFO [Dummy-5023] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.071 INFO [Dummy-5024] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.116 INFO [Dummy-5025] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.118 INFO [Dummy-5026] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.154 INFO [Dummy-5027] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.156 INFO [Dummy-5028] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/management/models?page=1&page_size=256 "HTTP/1.1 200 OK"
2025-11-11 13:19:36.644 INFO [Dummy-5027] [_client.py:1038] - HTTP Request: POST http://plugin_daemon:5002/plugin/97098ea7-f8e8-4ba4-a25b-bb1d22ccc1ec/dispatch/model/schema "HTTP/1.1 200 OK"
2025-11-11 13:19:36.646 ERROR [Dummy-5027] [base.py:271] - Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"args\":{},\"error_type\":\"ValueError\",\"message\":\"invalid literal for int() with base 10: '131,072'\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
2025-11-11 13:19:36.647 WARNING [Dummy-5027] [provider_configuration.py:1737] - get custom model schema failed, req_id: 1fa8c2df71 PluginInvokeError: {"args":{},"error_type":"ValueError","message":"invalid literal for int() with base 10: '131,072'"}
@dosubot[bot] commented on GitHub (Nov 11, 2025):
The error happens because the Dify core tries to convert a string like
'131,072'(with a comma) to an integer, but Python'sint()can't handle commas. This parsing isn't handled in the plugin code—it happens in the main Dify server when it validates model schemas or credentials. There’s currently no sanitization to strip commas before conversion, so any numeric field with a thousands separator will trigger this bug.Recent Dify updates have added some sanitization for complex default values in plugin parameters, but not specifically for numbers with commas. To avoid this error, make sure any numeric values in your model configuration are plain numbers (e.g.,
131072instead of'131,072'). If you control the schema or config, remove any formatting from numeric fields before submitting them to Dify.This issue should ideally be fixed in the Dify core by sanitizing numeric inputs before parsing. For now, manual cleanup of number formatting is the best workaround.
Reference:
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@hjlarry commented on GitHub (Nov 11, 2025):
I can't reproduce this issue, which model did you add?
@simpsonyang commented on GitHub (Nov 12, 2025):
Thanks for you reminder, I realized that the number "131,072" is the context length i copied. I stripped the comma and try again, but failed again, the log shows the same error. I even tried reinstall the plugin and modified the number to another value, but nothing changed. The weird thing is, no matter what i do, the log shows the same number.
@dosubot[bot] commented on GitHub (Nov 29, 2025):
Hi, @simpsonyang. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!