eca icon indicating copy to clipboard operation
eca copied to clipboard

eca cannot find models from local llm server

Open apalazzi opened this issue 9 months ago • 9 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug

I'm running a local ai server with llama.cpp and llama-swap, however it fails to retrieve the models from the server.

~/.config/eca/config.json

{
  "providers": {
    "delfi": {
      "api": "openai-chat",
      "url": "http://delfi:8088/v1",
      "key": "NONE",
      "fetchModels": true
    }
  }
}

logs:

[server] Starting server...
[DB] No existing DB cache found for /home/andrea/.cache/eca/db.transit.json
:db/read-cache 0ms
:db/read-cache 0ms
[DB] Loading from workspace-cache caches...
:eca/initialize 1ms
[MODELS][MODELS] [MODELS]  Provider 'anthropic': Using models.dev provider-id fallback (url 'https://api.anthropic.com' not matched)Provider 'google': Using models.dev provider-id fallback (url 'https://generativelanguage.googleapis.com/v1beta/openai' not matched)Provider 'github-copilot': Loaded 20 models from models.dev
[MODELS] Provider 'google': Loaded 26 models from models.dev
[MODELS] Provider 'openai': Using models.dev provider-id fallback (url 'https://api.openai.com' not matched)

[MODELS] Provider 'openai': Loaded 42 models from models.dev

[MODELS] Provider 'anthropic': Loaded 22 models from models.dev
[MODELS] [7128] Sending body: 'null', headers: '{"x-llm-application-name" "eca", "Content-Type" "application/json", "Authorization" "Beare***** NONE"}', url: 'http://delfi:8088/v1/models'
[MODELS] Provider 'delfi': Failed to fetch models from http://delfi:8088/v1/models: null
[MODELS] Fetched model catalogs from 4 providers in 5040.5ms
[LLM-API] Default LLM model 'null' decision ':no-available-model'
[LLM-API] Default LLM model 'null' decision ':no-available-model'
:eca/initialized 5221ms

The server returns them models correctly AFAICT:

~$ curl http://delfi:8088/v1/models
{"data":[{"created":1771265628,"id":"CodeLlama-34b-Python-hf.i1-Q5_K_M-test","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"DIES-Qwen3-Coder-Next-UD-Q4_K_XL","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"DIES-codellama-70b-instruct","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"Qwen3-30B-A3B-Thinking-2507-Claude-4","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"Qwen3-30B-A3B-python-coder.i1-Q5_K_M","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"glm-4.7-flash-claude-4.5-opus.q6_k","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"granite-docling-258M-f16","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"lmstudio-community_DeepSeek-R1-Distill-Qwen-32B-Q4_K_M","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"orionstar-yi-34b-chat-llama","object":"model","owned_by":"llama-swap"},{"created":1771265628,"id":"unsloth_Qwen3-30B-A3B-Q4_K_M","object":"model","owned_by":"llama-swap"}],"object":"list"}

Expected behavior

Should retrieve the models available on the local server.

Doctor

/doctor

ECA version: 0.101.1

Server cmd: /home/andrea/.emacs.d/eca/eca server --log-level debug

Workspaces: /home/andrea/.emacs.d

Default model: 

Login providers: 
anthropic: {}
azure: {}
deepseek: {}
github-copilot: {}
google: {}
openai: {}
openrouter: {}
z-ai: {}

Relevant env vars: 
DEBUGINFOD_URLS=https://debuginfod.ubuntu.com 


Credential files: None found
**Screenshots**

Additional context Running on emacs.

apalazzi avatar Feb 16 '26 18:02 apalazzi

@apalazzi I pushed to master a minor fix to not require key, but besides that just tested with llama-cpp and worked properly the model fetch

ericdallo avatar Feb 18 '26 14:02 ericdallo

It still doesn't work on my setup, can you tell me how do I check I have the latest version (I'm using eca-emacs) and how can I debug the issue?

apalazzi avatar Feb 19 '26 20:02 apalazzi

/doctor in the chat will tell which version you are using

ericdallo avatar Feb 19 '26 20:02 ericdallo

I think a good way to debug this is enabling debug logs and checking the request to /models in eca-show-stderr

ericdallo avatar Feb 19 '26 20:02 ericdallo

No joy with 0.104.0 installed today. A config.json of

{
  "providers": {
      "plus-inf": { "url": "http://plus-inf.local:13731/v1", "api": "openai-chat", "key": "" }
    }
  }
}

leads to

[...]
[2784] Provider 'plus-inf': Fetching models from http://plus-inf.local:13731/v1/models
[...]
[MODELS] Provider 'plus-inf': Failed to fetch models from http://plus-inf.local:13731/v1/models: null
[MODELS] Fetched model catalogs from 4 providers in 5004.4ms

curl and eww produce voluminous text from the same URL.

So likely just something missing in some documentation somewhere. No idea where.

jasonriedy avatar Feb 22 '26 00:02 jasonriedy

I pushed a log improvement to understand why it's failing to fetch the models, can you try 0.104.1 @jasonriedy ?

ericdallo avatar Feb 23 '26 11:02 ericdallo

Blah, looks like it was name lookup. I was using a .local name for mDNS resolution, but I guess this Java version didn't like it. Does tend to happen, alas. Sorry for the noise.

Someday I'll try wrapping it in mptcpize run. It'd be nice to unplug, walk to another room, and have nothing stop. ;)

jasonriedy avatar Feb 23 '26 16:02 jasonriedy

Oh, the new report direct from Java was a connection failure. Made the cause immediately obvious to me, but that's because I know mDNS support can be flaky. Now to play with eca more! Looks neat, plus Lisp! Should have been able to be debugged by attaching to eca via whatever SLIME-alike there is, but then I'd have to understand more of the code.

jasonriedy avatar Feb 23 '26 16:02 jasonriedy

Glad you figured it out!

ericdallo avatar Feb 23 '26 16:02 ericdallo