{"record":{"id":"31e4a1a7213a51aa","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"the-model-provided-is","errorCode":null,"errorMessage":"The model provided\n                             is not supported. Supported models are:\n                             {\", \".join(supported_models)}.","messagePattern":"The model provided\n                             is not supported\\. Supported models are:\n                             (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/nodes/generate_answer_from_image_node.py","lineNumber":85,"sourceCode":"            )\n\n    async def execute_async(self, state: dict) -> dict:\n        \"\"\"\n        Processes images from the state, generates answers,\n        consolidates the results, and updates the state asynchronously.\n        \"\"\"\n        self.logger.info(f\"--- Executing {self.node_name} Node ---\")\n\n        images = state.get(\"screenshots\", [])\n        analyses = []\n\n        supported_models = (\"gpt-4o\", \"gpt-4o-mini\", \"gpt-4-turbo\", \"gpt-4\")\n\n        if (\n            self.node_config[\"config\"][\"llm\"][\"model\"].split(\"/\")[-1]\n            not in supported_models\n        ):\n            raise ValueError(\n                f\"\"\"The model provided\n                             is not supported. Supported models are:\n                             {\", \".join(supported_models)}.\"\"\"\n            )\n\n        api_key = self.node_config.get(\"config\", {}).get(\"llm\", {}).get(\"api_key\", \"\")\n\n        async with aiohttp.ClientSession() as session:\n            tasks = [\n                self.process_image(\n                    session,\n                    api_key,\n                    image_data,\n                    state.get(\"user_prompt\", \"Extract information from the image\"),\n                )\n                for image_data in images\n            ]\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/nodes/generate_answer_from_image_node.py#L67-L103","documentation":"GenerateAnswerFromImageNode.execute_async only supports OpenAI vision models; it reads node_config['config']['llm']['model'] (taking the part after the last '/'), and if it is not one of gpt-4o/gpt-4o-mini/gpt-4-turbo/gpt-4 it raises this ValueError listing supported models.","triggerScenarios":"Configuring the node with a non-vision model (e.g. 'gpt-3.5-turbo', 'claude-...', or an Azure deployment name); passing a provider-prefixed string whose suffix is unsupported.","commonSituations":"Reusing a general LLM config for an image graph; Azure deployment names that don't match the allowlist; model allowlist is hardcoded so newer models (gpt-4.1 etc.) also fail on older versions.","solutions":["Set config.llm.model to a supported vision model, e.g. 'gpt-4o' or 'gpt-4o-mini'","Upgrade scrapegraphai — the supported list may have been extended","Ensure the model string's final '/'-segment matches the exact model name"],"exampleFix":"# before\nllm_config = {'llm': {'model': 'openai/gpt-3.5-turbo', 'api_key': key}}\n# after\nllm_config = {'llm': {'model': 'openai/gpt-4o', 'api_key': key}}","handlingStrategy":"validation","validationCode":"SUPPORTED = ('gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4')\nmodel = llm_config['model'].split('/')[-1]\nassert model in SUPPORTED, f'use one of {SUPPORTED} for image nodes'","typeGuard":"def is_vision_model(model: str) -> bool:\n    return model.split('/')[-1] in ('gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4')","tryCatchPattern":"try:\n    await node.execute_async(state)\nexcept ValueError as e:\n    if 'not supported' in str(e):\n        llm_config['model'] = 'openai/gpt-4o'\n    else:\n        raise","preventionTips":["Use a dedicated vision-capable model config for image graphs","Upgrade scrapegraphai to pick up extended supported-model lists"],"tags":["scrapegraphai","vision","model-not-supported","llm-config"],"backgroundTag":"unsupported-model","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}