fix(auxiliary_client): repair syntax errors in Ollama provider wiring
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 45s

The Ollama feature commit introduced two broken `OpenAI(api_key=*** base_url=...)` calls
where `***` was a redacted variable name and the separating comma was missing.
Replace both occurrences with `api_key=api_key, base_url=base_url`.

Fixes #223
This commit is contained in:
Alexander Whitestone
2026-04-07 12:04:40 -04:00
parent 7936483ffc
commit 4538e11f97

View File

@@ -940,7 +940,7 @@ def _try_ollama() -> Tuple[Optional[OpenAI], Optional[str]]:
return None, None
api_key = (os.getenv("OLLAMA_API_KEY", "") or "ollama").strip()
model = _read_main_model() or "gemma4:12b"
return OpenAI(api_key=*** base_url=base_url), model
return OpenAI(api_key=api_key, base_url=base_url), model
def _get_provider_chain() -> List[tuple]:
@@ -1216,7 +1216,7 @@ def resolve_provider_client(
base_url = base_url + "/v1" if not base_url.endswith("/v1") else base_url
api_key = (explicit_api_key or os.getenv("OLLAMA_API_KEY", "") or "ollama").strip()
final_model = model or _read_main_model() or "gemma4:12b"
client = OpenAI(api_key=*** base_url=base_url)
client = OpenAI(api_key=api_key, base_url=base_url)
return (_to_async_client(client, final_model) if async_mode else (client, final_model))
# ── Custom endpoint (OPENAI_BASE_URL + OPENAI_API_KEY) ───────────