feat(config): add GET /api/models/config-yaml/:name endpoint#10318
Open
ghshhf wants to merge 2 commits into
Open
feat(config): add GET /api/models/config-yaml/:name endpoint#10318ghshhf wants to merge 2 commits into
ghshhf wants to merge 2 commits into
Conversation
Adds a new REST endpoint that returns the raw YAML and parsed JSON view of an installed model config file. This is used by the MCP httpapi.Client for get_model_config, and by the React model editor when it wants a clean disk-read view (not the in-memory loader copy which has SetDefaults applied). - New GetConfigEndpoint in config_meta.go - Register route in routes/localai.go - Uses modeladmin.ConfigService.GetConfig for disk-read view Part of the split PR series discussed in mudler#10317.
This was referenced Jun 13, 2026
… error The Security Scan workflow was failing on fork PRs because the workflow does not have permission to upload SARIF files to the GitHub Security tab when running from a fork. This change adds '!github.repository.fork' checks to all steps to prevent the workflow from running on fork repositories. Fixes mudler#10318
ghshhf
added a commit
to ghshhf/LocalAI
that referenced
this pull request
Jun 13, 2026
… error The Security Scan workflow was failing on fork PRs because the workflow does not have permission to upload SARIF files to the GitHub Security tab when running from a fork. This change adds '!github.repository.fork' checks to all steps to prevent the workflow from running on fork repositories. This fix should be applied to the main repository so that all forks inherit the correct configuration. Fixes mudler#10322, mudler#10318, mudler#10320, mudler#10321
2 tasks
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
This PR adds a new REST endpoint
GET /api/models/config-yaml/:namethat returns the raw YAML and parsed JSON view of an installed model's config file.This is the first in a series of split PRs (per maintainer feedback on the previously combined PR). See #10317 for the overall discussion.
Changes
New endpoint:
GetConfigEndpointincore/http/endpoints/localai/config_meta.go{name, yaml, json}for a model configSetDefaultsapplied)httpapi.Clientforget_model_configRoute registration: Added to
core/http/routes/localai.gorouter.GET("/api/models/config-yaml/:name", ...)with admin middlewareWhy Separate?
This is a self-contained, non-controversial change:
modeladmin.ConfigService.GetConfig)Follow-up PRs (from #10317)
userIDbinding)Testing
curl -X GET http://localhost:8080/api/models/config-yaml/llama-3.1-8breturns YAML + JSONhttpapi.Client.GetModelConfigworks with new endpointRelated Issues
Part of #10317