INNER CODE UNIT · Python

_is_llm_degraded_active

pikpikcu/airecon · airecon/tui/app.py:355

    def _is_llm_degraded_active(self) -> bool:
        return self._llm_degraded_until > time.monotonic()

    def _should_show_llm_degraded(self, llm_ok: bool) -> bool:
        return bool(
            llm_ok and self._processing and self._is_llm_degraded_active()
        )

    def _mark_llm_degraded(self, reason: str = "") -> None:
        if not self._processing:
            return
        self._llm_degraded_until = max(
            self._llm_degraded_until,
            time.monotonic() + self._LLM_DEGRADED_SECONDS,
        )
        if reason:
            logger.warning(
                "Marking LLM status degraded due to recovery event: %s", reason

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…