File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -578,6 +578,7 @@ export RUNPROMPT_BASE_URL="http://localhost:11434/v1"
578578./runprompt --base-url http://localhost:11434/v1 hello.prompt
579579
580580# Legacy env vars also work (checked in this order)
581+ export OLLAMA_BASE_URL="http://localhost:11434/v1"
581582export OPENAI_BASE_URL="http://localhost:11434/v1"
582583export OPENAI_API_BASE="http://localhost:11434/v1" # OpenAI SDK v0.x style
583584export BASE_URL="http://localhost:11434/v1"
Original file line number Diff line number Diff line change @@ -484,6 +484,7 @@ Environment:
484484 OPENAI_API_KEY API key for OpenAI models
485485 GOOGLE_API_KEY API key for Google AI models
486486 OPENROUTER_API_KEY API key for OpenRouter models
487+ OLLAMA_BASE_URL Custom Ollama endpoint URL (e.g. http://localhost:11434/v1)
487488 OPENAI_BASE_URL Custom OpenAI-compatible endpoint URL
488489 OPENAI_API_BASE Custom endpoint URL (legacy OpenAI SDK v0.x style)
489490 BASE_URL Custom endpoint URL (fallback)
@@ -982,7 +983,8 @@ def parse_model_string(model_str):
982983
983984def get_base_url ():
984985 """Get base URL from legacy env vars (fallback after config cascade)."""
985- return (os .environ .get ("OPENAI_BASE_URL" ) or
986+ return (os .environ .get ("OLLAMA_BASE_URL" ) or
987+ os .environ .get ("OPENAI_BASE_URL" ) or
986988 os .environ .get ("OPENAI_API_BASE" ) or
987989 os .environ .get ("BASE_URL" ))
988990
You can’t perform that action at this time.
0 commit comments