feat: LLM Provider Configuration - #10
Merged
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧠 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)
lib/llm.tsapi/llm/route.tsGET(provider status + health) /POST(test completion or run prompt)settings/llm/page.tsxsettings/page.tsxlib/config.ts.env.examplePriority order
Workers try local first. Cloud APIs only fire if local is down and
LLM_CLOUD_FALLBACKisn'tfalse.Next PRs