Skip to content

feat: vector search support for Flux API (v0.3.0)#5

Merged
loookashow merged 1 commit intomainfrom
feat/add-vector-fields-support
Mar 19, 2026
Merged

feat: vector search support for Flux API (v0.3.0)#5
loookashow merged 1 commit intomainfrom
feat/add-vector-fields-support

Conversation

@loookashow
Copy link
Copy Markdown
Contributor

Summary

  • New flux/models.ts with typed interfaces and buildSearchBody() validation (cross-field constraints, NaN/Inf/fractional rejection, unknown mode guard)
  • 4 convenience methods on FluxClient: vectorSearch(), vectorFieldSearch(), hybridSearch(), boostedSearch() with Python SDK parity defaults (top_k=10, boost_factor=1.5, max_boost_results=20, hybrid weights 0.6/0.4)
  • mergeExtra() conflict guard prevents extra params from overriding validated fields
  • Extra params (where, sort) forwarded via ...rest destructuring + stripUndefined()
  • README updated with Vector Search section and buildSearchBody() examples

Test plan

  • 266 unit tests pass (55 new — client methods, model validation, defaults parity, mergeExtra)
  • src/flux coverage: 100% statements/lines/functions, 96.6% branches
  • TypeScript typecheck clean, ESLint clean, Prettier clean

Add typed models and convenience methods for Flux vector search API:

- SearchMode, VectorSearch, VectorFieldSearch, VectorBoostConfig,
  HybridConfig, SearchRequest types with buildSearchBody() validation
- vectorSearch(), vectorFieldSearch(), hybridSearch(), boostedSearch()
  on FluxClient with Python SDK parity defaults and extra param forwarding
- mergeExtra() conflict guard, checkPositiveInt() for integer enforcement
- README vector search section with examples
@loookashow loookashow merged commit dab8ef1 into main Mar 19, 2026
3 checks passed
@loookashow loookashow deleted the feat/add-vector-fields-support branch March 19, 2026 17:06
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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