fix(settings): prevent API key duplication on save#9080
Closed
localai-bot wants to merge 542 commits into
Closed
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…er#8652) fix: reload model configuration after editing (issue mudler#8647) - Add *model.ModelLoader parameter to EditModelEndpoint - Call ml.ShutdownModel() after saving config to unload the running model - Model will be reloaded on next inference request with new settings (e.g., context_size) - Update route registration to pass ml to EditModelEndpoint Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…aae68c902f7` (mudler#8655) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…#8656) Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…r#8657) Closes mudler#8119 When installing models from the gallery, files are created with 0600 permissions (owner read/write only), making them unreadable by the LocalAI server when running as a different user. This fix changes the permissions to 0644 (owner read/write, group/others read), allowing the server to read model files regardless of the user it runs as. Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…5fbf6d986fd` (mudler#8660) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
- Added named volumes (models, images) to docker-compose.yaml - Added named volumes (models, backends) to .devcontainer/docker-compose-devcontainer.yml - Changed bind mounts to named volumes for Windows compatibility Fixes mudler#8455 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
* feat(backends): add faster-qwen3-tts Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix: this backend is CUDA only Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix: add requirements-install.txt with setuptools for build isolation The faster-qwen3-tts backend requires setuptools to build packages like sox that have setuptools as a build dependency. This ensures the build completes successfully in CI. Signed-off-by: LocalAI Bot <localai-bot@users.noreply.github.com> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: LocalAI Bot <localai-bot@users.noreply.github.com> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
…udler#8663) * fix(gallery): add fallback URI resolution for backend installation When a backend installation fails (e.g., due to missing 'latest-' tag), try fallback URIs in order: 1. Replace 'latest-' with 'master-' in the URI 2. If that fails, append '-development' to the backend name This fixes the issue where backend index entries don't match the repository tags. For example, installing 'ace-step' tries to download 'latest-gpu-nvidia-cuda-13-ace-step' but only 'master-gpu-nvidia-cuda-13-ace-step' exists in the quay.io registry. Fixes: mudler#8437 Signed-off-by: localai-bot <139863280+localai-bot@users.noreply.github.com> * chore(gallery): make fallback URI patterns configurable via env vars --------- Signed-off-by: localai-bot <139863280+localai-bot@users.noreply.github.com>
…37cefa039acee` (mudler#8671) ⬆️ Update ggml-org/whisper.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…028' (mudler#8672) Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…8108) (mudler#8677) This addresses issue mudler#8108 where the legacy nvidia driver configuration causes container startup failures with newer NVIDIA Container Toolkit versions. Changes: - Update docker-compose example to show both CDI (recommended) and legacy nvidia driver options - Add troubleshooting section for 'Auto-detected mode as legacy' error - Document the fix for nvidia-container-cli 'invalid expression' errors The root cause is a Docker/NVIDIA Container Toolkit configuration issue, not a LocalAI code bug. The error occurs during the container runtime's prestart hook before LocalAI starts. Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…y detection) (mudler#8678) fix: use absolute path for CUDA directory detection The capability detection was using a relative path 'usr/local/cuda-13' which doesn't work when LocalAI is run from a different working directory. This caused whisper (and other backends) to fail on CUDA-13 containers because the system incorrectly detected 'nvidia' capability instead of 'nvidia-cuda-13', leading to wrong backend selection (cuda12-whisper instead of cuda13-whisper). Fixes: mudler#8033 Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…ailure (mudler#8679) When a backend download fails (e.g., on Mac OS with port conflicts causing connection issues), the backend directory is left with partial files. This causes subsequent installation attempts to fail with 'run file not found' because the sanity check runs on an empty/partial directory. This fix cleans up the backend directory when the initial download fails before attempting fallback URIs or mirrors. This ensures a clean state for retry attempts. Fixes: mudler#8016 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…udler#8680) fix(video): initialize model selection dropdown with current model value The Alpine.js link variable was starting empty, causing the dropdown selection to not reflect the currently selected model. This fix initializes the link variable with the current model value from the template (e.g., video/{{.Model}}), following the same pattern used in image.html. Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
…8675) Add model storage size display and RAM warning in Models tab - Backend (ui_api.go): - Added getDirectorySize() helper function to calculate total size of model files - Added storageSize, ramTotal, ramUsed, ramUsagePercent to /api/models endpoint response - Uses xsysinfo.GetSystemRAMInfo() for RAM information - Frontend (models.html): - Added storageSize, ramTotal, ramUsed, ramUsagePercent to Alpine.js data object - Added formatBytes() helper for human-readable byte formatting - Display storage size in hero header with blue indicator - Show warning banner when storage exceeds RAM (model too large for system) Addresses: mudler#6251 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
* docs: add TLS reverse proxy configuration guide Add documentation explaining how to use LocalAI behind a TLS termination reverse proxy (HAProxy, Apache, Nginx). The documentation covers: - How LocalAI detects HTTPS via X-Forwarded-Proto header - Required headers that must be forwarded - Configuration examples for HAProxy, Apache, and Nginx - Sub-path serving configuration - Testing and troubleshooting guide Fixes: Issue mudler#7176 - Web UI broken behind TLS reverse proxy Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> * docs: remove non-existent --base-url option from sub-path section --------- Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…daaf015206b` (mudler#8683) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
chore: simplify CI steps, fix gallery agent Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Update Home Assistant links in README.md Signed-off-by: Loryan Strant <51473494+loryanstrant@users.noreply.github.com>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
chore(model gallery): 🤖 add new models via gallery agent Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
chore(model gallery): 🤖 add new models via gallery agent Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
chore(model gallery): 🤖 add new models via gallery agent Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
chore(model gallery): 🤖 add new models via gallery agent Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
chore(model gallery): 🤖 add new models via gallery agent Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
* debug Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * retry instead of re-computing a response Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…4e998df70450c` (mudler#9086) ⬆️ Update ace-step/acestep.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…in_p (mudler#9092) * feat: wire min_p Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat: inferencing defaults Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore(refactor): re-use iterative parser Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore: generate automatically inference defaults from unsloth Instead of trying to re-invent the wheel and maintain here the inference defaults, prefer to consume unsloth ones, and contribute there as necessary. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore: apply defaults also to models installed via gallery Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore: be consistent and apply fallback to all endpoint Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…0ed552213ba2d` (mudler#9094) ⬆️ Update ggml-org/whisper.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…31642fb9903` (mudler#9095) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…#9097) * chore(transformers): bump to >5.0 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore: refactor to use generic model loading Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…udler#9099) chore(llama.cpp): bundle libdl, librt, libpthread in llama-cpp backend Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Removed outdated link to community curated how-tos section. Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
…er#9100) This actually caused fallbacks to be compeletely no-op as we were removing the destination dir before calling containerd.Apply Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Updated the description formatting for LocalAI. Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…cbdf8a22388` (mudler#9102) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…61eda8ca47c` (mudler#9123) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…to 0.21.3 (mudler#9121) chore(deps): bump github.com/google/go-containerregistry Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.21.2 to 0.21.3. - [Release notes](https://github.com/google/go-containerregistry/releases) - [Commits](google/go-containerregistry@v0.21.2...v0.21.3) --- updated-dependencies: - dependency-name: github.com/google/go-containerregistry dependency-version: 0.21.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…o 1.4.1 (mudler#9118) chore(deps): bump github.com/modelcontextprotocol/go-sdk Bumps [github.com/modelcontextprotocol/go-sdk](https://github.com/modelcontextprotocol/go-sdk) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/modelcontextprotocol/go-sdk/releases) - [Commits](modelcontextprotocol/go-sdk@v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: github.com/modelcontextprotocol/go-sdk dependency-version: 1.4.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#9114) Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](peter-evans/create-pull-request@v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…udler#9116) Bumps [github.com/mudler/skillserver](https://github.com/mudler/skillserver) from 0.0.5 to 0.0.6. - [Release notes](https://github.com/mudler/skillserver/releases) - [Commits](mudler/skillserver@v0.0.5...v0.0.6) --- updated-dependencies: - dependency-name: github.com/mudler/skillserver dependency-version: 0.0.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…50f8dfa3f58` (mudler#9127) ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
…84976f5b52d3a` (mudler#9128) ⬆️ Update ace-step/acestep.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Collaborator
Author
Conflict Resolution UpdateMerged upstream/master changes into this PR and resolved the merge conflict in Settings.jsx. Changes:
The PR should now be up-to-date with the latest master branch and ready for review. |
- Removed duplicate handleSave function that was causing syntax error - The duplicate declaration was introduced during a previous merge/rebase - This fixes the build-test CI failure Signed-off-by: Team Coding Agent 1 <team-coding-agent-1@localai.ai>
Collaborator
Author
|
Fixed the duplicate closing brace issue in the handleSave function. The code now properly handles the api_keys deduplication and removes the UI-only api_keys_text field before saving. |
localai-bot
force-pushed
the
fix-settings-api-keys-dup
branch
from
March 25, 2026 18:19
cd17eea to
4f77561
Compare
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.
Description
Fixes issue #9071 where saving settings from the WebUI would duplicate API keys.
Problem
The Settings.jsx page stores API keys in a textarea as (string), but the backend expects an array in . When saving, the string was being sent directly instead of being converted to an array, causing duplication issues.
Solution
Changes
Testing