{"record":{"id":"508d5102b5727506","repo":"tinyhumansai/openhuman","slug":"home-applyopenrouterfreemodels-failed","errorCode":null,"errorMessage":"[home] applyOpenRouterFreeModels failed","messagePattern":"\\[home\\] applyOpenRouterFreeModels failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/pages/Home.tsx","lineNumber":79,"sourceCode":"    setIsRestartingCore(true);\n    setRestartError(null);\n    try {\n      await restartCoreProcess();\n    } catch (err) {\n      setRestartError(err instanceof Error ? err.message : String(err));\n    } finally {\n      setIsRestartingCore(false);\n    }\n  };\n\n  const handleUseOpenRouterFree = async () => {\n    setOpenRouterStatus('saving');\n    try {\n      await applyOpenRouterFreeModels();\n      setOpenRouterStatus('idle');\n      navigate('/chat');\n    } catch (err) {\n      console.warn('[home] applyOpenRouterFreeModels failed', err);\n      setOpenRouterStatus('error');\n    }\n  };\n\n  const statusCopy = {\n    ok: t('home.statusOk'),\n    'backend-only': t('home.statusBackendOnly'),\n    'core-unreachable': t('home.statusCoreUnreachable'),\n    'internet-offline': t('home.statusInternetOffline'),\n  }[blocking];\n\n  // Open in-app chat.\n  const handleStartCooking = async () => {\n    navigate('/chat');\n  };\n\n  useEffect(() => {\n    const activeVariant = welcomeVariants[welcomeVariantIndex] ?? '';","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/pages/Home.tsx#L61-L97","documentation":"Applying the OpenRouter free-models preset failed on the Home page: applyOpenRouterFreeModels rejected after the UI set status 'saving', so the handler sets status 'error' and the navigation to /chat does not happen. Model route configuration is left unchanged — the user stays on Home with the error state visible in the status line.","triggerScenarios":"Thrown at app/src/pages/Home.tsx:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the console-warned error — missing/expired OpenRouter credentials are the common cause","Configure a valid OpenRouter key in settings, then retry the use-free-models action","If the error is a config validation rejection, inspect the core log for the routing config write","A successful retry navigates to /chat as designed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}