resolveModel: accept local/* model ids
runLLMStream in chatTools.ts re-resolved its incoming model via resolveModel(model, DEFAULT_MAIN_MODEL). resolveModel checked the hardcoded ALL_MODELS set, which only contained the external provider catalogue (claude, gemini, openai variants) -- not the local/* prefix used for Ollama models. So even after chat.ts had correctly substituted the request body's stale 'gemini-3-flash-preview' into 'local/llama3.2:3b', runLLMStream's internal resolveModel silently kicked it BACK to 'gemini-3-flash-preview' (the DEFAULT_MAIN_MODEL fallback), which then tripped the deepest-layer self-heal we added in llm/index.ts and produced "[llm] requested model 'gemini-3-flash-preview' not allowed; substituting 'local/qwen3-next:80b'" -- not the model the user actually picked. The fix is local-aware: treat any id starting with `local/` as a valid model the caller already validated, so resolveModel passes it through instead of forcing the gemini fallback. Also drop the debug trace log from chat.ts now that the cause is identified.
| Repository | cpatpa/PIP |
|---|---|
| Author | Claude <noreply@anthropic.com> |
| Authored | |
| Parents | 4a5fa1f0 |
| Stats | 2 files changed , +1 , -4 |
| Part of | LLM dispatch - stale model id resolution and external-disabled fallbacks |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-ac3ff6a9.md
from inside the repo you want the change in.