Non-Anthropic providers are broken end-to-end: launcher exports SOUL_LLM_BASE_URL, engine reads NEURON_LLM_0_URL — so use_openai is always false and a Groq key gets POSTed to api.anthropic.com (and that path has no tools anyway) #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Filed by Neuron (Tim's instance) 2026-08-05. All line numbers from
neuronmain(HEAD4171aad) and the round-7 launcher; the byte-level check is against the shipped brain.I started from a narrower finding — tools are not passed on the OpenAI-compatible path — and it is true, but it is the second problem. The first is that the OpenAI-compatible path can never execute in a shipped install. Both are below, in the order they need fixing.
Problem 1: the launcher and the engine use different env var names, so
use_openaiis always falseThe engine reads (
neuron/chat.el:1295, 1299):The launcher exports (
_wt-beta-round7/resources/macos-arm64/neuron-daemons.sh:287-299):It exports
SOUL_LLM_BASE_URL. It never exportsNEURON_LLM_0_URLorNEURON_LLM_0_FORMATat all.Nothing reads
SOUL_LLM_BASE_URL. Anenv("...")search across the engine sources returns zero reads forSOUL_LLM_BASE_URL,SOUL_LLM_PROVIDERandSOUL_API_KEY. Confirmed at the byte level in the shipped brain (_wt-beta-round7/resources/macos-arm64/neuron, md585a19bd6e83a9f96f60a7b7a17e5745d),strings -a | grep -cx:NEURON_LLM_0_URLNEURON_LLM_0_FORMATSOUL_LLM_BASE_URLSo at
chat.el:2103the fork evaluates withllm_base_url() == ""andllm_wire_format() == "anthropic":false && false—use_openaiis unconditionally false in every shipped configuration. The OpenAI-compatible path added by #65 is unreachable dead code as packaged.What that means for a Groq user
Every provider falls into the Anthropic branch. That branch has the endpoint hardcoded (
chat.el:2085andchat.el:2167):and takes its key from
agentic_api_key()(chat.el:1436-1442), which readsANTHROPIC_API_KEYfirst — into which the launcher has put whatever provider key the user saved (line 298). A user who picks Groq, pastes agsk_…key, and sends a message causes that key to be POSTed toapi.anthropic.comin Anthropic wire format.Two consequences, both bad:
neuron-daemons.sh:165-171, includinggroq) BASE_URL="https://api.groq.com/openai/v1"— it just hands it to the engine under a name the engine does not read.Commercial weight: Groq is the free, zero-cost lane onboarding recommends to new users (
OnboardingView.kt:57-58, added in ui#194). It is the path a free-tier beta user is most likely to take.The fix
Align the names — one side or the other, your call. Cheapest is for the engine to accept the names the launcher already exports (
SOUL_LLM_BASE_URL, plus a wire-format derived fromSOUL_LLM_PROVIDER) while keepingNEURON_LLM_0_*as the override. Worth a boot-time log line stating the resolved provider, base URL and wire format, so a mismatch like this announces itself instead of silently degrading.Problem 2: once the path is reachable, it still has no tools
chat.el:2103-2108— the fork happens before the tool list is used, and only one branch receives it:The Anthropic branch is handed
tools_json. The OpenAI branch is not — and cannot be:openai_chat_completehas no tools parameter in its signature (chat.el:1318):There is no tool loop on that path either — it is a single completion call. So on OpenAI, Grok, Gemini, Groq and Ollama an "agentic" turn has no tools whatsoever. The code is honest about it (
chat.el:1290, "v1 SCOPE: plain chat completion only — NO tools / agentic loop yet (that is a follow-up port)") — this issue is to make that follow-up port a tracked item, because the app has been shipping the promise.Ours, already fixed: our app-side prompt was telling those users they had file and command tools. That text is now provider-aware in neuron-ui#223. The engine-side port is yours.
Order of operations
Cross-refs: neuron#65 (added the OpenAI-compatible path), neuron#62 (configurable inference endpoint + auth token — same surface), neuron-ui#223 (app-side prompt honesty, ours), neuron-ui#193 (the two-bill / free-lane story), neuron-ui#213 (2026-08-03 bug harvest).