Repository navigation
feat: add host-owned chat model SDK facade - #695
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please review the current PR head 2a034ce. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads. The follow-up isolates the test's runtime provider fixture instead of augmenting the global provider-options union. Both Bun's CI typechecker and TypeScript now pass; all 36 model tests pass. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Remote SDK graphs need to use the host's configured model so builder settings, credentials and model-bound protections can remain authoritative.
HostChatModeladds a native LangChain facade over a versioned host model service, preserving assistant chunks, reasoning, tool fragments, usage and provider metadata.The facade snapshots execution identity and approved schemas, restricts tool binding to those schemas, normalizes tool choice, supports nonstreaming models, forwards cancellation and requests stream cleanup. Unexpected host errors are sanitized; no automatic retry can duplicate an ambiguous provider request. Host callbacks stay on the actual model and worker callbacks remain local.
This completes the SDK consumer contract, not the LibreChat host adapter. The documented next integration must authenticate and authorize each call, enforce shared admission/deadlines/queue bounds, preserve native messages across transport, and bind builder policy/accounting. Protected saved-agent guards remain necessary. Non-function provider tools, dynamic schema changes and child/fallback model authorization require explicit integration. See
docs/host-model.mdfor the boundary and parity requirements.Validation: 36 new model tests, including a real SDK graph and native tool loop; 302 tests passed across the model/harness/provider-registry/tracing suites before the final additional stream-cleanup case; TypeScript, scoped ESLint, CJS/ESM/declaration build, and circular-dependency checks pass. No package version change; SDK release remains a separate commit/PR. Independent of release PR #694.