mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Tongyi plugin reject new API-KEY #449
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 @rASONIC on GitHub (Jul 15, 2025).
Self Checks
Dify version
1.6.0
Cloud or Self Hosted
Cloud
Steps to reproduce
✔️ Expected Behavior
❌ Actual Behavior
@dosubot[bot] commented on GitHub (Jul 15, 2025):
Hi @rASONIC! I'm Dosu and I’m helping the dify team.
This looks like a combination of a frontend UI bug and strict backend validation. The green API-KEY indicator is controlled by frontend logic and may only check if the field is non-empty, not if the key is actually valid—so it can show green even when the backend rejects the key as invalid. Recent frontend changes now require both the name and key fields to be non-empty and trimmed for the indicator to work as expected, but this doesn't guarantee backend acceptance if the key format or provider config is off [source].
On the backend, Tongyi API key validation is strict and expects a specific format (often starting with
sk-). If the key doesn't match, or if there's a mismatch in provider config or endpoint, the backend will reject it—even if the UI indicator is green. There are no hardcoded keys; everything is modular and expects correct registration and format.Known workarounds from similar issues include: double-checking the API key format, ensuring both the name and key fields are filled and trimmed, and sometimes downgrading the plugin version (though this hasn't consistently resolved the issue in recent cloud versions). If the problem persists, it's likely a UI/backend sync bug or a backend validation change that the frontend doesn't reflect yet. Collecting backend logs or error messages could help pinpoint the root cause, especially since this is a cloud deployment.
If you have access, try to confirm the exact API key format expected by the backend and ensure the plugin config matches. If not, this may need a patch to better sync frontend indicator logic with backend validation results.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@rASONIC commented on GitHub (Jul 15, 2025):
@dosu.
@dosubot[bot] commented on GitHub (Jul 15, 2025):
Thanks for confirming the API keys are correct and start with "sk-". Based on the code and recent changes, the backend validation for Tongyi keys is strict but hasn't changed its expected format—just "sk-" and a valid key. The Dify backend delegates the actual check to the Tongyi plugin, which does a real API request to verify the key. If all new keys are rejected, even after trying multiple accounts and plugin versions, the most likely causes are:
There are no new required fields or breaking changes in the Dify code for Tongyi key validation, and no direct workarounds documented for this specific cloud issue. If you have access to backend logs or error details, those could help pinpoint if it's a plugin, network, or upstream API problem. Otherwise, this may require a fix or update on the cloud platform side, especially if plugin installation or validation policies have changed recently [source].
Let me know if you have any backend error messages or logs—those would help narrow it down further.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@flyingfishzxf commented on GitHub (Jul 15, 2025):
Yes, I encountered the same issue, please fix asap, thanks
@rASONIC commented on GitHub (Jul 15, 2025):
@flyingfishzxf
Try plugin 0.025
@flyingfishzxf commented on GitHub (Jul 16, 2025):
Thank you, 0.025 works. But I encounter another problem, when I select the model which support
Structure Outputin LLM node, the switch ofOutput Variables Structuredalways display a warning thatThe current model does not support this feature...@crazywoola commented on GitHub (Jul 17, 2025):
If you obtain the key from "百炼", you should not use the "international endpoint".
I have tested it without problems.