The LangChainChatProvider class defined name and model_id as read-only
properties without setters, causing AttributeError when PlanService
attempted to set these properties after provider instantiation.
Root Cause:
- LangChainChatProvider.name and .model_id were @property without @setter
- PlanService._resolve_ai_provider_for_actor() attempts to mutate these
properties at lines 411 and 413
- This caused: AttributeError: property 'name' of 'LangChainChatProvider'
object has no setter
Solution:
Added property setters for both name and model_id:
@name.setter
def name(self, value: str) -> None:
self._name = value
@model_id.setter
def model_id(self, value: str) -> None:
self._model_id = value
This allows PlanService to correctly resolve provider names and model IDs
without raising AttributeError.
Impact:
- Fixes the agents build command crash when using agents tell
- No regression: existing functionality unchanged
- Properties remain type-safe (str -> str)
ISSUES CLOSED: #1553
Remove FakeListLLM as a silent fallback in agent graph constructors
(plan_generation.py, context_analysis.py, auto_debug.py). All three now
raise ValueError when llm=None, making missing-provider errors explicit.
Add Settings.mock_providers flag and validate_provider_availability()
method. Update container.get_ai_provider() to check Settings.mock_providers
first, with env-var fallback for backward compatibility.
Add resolve_provider_by_name() helper to the provider registry and export
it from cleveragents.providers. Add structlog trace logging to
ProviderRegistry.get_default_provider_type() to record selection reasoning.
Update all existing behave step files, robot tests, and benchmarks that
relied on the implicit FakeListLLM default to pass an explicit LLM
instance instead.
Add new BDD tests (features/provider_fixes.feature with 17 scenarios),
Robot Framework integration tests (robot/provider_detection_smoke.robot),
and ASV benchmarks (benchmarks/provider_selection_bench.py).
ISSUES CLOSED: #323