fix(agent/run): silent no-response + provider visibility#187
Merged
Conversation
…followup Root causes of specsmith run returning nothing: 1. DEFAULT_OLLAMA_MODEL=qwen2.5:7b not installed; Ollama 404 silently swallowed 2. run_chat returning None gave user zero feedback 3. EventEmitter always wrote JSONL even in interactive terminal mode Fixes: - chat_runner: _pick_ollama_model() queries /api/tags and selects the first installed model from a preference list (lighter models first); falls back to DEFAULT_OLLAMA_MODEL only when the API is unreachable or list is empty. SPECSMITH_OLLAMA_MODEL env var still wins unconditionally. - runner: _handle_command() prints an actionable hint when run_chat returns None — explains whether Ollama is running (with model name) or no provider is available at all. - events: PlainTextEmitter subclass — token() writes raw text to stdout, emit() is a no-op. Used by AgentRunner when json_events=False so LLM responses render as readable prose instead of JSONL blobs. - runner: check_providers() probes all four providers (Ollama, Anthropic, OpenAI, Gemini) and returns ProviderStatus(name, available, model, note). - runner: _print_banner() shows a provider status table in interactive mode so the user knows upfront which model will respond before typing. - cli: specsmith run --check validates providers and exits 0/1 without starting the REPL. - run_interactive: adds a trailing newline after each streamed response so the next prompt doesn't bleed onto the last output line. 19 new tests in test_agent_run_feedback.py (854 total, 0 failures). Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes specsmith run silently discarding all input with no response.
Root causes
un_chat returns None → nothing printed.
What changed
unner._handle_command(): prints an actionable hint when
un_chat returns None — distinguishes between Ollama running but unresponsive vs no provider configured at all.
unner.check_providers(): probes all 4 providers and returns ProviderStatus(name, available, model, note).
unner._print_banner(): shows a full provider status table in interactive mode — user knows exactly which model will respond before typing a word.
un_interactive: trailing newline after each streamed response.
What specsmith run now shows at startup
`
Nexus 0.11.5 — specsmith run
project : /path/to/project
profile : (default)
LLM providers:
✓ ollama ✓ ready model: qwen2.5-coder:7b-instruct (auto, 13 installed)
✗ anthropic ✗ no ANTHROPIC_API_KEY
✗ openai ✗ no OPENAI_API_KEY
✗ gemini ✗ no GOOGLE_API_KEY
Type plain English, or use /plan /ask /fix /test /commit /pr /exit
`
Tests
19 new tests in est_agent_run_feedback.py — 854 total, 0 failures.
Co-Authored-By: Oz oz-agent@warp.dev