Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(tauri): handle missing local AI binary gracefully

Steven Enamakel6efd3ba45846
diff --git a/app/src/utils/tauriCommands/localAi.ts b/app/src/utils/tauriCommands/localAi.ts
index fab80c00a0..c721969a57 100644
--- a/app/src/utils/tauriCommands/localAi.ts
+++ b/app/src/utils/tauriCommands/localAi.ts
@@ -23,11 +23,6 @@ export interface LocalAiStatus {
stt_state: string;
tts_state: string;
provider: string;
- download_progress?: number | null;
- downloaded_bytes?: number | null;
- total_bytes?: number | null;
- download_speed_bps?: number | null;
- eta_seconds?: number | null;
warning?: string | null;
error_detail?: string | null;
error_category?: string | null;
@@ -39,63 +34,6 @@ export interface LocalAiStatus {
gen_toks_per_sec?: number | null;
}
-export interface LocalAiAssetStatus {
- state: string;
- id: string;
- provider: string;
- path?: string | null;
- warning?: string | null;
-}
-
-export interface LocalAiAssetsStatus {
- chat: LocalAiAssetStatus;
- vision: LocalAiAssetStatus;
- embedding: LocalAiAssetStatus;
- tts: LocalAiAssetStatus;
- quantization: string;
- /**
- * True when the configured Ollama endpoint is reachable enough for model
- * checks. When false the UI should render external-runtime guidance instead
- * of pretending the app can install or launch Ollama itself.
- */
- ollama_available: boolean;
-}
-
-export interface LocalAiDownloadProgressItem {
- id: string;
- provider: string;
- state: string;
- progress?: number | null;
- downloaded_bytes?: number | null;
- total_bytes?: number | null;
- speed_bps?: number | null;
- eta_seconds?: number | null;
- warning?: string | null;
- path?: string | null;
-}
-
-export interface LocalAiDownloadsProgress {
- state: string;
- warning?: string | null;
- progress?: number | null;
- downloaded_bytes?: number | null;
- total_bytes?: number | null;
- speed_bps?: number | null;
- eta_seconds?: number | null;
- chat: LocalAiDownloadProgressItem;
- vision: LocalAiDownloadProgressItem;
- embedding: LocalAiDownloadProgressItem;
- tts: LocalAiDownloadProgressItem;
- /** Mirrors `LocalAiAssetsStatus.ollama_available` — see that field. */
- ollama_available: boolean;
-}
-
-export interface LocalAiEmbeddingResult {
- model_id: string;
- dimensions: number;
- vectors: number[][];
-}
-
export interface LocalAiSpeechResult {
text: string;
model_id: string;
@@ -112,53 +50,6 @@ export interface SentimentResult {
confidence: number;
}
-export interface DeviceProfileResult {
- total_ram_bytes: number;
- cpu_count: number;
- cpu_brand: string;
- os_name: string;
- os_version: string;
- has_gpu: boolean;
- gpu_description: string | null;
-}
-
-export interface ModelPresetResult {
- tier: string;
- label: string;
- description: string;
- chat_model_id: string;
- vision_model_id: string;
- embedding_model_id: string;
- quantization: string;
- vision_mode: string;
- supports_screen_summary: boolean;
- target_ram_gb: number;
- min_ram_gb: number;
- approx_download_gb: number;
-}
-
-export interface PresetsResponse {
- presets: ModelPresetResult[];
- recommended_tier: string;
- current_tier: string;
- selected_tier?: string | null;
- device: DeviceProfileResult;
- /** When true the device is below the RAM floor and cloud fallback is the recommended default. */
- recommend_disabled?: boolean;
- /** Current value of `config.local_ai.runtime_enabled`. When false, cloud fallback is in use. */
- local_ai_enabled?: boolean;
-}
-
-export interface ApplyPresetResult {
- applied_tier: string;
- chat_model_id?: string;
- vision_model_id?: string;
- embedding_model_id?: string;
- quantization?: string;
- vision_mode?: string;
- local_ai_enabled?: boolean;
-}
-
export type RepairAction =
| { action: 'install_ollama' }
| { action: 'start_server'; binary_path: string | null }
@@ -277,15 +168,6 @@ export async function openhumanLocalAiVisionPrompt(
});
}
-export async function openhumanLocalAiEmbed(
- inputs: string[]
-): Promise<CommandResponse<LocalAiEmbeddingResult>> {
- return await callCoreRpc<CommandResponse<LocalAiEmbeddingResult>>({
- method: 'openhuman.inference_embed',
- params: { inputs },
- });
-}
-
export async function openhumanLocalAiTranscribe(
audioPath: string
): Promise<CommandResponse<LocalAiSpeechResult>> {
@@ -328,46 +210,6 @@ export async function openhumanLocalAiAnalyzeSentiment(
});
}
-export async function openhumanLocalAiAssetsStatus(): Promise<
- CommandResponse<LocalAiAssetsStatus>
-> {
- return await callCoreRpc<CommandResponse<LocalAiAssetsStatus>>({
- method: 'openhuman.inference_assets_status',
- });
-}
-
-export async function openhumanLocalAiDownloadsProgress(): Promise<
- CommandResponse<LocalAiDownloadsProgress>
-> {
- return await callCoreRpc<CommandResponse<LocalAiDownloadsProgress>>({
- method: 'openhuman.inference_downloads_progress',
- });
-}
-
-export async function openhumanLocalAiDownloadAsset(
- capability: 'chat' | 'vision' | 'embedding' | 'tts'
-): Promise<CommandResponse<LocalAiAssetsStatus>> {
- return await callCoreRpc<CommandResponse<LocalAiAssetsStatus>>({
- method: 'openhuman.inference_download_asset',
- params: { capability },
- });
-}
-
-export async function openhumanLocalAiDeviceProfile(): Promise<DeviceProfileResult> {
- return await callCoreRpc<DeviceProfileResult>({ method: 'openhuman.inference_device_profile' });
-}
-
-export async function openhumanLocalAiPresets(): Promise<PresetsResponse> {
- return await callCoreRpc<PresetsResponse>({ method: 'openhuman.inference_presets' });
-}
-
-export async function openhumanLocalAiApplyPreset(tier: string): Promise<ApplyPresetResult> {
- return await callCoreRpc<ApplyPresetResult>({
- method: 'openhuman.inference_apply_preset',
- params: { tier },
- });
-}
-
export async function openhumanLocalAiDiagnostics(): Promise<LocalAiDiagnostics> {
return await callCoreRpc<LocalAiDiagnostics>({
method: 'openhuman.inference_diagnostics',