You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(providers)!: adopt GenericEmbeddingModel for together/openrouter/mistral embeddings
Collapse the hand-rolled Together, OpenRouter, and Mistral embedding
models onto the shared GenericEmbeddingModel<Ext> via a new
OpenAIEmbeddingsCompatible path hook, mirroring
OpenAICompatibleProvider::completion_path. Together embeddings now honor
dimensions (via ndims), encoding_format, and user, which the previous
hand-rolled copy silently dropped.
EmbeddingResponse.usage becomes optional so providers that omit it
(OpenRouter for some models, Together historically) are not regressed now
that they share one response type. Removes the now-dead per-provider
embedding response/format types and their orphaned error envelopes.
Azure (needs the path hook plus deployment-scoped URLs) and Copilot
(blocked on async auth headers) are left out of scope per the issue.
Fixes#2078.
Copy file name to clipboardExpand all lines: crates/rig-core/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Changed
11
11
12
+
-*(providers)*[**breaking**] Collapse the hand-rolled Together, OpenRouter, and Mistral embedding models onto the shared `GenericEmbeddingModel<Ext>`, routed through a new `OpenAIEmbeddingsCompatible` path hook (mirroring `OpenAICompatibleProvider::completion_path`). Together embeddings now honor `dimensions` (via `ndims`), `encoding_format`, and `user`, which the previous implementation silently dropped. Removes the now-redundant per-provider embedding types: `together::{EmbeddingResponse, EmbeddingData, Usage}` and the `together_ai_api_types` module, `openrouter::{EncodingFormat, EmbeddingResponse, EmbeddingData}`, and `mistral::{EmbeddingResponse, EmbeddingData}`.
12
13
-*(core)*[**breaking**] Mark `PromptError`, `StructuredOutputError`, `ToolError`, `ToolSetError`, and `VectorStoreError` as non-exhaustive, requiring downstream match expressions to include a wildcard arm. Conversation memory load failures now surface as the typed `PromptError::MemoryError` variant instead of `CompletionError::RequestError`.
0 commit comments