Repository navigation
Provide the LLM client to the chat-completions route - #106
Closed
its-janghoon wants to merge 1 commit into
Closed
its-janghoon wants to merge 1 commit into
its-janghoon wants to merge 1 commit into
Conversation
/v1/chat/completions calls the model directly, with no session in between, so it needs @redrob/LLMClient in the route tree itself. Both route trees (packages/server routes and the daemon's httpapi server) listed httpClient but not llmClient, and the layer compiler only exposes group members to handlers. Every call to the OpenAI-compatible route on v0.6.4 therefore died with a 500 "Service not found: @redrob/LLMClient" before a provider was chosen, for every app on the shared daemon. Adds the node to both groups and a route-level regression test that drives the production tree and asserts the request reaches the model layer.
Member
Author
|
Reopened as #107 from a hotfix/ branch (branch-name gate). |
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
POST /v1/chat/completionson the shared daemon (v0.6.4) answers 500Service not found: @redrob/LLMClientfor every request, with or without tools, any model. The route calls the model directly (no session), so it needsllmClientin the route tree; both route trees listedhttpClientbut notllmClient, and the layer compiler exposes only group members to handlers.Found while wiring Redrob Grow's agent planner to the daemon: 915/915 cycles fell back to rules with this error.
Changes
packages/server/src/routes.ts: addllmClienttoapplicationServicespackages/redrob/src/server/routes/instance/httpapi/server.ts: addllmClientto theappgrouppackages/redrob/test/server/chat-completion-route.test.ts: drives the production route tree; fails on develop with the 500, passes with the fixTested
bun test test/server/chat-completion-route.test.ts test/server/httpapi-cors.test.ts: 6 passbun run typecheckin packages/server and packages/redrob: clean