{"record":{"id":"51d274e167ae9559","repo":"BerriAI/litellm","slug":"no-auto-router-config-provided","errorCode":null,"errorMessage":"No auto router config provided","messagePattern":"No auto router config provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_strategy/auto_router/auto_router.py","lineNumber":79,"sourceCode":"        self.litellm_router_instance: Router = litellm_router_instance\n\n    def _load_semantic_routing_routes(self) -> list[Route]:\n        from semantic_router.routers import SemanticRouter\n\n        if self.auto_router_config_path:\n            return SemanticRouter.from_json(self.auto_router_config_path).routes\n        elif self.auto_router_config:\n            return self._load_auto_router_routes_from_config_json()\n        else:\n            raise ValueError(\"No router config provided\")\n\n    def _load_auto_router_routes_from_config_json(self) -> list[Route]:\n        import json\n\n        from semantic_router.routers.base import Route\n\n        if self.auto_router_config is None:\n            raise ValueError(\"No auto router config provided\")\n        auto_router_routes: Final[list[Route]] = []\n        loaded_config: Final = json.loads(self.auto_router_config)\n        for route in loaded_config.get(\"routes\", []):\n            auto_router_routes.append(\n                Route(\n                    name=route.get(\"name\"),\n                    description=route.get(\"description\"),\n                    utterances=route.get(\"utterances\", []),\n                    score_threshold=route.get(\"score_threshold\"),\n                )\n            )\n        return auto_router_routes\n\n    @staticmethod\n    def _extract_text_from_messages(messages: list[dict[str, Any]]) -> str:\n        \"\"\"\n        Extract text content from the last user message for routing.\n","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_strategy/auto_router/auto_router.py#L61-L97","documentation":"Init guard in the auto (semantic) router: neither auto_router_config_path nor auto_router_config was provided, so there is no route configuration to build SemanticRouter routes from.","triggerScenarios":"Thrown at litellm/router_strategy/auto_router/auto_router.py:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide an auto router config (with embedding model and routing config) when initializing."],"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-14T00:17:10.932Z"}