Soul: make inference endpoint + auth token configurable (unblocks hosted Pro/Max/trial) #62
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?
Hi Will — small, scoped soul change (no rush; queue behind #55). Unblocks hosted-tier inference via Neuron's metered gateway. Full spec: docs repo
specs/SOUL-configurable-inference-endpoint.md.Why
Hosted tiers should send inference to Neuron's gateway (LiteLLM-class: holds our key, enforces per-user budget caps, meters, bills) instead of straight to Anthropic. The gateway speaks the Anthropic Messages API format, so the soul needs NO payload/routing rewrite — only a configurable endpoint + auth. Cost-control core already proven: docs
research-archive/p0-prototypes/gateway-cap-test/(14/14 cap tests; the $3 trial cap is provably absolute).The change (~2 lines + a config read), in chat.el
Endpoint is hardcoded at chat.el:1699 and chat.el:1758 (
api_url = "https://api.anthropic.com/v1/messages"). Auth =agentic_api_key()(chat.el:1197) → env ANTHROPIC_API_KEY / NEURON_LLM_0_KEY as x-api-key.env("NEURON_INFERENCE_URL"); if set use it, else fall back to the Anthropic default (both sites).env("NEURON_INFERENCE_TOKEN")) as the auth header for hosted mode; fall back to agentic_api_key() when unset.Acceptance
Scope
NOT a routing rewrite or multi-provider abstraction (that's the larger P2.8 vision) — just endpoint + token from config. Ships with the next soul regen. This is the one dependency gating hosted Pro/Max/trial revenue; gateway + billing + app UX are being built in parallel on our side.
Thanks — Tim + Neuron