Severity: HIGH (post-#1067 surface gap — documented v0.7.0 feature unreachable from MCP)
Affected code: src/mcp/mod.rs:2139-2164 (the let llm: Option<Arc<OllamaClient>> init block)
Symptom: running ai-memory mcp --tier autonomous with AI_MEMORY_LLM_BACKEND=xai, AI_MEMORY_LLM_MODEL=grok-4.3 in env produces this boot banner:
ai-memory: connecting to Ollama for Gemma 4 Effective 4B (Q4) ...
ai-memory: Ollama connected, ensuring model gemma4:e4b is available...
ai-memory: LLM ready (Gemma 4 Effective 4B (Q4))
The env vars are IGNORED. The MCP daemon connects to local Ollama for Gemma 4 every time regardless of the operator's selector.
Root cause: #1067 (v0.7.0 LLM-vendor-agnostic backend selector) landed the env-aware OllamaClient::from_env resolver into src/daemon_runtime.rs:1746-1798 (the serve HTTP daemon path). The MCP stdio path in src/mcp/mod.rs:2139 was NOT updated — it still does the legacy OllamaClient::new_with_url(ollama_url, model_id) with model_id = llm_model.ollama_model_id().
CLAUDE.md §"Feature tiers" claims: "Post-#1067 (v0.7.0): tier no longer dictates LLM vendor. Any tier can speak to any provider — local Ollama, xAI Grok, OpenAI, Anthropic, Google Gemini, DeepSeek, ..." — but for the MCP surface this claim is false until this gap is closed.
Proposed fix: mirror the daemon_runtime.rs:1756-1799 env-aware path into the MCP init: check AI_MEMORY_LLM_BACKEND first; if set, use OllamaClient::from_env; else fall through to the legacy tier-default Ollama path.
Operator impact: Codex CLI configured to use ai-memory MCP with AI_MEMORY_LLM_BACKEND=xai cannot access xAI Grok. Same gap for any client that wires ai-memory through ai-memory mcp stdio (Claude Code, Cursor, ChatGPT Desktop fallback, Continue.dev, etc.) — the entire MCP integration surface is locked to Ollama.
Release-gate impact: v0.7.0 documents provider-agnostic LLM dispatch but the MCP surface (where most clients consume the substrate) hardcodes Ollama. Fix required before ship.
Severity: HIGH (post-#1067 surface gap — documented v0.7.0 feature unreachable from MCP)
Affected code:
src/mcp/mod.rs:2139-2164(thelet llm: Option<Arc<OllamaClient>>init block)Symptom: running
ai-memory mcp --tier autonomouswithAI_MEMORY_LLM_BACKEND=xai,AI_MEMORY_LLM_MODEL=grok-4.3in env produces this boot banner:The env vars are IGNORED. The MCP daemon connects to local Ollama for Gemma 4 every time regardless of the operator's selector.
Root cause: #1067 (v0.7.0 LLM-vendor-agnostic backend selector) landed the env-aware
OllamaClient::from_envresolver intosrc/daemon_runtime.rs:1746-1798(theserveHTTP daemon path). The MCP stdio path insrc/mcp/mod.rs:2139was NOT updated — it still does the legacyOllamaClient::new_with_url(ollama_url, model_id)withmodel_id = llm_model.ollama_model_id().CLAUDE.md §"Feature tiers" claims: "Post-#1067 (v0.7.0): tier no longer dictates LLM vendor. Any tier can speak to any provider — local Ollama, xAI Grok, OpenAI, Anthropic, Google Gemini, DeepSeek, ..." — but for the MCP surface this claim is false until this gap is closed.
Proposed fix: mirror the
daemon_runtime.rs:1756-1799env-aware path into the MCP init: checkAI_MEMORY_LLM_BACKENDfirst; if set, useOllamaClient::from_env; else fall through to the legacy tier-default Ollama path.Operator impact: Codex CLI configured to use ai-memory MCP with
AI_MEMORY_LLM_BACKEND=xaicannot access xAI Grok. Same gap for any client that wires ai-memory throughai-memory mcpstdio (Claude Code, Cursor, ChatGPT Desktop fallback, Continue.dev, etc.) — the entire MCP integration surface is locked to Ollama.Release-gate impact: v0.7.0 documents provider-agnostic LLM dispatch but the MCP surface (where most clients consume the substrate) hardcodes Ollama. Fix required before ship.