Skip to content

fix: Replace deprecated text-embedding-004 with gemini-embedding-001 and upgrade smart chat model#7

Open
Copilot wants to merge 3 commits intomainfrom
copilot/fix-ask-docs-tool
Open

fix: Replace deprecated text-embedding-004 with gemini-embedding-001 and upgrade smart chat model#7
Copilot wants to merge 3 commits intomainfrom
copilot/fix-ask-docs-tool

Conversation

Copy link

Copilot AI commented Feb 26, 2026

Google shut down text-embedding-004 on January 14, 2026, breaking the ask-docs tool with a "model not found" error. This PR also upgrades the smart quality level to use the newer gemini-3-flash chat model.

Changes

  • ModelQuality enum — updated both fast and smart variants to use gemini-embedding-001 for embeddings
  • ModelQuality.smart — upgraded chat model from gemini-2.5-flash to gemini-3-flash
// Before
fast('google?chat=gemini-2.5-flash-lite&embeddings=text-embedding-004'),
smart('google?chat=gemini-2.5-flash&embeddings=text-embedding-004');

// After
fast('google?chat=gemini-2.5-flash-lite&embeddings=gemini-embedding-001'),
smart('google?chat=gemini-3-flash&embeddings=gemini-embedding-001');
Original prompt

This section details on the original issue you should resolve

<issue_title>[serverpod_mcp] Gemini embedding model text-embedding-004 deprecated - ask-docs tool broken</issue_title>
<issue_description>## Bug Description

The ask-docs tool in serverpod_mcp is currently broken due to Google's deprecation of the text-embedding-004 model.

Error Message

StatusException: models/text-embedding-004 is not found for API version v1beta, or is not supported for embedContent. Call ListModels to see the list of available models and their supported methods.

Root Cause

According to Google's announcement, the text-embedding-004 embedding model was shut down on January 14, 2026.

Model Deprecation Date Shutdown Date
text-embedding-004 November 18, 2025 January 14, 2026

Environment

  • serverpod_mcp version: 0.1.1
  • starguide_client version: 0.1.2
  • Date observed: February 24, 2026

Steps to Reproduce

  1. Install serverpod_mcp: dart pub global activate serverpod_mcp
  2. Configure with Gemini API key
  3. Call the ask-docs tool with any question
  4. Observe the embedding model error

Working Tools

The following tools still work correctly:

  • list-guides - Lists available guides
  • get-guide - Retrieves guide content by URI

Suggested Fix

Update the embedding model from text-embedding-004 to gemini-embedding-001 in the Starguide server code.

The new model offers:

  • Support for 100+ languages
  • Better performance on MTEB benchmarks
  • Up to 2048 tokens input
  • Flexible output dimensions (3K/2K/1K/512)

References

Impact

This issue prevents users from using the natural language Q&A feature of the Serverpod MCP, which is critical for developers relying on this tool for Serverpod documentation queries.


Thanks for maintaining Serverpod! 🚀
</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: marcelomendoncasoares <6807059+marcelomendoncasoares@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ask-docs tool due to model deprecation Replace deprecated text-embedding-004 with gemini-embedding-001 Feb 26, 2026
Co-authored-by: marcelomendoncasoares <6807059+marcelomendoncasoares@users.noreply.github.com>
Copilot AI changed the title Replace deprecated text-embedding-004 with gemini-embedding-001 Replace deprecated text-embedding-004 with gemini-embedding-001 and upgrade smart chat model Feb 26, 2026
@marcelomendoncasoares marcelomendoncasoares marked this pull request as ready for review February 26, 2026 16:57
@marcelomendoncasoares marcelomendoncasoares changed the title Replace deprecated text-embedding-004 with gemini-embedding-001 and upgrade smart chat model fix: Replace deprecated text-embedding-004 with gemini-embedding-001 and upgrade smart chat model Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[serverpod_mcp] Gemini embedding model text-embedding-004 deprecated - ask-docs tool broken

2 participants