[GH-ISSUE #654] [BUG]: Failed to save LLM settings #374

Closed
opened 2026-02-22 18:19:11 -05:00 by yindo · 7 comments
Owner

Originally created by @RasterZero on GitHub (Jan 27, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/654

How are you running AnythingLLM?

Docker (local)

What happened?

Im trying to save the settings while it's pointing to a LocalAI API.

Are there known steps to reproduce?

Just click save after entering the Local AI Base UL and Selecting a model in the Chat Model Selection drop down. Local API Key is blank.

Error is
image

Originally created by @RasterZero on GitHub (Jan 27, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/654 ### How are you running AnythingLLM? Docker (local) ### What happened? Im trying to save the settings while it's pointing to a LocalAI API. ### Are there known steps to reproduce? Just click save after entering the Local AI Base UL and Selecting a model in the Chat Model Selection drop down. Local API Key is blank. Error is ![image](https://github.com/Mintplex-Labs/anything-llm/assets/103606760/085b5e49-319a-4ffb-b1cf-0e82e2840cfd)
yindo added the possible bugneeds info / can't replicate labels 2026-02-22 18:19:11 -05:00
yindo closed this issue 2026-02-22 18:19:11 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 29, 2024):

Please check the docker logs and the chrome network inspector logs for the full error with traceback and post that here. That error seems to be coming from the server backend, so the full error is likely in your docker container logs.

@timothycarambat commented on GitHub (Jan 29, 2024): Please check the docker logs and the chrome network inspector logs for the full error with traceback and post that here. That error seems to be coming from the `server` backend, so the full error is likely in your docker container logs.
Author
Owner

@hittle2015 commented on GitHub (Mar 17, 2024):

I ran into the same issue when trying to run a docker: here is the docker log

TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11731:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ollamaAIModels (/app/server/utils/helpers/customModels.js:96:18)
at async getCustomModels (/app/server/utils/helpers/customModels.js:25:14)
at async /app/server/endpoints/system.js:827:35 {
cause: Error: connect ECONNREFUSED 127.0.0.1:11434
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 11434
}
}
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11731:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ollamaAIModels (/app/server/utils/helpers/customModels.js:96:18)
at async getCustomModels (/app/server/utils/helpers/customModels.js:25:14)
at async /app/server/endpoints/system.js:827:35 {
cause: Error: connect ECONNREFUSED 127.0.0.1:11434
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 11434
}
}

@hittle2015 commented on GitHub (Mar 17, 2024): I ran into the same issue when trying to run a docker: here is the docker log TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11731:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:96:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:25:14) at async /app/server/endpoints/system.js:827:35 { cause: Error: connect ECONNREFUSED 127.0.0.1:11434 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 11434 } } TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11731:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:96:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:25:14) at async /app/server/endpoints/system.js:827:35 { cause: Error: connect ECONNREFUSED 127.0.0.1:11434 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 11434 } }
Author
Owner

@hittle2015 commented on GitHub (Mar 17, 2024):

by adding --net=host, I can choose model from the drop-down list but the failed to save LLMs still remains. docker logs shows:
nc improve AnythingLLM.
prisma:info Starting a sqlite pool with 21 connections.
fatal: not a git repository (or any of the parent directories): .git
getGitVersion Command failed: git rev-parse HEAD
fatal: not a git repository (or any of the parent directories): .git
[TELEMETRY SENT] {
event: 'server_boot',
distinctId: 'bad38249-92b4-4bc4-9ef3-65431751adda',
properties: { commit: '--', runtime: 'docker' }
}
Primary server in HTTP mode listening on port 3001

@hittle2015 commented on GitHub (Mar 17, 2024): by adding --net=host, I can choose model from the drop-down list but the failed to save LLMs still remains. docker logs shows: nc improve AnythingLLM. prisma:info Starting a sqlite pool with 21 connections. fatal: not a git repository (or any of the parent directories): .git getGitVersion Command failed: git rev-parse HEAD fatal: not a git repository (or any of the parent directories): .git [TELEMETRY SENT] { event: 'server_boot', distinctId: 'bad38249-92b4-4bc4-9ef3-65431751adda', properties: { commit: '--', runtime: 'docker' } } Primary server in HTTP mode listening on port 3001
Author
Owner

@timothycarambat commented on GitHub (Mar 18, 2024):

You are on docker it appears. Your host network is running ollama (bound to 127.0.0.1). Docker will resolve 127.0.0.1 internally in the container, not on the host. Without modifying any elements, you should be able to just use docker.host.internal instead of 127.0.01 and it should bind.

Optionally, you can change the binding for ollama so this bridge can work. It is converted in the documentation here - which should help!
https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/AiProviders/ollama/README.md

@timothycarambat commented on GitHub (Mar 18, 2024): You are on docker it appears. Your host network is running ollama (bound to 127.0.0.1). Docker will resolve 127.0.0.1 internally in the container, not on the host. Without modifying any elements, you should be able to just use `docker.host.internal` instead of 127.0.01 and it should bind. Optionally, you can change the binding for ollama so this bridge can work. It is converted in the documentation here - which should help! https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/AiProviders/ollama/README.md
Author
Owner

@ljubomirb commented on GitHub (May 21, 2024):

This error exist for a long time, don't know how it is still here. It is a permission issue. File .env must be set chmod 777, then it works.

@ljubomirb commented on GitHub (May 21, 2024): This error exist for a long time, don't know how it is still here. It is a permission issue. File .env must be set chmod 777, then it works.
Author
Owner

@a3igner commented on GitHub (Jan 14, 2025):

This error exist for a long time, don't know how it is still here. It is a permission issue. File .env must be set chmod 777, then it works.

Where is this .env file that one needs to fix permissions for?
I have the same issue. Suddenly cannot select/save the LLM model option. Says "Failed to save LLM settings: Load failed"

I reinstalled docker image but to no avail.

@a3igner commented on GitHub (Jan 14, 2025): > This error exist for a long time, don't know how it is still here. It is a permission issue. File .env must be set chmod 777, then it works. Where is this .env file that one needs to fix permissions for? I have the same issue. Suddenly cannot select/save the LLM model option. Says "Failed to save LLM settings: Load failed" I reinstalled docker image but to no avail.
Author
Owner

@v3ss0n commented on GitHub (May 10, 2025):

still happening , the settings aren't remembered.

@v3ss0n commented on GitHub (May 10, 2025): still happening , the settings aren't remembered.
yindo changed title from [BUG]: Failed to save LLM settings to [GH-ISSUE #654] [BUG]: Failed to save LLM settings 2026-06-05 14:34:58 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#374