fix(llm): actionable error when no LLM provider configured; scope proposal-md headings
The "fetch failed" error shown in the Enrich toast was Node.js 18+'s TypeError message when fetch() cannot connect to localhost:11434 (Ollama). This occurs whenever neither OPENAI_API_KEY nor ANTHROPIC_API_KEY is set and the function falls through to the Ollama branch. The bare message gave no guidance on how to fix it.
Wrap the Ollama fetch in a try-catch and rethrow with a clear message: "LLM provider not reachable (localhost:11434): fetch failed. Set OPENAI_API_KEY or ANTHROPIC_API_KEY in environment variables..."
This message will now surface in the Enrich toast and in Netlify function logs, making the missing API key immediately obvious.
Also constrain heading sizes inside .proposal-md so that markdown documents with # headings (e.g. cursor-generated implementation plans imported as proposals) do not render with full h1/h2/h3 sizes in the proposal detail panel.
Root cause of the hosted enrich/hints failure: OPENAI_API_KEY (or ANTHROPIC_API_KEY) is not set in Netlify env vars. Fix: Netlify dashboard → Site settings → Environment variables → add key.
0 comments
muse hub commit comment sha256:6595a80d7278b1c15f6635e0dfcd7f1369b8c5954e31c1a9fc2987e452837e7a --body "your comment"
No comments yet. Be the first to start the discussion.