Skip to content

Cover generate, embed, and rerank with one provider protocol - #699

Merged
arrry-hydraDB merged 5 commits into
hydra-db:mainfrom
jaywyawhare:feat/provider-protocol
Dec 5, 2026
Merged

arrry-hydraDB merged 5 commits into
hydra-db:mainfrom
jaywyawhare:feat/provider-protocol

Conversation

@jaywyawhare

@jaywyawhare jaywyawhare commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Cover generate, embed, and rerank with one provider protocol in both SDKs, so a custom provider plugs into all three capabilities uniformly. A gateway guide shows a configured chat client and a custom provider, and existing providers satisfy the unified protocol.

Implementation details

Decisions

  • Both SDKs export one Provider protocol for generate, embed, and rerank, plus the public vector and score types.
  • build_provider and buildProvider adapt a configured generation client with caller-supplied embedding and scoring delegates; explicit llm, embedder, and reranker options take precedence.
  • Provider reranking respects the cost cap; embedding seeds follow the existing tier selection.
  • The gateway guide covers a configured chat client and a custom provider in both SDKs; tests use stubs.

Validation

  • Six new cases fail or error on base; both conformance files are updated.
  • scripts/precheck.py passes (459 changed lines). Full suites on Kuzu pass, apart from the existing macOS pipe test in cli.test.ts. Two TypeScript cases timed out under the full run and passed on isolated reruns.
  • Ruff, lint, typecheck, and build pass.

Limits

Named generation output exports stay with the client-protocol change, and task-level configuration stays with the config-shape change. Invalid provider objects use invalid_argument with field provider.

Linked issue

Closes #678

AI Assistance

AI tools helped write and test parts of this. I reviewed and ran every change.

Checklist

  • Implements an issue a maintainer has /approved.
  • Small and scoped to that issue.
  • New errors have a code and hint, the same on API, CLI, and MCP in both SDKs (see AGENTS.md). No new codes; reuses invalid_argument.
  • Breaking changes described below, or none.

Breaking changes

None.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@arrry-hydraDB arrry-hydraDB added feature New capability area: extraction LLM extractor and clients effort: L Design change or many modules labels Dec 4, 2026
@arrry-hydraDB
arrry-hydraDB marked this pull request as ready for review December 4, 2026 22:29

@arrry-hydraDB arrry-hydraDB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arrry-hydraDB
arrry-hydraDB merged commit a7f863d into hydra-db:main Dec 5, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: extraction LLM extractor and clients effort: L Design change or many modules feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover generate, embed, and rerank with one provider protocol

2 participants