Skip to content

feat: LLM Provider Configuration - #10

Merged
davidminin merged 1 commit into
mainfrom
feat/llm-provider-config
Apr 19, 2026
Merged

feat: LLM Provider Configuration#10
davidminin merged 1 commit into
mainfrom
feat/llm-provider-config

Conversation

@davidminin

Copy link
Copy Markdown
Owner

🧠 LLM Provider Configuration (piece 1/3 for self-sustaining)

ClickUp task: 86e0yp0a2

Adds a pluggable LLM provider layer so workers can call AI models. Local-first: tries Ollama before cloud APIs.

Files (6)

File What it does
lib/llm.ts Provider abstraction — Ollama, OpenAI-compatible (vLLM/Together), OpenAI, Anthropic. Health checks, chat completion with automatic fallback.
api/llm/route.ts GET (provider status + health) / POST (test completion or run prompt)
settings/llm/page.tsx Provider dashboard — status indicators, available models, test buttons
settings/page.tsx Settings hub with navigation cards
lib/config.ts Added all LLM env vars
.env.example Documented LLM configuration with examples

Priority order

1. Ollama (local, free) — OLLAMA_URL
2. OpenAI-Compatible (vLLM, Together, OpenRouter) — LLM_API_URL
3. OpenAI (cloud fallback) — OPENAI_API_KEY
4. Anthropic (cloud fallback) — ANTHROPIC_API_KEY

Workers try local first. Cloud APIs only fire if local is down and LLM_CLOUD_FALLBACK isn't false.

Next PRs

- lib/llm.ts: provider abstraction (Ollama → OpenAI-compat → OpenAI → Anthropic)
- api/llm: health check + test completion endpoint
- settings/llm page: provider dashboard with test buttons
- settings index: navigation hub
- config.ts: LLM env vars
- .env.example: LLM provider documentation

Priority order: local Ollama (free) first, cloud fallback only if needed.
@davidminin
davidminin merged commit ca36884 into main Apr 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant