feat: user-defined LLM committees - #341
Open
duncanmcqueen wants to merge 2 commits into
Open
Conversation
Adds per-user model committees: members answer in parallel and a chair synthesizes, configurable under Settings > Models. Persisted on the user profile (model_committees column), resolved through the model registry, and enforced for API-key availability across members and chair.
|
|
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
Adds user-defined LLM committees: a committee runs its members in parallel and a chair synthesizes the result, configurable per user under Settings > Models and persisted on the profile (
user_profiles.model_committees).Built on the model-registry foundation (#339).
What's added
Backend
lib/llm/committee.ts— parallel member execution + chair synthesis, with cycle and self-chair guards.lib/userCommittees.ts— validation/normalization of user committee configs (max 8 committees, max 8 members).lib/llm/registry.ts—getCommitteeModeland friends accept a backward-compatible optionaladditionalCommitteesarray so user committees resolve like configured ones.lib/llm/{models,index}.ts— committee-aware model resolution, availability checks, and chat/complete dispatch.lib/chat/streaming.ts— loads the user's committees and resolves a usable model through them.routes/user.ts—model_committeeson the profile (select/serialize/PATCH) plusGET /user/models; profile reads tolerate pre-migration databases.routes/tabular.ts— committee-aware model-availability messages.migrations/20260813_02_user_model_committees.sql+schema.sql.Frontend
ModelToggle— a "Committee" group listing the user's committees, with reset-to-default when a committee is removed.mikeApi/UserProfileContext— committee types, profile state, and save.Validation
backend:tsc --noEmitclean;vitest run655 passed, 24 skipped (+14 committee tests).frontend:tsc --noEmitclean;vitest run292 passed + 4 pre-existingBlob.text()failures in untouchedmikeApi.test.ts.This PR is stacked on #339 (
feat/model-registry-foundation); retarget tomainonce that merges.