Commit Graph

3 Commits

Author SHA1 Message Date
welberr e2b1000198 P1–P2 complete: routing strategies, streaming, discovery, observed metrics + role catalogs
Control plane:
- fallback_roles chain in resolve_route() with cycle protection
- round_robin and least_loaded routing strategies; default_strategy dispatches all three
- Streaming chat completions: async generator, eager route resolution, SSE reasoning-strip
- POST /v1/audio/transcriptions proxy (multipart, dedicated httpx path)
- ServiceProber background task: probes /health, falls back to /v1/models for vLLM
- ServiceObserved gains loaded_model_count and vram_used_bytes
- _runtime_signals exposes loaded_model_count to route scoring

Node agent:
- discover_protocol: "ollama"|"openai"|null per-service config field
- discovery.py: discover_ollama_assets (loaded: False), _get_ollama_ps_models helper,
  query_ollama_ps, discover_openai_models, enrich_service_assets (two-phase Ollama,
  corrects stale loaded state, populates observed metrics from /api/ps)
- Heartbeat zips service dicts with config to pass protocol; allocates discovery client
  only when needed

Tests: 47 passing (up from 19)

Role catalogs (example configs):
- roles.surgical-team.example.yaml  — Brooks/Mills surgical team (surg_ prefix, 9 roles)
- roles.belbin.example.yaml         — Belbin team roles (belbin_ prefix, 9 roles)
- roles.sixhats.example.yaml        — De Bono Six Thinking Hats (sixhats_ prefix, 6 roles)
- roles.disney.example.yaml         — Disney creative strategy (disney_ prefix, 3 roles)
- roles.xp.example.yaml             — XP team roles (xp_ prefix, 5 roles)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 14:12:54 -04:00
welberr e36650a017 Add benchmarked route matching and request shaping 2026-04-07 14:45:32 -04:00
welberr b9270df3e8 Initial commit 2026-04-07 13:17:28 -04:00