mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
dify tongyi api-key api 400 bad request #867
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 @kww12138 on GitHub (Dec 11, 2025).
Self Checks
Dify version
1.11
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
{
"code": "invalid_param",
"message": "slice indices must be integers or None or have an index method",
"status": 400
}
api : https://aiyandu.cn:5678/console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi/credentials
✔️ Expected Behavior
setup tong yi qian wen 's api-key as normal
❌ Actual Behavior
When I upgrade dify version from 1.4.3 to 1.11, I cannot setup tong yi qian wen 's api-key , dify response 400 bad request from api. Details are as follows :
{
"code": "invalid_param",
"message": "slice indices must be integers or None or have an index method",
"status": 400
}
api : https://aiyandu.cn:5678/console/api/workspaces/current/model-providers/langgenius/tongyi/tongyi/credentials
@crazywoola commented on GitHub (Dec 11, 2025):
Please provide the plugin version as well.
@dosubot[bot] commented on GitHub (Dec 11, 2025):
This error is usually caused by a type mismatch in the plugin's backend code—specifically, the code tries to slice a list of prompt messages, but receives an unexpected type (not a list), often due to a malformed payload or missing dependencies in the plugin daemon's Python environment. This is a known issue with the Tongyi plugin in Dify 1.11, especially after upgrades or changes to the plugin environment.
Here’s how you can troubleshoot and often resolve it:
.venvdirectory. If any are missing, install them manually and restart the plugin daemon.If the error persists, monitor the plugin daemon logs for silent failures or malformed responses, as these are often the root cause of this slice index error. More details and step-by-step instructions are available in this related issue.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@crazywoola commented on GitHub (Dec 11, 2025):
Should be fixed in linked PR