Get model capabilities from metadata#395
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR shifts Web UI capability handling from a hardcoded/shell-provided list to model-provided metadata (from model.yaml), so the backend forwards model capabilities directly to the frontend.
Changes:
- Remove the hardcoded
--capabilitiesplumbing from the snap startup script andmodelctl serve-webui. - Load the active model’s manifest and forward its
capabilitiesinto the Web UI/configpayload. - Relax backend capability validation (unknown capabilities are forwarded) and adjust unit tests accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| snap/local/server-webui.sh | Stops passing a hardcoded capabilities list to modelctl serve-webui. |
| pkg/webui/config.go | Updates supported capability constants/list and removes backend-side rejection of unknown capabilities. |
| pkg/webui/config_test.go | Updates validation tests to reflect “unknown capability is accepted”; removes the SupportedCapabilities test. |
| cmd/modelctl/commands/serve-webui.go | Removes the --capabilities flag and loads capabilities from the active model manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1
to
5
| package webui | ||
|
|
||
| import ( | ||
| "testing" | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
SupportedCapabilites() is only returning a slice of strings. No relevant tests can be performed IMO
farshidtz
reviewed
Jul 10, 2026
farshidtz
approved these changes
Jul 10, 2026
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.
Model capabilities are now retrieved from metadata inside
model.yamland passed to webui, dropping the need for hardcoded values.Supported capabilities are validated at build time for each model against a known list (PR).
Frontend will ignore and not show any unsupported capability (PR)