{"record":{"id":"828744b5c1e52480","repo":"tinyhumansai/openhuman","slug":"model-test-rpc-returned-no-result-for-workload","errorCode":null,"errorMessage":"Model test RPC returned no result for ${workload} via ${provider} (openhuman.inference_test_provider_model).","messagePattern":"Model test RPC returned no result for (.+?) via (.+?) \\(openhuman\\.inference_test_provider_model\\)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/services/api/aiSettingsApi.ts","lineNumber":818,"sourceCode":"  });\n  return res?.result?.errors ?? [];\n}\n\nexport async function testProviderModel(\n  workload: WorkloadId,\n  provider: string,\n  prompt = 'Hello world'\n): Promise<ProviderModelTestResult> {\n  if (!isTauri()) {\n    throw new Error('Model testing is only available in the desktop app.');\n  }\n  const res = await callCoreRpc<{ result: ProviderModelTestResult }>({\n    method: 'openhuman.inference_test_provider_model',\n    params: { workload, provider, prompt },\n    timeoutMs: PROVIDER_MODEL_TEST_TIMEOUT_MS,\n  });\n  if (!res?.result) {\n    throw new Error(\n      `Model test RPC returned no result for ${workload} via ${provider} (openhuman.inference_test_provider_model).`\n    );\n  }\n  return res.result;\n}\n\n// ─── Local provider façade (Ollama install / detect / model manage) ───────\n\n/** Snapshot of the Ollama daemon + installed-model state for the AI panel. */\nexport interface LocalProviderSnapshot {\n  status: LocalAiStatus | null;\n  diagnostics: LocalAiDiagnostics | null;\n  presets: PresetsResponse | null;\n  installedModels: InstalledModelInfo[];\n}\n\nexport async function loadLocalProviderSnapshot(): Promise<LocalProviderSnapshot> {\n  const [statusRes, diag, presets] = await Promise.all([","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/app/src/services/api/aiSettingsApi.ts#L800-L836","documentation":"testProviderModel got a response from openhuman.inference_test_provider_model but res.result was null/undefined — the envelope has no result object to read workload/provider outcome from. This is a protocol-shape mismatch, not a failed inference: the RPC layer answered, the payload did not match the expected { result: ProviderModelTestResult } shape.","triggerScenarios":"A core version whose handler returns {} or a differently-named envelope for inference_test_provider_model; a proxy/mock returning an empty object; result explicitly nulled by the handler on some internal skip path.","commonSituations":"Version skew between an updated frontend and an older (or not-yet-restarted) embedded core; OPENHUMAN_CORE_REUSE_EXISTING=1 pinning an older core during development; mock backends that answer success without the result body.","solutions":["Restart the desktop app / core process so the bundled core matches the frontend","If using OPENHUMAN_CORE_REUSE_EXISTING, clear it and let the fresh core spawn, then retest","Check the core-side handler for inference_test_provider_model (what it returns on skip/failure) in logs","Catch the error and show 'model test unavailable in this build' rather than a raw stack"],"exampleFix":"// before\nconst r = await testProviderModel(workload, provider);\nsetOutcome(r);\n\n// after\ntry {\n  const r = await testProviderModel(workload, provider);\n  setOutcome(r);\n} catch (e) {\n  setOutcome({ error: 'Model test unavailable — restart the app and try again.' });\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const hasResult = <T>(r: unknown): r is { result: T } =>\n  typeof r === 'object' && r !== null && 'result' in r && (r as { result: unknown }).result != null;","tryCatchPattern":"try { const r = await testProviderModel(workload, provider); setOutcome(r); }\ncatch (e) { if (String(e.message).includes('no result')) { promptRestartCore('Model test unavailable — restart the app.'); } else throw e; }","preventionTips":["Restart the embedded core after frontend/core updates before debugging 'shape' errors","Don't pin an old core with OPENHUMAN_CORE_REUSE_EXISTING while testing new frontend code","Make mocks return the full { result: ... } envelope so tests match production"],"tags":["response-shape","rpc","ai-settings","version-skew"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}