ScrapeGraphAI/Scrapegraph-ai · error · ValueError
The model provided is not suppo
Error message
The model provided
is not supported. Supported models are:
{", ".join(supported_models)}. What it means
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.
Source
Thrown at scrapegraphai/nodes/generate_answer_from_image_node.py:85
)
async def execute_async(self, state: dict) -> dict:
"""
Processes images from the state, generates answers,
consolidates the results, and updates the state asynchronously.
"""
self.logger.info(f"--- Executing {self.node_name} Node ---")
images = state.get("screenshots", [])
analyses = []
supported_models = ("gpt-4o", "gpt-4o-mini", "gpt-4-turbo", "gpt-4")
if (
self.node_config["config"]["llm"]["model"].split("/")[-1]
not in supported_models
):
raise ValueError(
f"""The model provided
is not supported. Supported models are:
{", ".join(supported_models)}."""
)
api_key = self.node_config.get("config", {}).get("llm", {}).get("api_key", "")
async with aiohttp.ClientSession() as session:
tasks = [
self.process_image(
session,
api_key,
image_data,
state.get("user_prompt", "Extract information from the image"),
)
for image_data in images
]
View on GitHub (pinned to 532dfffbf6)
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
Example fix
# before
llm_config = {'llm': {'model': 'openai/gpt-3.5-turbo', 'api_key': key}}
# after
llm_config = {'llm': {'model': 'openai/gpt-4o', 'api_key': key}} Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = ('gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4')
model = llm_config['model'].split('/')[-1]
assert model in SUPPORTED, f'use one of {SUPPORTED} for image nodes' Type guard
def is_vision_model(model: str) -> bool:
return model.split('/')[-1] in ('gpt-4o', 'gpt-4o-mini', 'gpt-4-turbo', 'gpt-4') Try / catch
try:
await node.execute_async(state)
except ValueError as e:
if 'not supported' in str(e):
llm_config['model'] = 'openai/gpt-4o'
else:
raise Prevention
- Use a dedicated vision-capable model config for image graphs
- Upgrade scrapegraphai to pick up extended supported-model lists
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Adjacent state keys found without an operator between them.
- Invalid operator usage.
- Invalid operator placement: operators cannot be adjacent.
- Missing or unbalanced parentheses in expression.
- No state keys matched the expression.
AI-assisted analysis of ScrapeGraphAI/Scrapegraph-ai@532dfffbf6 (2026-08-28).
Data as JSON: /api/errors/31e4a1a7213a51aa.
Report an issue: GitHub.