Skip to content

feat: add custom provider batch size caps#41

Merged
Helweg merged 2 commits intomainfrom
feat/custom-provider-max-batch-size
Mar 29, 2026
Merged

feat: add custom provider batch size caps#41
Helweg merged 2 commits intomainfrom
feat/custom-provider-max-batch-size

Conversation

@Helweg
Copy link
Copy Markdown
Owner

@Helweg Helweg commented Mar 29, 2026

Summary

Add custom provider request batch-size caps so OpenAI-compatible endpoints with strict per-request input limits, such as text-embeddings-inference, can be used without rejecting larger indexer batches.

Changes

  • add customProvider.maxBatchSize support and accept max_batch_size as a config alias
  • split custom provider /embeddings requests into smaller sequential calls while preserving existing indexer token batching
  • add config/provider tests and update README usage docs

Testing

How were these changes tested?

  • Unit tests added/updated
  • Manual testing performed
  • Build passes (npm run build)
  • Typecheck passes (npm run typecheck)
  • Tests pass (npm run test:run)
  • Lint passes (npm run lint)

Additional targeted verification:

  • npx vitest run tests/custom-provider.test.ts
  • npx vitest run tests/config.test.ts
  • npx vitest run tests/embeddings.test.ts

Release Labels

  • Added at least one release category label (feature, bug, performance, documentation, dependencies, refactor, test, chore, or skip-changelog)
  • Added at most one semver label (semver:major, semver:minor, semver:patch) when needed

Related Issues

Fixes #39

@github-actions github-actions bot added documentation Documentation changes test Test changes labels Mar 29, 2026
@Helweg Helweg added feature New feature or capability semver:minor New feature (minor bump) labels Mar 29, 2026
@Helweg Helweg merged commit 3c26236 into main Mar 29, 2026
3 checks passed
@Helweg Helweg deleted the feat/custom-provider-max-batch-size branch March 29, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes feature New feature or capability semver:minor New feature (minor bump) test Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support setting max batch size in custom providers

1 participant