P0: the app's provider setting never reaches the brain — every non-Anthropic provider is dead in shipped builds #124

Open
opened 2026-08-06 21:49:37 +00:00 by tim.lingo · 0 comments
Member

Affects every shipped build today. Onboarding offers six providers; in practice only Anthropic has ever worked. Fix is in PR #122, live for no one until that merges and a brain is rebuilt.

Symptom

A user who picks Groq (or OpenAI, Grok, Gemini, Ollama) gets {"error":"llm unavailable"} on every message, Tools on and Tools off, with no indication why.

Root cause — a name mismatch across the launcher/brain boundary

  • The launcher exports SOUL_LLM_PROVIDER / SOUL_LLM_BASE_URL, and puts the provider's key in ANTHROPIC_API_KEY and SOUL_API_KEY (installer/macos/neuron-daemons.sh:288-300).
  • The brain's provider fork reads only NEURON_LLM_0_URL / NEURON_LLM_0_FORMAT (chat.el), which nothing sets in a customer build.
  • So use_openai is always false: every turn goes to api.anthropic.com carrying, for example, a Groq key, and comes back 401 → "llm unavailable".
  • PATCH /api/config does not close the gap either — handle_config (studio.el:36) ignores llm_url/llm_key/llm_format entirely.

Evidence — side-by-side, probe server logging every hit

Identical environment (the launcher's own variables, a Groq-shaped endpoint and key):

round-9 shipping brain (sha256 15cf7d1b…, matches the manifest pin) PR #122 build
plain chat {"error":"llm unavailable"}
agentic chat {"error":"llm unavailable"} real answer, model: llama-3.3-70b-versatile
calls to the configured endpoint zero; log says [llm] using legacy ANTHROPIC_API_KEY fallback POST /v1/chat/completions, Authorization: Bearer gsk_…

Fix (in PR #122)

Brain-side fallbacks only — llm_base_url, llm_wire_format and agentic_api_key honour the launcher's own variable names, deriving the wire format from the provider id. No launcher or app change required, and Anthropic deliberately still returns "" so its native path is untouched (endpoint configurability remains #62).

Note

Not the cause of the round-9 test failure — that was independently traced to a StallWatchdog regression (see PR #122 comment). This is a separate, older defect.

🤖 Generated with Claude Code

**Affects every shipped build today.** Onboarding offers six providers; in practice only Anthropic has ever worked. Fix is in PR #122, live for no one until that merges and a brain is rebuilt. ## Symptom A user who picks Groq (or OpenAI, Grok, Gemini, Ollama) gets `{"error":"llm unavailable"}` on **every** message, Tools on and Tools off, with no indication why. ## Root cause — a name mismatch across the launcher/brain boundary - The launcher exports `SOUL_LLM_PROVIDER` / `SOUL_LLM_BASE_URL`, and puts the provider's key in `ANTHROPIC_API_KEY` **and** `SOUL_API_KEY` (`installer/macos/neuron-daemons.sh:288-300`). - The brain's provider fork reads only `NEURON_LLM_0_URL` / `NEURON_LLM_0_FORMAT` (`chat.el`), which **nothing sets in a customer build**. - So `use_openai` is always false: every turn goes to `api.anthropic.com` carrying, for example, a Groq key, and comes back 401 → "llm unavailable". - `PATCH /api/config` does not close the gap either — `handle_config` (`studio.el:36`) ignores `llm_url`/`llm_key`/`llm_format` entirely. ## Evidence — side-by-side, probe server logging every hit Identical environment (the launcher's own variables, a Groq-shaped endpoint and key): | | round-9 shipping brain (`sha256 15cf7d1b…`, matches the manifest pin) | PR #122 build | |---|---|---| | plain chat | `{"error":"llm unavailable"}` | — | | agentic chat | `{"error":"llm unavailable"}` | real answer, `model: llama-3.3-70b-versatile` | | calls to the configured endpoint | **zero**; log says `[llm] using legacy ANTHROPIC_API_KEY fallback` | `POST /v1/chat/completions`, `Authorization: Bearer gsk_…` | ## Fix (in PR #122) Brain-side fallbacks only — `llm_base_url`, `llm_wire_format` and `agentic_api_key` honour the launcher's own variable names, deriving the wire format from the provider id. No launcher or app change required, and Anthropic deliberately still returns "" so its native path is untouched (endpoint configurability remains #62). ## Note Not the cause of the round-9 test failure — that was independently traced to a StallWatchdog regression (see PR #122 comment). This is a separate, older defect. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/neuron#124