Skip to content

feat(openrouter) Add support for openrouter embeddings (#1418)#1419

Merged
joshua-mo-143 merged 2 commits into0xPlaygrounds:mainfrom
Lochlanna:openrouter_embeddings
Feb 24, 2026
Merged

feat(openrouter) Add support for openrouter embeddings (#1418)#1419
joshua-mo-143 merged 2 commits into0xPlaygrounds:mainfrom
Lochlanna:openrouter_embeddings

Conversation

@Lochlanna
Copy link
Copy Markdown
Contributor

Fixes #1418

  • Add EmbeddingModel implementation for the OpenRouter provider, following the same pattern as the OpenAI embedding implementation
  • Register Capable<EmbeddingModel<H>> in the OpenRouter Capabilities declaration (previously Nothing)
  • Add #[serde(default)] to Usage::completion_tokens and a new Usage::cost field to handle embedding API responses that omit completion tokens and include cost

@joshua-mo-143 joshua-mo-143 added this pull request to the merge queue Feb 24, 2026
Merged via the queue into 0xPlaygrounds:main with commit 43fc9fa Feb 24, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 24, 2026
@Lochlanna Lochlanna deleted the openrouter_embeddings branch February 25, 2026 07:19
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.

feat: OpenRouter embedding API support

2 participants