{"record":{"id":"47d5b0c62d01949f","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"provider-llm-params-model-provider-is-not-sup","errorCode":null,"errorMessage":"Provider {llm_params[\"model_provider\"]} is not supported.\n                If possible, try to use a model instance instead.","messagePattern":"Provider (.+?) is not supported\\.\n                If possible, try to use a model instance instead\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/graphs/abstract_graph.py","lineNumber":191,"sourceCode":"            \"fireworks\",\n            \"clod\",\n            \"togetherai\",\n            \"xai\",\n            \"minimax\",\n        }\n\n        if \"/\" in llm_params[\"model\"]:\n            split_model_provider = llm_params[\"model\"].split(\"/\", 1)\n            llm_params[\"model_provider\"] = split_model_provider[0]\n            llm_params[\"model\"] = split_model_provider[1]\n        else:\n            possible_providers = [\n                provider\n                for provider, models_d in models_tokens.items()\n                if llm_params[\"model\"] in models_d\n            ]\n            if len(possible_providers) <= 0:\n                raise ValueError(\n                    f\"\"\"Provider {llm_params[\"model_provider\"]} is not supported.\n                                If possible, try to use a model instance instead.\"\"\"\n                )\n            llm_params[\"model_provider\"] = possible_providers[0]\n            logger.info(\n                \"Found providers %s for model %s, using %s. \"\n                \"If it was not intended please specify the model provider in the graph configuration\",\n                possible_providers,\n                llm_params[\"model\"],\n                llm_params[\"model_provider\"],\n            )\n\n        if llm_params[\"model_provider\"] not in known_providers:\n            raise ValueError(\n                f\"\"\"Provider {llm_params[\"model_provider\"]} is not supported.\n                             If possible, try to use a model instance instead.\"\"\"\n            )\n","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/graphs/abstract_graph.py#L173-L209","documentation":"Raised when _create_llm cannot determine the provider: the 'model' string in llm_params does not appear in any provider's entry of models_tokens, so the list of possible providers is empty and the fallback lookup fails. The message prints the (unset or wrong) model_provider value, which is confusing but means 'unknown model name'.","triggerScenarios":"Setting config llm {'model': 'some-unknown-or-typo'd-model'} without a valid model_provider, or with model_provider omitted so the code tries to infer the provider from models_tokens and finds no match.","commonSituations":"Typos in model names ('gpt-4o-mini ' with whitespace, 'claude-3.5-sonnet' vs the exact key); brand-new models released after the installed scrapegraphai version; custom/self-hosted model names that are not in the built-in token tables.","solutions":["Check the exact model string keys in scrapegraphai/models/models_tokens.py and use one of them verbatim.","Upgrade scrapegraphai (uv sync / pip install -U scrapegraphai) so newly added models are recognized.","For custom models, pass a pre-built 'model_instance' plus 'model_tokens' to bypass name-based lookup.","Set 'model_provider' explicitly to a supported provider if the model name genuinely exists under it."],"exampleFix":"# before\nconfig = {'llm': {'model': 'gpt4-o', 'api_key': key}}\n\n# after\nconfig = {'llm': {'model': 'gpt-4o', 'model_provider': 'openai', 'api_key': key}}","handlingStrategy":"validation","validationCode":"from scrapegraphai.models.models_tokens import models_tokens\nmodel = config['llm']['model']\nknown = {m for prov in models_tokens.values() for m in prov}\nassert model in known, f\"model '{model}' not in models_tokens; fix the name or pass model_instance\"","typeGuard":"def is_known_model(model: str) -> bool:\n    from scrapegraphai.models.models_tokens import models_tokens\n    return any(model in prov for prov in models_tokens.values())","tryCatchPattern":"try:\n    graph = SmartScraperGraph(prompt=p, config=config)\nexcept ValueError as e:\n    if 'is not supported' in str(e):\n        config['llm']['model_instance'] = build_client(config['llm'])\n        config['llm']['model_tokens'] = 32000\n        graph = SmartScraperGraph(prompt=p, config=config)\n    else:\n        raise","preventionTips":["Copy model names verbatim from models_tokens.py.","Pin and periodically upgrade scrapegraphai so new model names are recognized.","For custom endpoints, standardize on model_instance + model_tokens."],"tags":["configuration","model-name","provider-detection","llm"],"backgroundTag":"unknown-model-name","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}