Skip to content

Code base indexing returns 400Β #7761

@springrider

Description

@springrider

App Version

Version: 3.27.0 (173acdb)

API Provider

Google Gemini

Model Used

gemini

Roo Code Task Links (Optional)

No response

πŸ” Steps to Reproduce

here is the settings:
Image

πŸ’₯ Outcome Summary

`I modified the code and logged the request & response info:


DEBUG: embeddings/user defined encoding_format:
base64
DEBUG: [log_20057d] sending request
{
  "method": "post",
  "url": "https://generativelanguage.googleapis.com/v1beta/openai/embeddings",
  "options": {
    "method": "post",
    "path": "/embeddings",
    "body": {
      "input": [
        "test"
      ],
      "model": "gemini-embedding-001",
      "encoding_format": "base64"
    }
  },
  "headers": {
    "accept": "application/json",
    "authorization": "***",
    "content-type": "application/json",
    "user-agent": "Pn/JS 5.12.2",
    "x-stainless-arch": "arm64",
    "x-stainless-lang": "js",
    "x-stainless-os": "MacOS",
    "x-stainless-package-version": "5.12.2",
    "x-stainless-retry-count": "0",
    "x-stainless-runtime": "node",
    "x-stainless-runtime-version": "v22.17.0"
  }
}
INFO: [log_20057d] post https://generativelanguage.googleapis.com/v1beta/openai/embeddings failed with status 400 in 554ms - error; not retryable
DEBUG: [log_20057d] response error (error; not retryable)
{
  "url": "https://generativelanguage.googleapis.com/v1beta/openai/embeddings",
  "status": 400,
  "headers": {
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
    "content-encoding": "gzip",
    "content-type": "application/json; charset=UTF-8",
    "date": "Sun, 07 Sep 2025 15:59:57 GMT",
    "server": "scaffolding on HTTPServer2",
    "server-timing": "gfet4t7; dur=230",
    "transfer-encoding": "chunked",
    "vary": "Origin, X-Origin, Referer",
    "x-content-type-options": "nosniff",
    "x-frame-options": "SAMEORIGIN",
    "x-xss-protection": "0"
  },
  "durationMs": 555
}

I did some research that look like the parameter is wrong? it should not used openAI's format to call gemini's API? `

πŸ“„ Relevant Logs or Errors (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs InfoMissing details or unclear. Waiting on author to provide more context.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions