dograh/api/services/workflow
Mubashir Rahim 6ae9ba5d9e fix(qa): tolerate non-dict JSON from QA LLM instead of crashing
parse_llm_json is explicitly designed to return a list when the model emits a
top-level JSON array (it has a dedicated test for that). The QA analyzers then
call parsed.get("tags", ...) directly on the result. When parsed is a list,
that raises AttributeError, which is NOT caught by the surrounding
except (json.JSONDecodeError, ValueError) — so a single stray array response
from the QA model crashed the entire QA analysis run instead of degrading to
empty results.

The live variable-extraction path already guards this exact case with an
isinstance(..., dict) check; mirror it in both QA analysis call sites
(_run_qa_analysis per-node and _run_whole_call_qa_analysis fallback) so a
non-dict parse result coerces to {} and the run produces empty defaults.

Adds a regression test that drives the whole-call analyzer with an array
response and asserts empty results rather than a crash.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 14:24:03 +05:00
..
node_specs feat: add Tuner Integration to Dograh (#311) 2026-05-20 14:37:33 +05:30
qa fix(qa): tolerate non-dict JSON from QA LLM instead of crashing 2026-06-03 14:24:03 +05:00
tools feat: add Azure AI multi-provider support (TTS, STT, Embeddings, Realtime) (#381) 2026-06-02 12:50:00 +05:30
__init__.py Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
audit.py feat: add Tuner Integration to Dograh (#311) 2026-05-20 14:37:33 +05:30
disposition_mapper.py chore: bump pipecat version and fix tests (#263) 2026-05-04 21:35:37 +05:30
dto.py feat: banner if API is not reachable 2026-05-31 13:05:22 +05:30
duplicate.py chore: fix duplicate workflow issue 2026-04-24 13:17:04 +05:30
errors.py Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
layout.py feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30
mcp_tool_session.py chore: update pipecat to 1.3.0 (#379) 2026-05-29 16:19:42 +05:30
node_data.py feat: add Tuner Integration to Dograh (#311) 2026-05-20 14:37:33 +05:30
pipecat_engine.py feat: add Azure AI multi-provider support (TTS, STT, Embeddings, Realtime) (#381) 2026-06-02 12:50:00 +05:30
pipecat_engine_callbacks.py feat: abort immediately on max call duration exceed 2026-05-31 13:21:37 +05:30
pipecat_engine_context_composer.py feat(mcp): generic MCP tool source with per-node function filtering (#301) 2026-05-19 16:10:00 +05:30
pipecat_engine_context_summarizer.py feat: add headless mode, redesign floating widget, refactor lifecycle callbacks (#268) 2026-05-07 12:23:41 +05:30
pipecat_engine_custom_tools.py feat: add ultravox realtime and fix signature issue in telephony (#345) 2026-05-23 12:51:55 +05:30
pipecat_engine_variable_extractor.py feat: add headless mode, redesign floating widget, refactor lifecycle callbacks (#268) 2026-05-07 12:23:41 +05:30
text_chat_logs.py feat: add chat based testing for voice agent (#308) 2026-05-21 15:20:02 +05:30
text_chat_runner.py chore: update pipecat to 1.3.0 (#379) 2026-05-29 16:19:42 +05:30
text_chat_session_service.py feat: add chat based testing for voice agent (#308) 2026-05-21 15:20:02 +05:30
trigger_paths.py feat: add google stt and tts. add folders to organize agents 2026-05-22 14:36:50 +05:30
workflow_graph.py feat(mcp): add search_docs tool over docs corpus (closes #295) (#316) 2026-05-20 18:20:35 +05:30