Skip to content

Conversation

@fbricon
Copy link
Contributor

@fbricon fbricon commented Aug 29, 2025

bf8b4bd introduced a regression which makes Ollama.ts query /api/show for AUTODETECT models. Since it's not a real model, the log is littered with:

The model "AUTODETECT" was not found. To download it, run ollama run AUTODETECT.

Code: undefined
Error number: undefined
Syscall: undefined
Type: undefined

Error: The model "AUTODETECT" was not found. To download it, run ollama run AUTODETECT.
at _Ollama.parseError (/Users/fbricon/Dev/souk/continue-for-granite/core/llm/index.ts:421:16)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at customFetch2 (/Users/fbricon/Dev/souk/continue-for-granite/core/llm/index.ts:468:25)
at withExponentialBackoff (/Users/fbricon/Dev/souk/continue-for-granite/core/util/withExponentialBackoff.ts:14:22)

While AUTODETECT model is not a real model, models satisfying isFromAutoDetect are though. While looking for fimSupport is probably not relevant now for autodetected models, I'm considering applying the same sort of logic to detect if thinking is supported, so /api/show would still need to be queried for those models. But that's another story.

cc @RomneyDa


Summary by cubic

Prevent Ollama from calling /api/show for the sentinel AUTODETECT model to stop “model not found” log spam. The constructor now early-returns only when options.model === "AUTODETECT", so real auto-detected models continue to be queried normally.

@fbricon fbricon requested a review from a team as a code owner August 29, 2025 09:15
@fbricon fbricon requested review from tingwai and removed request for a team August 29, 2025 09:15
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 29, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 8, 2025
@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 8, 2025

@fbricon nice find, thanks for fixing my mistake

@RomneyDa RomneyDa merged commit aa79ae6 into continuedev:main Sep 8, 2025
165 of 174 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Sep 8, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2025
@RomneyDa RomneyDa added the hotfix Should be considered as a hotfix for main releases label Sep 10, 2025
@RomneyDa RomneyDa changed the title fix: prevent AUTODETECT model from being queried on Ollama fix: HOTFIX prevent AUTODETECT model from being queried on Ollama Sep 10, 2025
@sestinj
Copy link
Contributor

sestinj commented Sep 11, 2025

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hotfix Should be considered as a hotfix for main releases lgtm This PR has been approved by a maintainer released size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants