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:
parent
773fd368e0
commit
2c5f7f6ebe
@ -1,7 +1,7 @@
|
|||||||
# LLM Gateway Model Configuration
|
# 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: "http://192.168.178.169:11434"
|
ollama_base_url: "https://ollama.fichtmueller.org"
|
||||||
|
|
||||||
tiers:
|
tiers:
|
||||||
fast:
|
fast:
|
||||||
|
|||||||
@ -168,6 +168,9 @@ export function getModelTier(model: string): 'fast' | 'medium' | 'large' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getOllamaBaseUrl(): string {
|
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();
|
const models = loadModels();
|
||||||
return models.ollama_base_url;
|
return models.ollama_base_url;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user