{"record":{"id":"fa0ac7b8cc105df7","repo":"BerriAI/litellm","slug":"classifier-llm-config-is-not-set","errorCode":null,"errorMessage":"classifier_llm_config is not set","messagePattern":"classifier_llm_config is not set","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/complexity_router/complexity_router.py","lineNumber":1001,"sourceCode":"        Call the configured classifier model with a system/user role split and prior-turn context.\n\n        Builds a structured classification prompt with:\n        - System message: the stable classifier rubric AND the caller's own system prompt (task\n          constraints). This is the largest, most repeated part of the call, so keeping it in the\n          system role lets the provider prompt-cache it across a session's classifier calls.\n        - User message: the variable payload -- a few prior user turns for context and the current\n          ask to classify.\n\n        Args:\n            prompt: The current user ask text (already extracted as the real human ask, not tool results)\n            system_prompt: The caller's system prompt (task constraints), always included so later\n                turns never lose it\n            request_kwargs: Request metadata for spend attribution\n            messages: Full message history for extracting prior turns and the trajectory signal\n        \"\"\"\n        llm_config: Final = self.config.classifier_llm_config\n        if llm_config is None:\n            raise ValueError(\"classifier_llm_config is not set\")\n\n        include_assistant: Final = self.config.classifier_context_include_assistant_turns\n        context_enabled: Final = bool(messages) and self.config.classifier_context_window_size > 0\n        prior_turns: Final = (\n            _extract_prior_turns(\n                messages,\n                current_ask=prompt,\n                window_size=self.config.classifier_context_window_size,\n                per_turn_chars=self.config.classifier_context_per_turn_chars,\n                include_assistant=include_assistant,\n                marker_pairs=self._reminder_markers,\n            )\n            if context_enabled\n            else ()\n        )\n        has_prior_conversation: Final = (\n            context_enabled\n            and len(","sourceCodeStart":983,"sourceCodeEnd":1019,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/complexity_router/complexity_router.py#L983-L1019","documentation":"Config guard in the complexity router: routing requests need an LLM classifier (classifier_type 'llm' or code paths calling _classify_with_llM) but no classifier_llm_config was set, so there is no model to classify with.","triggerScenarios":"Thrown at litellm/router_strategy/complexity_router/complexity_router.py:1001 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set classifier_llm_config in the complexity router config."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}