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
{{ message }}
Repository navigation
AI SDK embedding requests use a language model and fail before sending #13370
Embedding requests through the AI SDK adapter fail with TypeError: model.doEmbed is not a function.
On main (5522c6f), construct AiSdkApi with model: "openai/text-embedding-3-small" and call embed({ model: "text-embedding-3-small", input: "hello" }). The adapter gets a language model from the provider's callable interface and passes it to the SDK embedding function. The request fails before reaching the endpoint.
I reproduced this locally with the installed AI SDK. As a control, provider.embeddingModel("text-embedding-3-small") sends the expected /embeddings request and returns the embedding using a mock fetch response.
I plan to select the provider's embedding model with the configured model ID and add single-input and batch regression tests.
Activity