diff --git a/docs/model-chain.md b/docs/model-chain.md index 86a9e24..69f765c 100644 --- a/docs/model-chain.md +++ b/docs/model-chain.md @@ -1,18 +1,53 @@ -# AI Model Chain — IT Pro Partner +# AI Model Architecture — IT Pro Partner -**Updated:** July 24, 2026 +**Updated:** July 27, 2026 -## Active Fallback Chain +Two separate concepts that must not be conflated: + +--- + +## Fallback Chain *(auto-failover — config.yaml)* + +Survives admin-ai outage. Uses direct API keys for F1–F4. | Tier | Model | Provider | Notes | |---|---|---|---| -| **Primary** | `claude-sonnet-5` | `admin-ai` | Conductor via LiteLLM ($3.33/day cap) | -| **Fallback 1 (F1)** | `deepseek-v4-pro` | `deepseek` | Direct DeepSeek API | -| **Fallback 2 (F2)** | `gpt-5.6-terra` | `admin-ai` | Demoted from Primary via LiteLLM ($3.33/day cap) | -| **Fallback 3 (F3)** | `grok-4.5` (`grok-2-1212`) | `xai` | Direct xAI API | -| **Fallback 4 (F4)** | `gemini-3.6-flash` | `google` | Direct Google API | +| **Primary** | `deepseek-v4-flash` | `admin-ai` | Fast, cheap conductor via LiteLLM | +| **F1** | `deepseek-v4-flash` | `deepseek` (direct) | Same model, direct API | +| **F2** | `gemini-3.6-flash` | `google` (direct) | Fast, free-tier eligible | +| **F3** | `grok-4.6` | `xai` (direct) | Verified working (NOT grok-4.5) | +| **F4** | `claude-sonnet-5` | `anthropic` (direct) | Premium survival fallback | + +**Only fires when the model above it is unreachable.** + +--- + +## Operational Models *(daily toolbox — admin-ai only)* + +No direct API keys. Shared $5/day budget via hermes-agent-v3 key. + +| Role | Model | When | +|---|---|---| +| Conductor | `deepseek-v4-flash` | Orchestrating, delegating, quick decisions | +| Workhorse | `deepseek-v4-pro` | Large context, big outputs, infra code | +| Workhorse | `deepseek-reasoner` | Multi-step analysis, debugging, planning | +| Auditor | `gemini-3.6-flash` | Sanity checks, every output (essentially free) | +| Auditor | `claude-sonnet-5` | Architecture, security, auth — sparingly ($15/M output) | + +--- ## Admin-AI Virtual Key -- **Key Hash**: `0237186aaff1ed90295c00d73103103900d4bd07252ec1806af8a4358e45d37a` -- **Allowed Models**: `claude-sonnet-5`, `gpt-5.6-terra`, `deepseek-v4-pro`, `deepseek-v4-flash`, `glm-5.2`, `MiniMax-M3`, `qwen3.7-plus` -- **Daily Budget Cap**: $3.33 / day + +- **Key Name:** `hermes-agent-v3` (generated Jul 27, 2026) +- **Daily Budget Cap:** $5/day shared across all operational models +- **Expiry:** Jul 27, 2027 +- **Master Key:** stored in Hudu + +## Budget Targets + +| Component | Daily est. | +|---|---| +| Conductor (ds-v4-flash) | ~$0.30 | +| Workhorses (ds-v4-pro + reasoner) | ~$1.70 | +| Auditors (gemini + claude sparingly) | ~$0.80 | +| **Total** | **$3–5/day** |