embeddings-add-adapter

Implements an embeddings provider adapter with multimodal mapping, batch routing, pricing, and tests.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill embeddings-add-adapter-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: embeddings-add-adapter
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/embeddings-add-adapter
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill embeddings-add-adapter-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new embeddings provider to the OpenRouter monorepo requires touching many coordinated files—adapter code, factory registration, model capabilities, pricing SKUs, and tests—and missing any of them breaks the integration. This Skill guides the implementation of a complete provider adapter from a finished research note and captured fixtures. ## Core Features & Use Cases - Adapter Implementation: Extends BaseEmbeddingsAdapter to transform text, arrays, numeric inputs, and multimodal content (image_url, input_audio, input_video, input_file) while preserving dimensions and encoding_format. - Pricing & Registration: Registers per-token and modality-specific SKUs, pricing JSON, strategy, and provider metadata in the adapter factory and config files. - Testing & Validation: Covers single/batch requests, multimodal mappings, malformed vectors, chunking, usage, redaction, and SKU totals using mocked fetch and create-fixtures. - Use Case: After researching a new embeddings provider's API, use this Skill to implement the full adapter, wire it into the factory, register pricing, and pass the embeddings package test and typecheck suites. ## Quick Start Ask the AI to implement the embeddings adapter for your researched provider following the embeddings-add-adapter skill, then run the embeddings package tests and typecheck.

Frequently Asked Questions about embeddings-add-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new embeddings provider adapter in OpenRouter?▼

Extend BaseEmbeddingsAdapter in packages/embeddings/adapters, implement multimodal input transforms and Zod response parsing, then register the adapter in adapter-factory.ts, get-adapter-name.ts, and model-capabilities.ts. Finish by adding pricing SKUs and tests.

What files must change when adding an embeddings adapter?▼

Touch packages/enums/adapters.ts, the new adapter directory under packages/embeddings/adapters, adapter-factory.ts, get-adapter-name.ts, model-capabilities.ts, and pricing strategy/SKU registration. Extend serving schemas in packages/embedding-interfaces if the provider needs new fields.

Does the embeddings adapter support multimodal inputs like images and audio?▼

Yes, the adapter contract transforms structured text, image_url, input_audio, input_video, and input_file content alongside plain text and arrays. It must preserve dimensions and encoding_format without retaining request media on long-lived fields.

How do I test an embeddings provider adapter?▼

Mock fetch and cover single and batch requests, multimodal mappings, dimensions and encoding, malformed vectors, errors, chunking, usage, redaction, and SKU totals using create-fixtures. Run bun run --filter @openrouter-monorepo/embeddings test and typecheck.

What should I do if the provider needs fields missing from the request schemas?▼

Extend the serving schemas in packages/embedding-interfaces/schemas/request/index.ts within the same adapter PR. Fix the payload schema rather than dropping a capability field to bypass validation.