Skip to content

Vertex text embedding model discontinuation on May 14, 2025

What

We currently use the textembedding-gecko@003 vertex model for embeddings. The model is being discontinued on May 14, 2025 so we need to replace it with a later model, probably textembedding-gecko@005 before that date.

Screenshot_2025-02-28_at_09.20.05

https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api#generative-ai-get-text-embedding-drest

Scheduled for %18.0 which has a release date of 2025-05-15. Currently only gitlab.com is affected - no SM customers use these embeddings.

How

  • Change the model in ee/lib/gitlab/llm/vertex_ai/model_configurations/text_embeddings.rb
  • Add a model version in ee/lib/search/elastic/references/embedding.rb
  • Test that we can still use the existing 003 embeddings with a 005 question embedding. If not, we need to regenerate the existing embeddings. This changes the issue to weight 5.
  • Allow rails to select the model
  • Add model to AI Gateway (blocker for the remaining steps)
  • Add new field embedding_1
  • Update as_indexed_json to switch to embedding_1 and new model if the migration is complete
  • Add migration to backfill embedding_1 for the currently supported projects
  • Switch query (ee/lib/search/elastic/queries.rb) to use new model if backfill migration is complete
  • Migration to nullify the embedding_0 field
Edited by Madelein van Niekerk