Skip to content

fix(knowledge): reject inconsistent remote embedding dimensions - #1607

Closed
chqcjq wants to merge 1 commit into
TencentCloud:developfrom
chqcjq:codex/fix-knowledge-embedding-dimensions
Closed

chqcjq wants to merge 1 commit into
TencentCloud:developfrom
chqcjq:codex/fix-knowledge-embedding-dimensions

Conversation

@chqcjq

@chqcjq chqcjq commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1606.

Reject empty remote embedding vectors and mixed dimensions within or across batches. A document must not appear successfully indexed while some chunks are silently excluded by query-dimension filtering. Add matching backend locale keys and Unreleased CHANGELOG.

Target branch

  • develop

Verification

  • Original adapter: both mixed-dimension regressions fail (one-batch and cross-batch).
  • Valid same-dimension batching and order, empty vectors and mixed dimensions are covered using real httpx response decoding with MockTransport.
  • uv run --no-sync python -m pytest tests/unit/knowledge tests/unit/i18n -q: 164 passed.
  • make all RUN='uv run --no-sync python -m' PYTEST_JOBS=8: Ruff/mypy pass; 4178 passed, 142 skipped, 33 warnings, exit code 0.
  • Normal hook: 19 affected tests passed, Ruff/mypy pass; tsc -b && vite build and PWA generation pass. No hooks skipped.

Response ordering (#1454) and finite-value validation (#1605) address separate defects; this change specifically enforces vector shape. No schema or dependency change.

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.

2 participants