{"record":{"id":"ae84256b10a1cbb0","repo":"BerriAI/litellm","slug":"invalid-ragflow-model-format-model-must-start","errorCode":null,"errorMessage":"Invalid RAGFlow model format: {model}. Must start with 'ragflow/'","messagePattern":"Invalid RAGFlow model format: (.+?)\\. Must start with 'ragflow/'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/ragflow/chat/transformation.py","lineNumber":52,"sourceCode":"\n        Args:\n            model: Model name in format ragflow/chat/{chat_id}/{model} or ragflow/agent/{agent_id}/{model}\n\n        Returns:\n            Tuple of (endpoint_type, id, model_name)\n\n        Raises:\n            ValueError: If model format is invalid\n        \"\"\"\n        parts: Final = model.split(\"/\")\n        if len(parts) < 4:\n            raise ValueError(\n                f\"Invalid RAGFlow model format: {model}. \"\n                f\"Expected format: ragflow/chat/{{chat_id}}/{{model}} or ragflow/agent/{{agent_id}}/{{model}}\"\n            )\n\n        if parts[0] != \"ragflow\":\n            raise ValueError(f\"Invalid RAGFlow model format: {model}. Must start with 'ragflow/'\")\n\n        endpoint_type: Final = parts[1]\n        if endpoint_type not in [\"chat\", \"agent\"]:\n            raise ValueError(f\"Invalid RAGFlow endpoint type: {endpoint_type}. Must be 'chat' or 'agent'\")\n\n        entity_id: Final = parts[2]\n        model_name: Final = \"/\".join(parts[3:])  # Handle model names that might contain slashes\n\n        return endpoint_type, entity_id, model_name\n\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        api_key: str | None,\n        model: str,\n        optional_params: dict,\n        litellm_params: dict,\n        stream: bool | None = None,","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/ragflow/chat/transformation.py#L34-L70","documentation":"Model-format parser guard in the RAGFlow chat config: the string had enough segments but the first segment is not 'ragflow', so it belongs to a different provider's naming scheme and cannot be routed to the RAGFlow endpoint.","triggerScenarios":"Triggered when the RAGFlow model string does not start with the 'ragflow/' prefix.","commonSituations":"See trigger scenarios.","solutions":["Prefix the model string with 'ragflow/'.","Use the full ragflow/chat/<chat_id>/<model> or ragflow/agent/<agent_id>/<model> form."],"exampleFix":"model=\"ragflow/chat/<chat_id>/<model>\"","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"}