Skip to content

fix: trim URL inputs and expand openai-compatible embedding model profiles#12367

Draft
roomote-v0[bot] wants to merge 1 commit into
mainfrom
fix/openai-compatible-embedding-trimming-models
Draft

fix: trim URL inputs and expand openai-compatible embedding model profiles#12367
roomote-v0[bot] wants to merge 1 commit into
mainfrom
fix/openai-compatible-embedding-trimming-models

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented May 14, 2026

This PR attempts to address Issue #12366. Feedback and guidance are welcome.

Changes

1. Input trimming for URL/identifier fields (Bug 3)

Added whitespace trimming in CodeIndexPopover.handleSaveSettings() for:

  • codebaseIndexQdrantUrl
  • codebaseIndexEmbedderBaseUrl
  • codebaseIndexOpenAiCompatibleBaseUrl
  • codebaseIndexEmbedderModelId
  • codebaseIndexQdrantApiKey

This prevents leading/trailing whitespace (e.g. " https://api.featherless.ai/v1") from causing silent authentication failures.

2. Expanded openai-compatible model profiles (Bug 2)

Added popular third-party embedding models to EMBEDDING_MODEL_PROFILES["openai-compatible"] for auto-dimension detection:

  • Qwen: Qwen3-Embedding-0.6B (1024), 4B (2560), 8B (4096)
  • BAAI BGE: bge-large/base/small-en-v1.5
  • Nomic: nomic-embed-text, nomic-ai/nomic-embed-text-v1.5
  • Mixedbread: mxbai-embed-large-v1

Users can still enter any custom model ID -- these profiles just enable automatic dimension detection for common models.

Note on Bug 1 (API key)

Bug 1 (missing API key field) was already fixed on main prior to this PR. The codebaseIndexOpenAiCompatibleApiKey field and its save/load logic already exist.

Testing

  • All existing tests pass
  • Added new tests for openai-compatible third-party model dimension lookups

Interactively review PR in Roo Code Cloud

…files

- Add input trimming for URL and identifier fields in CodeIndexPopover
  handleSaveSettings to prevent leading/trailing whitespace from causing
  silent authentication failures (Bug 3 from #12366)
- Expand openai-compatible model profiles with popular third-party
  embedding models (Qwen, BAAI BGE, Nomic, Mixedbread) for better
  auto-dimension detection (Bug 2 from #12366)
- Add tests for new model dimension lookups
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.

1 participant