Repository navigation
fix(models): accept models ollama can serve and refuse a denied sim-auto - #10341
Merged
Merged
Conversation
The editing validator rejected any model id outside the static catalog on the router, evaluator, translate and guardrails blocks. At runtime an id that no provider claims runs on Ollama, so a locally installed model (llama3.1:8b, user/model library names) could not be written by an edit, the workflow-state API or workflow-as-code, and replacing a workflow that already used one failed outright. Where Ollama can serve a model (reachable and not blacklisted), the validator now accepts an Ollama-shaped name that no provider claims, mirroring the runtime. Ids a provider claims, free text, and sim-auto are still rejected. Whether this deployment can reach Ollama is now one helper, isOllamaReachable, used by the chat and embedding model lists, the embedding client and the access-request catalog, which each restated it. resolveAutoModel now checks the configured sim-auto against the workspace's permission group before routing. A group that denied sim-auto still ran it as whichever pool or default model it allowed; the editor already hid Auto for such a group, and execution now refuses it the same way it refuses any other denied model.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryThe PR accepts Ollama-shaped model names where Ollama is available and checks access to
Reviews (2) · Last reviewed commit: "fix(models): keep the ollama url check p..." · Reviewed by Greptile |
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
llama3.1:8b,user/modellibrary names). Replacing a workflow that already used one failed outrightOLLAMA_URLset; and not blacklisted), the validator now accepts an Ollama-shaped name that no provider claims, mirroring the runtimeazure/, catalog-looking ids likeclaude-sonnet-4.6), free text,sim-autowhere Auto isn't offered, and everything on hosted Sim without OllamaisOllamaReachablehelper now answers "can this deployment reach Ollama" for the chat and embedding model lists, the embedding client and the access-request catalog, which each restated it.isOllamaAvailableadds the blacklist on topresolveAutoModelnow checks the configuredsim-autoagainst the workspace's permission group before routing. A group that deniedsim-autostill ran it as whichever pool or default model it allowed. The editor already hid Auto for such a group; execution now refuses it like any other denied modelType of Change
Testing
validation-models.test.tsruns the real blocks through the real validator. It covers installed and namespaced Ollama names accepted where Ollama is reachable, and rejected on hosted without Ollama, when blacklisted, for provider-claimed ids and for free text.sim-autostays rejected on self-hostedresolve.test.ts: a deniedsim-autois refused on hosted and self-hosted without calling the router; a pool denied model by model still falls backurls.test.tscoversisOllamaAvailableacross self-hosted, hosted with and withoutOLLAMA_URL, and blacklistedtsc --noEmitandbun run lintclean; vitest across workflows, core, model router, embeddings, API routes, ee, knowledge, blocks, providers and executor passChecklist