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

  1. Run the full desktop app (`pnpm dev:app`) when testing model connectivity
  2. Hide or disable the 'Test model' button when !isTauri(), offering a desktop-only tooltip
  3. 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

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


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/95edca51e34b05af. Report an issue: GitHub.