Files
local-deep-research/scripts
LearningCircuit 1315b679e0 ci(research): switch E2E research workflow to langgraph-agent strategy (#3965)
* ci(research): switch E2E research workflow to langgraph-agent strategy

The ldr_research label runs scripts/ldr-diff-research.py, which until
now didn't pass a search_strategy and so fell through to the
quick_summary default of source_based. Switch to the agentic
langgraph-agent strategy so the workflow exercises the autonomous
research path.

- Adds --strategy CLI arg and LDR_STRATEGY env var, default
  langgraph-agent (consistent with the existing --provider /
  --search-tool / --iterations pattern).
- Workflow exposes LDR_STRATEGY: vars.LDR_STRATEGY || 'langgraph-agent'
  so the choice is overridable per-repo via Variables.
- Notes in the script docstring that LDR_ITERATIONS=1 is a no-op for
  the langgraph strategy (which reads langgraph_agent.max_iterations
  from settings instead).

* ci(research): consolidate model var to LDR_RESEARCH_MODEL

The workflow had two model variables — vars.LDR_MODEL for diff mode and
vars.LDR_STATIC_MODEL for static mode — selected by a small set-model
step. Collapse to a single LDR_RESEARCH_MODEL variable shared by both
labels, mirroring the AI reviewer's vars.AI_MODEL pattern.

- Default: google/gemini-2.0-flash-001 (the value the script was
  already falling through to).
- Override via Settings → Variables → New repository variable
  → name: LDR_RESEARCH_MODEL.
- The set-model step is removed; the workflow now passes the env var
  through directly.
- Script reads LDR_RESEARCH_MODEL instead of LDR_MODEL.

Note: existing repo variables LDR_MODEL and LDR_STATIC_MODEL become
orphaned by this rename and can be deleted from repo settings.

* ci(research): stop overriding strategy iterations from the workflow

Previously the workflow set LDR_ITERATIONS=1 and the script forwarded
that as iterations= in kwargs. For source_based that capped research at
one iteration; for langgraph-agent it was effectively a no-op (langgraph
reads max_iterations, not iterations) but the wiring was misleading.

- Drop LDR_ITERATIONS from the workflow env block.
- Make --iterations default to None in the script and only forward it
  to quick_summary when explicitly set on the CLI.
- Each strategy now uses its own setting-driven default unless
  overridden — for langgraph-agent that means langgraph_agent.max_iterations
  (default 50) flows through unchanged.

* ci(research): split research model into MAIN + CHEAP per label

Bring back per-label model selection with cleaner names:

- ldr_research        → vars.LDR_RESEARCH_MODEL  (deep PR analysis,
                                                   user-configurable)
- ldr_research_static → vars.LDR_RESEARCH_CHEAP_MODEL  (regression
                                                        smoke, kept cheap)

Both default to google/gemini-2.0-flash-001 if unset, so existing
behaviour stays identical until you actually configure cheap-model.
The script and its env-var contract are unchanged — the workflow
just picks which value to feed into LDR_RESEARCH_MODEL based on the
applied label.
2026-05-10 13:10:02 +02:00
..