Skip to content

fix: align llm provider fallback models - #2501

Merged
stranske merged 1 commit into
mainfrom
codex/llm-provider-shared-client
Jun 22, 2026
Merged

fix: align llm provider fallback models#2501
stranske merged 1 commit into
mainfrom
codex/llm-provider-shared-client

Conversation

@stranske

@stranske stranske commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace retired provider fallback model names in tools/llm_provider.py with current registry defaults
  • keep the consumer template copy aligned
  • update focused provider shared-client tests

Validation

  • uv run pytest tests/tools/test_llm_provider.py tests/tools/test_langchain_client.py tests/test_openai_provider.py tests/test_anthropic_provider.py -q
  • uv run --with pyyaml python scripts/validate_template_sync.py
  • uv run ruff check tools/llm_provider.py templates/consumer-repo/tools/llm_provider.py tests/tools/test_llm_provider.py
  • uv run black --fast --check tools/llm_provider.py templates/consumer-repo/tools/llm_provider.py tests/tools/test_llm_provider.py
  • git diff --check

Summary by CodeRabbit

  • Updates
    • Updated default AI analysis models to newer versions (OpenAI and Anthropic) for improved compatibility and performance.

@stranske stranske added automation Automation and workflow automation maintenance Maintenance tasks github:actions GitHub Actions related langchain sync codex codex-automation labels Jun 22, 2026
@stranske
stranske temporarily deployed to agent-standard June 22, 2026 10:03 — with GitHub Actions Inactive
@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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 42b20f3c-3df2-4765-8f09-b7f00f3f80f7

📥 Commits

Reviewing files that changed from the base of the PR and between 680260c and f3d621d.

📒 Files selected for processing (3)
  • templates/consumer-repo/tools/llm_provider.py
  • tests/tools/test_llm_provider.py
  • tools/llm_provider.py
🔗 Linked repositories identified

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

  • stranske/Template (auto-detected)
  • stranske/Fine-Art-Archive (auto-detected)
  • stranske/Ready (auto-detected)
  • stranske/Workflows-Integration-Tests (auto-detected)

📝 Walkthrough

Walkthrough

Two new module-level constants (DEFAULT_OPENAI_ANALYSIS_MODEL = "gpt-5.4" and DEFAULT_ANTHROPIC_ANALYSIS_MODEL = "claude-sonnet-4-6") replace previously hardcoded fallback strings in OpenAIProvider and AnthropicProvider within both tools/llm_provider.py and its template copy. Docstrings and inline comments are updated to reference "configured slot model" terminology, and tests are aligned to the new model identifiers.

Changes

Default Model Constant Extraction

Layer / File(s) Summary
New default model constants and provider fallback usage
tools/llm_provider.py, templates/consumer-repo/tools/llm_provider.py
Adds DEFAULT_OPENAI_ANALYSIS_MODEL (gpt-5.4) and DEFAULT_ANTHROPIC_ANALYSIS_MODEL (claude-sonnet-4-6) constants; replaces hardcoded fallback model strings in _get_client() and analyze_completion() for both OpenAIProvider and AnthropicProvider; updates get_llm_provider docstring and provider list inline comments to say "configured slot model".
Test assertions updated to new fallback model names
tests/tools/test_llm_provider.py
Updates test_openai_provider_reports_configured_client_model and test_anthropic_provider_reports_configured_client_model to assert gpt-5.4 and claude-sonnet-4-6 as the new fallback values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: align llm provider fallback models' directly summarizes the main change: updating LLM provider fallback models to align with current registry defaults.
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 codex/llm-provider-shared-client

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

@stranske
stranske enabled auto-merge (squash) June 22, 2026 10:04
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2501 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely.

Please do one of:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@stranske
stranske temporarily deployed to agent-standard June 22, 2026 10:04 — with GitHub Actions Inactive
@agents-workflows-bot

agents-workflows-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 07a9dab
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 70.56%
Baseline 85.00%
Delta -14.44%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185
scripts/langchain/topic_splitter.py 19.1% 57

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/check_api_wrapper_guard.py 0.0% 123
scripts/cleanup_labels.py 0.0% 127
scripts/issue_dedup_smoke.py 0.0% 4
scripts/list_registered_consumer_repos.py 0.0% 33
scripts/repo_review_backlog_scan.py 0.0% 203
scripts/repo_review_round1_runner.py 0.0% 225
scripts/repo_review_round1_schema.py 0.0% 194
scripts/runner_lib/__main__.py 0.0% 3
scripts/update_langchain_versions.py 0.0% 34
scripts/validate_dependency_test_setup.py 0.0% 112
scripts/validate_template_completeness.py 0.0% 88
scripts/validate_template_sync.py 0.0% 77
scripts/validate_workflow_yaml.py 0.0% 98
scripts/repo_review_round2_schema.py 8.8% 185
scripts/langchain/topic_splitter.py 19.1% 57

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske temporarily deployed to agent-standard June 22, 2026 10:04 — with GitHub Actions Inactive
@stranske
stranske merged commit f4fa438 into main Jun 22, 2026
119 of 130 checks passed
@stranske
stranske deleted the codex/llm-provider-shared-client branch June 22, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Automation and workflow automation codex codex-automation github:actions GitHub Actions related langchain maintenance Maintenance tasks sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant