Skip to content

feat(platform): pick the embedding model from the provider's catalog - #3435

Merged
larryro merged 1 commit into
mainfrom
feat/embedding-model-picker
Sep 20, 2026
Merged

larryro merged 1 commit into
mainfrom
feat/embedding-model-picker

Conversation

@larryro

@larryro larryro commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Settings › Data residency › Embedding model took the model as a free-text tag. The Model row now reads the organization's provider catalogs (the listing the AI-providers and governance pages already use) and lets the catalog decide:

The chosen provider… The row
lists embedding models (shipped catalog) a closed select over them; a pick fills Vector width from the catalog
lists embedding models (organization-defined) the same select plus Other model…, which opens a Model tag field — a bare /models listing tags nothing as an embedding model, so the listing may be incomplete
is shipped and its resolved catalog lists none refused: "The {provider} catalog lists no embedding model. Choose a provider that serves one." — no field, the shared Save stays off (previously the tag was accepted and failed at index time)
is shipped and its catalog could not be loaded refused, naming the remedy (refresh the catalogs under AI providers)
has no listing to consult (organization-defined without an entry, Azure's catalog: none deployments, a provider the listing does not know) the free tag field, with a hint that says why

The pick-vs-typed choice rides the form values (modelSource), so Discard and remote updates stay coherent; the form's baseline waits for the catalogs once, so a stored tag is classified exactly once (a stored tag a shipped catalog does not list shows as its own entry, so nothing configured is hidden).

@tale/ui Select gains errorMessage, rendered under the control the way Input renders its own: the description slot sits under the label, which in a settings row is the other column — where this form's provider/credential errors used to land. The form's three selects use it.

Part of #2991 (the form half of "distinguish the two empty states"). The unsupported provider declaration stays unused: the refusal here is a statement about the shipped catalog, not about the vendor.

Deliberate consequences

  • A shipped provider whose catalog carries no curated embedding entry (DeepSeek, Anthropic, xAI, Moonshot, Qwen, Gemini, Nous) is now refused, including the ones whose vendor does serve embeddings — the remedy is curating their models.yml entries (width included), not a typed tag.
  • OpenAI offers text-embedding-3-small only (the one curated entry; the bare live listing tags text-embedding-3-large as chat). Curate it if wanted.
  • Azure keeps the free field although it is shipped: its deployments carry the admin's own names and the platform has no listing to consult.

Checklist

  • bun run check — format:check ✓; typecheck ui + platform ✓; lint ui + platform (whole) ✓; @tale/ui tests ✓ (incl. the new Select.errorMessage case); @tale/ui-docs 74 ✓; platform test:ui ✓ (settings 102 files / 875 incl. the 10 embedding cases; full suite green); platform i18n messages test 24 ✓ (key parity 47/47/47); docs parity ✓; lint:manual ✓ + check-guide on the suite ✓.
  • bun run lint:sast — the pre-commit opengrep pass ran on the staged TS/TSX.
  • Translations: messages/{en,de,fr}.yml (10 new keys, nbsp typography in fr); no de-CH override applies.
  • Docs: docs/{en,de,fr}/self-hosted/configuration/data-residency.md (embedding paragraph); services/ui-docs/content/components/input.md (Select takes errorMessage).
  • README* — N/A (no env var, flag or command changed).

Test plan

Manual: DATA-F2b (updated) and DATA-F2c (new) in services/platform/tests/manual/suites/data-residency.md.

Observed on the dev stack (org with a Z.ai credential and embedding-3 / 1536 stored):

  • the Model row is a closed select showing embedding-3, options [embedding-3], hint "Embedding models the provider's catalog lists.";
  • switching the provider to deepseek empties the model, the row reads "No embedding model" with the explanation on the left, nothing appears under the provider select, and the header Save is disabled;
  • Discard restores the stored pick; 0 console errors.

Settings > Data residency took the embedding model as a free-text tag.
The Model row now reads the organization's provider catalogs (the same
listing the AI-providers and governance pages use) and takes one of four
shapes for the chosen provider:

- the catalog lists embedding models: a closed select over them; a pick
  fills the vector width the catalog states. An organization-defined
  provider keeps an "Other model…" escape into the free tag field, since
  a bare /models listing tags nothing as an embedding model.
- a shipped catalog lists none: the form says so and refuses the
  provider (the shared Save stays off) instead of accepting a tag that
  fails later, at index time.
- a shipped catalog could not be loaded: refused, with the remedy named.
- no listing can tell (an organization-defined provider without an
  embedding entry, Azure's per-credential deployments): the free tag
  field, with a hint that says why.

The choice between a catalog pick and a typed tag rides the form values
(modelSource), so Discard and remote updates stay coherent; the baseline
waits for the catalogs once, so a stored tag is classified exactly once.

Select gains errorMessage, rendered under the control like Input's,
because its description slot sits under the label — in a settings row
that is the other column, where the provider select's error used to
land. The form's three selects use it.

Locales en/de/fr, the self-hosted data-residency docs, the manual suite
(DATA-F2b/F2c) and the design-system input guide follow.
@larryro
larryro merged commit 3f7f6e0 into main Sep 20, 2026
49 checks passed
@larryro
larryro deleted the feat/embedding-model-picker branch September 20, 2026 14:50
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