add ollama fix

This commit is contained in:
Adil Hafeez 2025-09-22 15:25:52 -07:00
parent ed0772fdd0
commit be33311002
No known key found for this signature in database
GPG key ID: 9B18EF7691369645

View file

@ -19,6 +19,7 @@ SUPPORTED_PROVIDERS = [
"together_ai",
"azure_openai",
"xai",
"ollama",
]
@ -219,10 +220,12 @@ def validate_and_render_schema():
)
provider = model_name_tokens[0]
# Validate azure_openai provider requires base_url
if provider == "azure_openai" and llm_provider.get("base_url") is None:
# Validate azure_openai and ollama provider requires base_url
if (
provider == "azure_openai" or provider == "ollama"
) and llm_provider.get("base_url") is None:
raise Exception(
f"Provider 'azure_openai' requires 'base_url' to be set for model {model_name}"
f"Provider '{provider}' requires 'base_url' to be set for model {model_name}"
)
model_id = "/".join(model_name_tokens[1:])