Skip to content

fix: retry per-attempt timeouts and validate vector dimensions - #18

Merged
TheGreatAxios merged 1 commit into
cl-9388-embedding-align-repo-scaffolding-with-the-package-standardfrom
cl-9445-embedding-retry-per-attempt-timeouts-and-validate-vector
Sep 27, 2026
Merged

TheGreatAxios merged 1 commit into
cl-9388-embedding-align-repo-scaffolding-with-the-package-standardfrom
cl-9445-embedding-retry-per-attempt-timeouts-and-validate-vector

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • A per-attempt timeoutMs expiry is classified as timeout, which the default retry policy retries; a caller signal abort is still aborted and not retried.
  • embedTexts rejects empty vectors, vectors whose length differs from the first in the same call (across batches), and vectors whose length differs from config.dimensions when set. Each throws EmbeddingRequestError with protocol_mismatch.
  • README: timeoutMs and dimensions rows and the Dimensions section describe the new behavior.
  • Stacked on chore: align repo scaffolding with the package standard #17.

Verification

  • bun run check, bun run build: pass
  • bun run test:e2e with EMBEDDING_E2E_BASE_URL=http://100.113.184.123:11434/v1: 12 pass, 0 fail (live included)
  • New tests (timeout retried then succeeds; timeout exhausts 3 attempts as timeout; caller abort stays aborted; empty, uneven and off-dimension vectors) failed before the fix, except the caller-abort guard
  • Node pack smoke: pass

Closes CL-9445

A per-attempt timeout is now classified as timeout, which the default policy retries; a caller abort stays aborted. Empty vectors, uneven lengths within a call, and lengths other than config.dimensions throw EmbeddingRequestError with protocol_mismatch.
@TheGreatAxios
TheGreatAxios added this pull request to stack #15 September 27, 2026 01:14
@TheGreatAxios
TheGreatAxios merged commit a35e870 into main Sep 27, 2026
1 check passed
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