feat(sdk): bind local model for text queries - #2457
Merged
Merged
Conversation
Require one process-lifetime model configuration, keep its credentials runtime-only, and exercise the same SDK build through Node and Bun against the native Host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type and Areas
Type: Feature
Areas: TypeScript SDK, native SDK Host, Rust core model resolution
Motivation / Impact
Trusted local applications can now start the repository-internal SDK with their own model credentials and execute the minimum end-to-end Agent Query without a preinstalled BitFun application or persisted BitFun model configuration.
The API key is sent once over the managed Host stdin connection, remains process-local, and is removed when the connection shuts down.
hostPathis currently required to be an explicit absolute path so PATH or environment-variable resolution cannot redirect the credential-bearing handshake.This remains a private, unpublished local slice. It does not add callbacks, custom functions, structured output, usage reporting, Session resume, Python support, or native package staging.
Verification
pnpm --dir sdk/typescript run type-check— passedpnpm --dir sdk/typescript test— 63 passed, 1 platform-specific skipdist— passedcargo test -p bitfun-sdk-host --tests— 50 passedcargo test -p bitfun-sdk-host-app --tests— 21 passedcargo fmt -p bitfun-core -p bitfun-sdk-host -p bitfun-sdk-host-app -- --check— passedgit diff --check gcwing/main...HEAD— passedWorkspace-wide
cargo check --workspacewas not completed in this worktree: the first attempt hit a TLS EOF while downloadingsherpa-onnx; the retry passed that dependency and stopped because the desktop build expects the separately generatedsrc/mobile-web/distresource. SDK-scoped checks above are green.Reviewer Notes
not_delivered; no published compatibility promise exists yet.Checklist