fix(reactive): forward actor options block in ToolCallingLLMCaller._resolve_llm #11244
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Blocks
#11243 Bug: ToolCallingLLMCaller ignores actor options block, causing wrong LLM provider when skill is used
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!11244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m7-tool-calling-llm-options"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes a bug where running an actor with
--skillwould ignore theoptionsblock in the actor YAML config, causingopenai_api_baseandopenai_api_keyto be silently dropped. This caused actors that correctly route to a local llama-swap/llama.cpp backend without--skillto fail with an OpenAI 401 when--skillwas attached.Closes #11243
Root Cause
PR #11225 (commit
b3851693) added options-block forwarding toSimpleLLMAgent._resolve_llm()instream_router.py. PR #11211 later introducedToolCallingLLMCaller._resolve_llm()intool_caller.py— the parallel resolution path used when tools are attached via--skill— but never ported that logic. As a result, the two paths diverged silently.Changes
src/cleveragents/reactive/tool_caller.pyToolCallingLLMCaller._resolve_llm(): ported the full options-block merging logic fromSimpleLLMAgent._resolve_llm():openai_api_keyinoptionsis extracted and forwarded as__api_key_sentinel(overrides env-sourced key in provider registry)openai_api_base,timeout,top_p,frequency_penalty,presence_penaltyfromoptionsare forwarded tocreate_llm()when not already set by a top-level config key (top-level takes precedence)provider_type,model_id) are rejected withlogger.warninglogger.warningciting allowed keysSimpleLLMAgent._resolve_llm()features/actor_run_tool_calling.featureAdded five BDD regression scenarios in section V (
@tdd_issue @tdd_issue_11243):openai_api_baseandopenai_api_keyforwarded from options blocktimeout,top_p,frequency_penalty,presence_penalty) forwardedprovider_typerejected without TypeErrorfoo_barnot forwarded tocreate_llm()temperaturetakes precedence overoptions.temperaturefeatures/steps/actor_run_tool_calling_steps.pyAdded step definitions for the 5 new scenarios using
patch("cleveragents.reactive.tool_caller.get_provider_registry")to capturecreate_llm()call kwargs.Quality Gates
nox -e lintnox -e typechecknox -e unit_testsnox -e integration_testsnox -e coverage_reportNote: This PR contains both TDD and fix. To speed up the bug fixes, I decided to not have a dedicated PR for TDD test cases since it usually take days to get a PR merged in.
18429950564b05d9a181Claimed by
merge_drive.py(pid 292598) until2026-05-27T17:43:57.982964+00:00.This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
4b05d9a18191691750edReleased by
merge_drive.py(pid 292598). terminal_state=ci-fail-on-rebased-sha, op_label=auto/needs-implementerClaimed by
merge_drive.py(pid 309620) until2026-05-27T18:58:30.373348+00:00.This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
Released by
merge_drive.py(pid 309620). terminal_state=ci-fail-on-rebased-sha, op_label=auto/needs-implementerClaimed by
merge_drive.py(pid 779633) until2026-05-28T04:38:26.859563+00:00.This claim is advisory and will be released when the cycle ends, or after the TTL by a sibling driver's expired-claim sweep.
Approved by the controller reviewer stage (workflow 3).