tinyhumansai/openhuman · error
Model testing is only available in the desktop app.
Error message
Model testing is only available in the desktop app.
What it means
testProviderModel performs an inference test through the core RPC openhuman.inference_test_provider_model, which only exists when running inside the Tauri desktop shell. The isTauri() check fails (e.g. plain browser/Vite dev server without the Tauri host) and the call is refused before any RPC attempt.
Source
Thrown at app/src/services/api/aiSettingsApi.ts:810
/** Fetch BYO provider auth failures recorded this process, keyed by slug. */
export async function loadProviderAuthErrors(): Promise<ProviderAuthError[]> {
if (!isTauri()) {
return [];
}
const res = await callCoreRpc<{ result: { errors: ProviderAuthError[] } }>({
method: 'openhuman.inference_provider_auth_errors',
params: {},
});
return res?.result?.errors ?? [];
}
export async function testProviderModel(
workload: WorkloadId,
provider: string,
prompt = 'Hello world'
): Promise<ProviderModelTestResult> {
if (!isTauri()) {
throw new Error('Model testing is only available in the desktop app.');
}
const res = await callCoreRpc<{ result: ProviderModelTestResult }>({
method: 'openhuman.inference_test_provider_model',
params: { workload, provider, prompt },
timeoutMs: PROVIDER_MODEL_TEST_TIMEOUT_MS,
});
if (!res?.result) {
throw new Error(
`Model test RPC returned no result for ${workload} via ${provider} (openhuman.inference_test_provider_model).`
);
}
return res.result;
}
// ─── Local provider façade (Ollama install / detect / model manage) ───────
/** Snapshot of the Ollama daemon + installed-model state for the AI panel. */
export interface LocalProviderSnapshot {View on GitHub (pinned to a221052e0d)
Solutions
- Run the full desktop app (`pnpm dev:app`) when testing model connectivity
- Hide or disable the 'Test model' button when !isTauri(), offering a desktop-only tooltip
- In browser-only builds, replace the test with a hint to open the desktop app
Example fix
// before
<button onClick={() => testProviderModel(workload, provider)}>Test model</button>
// after
{isTauri()
? <button onClick={() => testProviderModel(workload, provider)}>Test model</button>
: <span className="hint">Model testing is available in the desktop app.</span>} Defensive patterns
Strategy: type-guard
Validate before calling
import { isTauri } from '@/utils/tauri';
const canTestModels = isTauri();
// gate the UI before any call:
if (canTestModels) { const r = await testProviderModel(workload, provider); } Type guard
const isDesktopHost = (): boolean => isTauri(); // use wherever the test button renders
Try / catch
try { await testProviderModel(workload, provider); }
catch (e) { if (String(e.message).includes('desktop app')) showDesktopOnlyNotice(); else throw e; } Prevention
- Use `pnpm dev:app` (full Tauri host) when touching inference/model settings
- Conditionally render desktop-only capabilities via isTauri() instead of catching
- Mark such functions in code review as desktop-only API surface
When it happens
Trigger: Opening the UI with `pnpm dev` (browser tab only) and clicking 'Test model' in the AI settings panel; running the frontend in a non-Tauri web deployment; unit/component tests executing the function in a plain JS DOM.
Common situations: Developers prototyping in the browser instead of `pnpm dev:app`; a web build of screens that were written for desktop; E2E harnesses that don't boot the Tauri host.
Related errors
- Not running in Tauri
- Not running in Tauri
- Not running in Tauri
- Not running in Tauri
- OpenHuman uses the session JWT — keys are not configurable h
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/95edca51e34b05af.
Report an issue: GitHub.