Skip to content

Getting code indexing error when using litellm with vertexai gemini-embedding-001 model #5123

@hsuyuming

Description

@hsuyuming

App Version

3.21.5 (653104b)

API Provider

OpenAI Compatible

Model Used

gemini-embedding-001

🔁 Steps to Reproduce

  1. OS: Google CloudWorkstation (linux), extension version: 3.31.5
  2. I setup a litellm proxy with vertexai gemini-embedding-001 model within config.
general_settings:
  otel: false
litellm_settings:
  turn_off_message_logging: true
model_list:
  - model_name: gemini-embedding-001
    litellm_params:
      model:  vertex_ai/gemini-embedding-001
      vertex_project: <project>
      vertex_location: <location>
      drop_params: true
  1. For embedding provider "OpenAI Compatible", Base URL: "http://0.0.0.0:4000/v1", API KEY: LITELLM APIKEY, Model: "gemini-embedding-001", Embedding Dimension: 3072
  2. Error message:
litellm.exceptions.BadRequestError: litellm.BadRequestError: VertexAIException BadRequestError - {
  "error": {
   "code": 400,
   "message": "Unable to submit request because it included too many instances. Reduce the number of instances and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings: Unable to submit request because batchSize must be 1 but the entered value was 56. Update the batchSize value and try again.",
   "status": "INVALID_ARGUMENT"
  }
}
. Received Model Group=gemini-embedding-001

Related document:

Image

💥 Outcome Summary

Would expect we are able to use gemini-embedding-001 for embedding model

📄 Relevant Logs or Errors (Optional)

Error message:

litellm.exceptions.BadRequestError: litellm.BadRequestError: VertexAIException BadRequestError - {
  "error": {
   "code": 400,
   "message": "Unable to submit request because it included too many instances. Reduce the number of instances and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings: Unable to submit request because batchSize must be 1 but the entered value was 56. Update the batchSize value and try again.",
   "status": "INVALID_ARGUMENT"
  }
}
. Received Model Group=gemini-embedding-001

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions