Summary
On a local-Ollama stack (agent_default_model = ollama:qwen3:8b), the showcase pipeline's agent_hitl_flow step (and the legacy agent step) always ⏭️ skip with "no API key matching agent_default_model provider" — even though Ollama needs no API key and is reachable. So the showcase HITL phase can never run on a local-Ollama dogfood setup.
Root cause
_llm_key_present() in app/features/demo/pipeline.py only recognizes cloud providers and returns False for anything else:
provider = model.split(":", 1)[0] if ":" in model else ""
if provider == "anthropic": return bool(settings.anthropic_api_key)
if provider == "openai": return bool(settings.openai_api_key)
if provider in ("google-gla", "google-vertex"): return bool(settings.google_api_key)
return False # <- ollama lands here
ollama requires no key, so the gate wrongly reports "no key" and the step skips.
Scope
Demo-only. Interactive Agent Chat (Chat page) builds the model via app/features/agents/agents/base.py:build_agent_model (which supports ollama: → OpenAIChatModel/OllamaProvider) and does NOT gate on _llm_key_present, so HITL already works there on Ollama. Only the demo pipeline gates on this helper.
Fix
Add an ollama branch returning True (no key required). The step still degrades gracefully if Ollama is unreachable — the chat round-trip fails and the step skips via the existing error path, so we let it attempt the call rather than pre-skip.
if provider == "ollama":
return True
Tests
Add a direct unit test for _llm_key_present():
ollama:qwen3:8b (no keys set) → True
openai:gpt with empty openai_api_key → False (cloud branch unchanged)
Notes
Found during a local-Ollama showcase dogfood on 2026-06-01.
Summary
On a local-Ollama stack (
agent_default_model = ollama:qwen3:8b), the showcase pipeline'sagent_hitl_flowstep (and the legacyagentstep) always ⏭️ skip with "no API key matching agent_default_model provider" — even though Ollama needs no API key and is reachable. So the showcase HITL phase can never run on a local-Ollama dogfood setup.Root cause
_llm_key_present()inapp/features/demo/pipeline.pyonly recognizes cloud providers and returnsFalsefor anything else:ollamarequires no key, so the gate wrongly reports "no key" and the step skips.Scope
Demo-only. Interactive Agent Chat (Chat page) builds the model via
app/features/agents/agents/base.py:build_agent_model(which supportsollama:→OpenAIChatModel/OllamaProvider) and does NOT gate on_llm_key_present, so HITL already works there on Ollama. Only the demo pipeline gates on this helper.Fix
Add an
ollamabranch returningTrue(no key required). The step still degrades gracefully if Ollama is unreachable — the chat round-trip fails and the step skips via the existing error path, so we let it attempt the call rather than pre-skip.Tests
Add a direct unit test for
_llm_key_present():ollama:qwen3:8b(no keys set) →Trueopenai:gptwith emptyopenai_api_key→False(cloud branch unchanged)Notes
Found during a local-Ollama showcase dogfood on 2026-06-01.