fix(reactive): forward actor options block in ToolCallingLLMCaller._resolve_llm #11244

Merged
HAL9000 merged 2 commits from bugfix/m7-tool-calling-llm-options into master 2026-05-28 03:08:32 +00:00

2 Commits

Author SHA1 Message Date
controller-ci-rerun 38aa457841 chore: re-trigger CI [controller]
CI / lint (pull_request) Successful in 1m1s
CI / typecheck (pull_request) Successful in 1m18s
CI / push-validation (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 40s
CI / build (pull_request) Successful in 48s
CI / security (pull_request) Successful in 1m14s
CI / quality (pull_request) Successful in 1m22s
CI / integration_tests (pull_request) Successful in 7m8s
CI / unit_tests (pull_request) Successful in 8m51s
CI / docker (pull_request) Successful in 1m33s
CI / coverage (pull_request) Successful in 14m30s
CI / status-check (pull_request) Successful in 3s
2026-05-27 22:28:21 -04:00
hurui200320 91691750ed fix(reactive): forward actor options block in ToolCallingLLMCaller._resolve_llm
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 42s
CI / build (pull_request) Successful in 47s
CI / lint (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m11s
CI / quality (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m37s
CI / integration_tests (pull_request) Failing after 4m9s
CI / unit_tests (pull_request) Successful in 4m59s
CI / docker (pull_request) Successful in 1m25s
CI / coverage (pull_request) Successful in 11m7s
CI / status-check (pull_request) Failing after 3s
Port the options-block merging logic from SimpleLLMAgent._resolve_llm()
(stream_router.py, added in PR #11225 / commit b3851693) to the parallel
resolution path ToolCallingLLMCaller._resolve_llm() in tool_caller.py.

Without this fix, running an actor with --skill would ignore the options
block in the actor YAML, causing openai_api_base and openai_api_key to be
silently dropped.  The provider registry then fell back to OPENAI_API_KEY
from the environment, routing requests to api.openai.com instead of the
configured local llama-swap/llama.cpp backend (HTTP 401).

Changes:
- tool_caller.ToolCallingLLMCaller._resolve_llm: read actor_config.options;
  extract openai_api_key -> __api_key_sentinel; forward allowed keys
  (openai_api_base, timeout, top_p, frequency_penalty, presence_penalty);
  reject reserved keys (provider_type, model_id) and unknown keys with
  logger.warning, matching SimpleLLMAgent behaviour exactly.
- features/actor_run_tool_calling.feature: add five BDD regression
  scenarios (section V, tagged @tdd_issue @tdd_issue_11243) covering
  api_base+key forwarding, allowed extra keys, reserved key rejection,
  unknown key rejection, and top-level precedence over options.
- features/steps/actor_run_tool_calling_steps.py: add corresponding step
  definitions for all five scenarios.

All nox quality gates pass (lint, typecheck, unit_tests 15822/0 fail,
integration_tests 1999/0 fail, coverage_report 97%).

ISSUES CLOSED: #11243
2026-05-27 12:14:04 -04:00