# AGENTS.md — EventHubAiRouter Zed OpenAI-compatible gateway на IFT. Карта продукта: `../EventHubSpec/ZED-ARCHITECTURE.md`. ## Ключевые файлы | Файл | Роль | |------|------| | `router/router.py` | `/v1/chat/completions`; ветка `tools` → agent hierarchical | | `router/hierarchical.py` | Plan (Max) / workers / verify (DeepSeek) / `plan_confirm` | | `router/agent_hier.py` | При tools: executor + tool_calls (Zed Write); без synthetic по умолчанию | | `router/orchestrator.py` | Tiers / lanes, Redis session | | `config/orchestration.yaml` | Роли моделей, таймауты, `plan_confirm`, synthetic=never | | `config/providers.yaml` | Novita / VPN (`novita-planner` = Qwen3.8-Max) | | `scripts/gen-litellm-config.py` | LiteLLM config | ## Модели (бюджет) | Роль | Модель | |------|--------| | Planner | `novita-planner` → **qwen/qwen3.8-max** | | Routine tools / medium_code | **qwen3-coder-30b** (`a-medium-code`) | | Hard | DeepSeek V3.2 (`b-complex`); `quality=max` → Max (`c-complex`) | | Verify | DeepSeek V3.2 | | Text SIMPLE (без tools) | Llama 8B — **не** в Write/tools | ## Поведение для Zed - **Primary клиент:** Zed Agent → `smart-router` (не Claude Code/Codex ACP). - **Write** (`tools`): Max-план → утверждение → Coder-30B `tool_calls` (файлы правит Zed); escalate на DeepSeek после edit fails. - **Без tools:** text hierarchical (plan → workers → synth). - Endpoint: `https://ai-router.ift.calentiq.com/v1`. ## Не делать - Не коммитить секреты (`.env`, ключи) и локальные `.tmp-*`. - Не сажать Llama / `a-simple` на tool-loop. - Deploy на IFT — только по просьбе; shell через WSL + `run-wsl-sh.sh`.