Skip to content

Conversation

mudler
Copy link
Owner

@mudler mudler commented Oct 10, 2025

Description

This PR simplifies the UI to:

  • Remove the generation form on importing/editing models (because it was, partially broken, and uneasy to keep up-to-date)
  • Prefers a simple, YAML editor instead to quickly change the model settings
  • Avoid to push model config defaults in the view to keep the model definition simple and lean

The rationale is to avoid having something which feels partially broken-ish, to have instead a simpler but more effective way to manage the configs.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

// Marshal the config to JSON for the template
configJSON, err := json.Marshal(modelConfig)
configData, err := os.ReadFile(modelConfigFile)

Check failure

Code scanning / gosec

Potential file inclusion via variable Error

Potential file inclusion via variable
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modelConfigFile is not coming from the request, but it's where the config loader module found out the config

// Write to file
if err := os.WriteFile(configPath, yamlData, 0644); err != nil {
// Write new content to file
if err := os.WriteFile(configPath, body, 0644); err != nil {

Check failure

Code scanning / gosec

Expect WriteFile permissions to be 0600 or less Error

Expect WriteFile permissions to be 0600 or less
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 8f5f7d6
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/68e9040b221a010008cfe127
😎 Deploy Preview https://deploy-preview-6424--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mudler mudler merged commit dc2be93 into master Oct 10, 2025
29 of 31 checks passed
@mudler mudler deleted the chore/simplify-edit-model branch October 10, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant