Skip to content

feat(platform): let a provider declare whether it can embed - #3219

Merged
Israeltheminer merged 1 commit into
mainfrom
feat/provider-embedding-capability
Sep 9, 2026
Merged

Israeltheminer merged 1 commit into
mainfrom
feat/provider-embedding-capability

Conversation

@Israeltheminer

@Israeltheminer Israeltheminer commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

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 curated embedding.dimensions. That
conflates two different answers behind one empty state:

  • the provider cannot embed, and
  • it can, but no vector width is known here.

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.yml now declares embedding: supported | unsupported | unknown,
independent of the model catalog, and providerEmbeddingOptions pairs each
provider with its declared support so a caller never reads "no entries" as an
answer.

What is claimed, and what deliberately isn't

Support Providers Established by
supported openai, openrouter a curated dimensions: entry in their shipped catalog
unknown the other ten nothing — and that is the point
unsupported none needs a source this repo does not hold

The 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 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 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 want
of evidence.

A provider declaring supported with no curated entry is reported as
unknown too: the declaration says it can embed, but there's still nothing to
offer, 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 evidence
plus the form copy, and stays open.

Verification

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 survived my first pass: nothing covered a provider declared
unsupported that still carried a matching recommendation — a curated entry
outliving the truth — which is exactly what the guard defends against.

The unsupported branch is covered by synthetic providers in the tests, so it
stays tested without any real provider asserting it.

Gate

typecheck 0 errors, oxlint --type-aware clean, oxfmt --check clean,
lib/shared suites 1020 passed (53 files).

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
Israeltheminer force-pushed the feat/provider-embedding-capability branch from 7a16d13 to 03a5ec4 Compare September 4, 2026 15:38
@Israeltheminer
Israeltheminer merged commit 9d1bcc7 into main Sep 9, 2026
65 of 67 checks passed
@Israeltheminer
Israeltheminer deleted the feat/provider-embedding-capability branch September 9, 2026 19:22
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.

1 participant