lms
lms copied to clipboard
Text embedding models does not support `dimensions`
https://platform.openai.com/docs/api-reference/embeddings/create#embeddings_create-dimensions
The OpenAI API supports dimensions to customize the embeddings output, and models such as Qwen3, do support custom dimensions.
Adding support for it would be helpful.
const lmstudio = createOpenAICompatible({
name: 'openai-compatible',
baseURL: 'http://localhost:1234/v1',
})
const { embeddings } = await embedMany({
providerOptions: {
'openai-compatible': {
dimensions: 1024,
},
},
model: lmstudio.textEmbeddingModel('Qwen/Qwen3-Embedding-8B'),
values: texts,
})
// Results in embeddings.length === 4096
new around these parts but shouldn't this be reported in https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues? seeing as the API lives in the app