Skip to content

One provider factory silently defaults dimensions to 768 where its siblings throw #1321

Description

@borisno2

The problem

One embedding provider factory silently defaults dimensions to 768 where its siblings in the same file throw on a missing or invalid value.

So a misconfiguration that is refused by name for one provider is accepted for another, and the wrong width then propagates: dimensions decides the emitted column width, sizes the zero-padding for empty chunks, and is stamped into a generated index. A wrong value does not fail where it is introduced. It fails much later, as a dimension mismatch at query time, or not at all — as an index quietly built at the wrong width.

The inconsistency is the sharp part. A developer who has seen one provider refuse a bad value reasonably assumes the others do too.

What to do

Make the factory refuse the same way its siblings do, naming the provider and what was wrong. If a default is genuinely wanted for that provider, it should come from the same place the others' declared dimensions come from, and be visible rather than silent.

Check every provider factory while you are there, not just the two involved — the point is that they agree.

Related

This is the same shape as #1288: a declared dimension nobody reconciles against reality. That issue asks for the declaration to be checked against the vectors a provider actually returns. Together they close both ends — one stops a bad value being accepted, the other stops a plausible value being wrong.

Provenance

Found while fixing documentation on #1318 and deliberately left out of scope, since it is runtime behaviour rather than prose.

Context


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Prisma8Relates to the Prisma 8 migration (prisma-8 branch)bugSomething isn't workingpriority:mediumShould land before or shortly after release; has a workaround or narrow blast radiusready-for-agentFully specified, ready for an AFK agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions