Skip to content

Feature Request: Configurable embedding model #554

@zcb617

Description

@zcb617

Problem

I'm currently using a local embedding service with a custom base URL via `LLM_OPENAI_COMPATIBLE_BASE_URL`. However, the embedding model ID is currently hardcoded in `src/embedding_client.py`:

  • `openai`: `text-embedding-3-small`
  • `openrouter`: `openai/text-embedding-3-small`
  • `gemini`: `gemini-embedding-001`

This means even when I point to my own embedding endpoint, I cannot specify which model to use. I had to manually modify the source code to change the model (e.g., to `openai/nomic-embed-text`), which isn't ideal for maintenance.

Suggested Solution

Would it be possible to add a new configuration parameter, perhaps something like:

```bash
LLM_EMBEDDING_MODEL=text-embedding-3-large
```

This would allow users to override the default model without modifying the codebase.

Benefits

  • Greater flexibility for self-hosted deployments
  • Easier to switch between different embedding models
  • No code changes required when upgrading/changing models

Thanks for considering this! Happy to provide more context if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions