Initial commit: Agentic OS troubleshooting platform
Self-hosted, Docker-based agentic troubleshooting platform: FastAPI backend + LangGraph agent, Next.js UI, tiered LLM routing (local Ollama -> Gemini -> DeepSeek -> OpenRouter), MCP server manager, encrypted device credentials, RBAC, audit log, project-memory + Obsidian integrations, and editable troubleshooting decision rules tuned for the GeneseasX vessel stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
backend/app/services/llm.py
Normal file
24
backend/app/services/llm.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""LLM client builders — delegates tier selection to model_router."""
|
||||
from __future__ import annotations
|
||||
|
||||
from app.config import settings
|
||||
from app.services.llm_usage import ModelInfo
|
||||
from app.services.model_catalog import entry_for_model
|
||||
from app.services.model_config import get_routing_config, resolve_tier_model
|
||||
from app.services.model_router import build_chat_model, entry_to_info
|
||||
|
||||
|
||||
async def triage_model():
|
||||
cfg = await get_routing_config()
|
||||
entry = resolve_tier_model(cfg, "local")
|
||||
if not entry:
|
||||
entry = entry_for_model("ollama", settings.llm_local_model, "local")
|
||||
return build_chat_model(entry, temperature=0.0)
|
||||
|
||||
|
||||
async def triage_model_info() -> ModelInfo:
|
||||
cfg = await get_routing_config()
|
||||
entry = resolve_tier_model(cfg, "local") or entry_for_model(
|
||||
"ollama", settings.llm_local_model, "local"
|
||||
)
|
||||
return entry_to_info(entry, "triage")
|
||||
Reference in New Issue
Block a user