Skip to content

fix(embedding): cap remote batch size at 10#238

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/embedding-api-batch-size
Open

fix(embedding): cap remote batch size at 10#238
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/embedding-api-batch-size

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cap remote embedding batch size at 10 so Dashscope/Tencent-compatible APIs do not reject L0 background embedding batches
  • keep existing chunking behavior for OpenAI-compatible and ZeroEntropy remote embedding services
  • add a regression test that fails when 11 inputs are sent as one remote batch

Closes #236

Test plan

  • npx vitest run src/core/store/embedding.test.ts
  • npm test
  • npm run build

Notes

  • npm run test:cc-plugin -- --run currently fails because package.json has no test:cc-plugin script.

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Awesome work! 13 fixes in one batch covering Gateway hardening, embedding compatibility, Hermes memory injection, offload stability, and pipeline optimization — a very productive cleanup session 👏

We'll review and merge them one by one 🚀

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.

[Bug] L0 embedding silently fails — MAX_BATCH_SIZE=256 exceeds Tencent API limit of 10

2 participants