refactor: extract shared _call_llm helper used by hypothesizer and synthesizer #35

Closed
opened 2026-05-25 18:57:42 -07:00 by pyr0ball · 0 comments
Owner

Context

_extract_content() and _call_llm() in app/services/diagnose/hypothesizer.py and app/services/diagnose/synthesizer.py are identical in logic. Any change (retry logic, cf-orch payload structure, timeout) must be made in both places.

Fix

Extract to a shared app/services/diagnose/_llm_client.py module (or add to models.py) so both stages import from one source.

Found by

Post-implementation code review of feat/29-multi-agent-diagnose.

## Context `_extract_content()` and `_call_llm()` in `app/services/diagnose/hypothesizer.py` and `app/services/diagnose/synthesizer.py` are identical in logic. Any change (retry logic, cf-orch payload structure, timeout) must be made in both places. ## Fix Extract to a shared `app/services/diagnose/_llm_client.py` module (or add to `models.py`) so both stages import from one source. ## Found by Post-implementation code review of feat/29-multi-agent-diagnose.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/turnstone#35
No description provided.