Files
knowledge-base/claude-memory/omniroute.md

67 lines
5.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: OmniRoute AI Gateway
description: OmniRoute v3.6.5 на LXC 132 (10.0.0.179) — AI-шлюз для 60+ LLM провайдеров, порт 20128
type: project
originSessionId: 9f26284f-db92-456f-813d-fd8210b7d7b6
---
## OmniRoute v3.6.9+ (LXC 132, 10.0.0.179)
- **Путь**: /root/OmniRoute/, Node.js 22, Next.js 16.2, git repo (github.com/diegosouzapw/OmniRoute)
- **Dashboard**: http://10.0.0.179:20128, пароль: 1qaz!QAZ
- **API**: http://10.0.0.179:20128/v1 (или https://ai.dttb.ru/v1 публично через NPM с Bearer)
- **API Key**: `sk-225e902dc95ff192-6bdad7-3ec8cdc6` (test-key) / `sk-225e902dc95ff192-e71c19-7cc9283e` (claw)
- **SQLite DB**: /root/.omniroute/storage.sqlite
- **Service**: omniroute.service (systemd, enabled), запускает **npx-кэш** (НЕ git repo)
- **ExecStart**: `/usr/bin/node /root/.npm/_npx/<hash>/node_modules/omniroute/app/server.js` (hash меняется при обновлении)
- **Конфиг**: /root/OmniRoute/.env (секреты сгенерированы)
- **Каталог моделей**: 145+ моделей (на 2026-05-06)
### SSH доступ к LXC 132
- **Прямой SSH** `ssh root@10.0.0.179` — РАБОТАЕТ если на машине есть claude-code ключ (на Mac Олега есть)
- **Через Proxmox**: `sshpass -p '1qaz!QAZ' ssh root@10.0.0.250 "pct exec 132 -- bash -c 'COMMAND'"` — РАБОТАЕТ всегда
- **Hostname**: code-server
### Обновление OmniRoute (npx способ — используется сервисом)
1. Остановить: `pct exec 132 -- systemctl stop omniroute`
2. Удалить старый npx-кэш: `rm -rf /root/.npm/_npx/<old_hash>`
3. Установить: `npx omniroute@<version> --version` (создаст новый кэш)
4. Обновить путь в `/etc/systemd/system/omniroute.service` ExecStart на новый hash
5. `systemctl daemon-reload && systemctl start omniroute`
### Обновление git-репозитория (отдельно, для разработки)
1. `cd /root/OmniRoute && git pull origin main && npm install && npm run build`
### Подключённые провайдеры (актуально 2026-05-06)
| Префикс | Провайдер | Модели Opus | Статус |
|---------|-----------|-------------|--------|
| **`cc/`** | Claude Code OAuth (Max-подписка) | **claude-opus-4-7**, opus-4-6, sonnet-4-6, sonnet-4-5, haiku-4-5 | ✅ Primary path к Opus |
| `claude/` | прямой Anthropic API (платный) | claude-opus-4-7, opus-4-6, sonnet-4-6, haiku-4-5 | ✅ Резерв per-token |
| `kr/` | Kiro/AWS Bedrock | sonnet-4.5 (Opus НЕТ) | ✅ для Sonnet, ❌ Opus |
| `cx/` | Codex (OpenAI free) | gpt-5.4, gpt-5.4-mini, gpt-5.5 | ✅ для GPT |
| `gh/` | GitHub Copilot integrator (MS) | sonnet-4.5/4.6, ~~opus-4.6~~, ~~opus-4.7~~ | ⚠️ Sonnet работает, Opus сломан (см. ниже) |
| `antigravity/` | Google Antigravity | opus-4-6-thinking | ❌ Нужен OAuth reconnect (projectId пуст) |
| `kc/` `kilocode/` | KiloCode aggregator | opus-4.7 | ❌ Empty response |
| `glm/` | Zhipu Z.ai | glm-5.1 | ✅ |
### Главный путь к Opus 4.7 — `omniroute/cc/claude-opus-4-7`
Через **CLIProxy + Claude Code OAuth + Max-подписку**. Фиксированная стоимость, без per-token. Подтверждено 2026-05-06: smoke-test вернул корректный ответ от `claude-opus-4-7`. См. [[../decisions/2026-05-06-openclaw-opus-4-7-via-max-cliproxy]].
### Известные сломы
- **`gh/claude-opus-4.6`**: MS Copilot integrator убрал Opus 4.6 из своего scope, отдаёт «model not available for integrator vscode-chat»
- **`gh/claude-opus-4.7`**: ID mismatch — OmniRoute шлёт `4.7`, MS ждёт `4-7` (точка vs дефис). Баг текущей версии OmniRoute. Workaround: использовать `cc/claude-opus-4-7` пока не починят.
- **`antigravity/*`**: возвращает `"Missing Google projectId for Antigravity account. Please reconnect OAuth in Providers → Antigravity"`. Триггер из [[user_profile]]: до OAuth нужен вход на antigravity.google и создание Cloud Code project.
### Использование
- Prefix модели в API: `cc/claude-opus-4-7`, `kr/claude-sonnet-4.5`, `cx/gpt-5.4`
- Codex OAuth callback: localhost:1455 (нужен SSH-туннель для удалённого онбординга)
- Token refresh: периодическая перелогинка OAuth — проверять Dashboard → Providers
- Health-check moniter: на LXC 132 в `journalctl -u omniroute -f` смотреть USAGE/STREAM строки
### Важно
- OAuth Codex привязан к localhost:1455 — для удалённого доступа: `ssh -L 20128:localhost:20128 -L 1455:localhost:1455 root@10.0.0.179`
- Встроенные агенты: Droid и Assistant (Dashboard → Agents)
- CLI tools конфиг: Dashboard → CLI Tools