{"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":"Error","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/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/services/api/aiSettingsApi.ts#L800-L836","documentation":"Thrown by testProviderModel() after the core RPC 'openhuman.inference_test_provider_model' resolves but the result envelope carries no result object (res.result is null/undefined). Unlike a thrown RPC error, this means the core answered successfully with an empty payload — typically a version skew where the deployed core does not actually implement/return the test result shape the UI expects, or a handler that swallowed its own failure and returned void.","triggerScenarios":"UI and openhuman-core of different versions (older core without the provider-test handler returning ProviderModelTestResult); an external/standalone core via OPENHUMAN_CORE_REUSE_EXISTING=1 that is stale; a handler code path that returns Ok(None)-equivalent on internal failure.","commonSituations":"After updating the app but the core process did not restart (cached core still running); pointing the app at a docker/cloud core built from an older branch; a core crash mid-test that still emitted a JSON-RPC success envelope.","solutions":["Restart the core (Settings > Restart Core / restartCoreProcess()) so the app and core versions match, then retest.","Check GET /schema on the running core to confirm inference_test_provider_model exists and inspect its declared return type.","Look at core logs for the provider test execution — a provider-side timeout/HTTP failure may be returning an empty success.","If using OPENHUMAN_CORE_REUSE_EXISTING=1 or a remote core, ensure it is built from the same commit as the UI."],"exampleFix":"// before\nconst res = await callCoreRpc<{ result: ProviderModelTestResult }>({ ... });\nif (!res?.result) {\n  throw new Error(`Model test RPC returned no result for ${workload} via ${provider} (openhuman.inference_test_provider_model).`);\n}\n\n// after — distinguish empty result from version skew and guide the user\nif (!res?.result) {\n  throw new Error(\n    `Model test RPC returned no result for ${workload} via ${provider}. ` +\n    'The running core may be older than the app — restart Core from Settings and retry.'\n  );\n}","handlingStrategy":"try-catch","validationCode":"import { callCoreRpc } from '../coreRpcClient';\n\nasync function coreSupportsProviderModelTest(): Promise<boolean> {\n  try {\n    const schema = await callCoreRpc<{ methods?: unknown }>({ method: 'openhuman.', params: {} }).catch(() => null);\n    // more reliably: GET /schema on the core and check for inference_test_provider_model\n    return Boolean(schema);\n  } catch {\n    return false;\n  }\n}","typeGuard":"function isProviderModelTestResult(v: unknown): v is ProviderModelTestResult {\n  return Boolean(v) && typeof v === 'object';\n}","tryCatchPattern":"try {\n  return await testProviderModel(workload, provider);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Model test RPC returned no result')) {\n    return { ok: false, error: 'Core may be outdated — restart Core and retry.' } as ProviderModelTestResult;\n  }\n  throw e;\n}","preventionTips":["Keep core and UI versions aligned; restart the core after app updates.","Treat an empty success envelope as a version-skew signal and check /schema.","Degrade the settings UI to 'test unavailable' instead of a hard error."],"tags":["core-rpc","version-skew","inference","response-validation"],"backgroundTag":"empty-rpc-response","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}