Skip to content

chore: sync workflow templates#870

Closed
stranske wants to merge 1 commit into
mainfrom
sync/workflows-c11e0664a4d8
Closed

chore: sync workflow templates#870
stranske wants to merge 1 commit into
mainfrom
sync/workflows-c11e0664a4d8

Conversation

@stranske

@stranske stranske commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Sync Summary

Files Updated

  • progress_reviewer.py: Progress reviewer - evaluates agent progress for keepalive rounds
  • llm_provider.py: LLM provider configuration - GitHub Models and OpenAI client setup

Files Skipped

  • pr-00-gate.yml: File exists and sync_mode is create_only
  • ci.yml: File exists and sync_mode is create_only
  • renovate.json: File exists and sync_mode is create_only
  • cross-repo-smoke.yml: File exists and sync_mode is create_only
  • llm_slots.json: None

Review Checklist

  • CI passes with updated workflows
  • No repo-specific customizations were overwritten

Source: stranske/Workflows
Source SHA: f4fa43827665268e99f8c9759a1e3f80aead3131
Template hash: c11e0664a4d8
Sync branch: sync/workflows-c11e0664a4d8
Consumer repo: stranske/Collab-Admin
Manifest: .github/sync-manifest.yml

Summary by CodeRabbit

  • New Features

    • LLM model selection now supports configurable model registry for OpenAI and Anthropic providers.
  • Improvements

    • Enhanced LLM client initialization with robust fallback handling when required imports are unavailable.

Automated sync from stranske/Workflows
Template hash: c11e0664a4d8

Changes synced from sync-manifest.yml
@stranske stranske added sync Automated sync from Workflows automated Automated sync from Workflows labels Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8a5f053c-3f11-4678-a707-f832ee8ed83d

📥 Commits

Reviewing files that changed from the base of the PR and between efc468b and d463efb.

📒 Files selected for processing (2)
  • scripts/langchain/progress_reviewer.py
  • tools/llm_provider.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • stranske/Workflows (auto-detected)
  • stranske/Template (auto-detected)
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

In the Manager-Database repository, use Prefect 2.x and import schedules from prefect.client.schemas.schedules

Files:

  • scripts/langchain/progress_reviewer.py
  • tools/llm_provider.py
🔀 Multi-repo context stranske/Workflows, stranske/Template

Linked repositories findings

Based on my exploration of the Workflows and Template repositories, I found significant cross-repository context that's important for this PR review.

stranske/Workflows (Source - contains NEW implementation)

Key Changes Identified:

  1. scripts/langchain/progress_reviewer.py (line 430) [::stranske/Workflows::]

    • Changed from: from tools.langchain_client import build_chat_client
    • Changed to: from scripts.langchain._llm_client import build_client
    • Both return the same ClientInfo object type, so the interface is compatible
    • Fallback behavior preserved when import fails
  2. tools/llm_provider.py [::stranske/Workflows::]

    • Added new constants:
      • DEFAULT_OPENAI_ANALYSIS_MODEL = "gpt-5.4" (line 48)
      • DEFAULT_ANTHROPIC_ANALYSIS_MODEL = "claude-sonnet-4-6" (line 49)
    • OpenAIProvider._get_client() (lines 595-608): Now uses build_chat_client() via tools.langchain_client instead of directly instantiating ChatOpenAI. Resolves model via _configured_langchain_model("openai", fallback=DEFAULT_OPENAI_ANALYSIS_MODEL)
    • AnthropicProvider._get_client() (lines 667-681): Similar refactoring - uses build_chat_client() with model resolution via registry
  3. Test Expectations [::stranske/Workflows::]

    • tests/scripts/test_progress_reviewer.py (line 220): Mocks scripts.langchain._llm_client.build_client, confirming the new import path is expected

stranske/Template (Target - contains OLD implementation)

Current Implementation (being updated):

  1. scripts/langchain/progress_reviewer.py (line 430) [::stranske/Template::]

    • Currently imports: from tools.langchain_client import build_chat_client
    • This will be changed by the sync
  2. tools/llm_provider.py [::stranske/Template::]

    • OpenAIProvider._get_client() (lines 585-597): Directly instantiates ChatOpenAI(model="gpt-5.1-codex", ...)
    • AnthropicProvider._get_client() (lines 652-663): Directly instantiates ChatAnthropic(model="claude-sonnet-4-5-20250929", ...)
    • No references to llm_registry or _configured_langchain_model
    • No new constants defined

Critical Cross-Repo Impact Analysis

  1. Model Name Changes: The hardcoded model names in Template will be replaced:

    • OpenAI: "gpt-5.1-codex" → configurable (default: "gpt-5.4")
    • Anthropic: "claude-sonnet-4-5-20250929" → configurable (default: "claude-sonnet-4-6")
    • This could affect LLM response behavior if model capabilities differ
  2. New Dependency on llm_registry: The providers now attempt to import tools.llm_registry.configured_model_for_provider() (graceful fallback when unavailable). Template may not have llm_registry configured initially.

  3. Client Construction Changes: Moving from direct instantiation to build_chat_client() wrapper means:

    • Models are now resolved through a centralized client builder
    • Potential impact on timeout, retry, and other client configuration parameters
  4. Consumers in both repos: Multiple scripts use these providers via get_llm_provider() (e.g., ci_failure_triage.py, workflow scripts), so the behavioral changes will cascade across the codebase.

🔇 Additional comments (2)
tools/llm_provider.py (1)

43-52: LGTM!

Also applies to: 598-608, 640-644, 669-681, 723-729, 980-981, 1008-1009

scripts/langchain/progress_reviewer.py (1)

430-434: LGTM!


📝 Walkthrough

Walkthrough

tools/llm_provider.py adds two default model constants and a _configured_langchain_model helper that resolves model names via an optional tools.llm_registry import. OpenAIProvider and AnthropicProvider are updated to build LangChain clients through build_chat_client using the registry-resolved model, storing it on self._model_name. scripts/langchain/progress_reviewer.py switches its LLM client import from tools.langchain_client to scripts.langchain._llm_client.

Changes

Configurable Model Registry Integration

Layer / File(s) Summary
Default constants and registry helper
tools/llm_provider.py
Adds DEFAULT_OPENAI_ANALYSIS_MODEL and DEFAULT_ANTHROPIC_ANALYSIS_MODEL constants and a _configured_langchain_model helper that optionally resolves model names from tools.llm_registry, falling back to the provided default.
OpenAI and Anthropic provider client updates
tools/llm_provider.py
OpenAIProvider._get_client() and AnthropicProvider._get_client() now call build_chat_client with a registry-resolved model name stored on self._model_name; analyze_completion() in both reads model_name from self._model_name with fallback instead of hardcoded strings. get_llm_provider() docstring and comments updated to describe configured slot model selection.
Progress reviewer client import switch
scripts/langchain/progress_reviewer.py
review_progress_with_llm switches the LLM client import from tools.langchain_client.build_chat_client to scripts.langchain._llm_client.build_client, with an ImportError fallback to None.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'chore: sync workflow templates' does not match the actual changes. The changeset modifies LLM client configuration and progress reviewer logic, not workflow templates. Update the title to reflect the actual changes, such as 'refactor: update LLM client configuration and progress reviewer' or similar.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/workflows-c11e0664a4d8

Comment @coderabbitai help to get the list of available commands and usage tips.

@stranske-keepalive stranske-keepalive Bot deleted the sync/workflows-c11e0664a4d8 branch June 23, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated sync from Workflows sync Automated sync from Workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant