mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-20 22:22:57 +03:00
Two mechanical hardening fixes requested in review: - Model: the request's `model=cursor/<…>` flowed unfiltered into the Agent CLI `--model` argv. Add resolveCursorImageModel() — an allowlist derived from IMAGE_PROVIDERS.cursor.models (auto | composer-2 | composer-2.5), mirroring the auggie executor. Unknown or flag-shaped values fall back to "auto" and never reach argv. Operator overrides (connection psd / CURSOR_IMG_MODEL) stay trusted. - Timeout: request `timeout_ms` had no upper bound while the shared Cursor seat has only CURSOR_IMG_MAX_CONCURRENT (default 2) slots. Add resolveCursorImageTimeoutMs() clamping the caller value to MAX_TIMEOUT_MS (300000ms); the operator default (CURSOR_IMG_TIMEOUT_MS) stays uncapped. Tests: +3 (12/12) — allowlist unit test, end-to-end proof a flag-shaped model resolves to "auto" in argv, and the timeout clamp. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>