fix: OLLAMA_URL env var takes precedence over hardcoded models.yaml URL

Gateway was reading ollama_base_url from YAML (192.168.178.169) instead of
OLLAMA_URL env var (https://ollama.fichtmueller.org). Fix getOllamaBaseUrl()
to prefer process.env['OLLAMA_URL'] and update YAML default to CF tunnel.
This commit is contained in:
Rene Fichtmueller 2026-04-02 23:05:13 +02:00
parent 773fd368e0
commit 2c5f7f6ebe
2 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# LLM Gateway Model Configuration
# Ollama base URL: http://192.168.178.169:11434
ollama_base_url: "http://192.168.178.169:11434"
ollama_base_url: "https://ollama.fichtmueller.org"
tiers:
fast:

View File

@ -168,6 +168,9 @@ export function getModelTier(model: string): 'fast' | 'medium' | 'large' {
}
export function getOllamaBaseUrl(): string {
// OLLAMA_URL env var takes precedence over config file
const envUrl = process.env['OLLAMA_URL'];
if (envUrl) return envUrl;
const models = loadModels();
return models.ollama_base_url;
}