Skip to content

[codex] fix requestDimensions schema sizing and request payload alignment#572

Draft
rwmjhb wants to merge 1 commit intomasterfrom
pr377-request-dimensions
Draft

[codex] fix requestDimensions schema sizing and request payload alignment#572
rwmjhb wants to merge 1 commit intomasterfrom
pr377-request-dimensions

Conversation

@rwmjhb
Copy link
Copy Markdown
Collaborator

@rwmjhb rwmjhb commented Apr 9, 2026

Supersedes #377.

What changed

  • add explicit embedding.requestDimensions schema and UI metadata
  • stop forwarding embedding.dimensions as a request-side override by default
  • size the local/store vector schema from the same effective dimension logic used by the embedder
  • add regression coverage for request-only overrides and omitDimensions

Why

PR #377 left the source of truth split in two places:

  • request-time validation could use requestDimensions ?? dimensions
  • LanceDB schema sizing still only used dimensions

That meant request-side overrides could pass embedder validation while the store schema was still sized from a different value. This PR makes the effective vector dimension calculation shared so local validation, store sizing, and request payload behavior stay aligned.

Impact

  • embedding.dimensions remains the internal schema/validation dimension
  • embedding.requestDimensions is now the explicit request-side override for providers that support variable output sizes
  • omitDimensions now cleanly suppresses request-side dimension fields even when requestDimensions is configured

Validation

  • node test/embedder-error-hints.test.mjs
  • node test/plugin-manifest-regression.mjs
  • npm test

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