404 NOT_FOUND for Gemini embedding models. #954

Open
opened 2026-02-16 10:21:06 -05:00 by yindo · 5 comments
Owner

Originally created by @MrunalSinagde on GitHub (Jan 28, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Error appears for models such as:

  • embedding-001
  • gemini-embedding-exp-03-07
  • text-embedding-004

Even though:

  • API key and billing remain unchanged
  • Dify containers have not been updated
  • The issue started suddenly

Steps to Reproduce

  1. Configure Google Gemini in Model Providers
  2. Set embedding model to one of the provided model names
  3. Use Knowledge Base embedding or upload documents
  4. Error: 404 NOT_FOUND: Model not found

✔️ Expected Behavior

The embedding should be carried out without any errors

Actual Behavior

Error:
404 NOT_FOUND, message: 'Model is not found: models/model name'

Originally created by @MrunalSinagde on GitHub (Jan 28, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.7.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Error appears for models such as: - `embedding-001` - `gemini-embedding-exp-03-07` - `text-embedding-004` Even though: - API key and billing remain unchanged - Dify containers have not been updated - The issue started suddenly ### Steps to Reproduce 1. Configure Google Gemini in Model Providers 2. Set embedding model to one of the provided model names 3. Use Knowledge Base embedding or upload documents 4. Error: `404 NOT_FOUND: Model not found` ### ✔️ Expected Behavior The embedding should be carried out without any errors ### ❌ Actual Behavior Error: 404 NOT_FOUND, message: 'Model is not found: models/model name'
yindo added the bug label 2026-02-16 10:21:06 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 28, 2026):

This 404 error is a known issue and is almost always caused by changes on the provider/plugin side—specifically, Google deprecating or renaming Gemini model IDs, or requiring the API version to be set to v1 instead of v1beta discussion issue. Dify fetches the list of supported Gemini models dynamically from the plugin daemon, so if Google or the plugin updates the available models, old names like embedding-001 or gemini-embedding-exp-03-07 will suddenly return 404s.

How to fix:

  1. Update your model names: Use only currently supported Gemini model IDs, such as gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash, or text-embedding-004. Avoid deprecated names like gemini-pro or embedding-001 discussion.
  2. Set API version to v1: In your Docker .env or environment, make sure GOOGLE_API_VERSION=v1 (not v1betadiscussion.
  3. Update or reinstall the Gemini plugin: Go to the Dify plugin marketplace, remove the Gemini plugin, and reinstall or update it to the latest version. This pulls the latest model list and fixes known bugs issue.
  4. Restart your containers: After any change to environment variables or plugins, restart your Docker containers to apply the changes.
  5. Check available models: Use the ListModels API or run:
    curl "https://generativelanguage.googleapis.com/v1/models?key=YOUR_API_KEY"
    
    to see which models your API key can access.

If you still get 404 errors after these steps, double-check that your Google Cloud project has the Generative AI API enabled, billing is active, and your API key has access to the models you want to use discussion.

For more details and troubleshooting, see the related issue and discussion.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 28, 2026): <!-- Answer --> This 404 error is a known issue and is almost always caused by changes on the provider/plugin side—specifically, Google deprecating or renaming Gemini model IDs, or requiring the API version to be set to `v1` instead of `v1beta` [discussion](https://github.com/langgenius/dify/discussions/17263#discussioncomment-15347160) [issue](https://github.com/langgenius/dify/issues/14352). Dify fetches the list of supported Gemini models dynamically from the plugin daemon, so if Google or the plugin updates the available models, old names like `embedding-001` or `gemini-embedding-exp-03-07` will suddenly return 404s. **How to fix:** 1. **Update your model names**: Use only currently supported Gemini model IDs, such as `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, or `text-embedding-004`. Avoid deprecated names like `gemini-pro` or `embedding-001` [discussion](https://github.com/langgenius/dify/discussions/17263#discussioncomment-15347160). 2. **Set API version to `v1`**: In your Docker `.env` or environment, make sure `GOOGLE_API_VERSION=v1` (not `v1beta`) [discussion](https://github.com/langgenius/dify/discussions/17263#discussioncomment-15347160). 3. **Update or reinstall the Gemini plugin**: Go to the Dify plugin marketplace, remove the Gemini plugin, and reinstall or update it to the latest version. This pulls the latest model list and fixes known bugs [issue](https://github.com/langgenius/dify/issues/14352#issuecomment-2683543853). 4. **Restart your containers**: After any change to environment variables or plugins, restart your Docker containers to apply the changes. 5. **Check available models**: Use the [ListModels API](https://ai.google.dev/api/rest/v1/models/list) or run: ``` curl "https://generativelanguage.googleapis.com/v1/models?key=YOUR_API_KEY" ``` to see which models your API key can access. If you still get 404 errors after these steps, double-check that your Google Cloud project has the Generative AI API enabled, billing is active, and your API key has access to the models you want to use [discussion](https://github.com/langgenius/dify/discussions/17263#discussioncomment-15347160). For more details and troubleshooting, see the related [issue](https://github.com/langgenius/dify/issues/14352) and [discussion](https://github.com/langgenius/dify/discussions/17263). <!-- 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/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4be78a3c-ec05-4d47-8218-3131730c8be2?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20404%20error%20is%20a%20known%20issue%20and%20is%20almost%20always%20caused%20by%20changes%20on%20the%20provider/plugin%20side%E2%80%94specifically%2C%20Google%20deprecating%20or%20renaming%20Gemini%20model%20IDs%2C%20or%20requiring%20the%20API%20version%20to%20be%20set%20to%20%60v1%60%20instead%20of%20%60v1beta%60%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/17263%23discussioncomment-15347160%29%C2%A0%5Bissue%5D%28https%3A//github.com/langgenius/dify/issues/14352%29.%20Dify%20fetches%20the%20list%20of%20supported%20Gemini%20models%20dynamically%20from%20the%20plugin%20daemon%2C%20so%20if%20Google%20or%20the%20plugin%20updates%20the%20available%20models%2C%20old%20names%20like%20%60embedding-001%60%20or%20%60gemini-embedding-exp-03-07%60%20will%20suddenly%20return%20404s.%0A%0A%2A%2AHow%20to%20fix%3A%2A%2A%0A%0A1.%20%2A%2AUpdate%20your%20model%20names%2A%2A%3A%20Use%20only%20currently%20supported%20Gemini%20model%20IDs%2C%20such%20as%20%60gemini-1.5-pro%60%2C%20%60gemini-1.5-flash%60%2C%20%60gemini-2.0-flash%60%2C%20or%20%60text-embedding-004%60.%20Avoid%20deprecated%20names%20like%20%60gemini-pro%60%20or%20%60embedding-001%60%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/17263%23discussioncomment-15347160%29.%0A2.%20%2A%2ASet%20API%20version%20to%20%60v1%60%2A%2A%3A%20In%20your%20Docker%20%60.env%60%20or%20environment%2C%20make%20sure%20%60GOOGLE_API_VERSION%3Dv1%60%20%28not%20%60v1beta%60%29%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/17263%23discussioncomment-15347160%29.%0A3.%20%2A%2AUpdate%20or%20reinstall%20the%20Gemini%20plugin%2A%2A%3A%20Go%20to%20the%20Dify%20plugin%20marketplace%2C%20remove%20the%20Gemini%20plugin%2C%20and%20reinstall%20or%20update%20it%20to%20the%20latest%20version.%20This%20pulls%20the%20latest%20model%20list%20and%20fixes%20known%20bugs%C2%A0%5Bissue%5D%28https%3A//github.com/langgenius/dify/issues/14352%23issuecomment-2683543853%29.%0A4.%20%2A%2ARestart%20your%20containers%2A%2A%3A%20After%20any%20change%20to%20environment%20variables%20or%20plugins%2C%20restart%20your%20Docker%20containers%20to%20apply%20the%20changes.%0A5.%20%2A%2ACheck%20available%20models%2A%2A%3A%20Use%20the%20%5BListModels%20API%5D%28https%3A//ai.google.dev/api/rest/v1/models/list%29%20or%20run%3A%0A%20%20%20%60%60%60%0A%20%20%20curl%20%22https%3A//generativelanguage.googleapis.com/v1/models%3Fkey%3DYOUR_API_KEY%22%0A%20%20%20%60%60%60%0A%20%20%20to%20see%20which%20models%20your%20API%20key%20can%20access.%0A%0AIf%20you%20still%20get%20404%20errors%20after%20these%20steps%2C%20double-check%20that%20your%20Google%20Cloud%20project%20has%20the%20Generative%20AI%20API%20enabled%2C%20billing%20is%20active%2C%20and%20your%20API%20key%20has%20access%20to%20the%20models%20you%20want%20to%20use%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/17263%23discussioncomment-15347160%29.%0A%0AFor%20more%20details%20and%20troubleshooting%2C%20see%20the%20related%20%5Bissue%5D%28https%3A//github.com/langgenius/dify/issues/14352%29%20and%20%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/17263%29.)&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/31639)
Author
Owner

@dosubot[bot] commented on GitHub (Jan 28, 2026):

The 404 NOT_FOUND error for Gemini embedding models like embedding-001, gemini-embedding-exp-03-07, and text-embedding-004 is happening because these models have likely been retired or are no longer supported by the Google Gemini backend. This is a systemic issue affecting multiple users and is not related to your API key, billing, or Dify configuration changes. The plugin and Dify core dynamically pass the model name to the backend, so if the backend no longer recognizes the model, you'll get this error—even if the model is still listed in plugin config files [source].

To resolve this, switch to a currently supported Gemini model. You can check which models your API key supports by running:

import google.generativeai as genai
genai.configure(api_key='YOUR_API_KEY')
for model in genai.list_models():
    print(model)

For embedding tasks, consider using models like gemini-1.5-pro, gemini-1.5-flash, or gemini-2.0-flash if they appear in your available models list. Make sure your Dify and Gemini plugin versions are up to date, and update your model configuration to use one of these supported models [source].

If you specifically need Gemini text embeddings, note that Dify currently only supports Gemini LLM models and not the Gemini Text Embeddings API (which includes the models you listed). Support for Gemini embedding models may be added in the future, so keep an eye on plugin updates and changelogs [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 (Jan 28, 2026): <!-- Answer --> The 404 NOT_FOUND error for Gemini embedding models like `embedding-001`, `gemini-embedding-exp-03-07`, and `text-embedding-004` is happening because these models have likely been retired or are no longer supported by the Google Gemini backend. This is a systemic issue affecting multiple users and is not related to your API key, billing, or Dify configuration changes. The plugin and Dify core dynamically pass the model name to the backend, so if the backend no longer recognizes the model, you'll get this error—even if the model is still listed in plugin config files [[source]](https://github.com/langgenius/dify-official-plugins/issues/2504). To resolve this, switch to a currently supported Gemini model. You can check which models your API key supports by running: ```python import google.generativeai as genai genai.configure(api_key='YOUR_API_KEY') for model in genai.list_models(): print(model) ``` For embedding tasks, consider using models like `gemini-1.5-pro`, `gemini-1.5-flash`, or `gemini-2.0-flash` if they appear in your available models list. Make sure your Dify and Gemini plugin versions are up to date, and update your model configuration to use one of these supported models [[source]](https://github.com/langgenius/dify-official-plugins/issues/2504). If you specifically need Gemini text embeddings, note that Dify currently only supports Gemini LLM models and not the Gemini Text Embeddings API (which includes the models you listed). Support for Gemini embedding models may be added in the future, so keep an eye on plugin updates and changelogs [[source]](https://github.com/langgenius/dify-official-plugins/issues/2504). <!-- 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/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b4481d91-6401-40a0-a1ed-1fd7a6fc55d8?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20404%20NOT_FOUND%20error%20for%20Gemini%20embedding%20models%20like%20%60embedding-001%60%2C%20%60gemini-embedding-exp-03-07%60%2C%20and%20%60text-embedding-004%60%20is%20happening%20because%20these%20models%20have%20likely%20been%20retired%20or%20are%20no%20longer%20supported%20by%20the%20Google%20Gemini%20backend.%20This%20is%20a%20systemic%20issue%20affecting%20multiple%20users%20and%20is%20not%20related%20to%20your%20API%20key%2C%20billing%2C%20or%20Dify%20configuration%20changes.%20The%20plugin%20and%20Dify%20core%20dynamically%20pass%20the%20model%20name%20to%20the%20backend%2C%20so%20if%20the%20backend%20no%20longer%20recognizes%20the%20model%2C%20you%27ll%20get%20this%20error%E2%80%94even%20if%20the%20model%20is%20still%20listed%20in%20plugin%20config%20files%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2504%29.%0A%0ATo%20resolve%20this%2C%20switch%20to%20a%20currently%20supported%20Gemini%20model.%20You%20can%20check%20which%20models%20your%20API%20key%20supports%20by%20running%3A%0A%0A%60%60%60python%0Aimport%20google.generativeai%20as%20genai%0Agenai.configure%28api_key%3D%27YOUR_API_KEY%27%29%0Afor%20model%20in%20genai.list_models%28%29%3A%0A%20%20%20%20print%28model%29%0A%60%60%60%0A%0AFor%20embedding%20tasks%2C%20consider%20using%20models%20like%20%60gemini-1.5-pro%60%2C%20%60gemini-1.5-flash%60%2C%20or%20%60gemini-2.0-flash%60%20if%20they%20appear%20in%20your%20available%20models%20list.%20Make%20sure%20your%20Dify%20and%20Gemini%20plugin%20versions%20are%20up%20to%20date%2C%20and%20update%20your%20model%20configuration%20to%20use%20one%20of%20these%20supported%20models%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2504%29.%0A%0AIf%20you%20specifically%20need%20Gemini%20text%20embeddings%2C%20note%20that%20Dify%20currently%20only%20supports%20Gemini%20LLM%20models%20and%20not%20the%20Gemini%20Text%20Embeddings%20API%20%28which%20includes%20the%20models%20you%20listed%29.%20Support%20for%20Gemini%20embedding%20models%20may%20be%20added%20in%20the%20future%2C%20so%20keep%20an%20eye%20on%20plugin%20updates%20and%20changelogs%20%5B%5Bsource%5D%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2504%29.)&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/2511)
Author
Owner

@HideenHuang commented on GitHub (Jan 28, 2026):

those model has been deprecated.
https://www.reddit.com/r/RooCode/comments/1pdcx4k/google_is_deprecating_the_textembedding004/

@HideenHuang commented on GitHub (Jan 28, 2026): those model has been deprecated. https://www.reddit.com/r/RooCode/comments/1pdcx4k/google_is_deprecating_the_textembedding004/
Author
Owner

@xuanmit1001 commented on GitHub (Jan 28, 2026):

I recently transitioned from using Gemini’s text-embedding-004 model to the Nomic‑embed‑text model provided by Ollama. This change completely resolved the issues I had been encountering, and my system has been running smoothly ever since.

If you are still experiencing similar problems, I recommend installing Ollama and integrating it with your application. This adjustment may help you resolve the issue as well.

@xuanmit1001 commented on GitHub (Jan 28, 2026): I recently transitioned from using Gemini’s text-embedding-004 model to the Nomic‑embed‑text model provided by Ollama. This change completely resolved the issues I had been encountering, and my system has been running smoothly ever since. If you are still experiencing similar problems, I recommend installing Ollama and integrating it with your application. This adjustment may help you resolve the issue as well.
Author
Owner

@crazywoola commented on GitHub (Feb 3, 2026):

Hi @MrunalSinagde, thanks for opening this issue.

Why this is being closed

Dify issue tracking requires English-only issue title and description for consistent collaboration.

Next steps

Please open a new issue in English and include clear details so maintainers can help efficiently.

Thanks for understanding and for your support.

@crazywoola commented on GitHub (Feb 3, 2026): Hi @MrunalSinagde, thanks for opening this issue. ### Why this is being closed Dify issue tracking requires English-only issue title and description for consistent collaboration. ### Next steps Please open a new issue in English and include clear details so maintainers can help efficiently. Thanks for understanding and for your support.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#954