Skip to content

Code indexing may enter a "standby" state when using the openai compatible mode.Β #4398

@sfz009900

Description

@sfz009900

App Version

v3.19.4

API Provider

Google Gemini

Model Used

gemini 2.5pro

πŸ” Steps to Reproduce

Code indexing may enter a "standby" state when using the openai compatible mode.

Image

πŸ’₯ Outcome Summary

Code indexing may enter a "standby" state when using the openai compatible mode.

πŸ“„ Relevant Logs or Errors (Optional)

Code indexing may enter a "standby" state when using the openai compatible mode.

Issue Scope

The code indexing feature provides misleading status indicators when embedder configurations are invalid. Users see both "standby" state and a green "file watcher started" message, suggesting the system is working when it's actually failing silently due to invalid embedder settings.

Currently, when settings are saved in webviewMessageHandler.ts, the system initializes services and reports "file watcher started" without validating if embeddings can actually be generated. This creates confusion when:

  • API keys are invalid or lack permissions
  • API quotas are exhausted
  • Endpoints are unreachable or incorrect
  • Models are inaccessible

The solution is to add validation during embedder instantiation in CodeIndexServiceFactory.createEmbedder(). The validation should:

  1. Create the embedder with the provided configuration
  2. Test it by generating a small test embedding before reporting success
  3. If validation fails, set an error state with specific error details
  4. Only show "file watcher started" if embedder validation succeeds

This ensures users receive accurate status information - either a successful "file watcher started" with working embeddings, or a clear error message explaining why indexing cannot proceed.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions