fix: consolidate duplicate AutoGen config_list builder into shared helper#2342
Conversation
…lper (fixes #2339) Co-authored-by: MervinPraison <MervinPraison@users.noreply.github.com>
|
@coderabbitai review |
|
/review |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughA shared ChangesShared AutoGen config list
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot Do a thorough review of this PR. Read ALL existing reviewer comments above from Qodo, Coderabbit, and Gemini first — incorporate their findings. Review areas:
|
Greptile SummaryThis PR centralizes the AutoGen config list builder. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: consolidate duplicate AutoGen confi..." | Re-trigger Greptile |
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on Python packages (praisonaiagents, praisonai). Do NOT modify praisonai-rust or praisonai-ts. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. Phase 1: Review per AGENTS.md
Phase 2: FIX Valid Issues Phase 3: Final Verdict |
|
Claude finished @MervinPraison's task —— View job Final Architecture Review — PR #2342 ✅ Approve
Phase 1 — Architecture Review (per AGENTS.md)
Phase 2 — Reviewer FeedbackAll prior reviewers (CodeRabbit — no actionable comments; Greptile — 5/5, safe to merge; Copilot/Qodo — no blocking issues; Qodo paused) reported no valid bugs. I independently verified rather than rubber-stamping: Verified backward compatibility (ran locally):
Validation claim confirmed — Tests: Phase 3 — Verdict✅ Approve. No fixes required — the refactor is minimal, focused, behaviour-preserving, and a legitimate DRY improvement. No bugs, no security issues (no secrets, no eval/exec), no performance regression, no public API change. Nothing to push. Files reviewed: |
|
MERGE_GATE_VERDICT: APPROVE Automated fallback — Claude assess did not post a verdict comment (e.g. GitHub MCP unavailable). |
|
Merged by Claude PR merge gate ( |
Fixes #2339
Summary
Introduces a single shared helper
praisonai/llm/config.py::build_config_list()that performs the endpoint resolve + AutoGen-style dict build, and updates the three duplicated call sites to delegate to it.Changes
praisonai/llm/config.py:build_config_list(*, include_api_type=True)— single owner of the endpoint→config mapping, reusingresolve_llm_endpoint()._entrypoint.py:_build_config_list()now delegates to the helper.cli/main.py:PraisonAI.__init__usesbuild_config_list().auto.py:AutoGenerator.__init__usesbuild_config_list(include_api_type=False)to preserve its existing behaviour (noapi_type).Behaviour
No command, flag, or behaviour changes. All three call sites build exactly the same
config_listas before — theinclude_api_typeflag preservesauto.py's prior omission ofapi_type.Validation
grep "'model': ep.model"now matches only the new helper.build_config_list()returns{model, base_url, api_key, api_type}andinclude_api_type=Falseomitsapi_type;_build_config_list()output is identical to before.Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor