{"record":{"id":"a29972a25aeb13e8","repo":"BerriAI/litellm","slug":"unknown-partner-model-model","errorCode":null,"errorMessage":"Unknown partner model: {model}","messagePattern":"Unknown partner model: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/vertex_ai_partner_models/count_tokens/handler.py","lineNumber":44,"sourceCode":"        Determine the publisher name for the given model.\n\n        Args:\n            model: The model name (e.g., \"claude-3-5-sonnet-20241022\")\n\n        Returns:\n            Publisher name to use in the Vertex AI endpoint URL\n\n        Raises:\n            ValueError: If the model is not a recognized partner model\n        \"\"\"\n        if \"claude\" in model:\n            return \"anthropic\"\n        elif \"mistral\" in model or \"codestral\" in model:\n            return \"mistralai\"\n        elif \"llama\" in model or \"meta/\" in model:\n            return \"meta\"\n        else:\n            raise ValueError(f\"Unknown partner model: {model}\")\n\n    def _build_count_tokens_endpoint(\n        self,\n        model: str,\n        project_id: str,\n        vertex_location: str,\n        api_base: str | None = None,\n    ) -> str:\n        \"\"\"\n        Build the count-tokens endpoint URL for a partner model.\n\n        Args:\n            model: The model name\n            project_id: Google Cloud project ID\n            vertex_location: Vertex AI location (e.g., \"us-east5\")\n            api_base: Optional custom API base URL\n\n        Returns:","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/vertex_ai_partner_models/count_tokens/handler.py#L26-L62","documentation":"Sentinel from publisher detection for the count-tokens handler: the model name contains none of the known markers (claude, mistral/codestral, llama/meta), so its publisher path segment for the Vertex count-tokens URL is unknown.","triggerScenarios":"Thrown at litellm/llms/vertex_ai/vertex_ai_partner_models/count_tokens/handler.py:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a partner model name recognized by litellm's count_tokens handler (e.g. a supported Claude/Llama/Mistral model on Vertex).","Check the model string spelling and the supported partner-model list in the litellm docs."],"exampleFix":null,"handlingStrategy":"fallback","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"}