MARS 8 family in gateway: 5 aliases, 5 gates

This commit is contained in:
reform
2026-11-01 20:47:46 +03:00
parent 6c22a4e727
commit 871839d07b
+27
View File
@@ -111,3 +111,30 @@ handle_path /camb/* {
`LISTEN` on it (SO_REUSEADDR) and every request died as "remote end closed connection".
Pick a port that is really free (`ss -lnt`), not just "looks free".
* `team_id` in the bank can be an int — `str()` it before `.strip()` or the refresh thread dies.
## MARS 8 family — gateway aliases
All five models were probed live (`POST /apis/tts-stream`, key from the pool) before wiring:
| gateway model | CAMB `speech_model` | rate | first-call latency |
|---|---|---|---|
| `camb-tts` | `mars-flash` | 22.05/48 kHz, ultra-low latency | 1.5-2.2 s |
| `camb-tts-pro` | `mars-pro` | 48 kHz, dubbing/audiobooks | 20-41 s cold, 2.9 s warm |
| `camb-tts-instruct` | `mars-instruct` | 22.05 kHz, emotion tags in text | 4.9 s |
| `camb-tts-81-flash` | `mars-8.1-flash-beta` | 48 kHz, beta 8.1 | 2.1 s |
| `camb-tts-81-pro` | `mars-8.1-pro-beta` | 48 kHz, beta 8.1 pro | 2.6 s |
Credits per phrase (`x-credits-required`): flash 2.53, pro 3.375, instruct 5.06.
`mars` is **not** a valid model id — the pro tier is `mars-pro`; using `mars` returns 4xx from CAMB.
Adding a model to the gateway needs five gates, otherwise it answers 503/403 while the shim is healthy:
1. `MODELS` map in `camb_shim.py` (alias -> real `speech_model`).
2. `channels.models` of the PG channel + `abilities` rows for every group (`enabled=true`, boolean!).
3. `/root/sso_limits.py` `MODELS` + `--apply` (else `403 no access to model`).
4. `rank_models()` in `/opt/grok-bot/iishko/legacy.py` — the bot rewrites `tokens.model_limits`
on every user message, so any TTS model missing there disappears right after the next message.
5. `/root/toolgate.py` `ALLOW` — otherwise `toolgate.timer` disables it within minutes.
Also check the unit: `camb-shim.service` was running `CAMB_SHIM_PORT=8817` while the channel and the
dashboard both point at `8822` — a silent mismatch, channel parked (`status=2`), zero requests.