Repository navigation
feat(platform): let a provider declare whether it can embed - #3219
Merged
Merged
Conversation
Nothing recorded whether a provider serves embeddings, so Settings → Data residency accepted one that only routes chat completions and the failure surfaced later — at index time, as a runtime error — rather than at the point of choosing. The information existed, but only by inference: a provider was treated as embedding-capable if its shipped catalog happened to carry an `embedding`-tagged model with curated `embedding.dimensions`. That conflates two different answers behind one empty state: - the provider cannot embed at all, and - it can, but no vector width is known here. Every live catalog is the second case, since listings publish no width and a guessed one poisons a corpus invisibly. An operator could not tell which, and the fields stayed free either way. `provider.yml` now declares `embedding: supported | unsupported | unknown`, independent of what the model catalog happens to carry, and `providerEmbeddingOptions` pairs each provider with its declared support so a caller never has to read "no entries" as an answer. ## What the twelve are set to, and why only two are claimed `supported` for openai and openrouter: their shipped catalogs carry a curated `dimensions:` entry, so this repo establishes it. `unknown` for the other ten. The absence of a catalog entry establishes nothing about a vendor's API — only that this deployment has no width to offer, which is what `unknown` says. Marking a provider `unsupported` because our catalog is silent would be the same inference this change sets out to remove, one layer down. So NOTHING declares `unsupported` yet. The value exists because the distinction is the point of the change, and the tests exercise it, but setting it on a real provider is a claim about that vendor's API and needs a source. The schema note says so, and asks whoever sets it to cite the vendor's docs in the same change. Absent also reads as `unknown`, so a new connector is never refused for want of evidence. A provider declaring `supported` with no curated entry is reported as `unknown` too: the declaration says it can embed, but there is still nothing to offer, and that is the state the operator has to act on. ## Tests | Mutation | Went red | | --- | --- | | default an unclassified provider to `unsupported` | `treats an unclassified provider as unknown, never unsupported` | | keep `supported` with no curated width | `downgrades supported to unknown when this deployment has no width` | | attach recommendations regardless of support | `lets the declaration win over a contradictory recommendation` | The third mutation survived my first pass — nothing covered a provider declared `unsupported` that still had a matching recommendation, which is exactly what the guard defends against. Refs #2991.
Israeltheminer
force-pushed
the
feat/provider-embedding-capability
branch
from
September 4, 2026 15:38
7a16d13 to
03a5ec4
Compare
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2991 — the data model and the two empty states. The form copy is
follow-on work; this is what it needs in order to say anything true.
Nothing recorded whether a provider serves embeddings, so Settings → Data
residency accepted one that only routes chat completions and the failure
surfaced later, at index time, as a runtime error.
Why inference wasn't enough
A provider was treated as embedding-capable if its shipped catalog happened to
carry an
embedding-tagged model with curatedembedding.dimensions. Thatconflates two different answers behind one empty state:
Every live catalog is the second case — listings publish no width, and a
guessed one poisons a corpus invisibly, so withholding the recommendation is
right. But the operator couldn't tell which, and the fields stayed free either
way.
provider.ymlnow declaresembedding: supported | unsupported | unknown,independent of the model catalog, and
providerEmbeddingOptionspairs eachprovider with its declared support so a caller never reads "no entries" as an
answer.
What is claimed, and what deliberately isn't
supporteddimensions:entry in their shipped catalogunknownunsupportedThe absence of a catalog entry establishes nothing about a vendor's API. It
establishes that this deployment has no width to offer, which is exactly
what
unknownsays. Marking a providerunsupportedbecause our catalog issilent would be the same inference this change sets out to remove, one layer
down.
So nothing declares
unsupportedyet. The value exists because thedistinction is the whole point, and the tests exercise it — but setting it on
a real provider is a claim about that vendor's API. The schema note says so,
and asks whoever sets it to cite the vendor's docs in the same change.
Absent also reads as
unknown, so a new connector is never refused for wantof evidence.
A provider declaring
supportedwith no curated entry is reported asunknowntoo: the declaration says it can embed, but there's still nothing tooffer, and "enter the model and dimensions yourself" is the state to act on.
What this does and does not fix
It gives the form a truthful thing to read, and separates the two empty states
so "no recommendation" stops meaning two things.
It does not yet warn anyone off a provider that cannot embed, because no
provider is marked
unsupported. That half of #2991 needs per-vendor evidenceplus the form copy, and stays open.
Verification
unsupportedtreats an unclassified provider as unknown, never unsupportedsupportedwith no curated widthdowngrades supported to unknown when this deployment has no widthlets the declaration win over a contradictory recommendationThe third survived my first pass: nothing covered a provider declared
unsupportedthat still carried a matching recommendation — a curated entryoutliving the truth — which is exactly what the guard defends against.
The
unsupportedbranch is covered by synthetic providers in the tests, so itstays tested without any real provider asserting it.
Gate
typecheck0 errors,oxlint --type-awareclean,oxfmt --checkclean,lib/sharedsuites 1020 passed (53 files).