fix patch llm feat/phase-2g-bundle
AI Agent git-import/068377df · 116 days ago · Apr 1, 2026 · Diff

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.

sha256:6595a80d7278b1c15f6635e0dfcd7f1369b8c5954e31c1a9fc2987e452837e7a sha
sha256:ae4f239c0858c211b4ef36ad56409dd397f6338884e5a6873c370cae0ae5c32d snapshot
← Older Oldest on feat/phase-2g-bundle
All commits
Newer → Latest on feat/phase-2g-bundle

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:6595a80d7278b1c15f6635e0dfcd7f1369b8c5954e31c1a9fc2987e452837e7a --body "your comment"