Repository navigation
Closed
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
Milestone
Description
Summary & Problem Statement
Currently, devops-cli AI workloads connect directly to individual Ollama daemonset pods or nodes (e.g. hawk.lan:11434, condor:11434), requiring manual node routing, static model mappings, and risk of GPU OOM or eviction when multiple tasks contend for VRAM.
Proposed Architecture & Capabilities
-
Unified LLM Gateway & Routing Service (
k8s/llm/gateway/,devops ai gateway):- Deploy LiteLLM Proxy / AI Gateway in
llmnamespace with single cluster-internal endpoint (http://llm-gateway.llm.svc.cluster.local:4000/v1). - Least-latency and least-busy load balancing across heterogeneous Ollama nodes and vLLM instances.
- Automatic retry loops, exponential backoff, health-probe-driven failover, and circuit breakers.
- Virtual tiering and model aliases (
devops-chat,devops-coder,devops-reasoning,devops-embedding). - Distributed token-bucket rate limiting via Valkey and outbound caching via Squid proxy.
- Deploy LiteLLM Proxy / AI Gateway in
-
vLLM Continuous Batching & Tensor Parallelism (
k8s/llm/vllm/):- Multi-GPU Tensor Parallelism (
$TP=2$ ) oncondordual RTX 3090 (48GB VRAM) for 70B models (llama-3.3-70b-instruct,qwen2.5-coder-32b). - PagedAttention and continuous batching for 5-10x throughput over Ollama during multi-file reviews.
- Multi-GPU Tensor Parallelism (
-
Context-Window & VRAM-Aware Dynamic Model Router (
devops_cli.ai.router.gateway):- Automatic context-size inspection:
$\le 16\text{k}$ to fast single-GPU nodes,$\ge 32\text{k}-64\text{k}$ to multi-GPU vLLM.
- Automatic context-size inspection:
-
FastMCP Gateway Tools & Telemetry:
- FastMCP tools (
ai_gateway_status,ai_gateway_routes,ai_gateway_failover,ai_vllm_scale) and cluster GPU resource. - OpenTelemetry tracing spans and Prometheus metrics.
- FastMCP tools (
Acceptance Criteria
- LiteLLM / AI Gateway Helm/K8s manifests authored under
k8s/llm/gateway/. - vLLM Tensor Parallelism manifests authored under
k8s/llm/vllm/. - Client dynamic routing and fallback implemented in
src/devops_cli/ai/client/. - FastMCP tools and system resource exposed.
- Full CI suite passing with
$\ge 90%$ code coverage.
Metadata
Metadata
Assignees
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/aiAI review pipeline, personas, prompts, LLM client, or RAGscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ai): remediate review comments on llm gateway, vllm manifests, an…
feat(ai): high-throughput LLM gateway and distributed model router (#142
feat(release): v0.2.19 (#217)