From 8a89a5d5a6b8d0501869aaef5e178acc3d60cccc Mon Sep 17 00:00:00 2001 From: Rui Hu Date: Fri, 17 Apr 2026 13:26:17 +0800 Subject: [PATCH] Revert "debug: upgrade logging levels for fallback diagnostics" This reverts commit 51472c0b3788c6258e8b70187d5670dfe9b791e0. --- .../application/services/strategy_actor.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/cleveragents/application/services/strategy_actor.py b/src/cleveragents/application/services/strategy_actor.py index 5ed594b7f..f387fa0f7 100644 --- a/src/cleveragents/application/services/strategy_actor.py +++ b/src/cleveragents/application/services/strategy_actor.py @@ -587,29 +587,29 @@ class StrategyActor: try: # Create or reuse cached fallback LLM if self._fallback_llm is None: - self._logger.warning( - "Creating fallback LLM instance: %s/%s", - _FALLBACK_PROVIDER, - _FALLBACK_MODEL, + self._logger.debug( + "Creating fallback LLM instance", plan_id=plan_id, + fallback_provider=_FALLBACK_PROVIDER, + fallback_model=_FALLBACK_MODEL, ) self._fallback_llm = self._registry.create_llm( provider_type=_FALLBACK_PROVIDER, model_id=_FALLBACK_MODEL, ) - self._logger.warning( - "Fallback LLM created, attempting invocation", + self._logger.debug( + "Fallback LLM instance created successfully", plan_id=plan_id, ) else: - self._logger.warning( - "Using cached fallback LLM, attempting invocation", + self._logger.debug( + "Reusing cached fallback LLM instance", plan_id=plan_id, ) content = self._invoke_llm_with_retry( self._fallback_llm, messages, plan_id ) - self._logger.warning( + self._logger.info( "Quota error recovery successful with fallback provider", plan_id=plan_id, fallback_provider=_FALLBACK_PROVIDER, @@ -618,12 +618,12 @@ class StrategyActor: except Exception as fallback_exc: # Log the actual fallback error with full context self._logger.error( - "FALLBACK PROVIDER FAILED: %s/%s returned error: %s [%s]", - _FALLBACK_PROVIDER, - _FALLBACK_MODEL, - str(fallback_exc), - type(fallback_exc).__name__, + "Fallback provider invocation failed", plan_id=plan_id, + fallback_provider=_FALLBACK_PROVIDER, + fallback_model=_FALLBACK_MODEL, + fallback_error=str(fallback_exc), + fallback_error_type=type(fallback_exc).__name__, exc_info=True, ) # Re-raise the original exception to let the caller handle it