[tongyi] Incorrect model credentials provided, please check and try again. #873

Closed
opened 2026-02-16 10:20:48 -05:00 by yindo · 2 comments
Owner

Originally created by @enternal111 on GitHub (Dec 11, 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 Dify issues & Dify Official Plugins, 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

latest

Plugin version

tongyi 0.1.7

Cloud or Self Hosted

Cloud

Steps to reproduce

llm node run with an error:[tongyi] Incorrect model credentials provided, please check and try again.
create the apikey in day 12.11 and it works,but find the error in 12.12.the key is not expired, revoked, or not updated in the plugin,checkd with ali
use the deepseek r1 model in ali bailian,api key has been proved normal checked with ali,supposed to be caused by dify or the tongyi plugin?
renew an api key in bailian ,update in tongyi plugin,and it works.

✔️ Error log

[tongyi] Incorrect model credentials provided, please check and try again.

Originally created by @enternal111 on GitHub (Dec 11, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 latest ### Plugin version tongyi 0.1.7 ### Cloud or Self Hosted Cloud ### Steps to reproduce llm node run with an error:[tongyi] Incorrect model credentials provided, please check and try again. create the apikey in day 12.11 and it works,but find the error in 12.12.the key is not expired, revoked, or not updated in the plugin,checkd with ali use the deepseek r1 model in ali bailian,api key has been proved normal checked with ali,supposed to be caused by dify or the tongyi plugin? renew an api key in bailian ,update in tongyi plugin,and it works. ### ✔️ Error log [tongyi] Incorrect model credentials provided, please check and try again.
yindo added the bug label 2026-02-16 10:20:48 -05:00
yindo closed this issue 2026-02-16 10:20:48 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 11, 2025):

The "[tongyi] Incorrect model credentials provided" error in Dify Cloud with the Tongyi plugin is most often caused by credential caching and validation logic in the Dify backend, not by the Tongyi plugin itself or the Ali Bailian API key. When you update or rotate your API key, Dify may continue using a cached (stale) credential for up to 24 hours unless you explicitly update or switch the credential in the UI, which triggers a cache clear and forces the new key to be used immediately. This explains why your renewed key worked after you updated it in the plugin config—manual update invalidates the cache and resolves the error.

Other common causes include mismatches between the API key region (domestic vs international) and the plugin's endpoint setting (use_international_endpoint), or stricter backend validation that expects keys in a specific format (often starting with sk-). Recent changes also require new fields like auth_method in some credential forms, so missing or misconfigured fields can trigger similar errors [source].

For best results: always update or re-save your credentials in the Dify UI after rotating or renewing your API key, double-check that your endpoint matches your key's region, and ensure all required fields are filled. If you see this error again after a key change, updating the credential in the UI should resolve it immediately [source].

If you recently upgraded Dify or the plugin, check for new required fields in the credential form and fill them in as needed [source].

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 (Dec 11, 2025): <!-- Answer --> The "[tongyi] Incorrect model credentials provided" error in Dify Cloud with the Tongyi plugin is most often caused by credential caching and validation logic in the Dify backend, not by the Tongyi plugin itself or the Ali Bailian API key. When you update or rotate your API key, Dify may continue using a cached (stale) credential for up to 24 hours unless you explicitly update or switch the credential in the UI, which triggers a cache clear and forces the new key to be used immediately. This explains why your renewed key worked after you updated it in the plugin config—manual update invalidates the cache and resolves the error. Other common causes include mismatches between the API key region (domestic vs international) and the plugin's endpoint setting (`use_international_endpoint`), or stricter backend validation that expects keys in a specific format (often starting with `sk-`). Recent changes also require new fields like `auth_method` in some credential forms, so missing or misconfigured fields can trigger similar errors [[source](https://github.com/langgenius/dify-official-plugins/issues/2236)]. For best results: always update or re-save your credentials in the Dify UI after rotating or renewing your API key, double-check that your endpoint matches your key's region, and ensure all required fields are filled. If you see this error again after a key change, updating the credential in the UI should resolve it immediately [[source](https://github.com/langgenius/dify-official-plugins/issues/1936)]. If you recently upgraded Dify or the plugin, check for new required fields in the credential form and fill them in as needed [[source](https://github.com/langgenius/dify-official-plugins/pull/2220)]. <!-- 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/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/509f6938-10da-403b-b244-dda4a5e717e1?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22%5Btongyi%5D%20Incorrect%20model%20credentials%20provided%22%20error%20in%20Dify%20Cloud%20with%20the%20Tongyi%20plugin%20is%20most%20often%20caused%20by%20credential%20caching%20and%20validation%20logic%20in%20the%20Dify%20backend%2C%20not%20by%20the%20Tongyi%20plugin%20itself%20or%20the%20Ali%20Bailian%20API%20key.%20When%20you%20update%20or%20rotate%20your%20API%20key%2C%20Dify%20may%20continue%20using%20a%20cached%20%28stale%29%20credential%20for%20up%20to%2024%20hours%20unless%20you%20explicitly%20update%20or%20switch%20the%20credential%20in%20the%20UI%2C%20which%20triggers%20a%20cache%20clear%20and%20forces%20the%20new%20key%20to%20be%20used%20immediately.%20This%20explains%20why%20your%20renewed%20key%20worked%20after%20you%20updated%20it%20in%20the%20plugin%20config%E2%80%94manual%20update%20invalidates%20the%20cache%20and%20resolves%20the%20error.%0A%0AOther%20common%20causes%20include%20mismatches%20between%20the%20API%20key%20region%20%28domestic%20vs%20international%29%20and%20the%20plugin%27s%20endpoint%20setting%20%28%60use_international_endpoint%60%29%2C%20or%20stricter%20backend%20validation%20that%20expects%20keys%20in%20a%20specific%20format%20%28often%20starting%20with%20%60sk-%60%29.%20Recent%20changes%20also%20require%20new%20fields%20like%20%60auth_method%60%20in%20some%20credential%20forms%2C%20so%20missing%20or%20misconfigured%20fields%20can%20trigger%20similar%20errors%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2236%29%5D.%0A%0AFor%20best%20results%3A%20always%20update%20or%20re-save%20your%20credentials%20in%20the%20Dify%20UI%20after%20rotating%20or%20renewing%20your%20API%20key%2C%20double-check%20that%20your%20endpoint%20matches%20your%20key%27s%20region%2C%20and%20ensure%20all%20required%20fields%20are%20filled.%20If%20you%20see%20this%20error%20again%20after%20a%20key%20change%2C%20updating%20the%20credential%20in%20the%20UI%20should%20resolve%20it%20immediately%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1936%29%5D.%0A%0AIf%20you%20recently%20upgraded%20Dify%20or%20the%20plugin%2C%20check%20for%20new%20required%20fields%20in%20the%20credential%20form%20and%20fill%20them%20in%20as%20needed%20%5B%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/2220%29%5D.)&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-official-plugins/issues/2243)
Author
Owner

@hjlarry commented on GitHub (Dec 17, 2025):

please try 0.1.10 version

@hjlarry commented on GitHub (Dec 17, 2025): please try 0.1.10 version
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#873