feat(local-ai): guided model tier selection by device capability#120
Merged
Conversation
Add tiered model presets (Low/Medium/High) with device-aware recommendations so users can pick a local AI model that fits their machine without editing raw JSON config. Detect RAM, CPU, GPU via sysinfo crate and recommend a tier. Persist selection to config.toml, with env var override and graceful degradation hints on bootstrap failure. - Rust: presets.rs (tier definitions, recommendation logic), device.rs (hardware detection), 3 new RPC methods, env var override, bootstrap hints - Frontend: tier selector UI in Settings > Local AI Model with device info, loading/error states, and "Advanced" toggle for existing controls - Tests: 7 Rust unit tests + comprehensive JSON-RPC E2E test - Also fixes pre-existing lint warning in SkillSetupWizard.tsx Closes #80
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
local_ai_device_profile,local_ai_presets,local_ai_apply_preset— preset selection persists toconfig.tomlwithOPENHUMAN_LOCAL_AI_TIERenv var overrideSkillSetupWizard.tsxChanges
Rust core
src/openhuman/local_ai/presets.rs—ModelTierenum,ModelPresetstruct, tier definitions,recommend_tier(),apply_preset_to_config(),current_tier_from_config()src/openhuman/local_ai/device.rs—DeviceProfilestruct,detect_device_profile()usingsysinfocrate (Apple Silicon GPU detection)src/openhuman/local_ai/schemas.rs— 3 new controller schemas + handlerssrc/openhuman/config/schema/local_ai.rs—selected_tier: Option<String>fieldsrc/openhuman/config/schema/load.rs—OPENHUMAN_LOCAL_AI_TIERenv var overridesrc/openhuman/local_ai/service/bootstrap.rs— degradation hint for tier step-downFrontend
app/src/components/settings/panels/LocalModelPanel.tsx— tier selection UI with device info, loading/error statesapp/src/components/settings/SettingsHome.tsx— "Local AI Model" main menu itemapp/src/components/settings/panels/DeveloperOptionsPanel.tsx— removed duplicate entryapp/src/utils/tauriCommands.ts— TypeScript types + 3 RPC wrappersTests
Test plan
cargo checkpassesyarn typecheckpassesyarn lintpasses (0 warnings)yarn format:checkpassesyarn buildpassesyarn tauri dev— app launches, core connects, presets RPC returns correct device info and tier recommendationsCloses #80
🤖 Generated with Claude Code