Provider Strategy Guide¶
Euxis uses a semantic task classification system to route agent workloads to the optimal LLM provider. This replaces simple tier-based routing with workload-aware provider selection.
Task Classes¶
11 task classes map to provider specializations:
Task Class |
Primary Provider |
Use Case |
|---|---|---|
|
OpenAI |
General research, summarization |
|
OpenAI |
Multi-language analysis |
|
OpenAI |
Policy document generation |
|
Claude |
Code generation, debugging |
|
Claude |
System design, architecture review |
|
Claude |
Code audit, compliance review |
|
Gemini |
Long-context research |
|
Gemini |
Security analysis, vuln scanning |
|
Ollama |
Air-gapped / private code |
|
Aider |
Targeted file edits |
|
Kiro/ShellGPT |
Shell command generation |
Configuration¶
Strategy routing is configured in data/config/provider_strategy.json:
{
"defaults": {
"coding": {
"primary": "claude",
"fallback": ["gemini", "openai", "ollama"]
},
"security": {
"primary": "gemini",
"fallback": ["claude", "openai"]
}
},
"agent_class_hints": {
"librarian": "research",
"sentinel": "security",
"architect": "architecture"
},
"classification_keywords": {
"security": ["vulnerability", "cve", "exploit", "threat"]
}
}
Classification Priority¶
Task class is determined in this order:
Environment override (
EUXIS_DEFAULT_*_PROVIDER)Agent class hints (per-agent mapping in config)
Pillar classification (security pillar → security class)
Keyword matching (prompt content analysis)
Tier fallback (Reason→architecture, Code→coding, etc.)
Environment Overrides¶
Override provider selection per task class:
# Force all research tasks to Gemini
export EUXIS_DEFAULT_RESEARCH_PROVIDER=gemini
# Force all coding tasks to Ollama (local)
export EUXIS_DEFAULT_CODING_PROVIDER=ollama
# Force all security tasks to Claude
export EUXIS_DEFAULT_SECURITY_PROVIDER=claude
Route Resolution¶
The full resolution chain for a given agent:
Explicit
--providerflag (highest priority)EUXIS_LOCAL_ONLY=1forces everything to OllamaEnvironment variable for this task class
Strategy config: try primary provider, then fallbacks
Tier-based fallback (original routing)
At each step, the system checks provider availability (API keys for cloud providers, PATH detection for tools like aider/kiro).
Fallback Chains¶
When the primary provider is unavailable, fallback chains activate:
Claude unavailable → OpenAI → Gemini → Ollama
OpenAI unavailable → Claude → Gemini → Ollama
Gemini unavailable → Claude → OpenAI → Ollama
Custom fallback chains can be configured in router.json:
{
"model_fallback": {
"claude-opus-4-6": [
{"provider": "gemini", "model": "gemini-2.5-pro"},
{"provider": "openai", "model": "gpt-5.4"}
]
}
}
Tool Detection¶
For CLI tool providers (aider, kiro, sgpt), availability is checked via PATH lookup. The result is cached for the session lifetime and invalidated on config hot-reload.
Hot Reload¶
Both router.json and provider_strategy.json support hot reload.
When file timestamps change, the router automatically re-reads both
configs without requiring a restart. This enables:
Changing provider routing mid-session
A/B testing different routing strategies
Emergency provider failover
Observability¶
The router gives each decision a reason (route_reason, for example
tier-based: code) and a task class. Neither is shown or written to the
verdict artifact yet: there is no command-line switch for the router’s
verbose mode, and the artifact has no routing fields. Exposing them is
planned.