mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 03:38:32 +02:00
Addresses review feedback on the discovery hardening: - parsePiModels: the previous guard only dropped the `Warning:`-prefixed form (which collapses to an empty `Warning/` half). The real pattern warning can arrive without that prefix — `No models match pattern "..."` — and the table branch would turn it into a bogus `No/models` model. Filter pi's diagnostic lines (unmatched-pattern message, `Warning:`/`Error:`/`Info:` prefixes) before field-splitting, with the empty-half check kept as a structural backstop. - discoverOpenCodeModels: parse the verbose output even on a non-zero exit and only fall back to plain `opencode models` when nothing parses. The earlier version skipped the fallback whenever verbose printed any bytes, so unparseable noise on a non-zero exit returned empty — worse than before. Tests: pi non-zero-exit cases now assert the result is exactly the resolvable model (no junk row) and cover the un-prefixed warning; new OpenCode test covers verbose-noise-then-fallback. Co-authored-by: multica-agent <github@multica.ai>