Anthropic API Key can not be validated #424

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

Originally created by @Yunrui11 on GitHub (Jul 5, 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 search for existing issues, 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

web version

Cloud or Self Hosted

Cloud

Steps to reproduce

I downloaded the Anthropic plugin from the marketplace and tried to configure the API. However, the API couldn't be configured because I kept getting a "claude-3-opus-20240229 model not found" error. I googled it and realized that model is currently in a deprecated state. I wanted to unselect that model, but I am not allowed to select any model until I configure the Anthropic API for some reason. I think this is a system glitch for the website version.

✔️ Expected Behavior

I expected to be able to connect to the Anthropic API.

Actual Behavior

Error code: 404 - {'type': 'error', 'error': {'type': 'not_found_error', 'message': 'model: claude-3-opus-20240229'}}

Image Image
Originally created by @Yunrui11 on GitHub (Jul 5, 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 [search for existing issues](https://github.com/langgenius/dify/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 web version ### Cloud or Self Hosted Cloud ### Steps to reproduce I downloaded the Anthropic plugin from the marketplace and tried to configure the API. However, the API couldn't be configured because I kept getting a "claude-3-opus-20240229 model not found" error. I googled it and realized that model is currently in a deprecated state. I wanted to unselect that model, but I am not allowed to select any model until I configure the Anthropic API for some reason. I think this is a system glitch for the website version. ### ✔️ Expected Behavior I expected to be able to connect to the Anthropic API. ### ❌ Actual Behavior Error code: 404 - {'type': 'error', 'error': {'type': 'not_found_error', 'message': 'model: claude-3-opus-20240229'}} <img width="1341" height="580" alt="Image" src="https://github.com/user-attachments/assets/d8834800-dcfd-43a9-844c-5b9235ffc771" /> <img width="1470" height="956" alt="Image" src="https://github.com/user-attachments/assets/5299c369-9563-4d46-a2c8-b398305d4fbf" />
yindo closed this issue 2026-02-16 10:19:23 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 5, 2025):

Hi @Yunrui11! I'm Dosu and I’m helping the dify team.

This error happens because Dify dynamically fetches the list of available Anthropic models from the plugin/provider at runtime. If the default model (in this case, claude-3-opus-20240229) is deprecated or removed by Anthropic, but is still set as the default in Dify's configuration, the API key validation process tries to validate against a model that no longer exists—resulting in the "model not found" error. The UI then blocks you from changing the model until the API is validated, creating a catch-22 situation.

This is a known limitation and an area of active development. There is a recent pull request to improve model selection and address related issues, so improvements are likely coming soon (see PR).

Currently, there isn't a documented workaround from the user side if the default model is deprecated and you can't proceed to select another model. The best options are to wait for the backend/provider to update the default model list, or for the Dify team to roll out the model selection improvements. This issue is not unique to Cloud and could also affect self-hosted instances if the plugin/provider returns deprecated models as defaults.

If you need to proceed urgently, you could try removing and re-adding the Anthropic provider (if possible), or check if the plugin has been updated in the marketplace. Otherwise, keep an eye out for updates to the Anthropic plugin or Dify platform that address this model selection flow.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 5, 2025): <!-- Greeting --> Hi @Yunrui11! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> This error happens because Dify dynamically fetches the list of available Anthropic models from the plugin/provider at runtime. If the default model (in this case, `claude-3-opus-20240229`) is deprecated or removed by Anthropic, but is still set as the default in Dify's configuration, the API key validation process tries to validate against a model that no longer exists—resulting in the "model not found" error. The UI then blocks you from changing the model until the API is validated, creating a catch-22 situation. This is a known limitation and an area of active development. There is a recent pull request to improve model selection and address related issues, so improvements are likely coming soon [(see PR)](https://github.com/langgenius/dify/pull/21208). Currently, there isn't a documented workaround from the user side if the default model is deprecated and you can't proceed to select another model. The best options are to wait for the backend/provider to update the default model list, or for the Dify team to roll out the model selection improvements. This issue is not unique to Cloud and could also affect self-hosted instances if the plugin/provider returns deprecated models as defaults. If you need to proceed urgently, you could try removing and re-adding the Anthropic provider (if possible), or check if the plugin has been updated in the marketplace. Otherwise, keep an eye out for updates to the Anthropic plugin or Dify platform that address this model selection flow. <!-- 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/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/54872ca4-653d-420d-a7cf-7778bdc92601?feedback_type=other)</sup>&nbsp;&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/issues/21961)
Author
Owner

@hjlarry commented on GitHub (Jul 5, 2025):

can you try this pkg https://github.com/langgenius/dify-official-plugins/issues/1201#issuecomment-3029934158

I fixed it but I havn't got a api-key for test, if it works I will submit a new PR

@hjlarry commented on GitHub (Jul 5, 2025): can you try this pkg https://github.com/langgenius/dify-official-plugins/issues/1201#issuecomment-3029934158 I fixed it but I havn't got a api-key for test, if it works I will submit a new PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#424