Skip to content

feat(embeddings): add OpenRouter provider - #210

Merged
nullure merged 1 commit into
CaviraOSS:mainfrom
mameikagou:feat/openrouter-embedding-provider
Aug 25, 2026
Merged

feat(embeddings): add OpenRouter provider#210
nullure merged 1 commit into
CaviraOSS:mainfrom
mameikagou:feat/openrouter-embedding-provider

Conversation

@mameikagou

Copy link
Copy Markdown
Contributor

Summary

  • add OpenRouter as a named embedding provider in the TypeScript and Python SDKs
  • support single and batched requests through https://openrouter.ai/api/v1/embeddings
  • expose provider configuration in Docker Compose, the dashboard, model defaults, and documentation
  • mask both OpenRouter API-key environment variables in the settings response
  • batch query embeddings for all providers that already advertise simple-mode batch support

Configuration

OM_EMBEDDINGS=openrouter
OPENROUTER_API_KEY=sk-or-v1-...
OM_OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small

The default embedding model follows OpenRouter's official embeddings example. Users can select any compatible model through OM_OPENROUTER_EMBEDDING_MODEL.

Official API documentation: https://openrouter.ai/docs/client-sdks/typescript/api-reference/embeddings

Verification

  • TypeScript: 10 test files, 52 tests passed
  • TypeScript typecheck passed
  • Python OpenRouter adapter: 4 tests passed

@nullure nullure left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mameikagou
mameikagou force-pushed the feat/openrouter-embedding-provider branch from f469273 to 02a0788 Compare August 24, 2026 17:10
@nullure
nullure merged commit 44b38e7 into CaviraOSS:main Aug 25, 2026
3 checks passed
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.

2 participants