Skip to content

Fix cron embedding token batch limits#243

Closed
Floofy6 wants to merge 1 commit into
ubiquity-os-marketplace:mainfrom
Floofy6:fix-cron-embedding-token-batches-158
Closed

Fix cron embedding token batch limits#243
Floofy6 wants to merge 1 commit into
ubiquity-os-marketplace:mainfrom
Floofy6:fix-cron-embedding-token-batches-158

Conversation

@Floofy6

@Floofy6 Floofy6 commented Jun 13, 2026

Copy link
Copy Markdown

Fixes #158

Summary

  • Add a configurable EMBEDDINGS_QUEUE_MAX_BATCH_TOKENS setting and split prepared embedding queue rows into Voyage requests by estimated token budget.
  • Retry oversized Voyage requests by recursively shrinking the chunk when the provider reports a 400 token-limit error.
  • Align the cron workflow defaults with deployed runtime defaults instead of hardcoding the more aggressive 200-row queue, and fail the cron job visibly when the enabled queue throws.
  • Document the new queue setting in the example env files and README.

Validation

  • node_modules\.bin\tsc.cmd --noEmit
  • node_modules\.bin\prettier.cmd --check src\cron\embedding-queue.ts src\cron\index.ts src\utils\embedding-queue.ts src\types\env.ts tests\embedding-queue.test.ts .github\workflows\cron.yml .github\workflows\update-configuration.yml README.md
  • node_modules\.bin\eslint.cmd src\cron\embedding-queue.ts src\cron\index.ts src\utils\embedding-queue.ts src\types\env.ts tests\embedding-queue.test.ts
  • npx --yes bun@1.3.0 test tests\embedding-queue.test.ts
  • npx --yes bun@1.3.0 test tests\cron-workflow.test.ts tests\embedding-queue.test.ts tests\plugin-lifecycle.test.ts --timeout 20000
  • git diff --check

AI assistance disclosure

This contribution was prepared with OpenAI Codex assistance. I inspected the issue, implemented the patch, and ran the validation commands above before submission.

@ubiquity-os-beta

Copy link
Copy Markdown
Contributor

Warning

@Floofy6 this pull request must be linked to an open issue and target the repository's default branch, or it will get automatically closed.

@ubiquity-os-beta ubiquity-os-beta Bot closed this Jun 13, 2026
@ubiquity-os-beta

Copy link
Copy Markdown
Contributor

Warning

@Floofy6 this pull request must be linked to an open issue and target the repository's default branch, or it will get automatically closed.

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