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
The problem
One embedding provider factory silently defaults
dimensionsto768where 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:
dimensionsdecides 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