{"record":{"id":"689e3f61e2da1b10","repo":"langchain-ai/langgraph","slug":"invalid-version-version-supported-versions-are","errorCode":null,"errorMessage":"Invalid version {version}. Supported versions are 'v1' and 'v2'.","messagePattern":"Invalid version (.+?)\\. Supported versions are 'v1' and 'v2'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py","lineNumber":534,"sourceCode":"    \"\"\"\n    if (\n        config_schema := deprecated_kwargs.pop(\"config_schema\", MISSING)\n    ) is not MISSING:\n        warnings.warn(\n            \"`config_schema` is deprecated and will be removed. Please use `context_schema` instead.\",\n            category=LangGraphDeprecatedSinceV10,\n        )\n\n        if context_schema is None:\n            context_schema = config_schema\n\n    if len(deprecated_kwargs) > 0:\n        raise TypeError(\n            f\"create_react_agent() got unexpected keyword arguments: {deprecated_kwargs}\"\n        )\n\n    if version not in (\"v1\", \"v2\"):\n        raise ValueError(\n            f\"Invalid version {version}. Supported versions are 'v1' and 'v2'.\"\n        )\n\n    if state_schema is not None:\n        required_keys = {\"messages\", \"remaining_steps\"}\n        if response_format is not None:\n            required_keys.add(\"structured_response\")\n\n        schema_keys = set(get_type_hints(state_schema))\n        if missing_keys := required_keys - set(schema_keys):\n            raise ValueError(f\"Missing required key(s) {missing_keys} in state_schema\")\n\n    if state_schema is None:\n        state_schema = (\n            AgentStateWithStructuredResponse\n            if response_format is not None\n            else AgentState\n        )","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py#L516-L552","documentation":"Error \"Invalid version {version}. Supported versions are 'v1' and 'v2'.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/prebuilt/langgraph/prebuilt/chat_agent_executor.py:534 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}