Fix Windows Ollama inference preset routing

This commit is contained in:
mmckeen-nv
2026-05-20 13:14:40 -07:00
parent 150169e5d5
commit 9d0e0e1a16
3 changed files with 22 additions and 9 deletions
+6 -4
View File
@@ -234,10 +234,12 @@ assert.doesNotMatch(inferencePanelSource, /nvidia\/NVIDIA-Nemotron-3-Super-120B-
assert.match(inferencePanelSource, /method: "DELETE"/, 'settings UI must expose provider deletion')
assert.match(inferencePanelSource, /\/api\/ollama\/models/, 'settings UI must poll local Ollama models')
assert.match(inferencePanelSource, /window\.setInterval\(\(\) => loadOllamaModels\(\{ silent: true \}\), 10000\)/, 'settings UI must autopoll Ollama while the endpoint panel is open')
assert.match(inferencePanelSource, /function applyOllamaModelPreset\(modelName: string\)/, 'settings UI must provide a click preset for local Ollama models')
assert.match(inferencePanelSource, /setName\(OLLAMA_PROVIDER_NAME\)[\s\S]*setType\("openai"\)[\s\S]*setModel\(modelName\)[\s\S]*setBaseUrl\(OLLAMA_BASE_URL\)/, 'Ollama model preset must fill provider name, provider type, model, and endpoint URL')
assert.match(inferencePanelSource, /onClick=\{\(\) => applyOllamaModelPreset\(item\.name\)\}/, 'clicking an Ollama model must load the endpoint preset')
assert.match(inferencePanelSource, /const OLLAMA_BASE_URL = "http:\/\/host\.docker\.internal:11434\/v1"/, 'Ollama preset must use the host-reachable OpenAI-compatible endpoint')
assert.match(inferencePanelSource, /function applyOllamaModelPreset\(item: OllamaModel\)/, 'settings UI must provide a click preset for local Ollama models')
assert.match(inferencePanelSource, /function ollamaOpenAiBaseUrl\(item: OllamaModel\)[\s\S]*item\.baseUrl[\s\S]*`\$\{baseUrl\}\/v1`/, 'Ollama preset must derive the OpenAI-compatible endpoint from the discovered model source')
assert.match(inferencePanelSource, /function ollamaProviderName\(item: OllamaModel\)[\s\S]*item\.hostKind === "win" \? "ollama-win" : OLLAMA_PROVIDER_NAME/, 'Ollama preset must distinguish Windows-host Ollama from local Ollama')
assert.match(inferencePanelSource, /setName\(ollamaProviderName\(item\)\)[\s\S]*setType\("openai"\)[\s\S]*setModel\(modelName\)[\s\S]*setBaseUrl\(ollamaOpenAiBaseUrl\(item\)\)/, 'Ollama model preset must fill provider name, provider type, model, and discovered endpoint URL')
assert.match(inferencePanelSource, /onClick=\{\(\) => applyOllamaModelPreset\(item\)\}/, 'clicking an Ollama model must load the endpoint preset')
assert.match(inferencePanelSource, /const OLLAMA_BASE_URL = "http:\/\/host\.docker\.internal:11434\/v1"/, 'Ollama preset must keep a fallback host-reachable OpenAI-compatible endpoint')
assert.match(ollamaModelsRouteSource, /\/api\/tags/, 'Ollama models route must query the Ollama tags API')
assert.match(ollamaModelsRouteSource, /OLLAMA_BASE_URL/, 'Ollama models route must support a configurable Ollama base URL')
assert.match(sandboxInferenceRouteSource, /parseRoutes/, 'sandbox inference route must accept multiple provider/model routes')