Skip to content

🔧 Feature: Pluggable embedding models #249

Closed

Description

@ajianaz

Feature: Pluggable Embedding Models

Problem

Uteke is locked to EmbeddingGemma Q4 (ONNX, 768d). Users with different needs (code embeddings, multilingual, smaller/faster models) cannot swap the embedding model.

Proposed Solution

Make embedding model pluggable — users can choose or bring their own model.

Supported Backends

Backend Model Example Use Case
ONNX (current) EmbeddingGemma Q4 Default, CPU-only
ONNX Jina Code v2 Code-aware embeddings
ONNX multilingual-e5 Multilingual content
OpenAI API text-embedding-3-small Cloud, zero local compute
Ollama nomic-embed-text Local GPU, popular models

Config

[embedding]
backend = "onnx"              # "onnx" | "openai" | "ollama"
model = "embeddinggemma-q4"   # Model name/identifier
max_seq_length = 256          # Max tokens per chunk
dims = 768                    # Embedding dimensions

# For API backends:
[embedding.api]
base_url = "https://api.openai.com/v1"
api_key_env = "OPENAI_API_KEY"  # Read from env var

CLI Usage

uteke config set embedding.model jina-code-v2
uteke config set embedding.backend onnx
uteke recall "deploy pattern"  # Uses new model automatically

# Re-index if model changed (dimensions might differ):
uteke reindex --force

Why v0.1.0

Migration Safety

  • Changing model with different dimensions = need re-index
  • uteke reindex should detect dimension mismatch and warn
  • Old embeddings preserved until reindex confirmed

Acceptance Criteria

  • uteke.toml supports embedding.backend and embedding.model
  • ONNX backend (default, current behavior)
  • OpenAI API backend (text-embedding-3-small)
  • uteke reindex rebuilds embeddings with new model
  • Dimension mismatch detection + warning
  • Backward compatible: default config = current behavior

Activity

  1. reopened this on Jun 9, 2026
  2. added
    v0.1.0
    scope:core
    type:feature
    enhancement
    and removed
    type:feature
    on Jun 9, 2026
  3. added this to the milestone on Jun 11, 2026
  4. ajianaz commented on Jun 13, 2026

    @ajianaz
    CollaboratorAuthor

    Implemented in PR #314, merged to develop.

  5. added a commit that references this issue on Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:mediumscope:corev0.1.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions