feat: supports hiding internal task models from external display#123
Merged
Conversation
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
Add model availability scope so admins can mark platform models as either platform-wide or internal-task-only. Internal task models are hidden from user model lists and blocked from direct user routing, while system tasks such as title generation, labels, and compaction can still route to them explicitly.
The implementation adds a first-class
access_scopeplatform model field, routes user and internal calls with explicit scope, uses a safe default that treats missing/unknown route scope as user scope, and adds admin UI controls for configuring the scope from the model sheet and models table.Change type
Affected areas
Verification
cd backend && go test ./internal/application/channel/... ./internal/application/conversation/... ./internal/transport/http/channel/... ./internal/infra/persistence/postgres/channel/...cd frontend && pnpm lintzh-CNanden-USadmin model messagesScreenshots, API examples, or logs
Not included. UI change is limited to the admin model form/table availability controls.
Configuration, migration, and compatibility notes
Adds
llm_platform_models.access_scope varchar(32) NOT NULL DEFAULT 'public'through the PostgreSQL baseline. Existing models remain platform-wide by default.Admin model create/update APIs now accept and return
accessScopewith valuespublicorinternal. Public model listing excludes internal-task models.Documentation
Security and privacy
Checklist
.pycfiles,.envfiles, and local storage data are not committed.