Repository navigation
Commit 81c0086
committed
fix(models): route tagged ollama names that share a cloud prefix to ollama
findProviderFromModel matched provider patterns (/^gpt/, /^mistral/, /^claude/,
...) against any id that no namespace or catalog entry claimed. The browser
registers the installed Ollama list, so the editor resolved a local model such
as gpt-oss:20b or mistral:latest to Ollama, but the server never holds that
list: execution fell through to the cloud pattern and sent the request to
OpenAI or Mistral with the user's key, or failed on a missing one.
Ollama lists every installed model as name:tag, and no cloud model id carries
an Ollama tag, so a bare tagged name is now left unclaimed before patterns
run and getProviderFromModel defaults it to Ollama, the same as every other
local name. Namespaces and exact catalog ids still win first, so
bedrock/...:0 and openrouter/...:free are unaffected. Saved workflows heal
without a migration, and the editor, execution, permission checks and the
editing validator now agree on the provider.
getModelCapabilities re-implemented the pattern scan and kept reporting a
cloud provider's capabilities for these names; it now falls back to
findProviderFromModel so the two cannot disagree.1 parent 3b3c0b5 commit 81c0086
4 files changed
Lines changed: 60 additions & 11 deletions
File tree
- apps/sim
- lib/workflows/editing
- providers
- tools/llm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
101 | 125 | | |
102 | 126 | | |
103 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6915 | 6915 | | |
6916 | 6916 | | |
6917 | 6917 | | |
| 6918 | + | |
| 6919 | + | |
| 6920 | + | |
6918 | 6921 | | |
6919 | 6922 | | |
6920 | 6923 | | |
| |||
6945 | 6948 | | |
6946 | 6949 | | |
6947 | 6950 | | |
| 6951 | + | |
| 6952 | + | |
| 6953 | + | |
| 6954 | + | |
| 6955 | + | |
| 6956 | + | |
| 6957 | + | |
| 6958 | + | |
6948 | 6959 | | |
6949 | 6960 | | |
6950 | 6961 | | |
| |||
6995 | 7006 | | |
6996 | 7007 | | |
6997 | 7008 | | |
6998 | | - | |
6999 | | - | |
7000 | | - | |
7001 | | - | |
7002 | | - | |
7003 | | - | |
7004 | | - | |
7005 | | - | |
7006 | | - | |
7007 | | - | |
7008 | | - | |
| 7009 | + | |
| 7010 | + | |
7009 | 7011 | | |
7010 | 7012 | | |
7011 | 7013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
40 | 54 | | |
0 commit comments