tinyhumansai/openhuman · error · Error
Not running in Tauri
Error message
Not running in Tauri
What it means
openhumanAgentChat sends a one-shot chat turn to the core via openhuman.agent_chat ({ message, model_override, temperature }) and is guarded by the shared isTauri() check that throws 'Not running in Tauri'. The chat path only exists through relay_http_rpc (a Tauri command invoked over IPC), so outside the desktop shell — or before window.__TAURI_INTERNALS__.invoke is injected at CEF startup (#1472) — the wrapper fails fast with this error instead of attempting invoke.
Source
Thrown at app/src/utils/tauriCommands/localAi.ts:230
chat_eligibility?: ModelContextEligibility | null;
embedding_model: string;
embedding_found: boolean;
embedding_eligibility?: ModelContextEligibility | null;
vision_model: string;
vision_found: boolean;
};
issues: string[];
repair_actions: RepairAction[];
ok: boolean;
}
export async function openhumanAgentChat(
message: string,
modelOverride?: string,
temperature?: number
): Promise<CommandResponse<string>> {
if (!isTauri()) {
throw new Error('Not running in Tauri');
}
return await callCoreRpc<CommandResponse<string>>({
method: 'openhuman.agent_chat',
params: { message, model_override: modelOverride, temperature },
});
}
export async function openhumanLocalAiStatus(): Promise<CommandResponse<LocalAiStatus>> {
try {
return await callCoreRpc<CommandResponse<LocalAiStatus>>({
method: 'openhuman.inference_status',
});
} catch (err) {
const message = tauriErrorMessage(err);
if (message.includes('unknown method: openhuman.inference_status')) {
throw new Error(
'Local model runtime is unavailable in this core build. Restart app after updating to the latest build.'
);View on GitHub (pinned to 7491200858)
Solutions
- Run chats inside the Tauri host: pnpm dev:app.
- Mock the Tauri core module (isTauri → true, invoke → canned CommandResponse<string>) in tests.
- Route non-Tauri contexts through the regular web-chat service instead of this desktop-only wrapper.
- Gate agent-chat debug actions on isTauri() and core readiness.
Example fix
// before
const reply = (await openhumanAgentChat('ping')).result;
// after
if (!isTauri()) throw new Error('agent_chat requires the desktop runtime');
const reply = (await openhumanAgentChat('ping')).result; Defensive patterns
Strategy: validation
Validate before calling
if (!isTauri()) {
throw new Error('agent_chat requires the desktop runtime');
}
const reply = (await openhumanAgentChat(message)).result; Type guard
import { isTauri } from './common';
const agentChatAvailable = (): boolean => isTauri(); Try / catch
try { const reply = (await openhumanAgentChat(msg)).result; }
catch (e) {
if (e instanceof Error && e.message === 'Not running in Tauri') { useWebChatFallback(); return; }
throw e;
} Prevention
- Route browser contexts through the web-chat service, not this desktop-only wrapper.
- Mock the Tauri core module in chat tests.
- Gate debug/diagnostic chat panels on isTauri().
- Don't fire test messages before IPC readiness.
When it happens
Trigger: Calling openhumanAgentChat('hello') from the Vite dev server in a normal browser; a chat unit test that doesn't mock the Tauri API; a debug console/panel issuing a test message during the startup bridge gap.
Common situations: Using pnpm dev instead of pnpm dev:app while iterating on chat; integration tests of chat plumbing missing '@tauri-apps/api/core' mocks; early-mount debug tools firing before IPC readiness.
Related errors
- Not running in Tauri
- Not running in Tauri
- Not running in Tauri
- Not running in Tauri
- Not running in Tauri
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/949de14d37914a7d.
Report an issue: GitHub.