Skip to content

Add optional OpenRouter provider for embeddings/search pipeline#133

Open
jamiequint wants to merge 1 commit intotobi:mainfrom
jamiequint:feat/openrouter-provider
Open

Add optional OpenRouter provider for embeddings/search pipeline#133
jamiequint wants to merge 1 commit intotobi:mainfrom
jamiequint:feat/openrouter-provider

Conversation

@jamiequint
Copy link

@jamiequint jamiequint commented Feb 8, 2026

Summary

  • Added provider selection via QMD_LLM_PROVIDER with local as the default.
  • Added an OpenRouterLLM backend for embeddings, query expansion, and reranking.
  • Kept privacy-safe defaults: no remote calls unless explicitly opted in.
  • Added a one-time remote-inference notice per process when OpenRouter mode is active.
  • Added API key loading from:
    • QMD_OPENROUTER_API_KEY (preferred)
    • OPENROUTER_API_KEY
    • QMD_OPENROUTER_API_KEY_FILE (defaults to ~/.config/qmd/openrouter.key)
  • Made store/CLI LLM calls provider-agnostic.
  • Added char-based chunking fallback for remote providers (no local tokenizer dependency).
  • Added OpenRouter-focused tests and concise README docs for setup and key storage.

Testing

~/.bun/bin/bun test src/llm.openrouter.test.ts
~/.bun/bin/bun test src/llm.test.ts --test-name-pattern "Default LlamaCpp Singleton|LlamaCpp.modelExists"
~/.bun/bin/bun src/qmd.ts --help

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