mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 12:52:11 +03:00
isUsableChatModel() was copy-pasted into 5 vscode listing routes. PR #7012 widened only models/route.ts to accept api_format "responses"/"openai-responses" alongside "chat-completions"; the other 4 copies (token+raw api/tags and api/show) still rejected anything that wasn't literally "chat-completions", silently dropping Codex-discovery-synced GPT models (apiFormat "responses") from the Ollama-compatible /api/tags endpoint VS Code's "Ollama" provider import flow actually calls. Extracted the predicate into a single shared module (vscode/[token]/usableChatModel.ts) imported by all 5 routes so this one-fixed-four-left-behind drift cannot recur. Co-authored-by: ikelvingo <im.kelvinwong@gmail.com>