Skip to content

fix: handle oversized ollama embedding inputs - #67

Merged
Helweg merged 15 commits into
mainfrom
fix/ollama-long-input-pooling
May 4, 2026
Merged

fix: handle oversized ollama embedding inputs#67
Helweg merged 15 commits into
mainfrom
fix/ollama-long-input-pooling

Conversation

@Helweg

@Helweg Helweg commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Fix oversized built-in Ollama embedding inputs by aligning the observed token budget with runtime behavior and pooling provider-sized subchunks back into a single stored embedding per semantic chunk.

Changes

  • align the built-in nomic-embed-text budget and docs with the observed ~2048-token effective limit
  • add provider-level Ollama truncation retry coverage as a last-resort safety valve for oversize requests
  • split oversized embedding texts into multi-part requests in the indexer, pool the part vectors before storage, and persist recovered failed-batch retries back to SQLite

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)

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 #58

@Helweg Helweg added bug Bug fix semver:patch Bug fix or patch labels Apr 28, 2026
@github-actions github-actions Bot added documentation Documentation changes test Test changes labels Apr 28, 2026
@Helweg
Helweg merged commit 8ff4c26 into main May 4, 2026
3 checks passed
@Helweg
Helweg deleted the fix/ollama-long-input-pooling branch June 23, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix documentation Documentation changes semver:patch Bug fix or patch test Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] This plugin doesn't work out of the box at all - more configuration is required

1 participant