OpenRouter Smart Embeddings icon

OpenRouter Smart Embeddings

Smart embedding model selection with automatic content analysis

OpenRouter Smart Embeddings

AI-generated

Summary

Select embedding models automatically or manually based on content analysis and user-defined criteria, then compute embeddings for input texts using the chosen model.

Inputs

  • Selection Mode (required) — Choose 'Auto-Detect' to analyze content and automatically select the best embedding model, or 'Manual Task Selection' to specify a fixed embedding task type manually.
  • Task — Specify the embedding task type manually when using 'Manual Task Selection'. Options include RAG / Semantic Search, Code Search, Multilingual, Classification, and Clustering.
  • Budget (required) — Select a budget preference affecting model selection: Cheap (lowest cost), Balanced (good value), or Premium (best quality).
  • Model Override — Optionally override automatic model selection by specifying an exact embedding model ID.
  • Filters — Set additional filters for model selection, including minimum context length, maximum price per million tokens, required embedding output dimensions to match existing vector stores, and provider whitelist.
  • Options — Additional options such as showing selection details and overriding output dimensions.

Output shape

An object representing an OpenRouter Smart Embeddings instance used to compute embeddings in the workflow, compatible with Langchain embedding usage.

The node outputs a configured embedding provider object rather than immediate embeddings. Users can call its methods to embed documents or queries. The model selection process respects user choices and content analysis, with caching and telemetry logging of API usage. Model selection considers benchmark scores, task fit, budget, and filtering criteria, and supports manual overrides.

Examples

Example 1: Auto-select embedding model for a set of documents

Set 'Selection Mode' to 'Auto-Detect (Recommended)', choose desired 'Budget', optionally set filters, and use the resulting embedding instance to compute embeddings for document texts.

Example 2: Manually select task type and override model

Set 'Selection Mode' to 'Manual Task Selection', select a 'Task' like 'Code Search', set 'Model Override' to specify a particular embedding model ID, and proceed to embed texts with the chosen configuration.

Links

Discussion