Skip to content

feat(llm): implement multi-profile system for local and remote endpoints#71

Merged
missuo merged 3 commits into
missuo:mainfrom
thedavidweng:feat/llm-multi-profiles
Apr 10, 2026
Merged

feat(llm): implement multi-profile system for local and remote endpoints#71
missuo merged 3 commits into
missuo:mainfrom
thedavidweng:feat/llm-multi-profiles

Conversation

@thedavidweng

@thedavidweng thedavidweng commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR introduces a robust LLM profile management system that allows users to configure and
switch between multiple remote and local models seamlessly. It transitions from a single global
LLM setting to a dynamic, multi-provider architecture.

Key Features

  • Dynamic Profile Management: Users can now create, name, and delete multiple LLM profiles (e.g., separate profiles for OpenAI, local APFEL/Ollama, or MLX).
  • APFEL Integration: Added a one-click shortcut to set up a profile for "APFEL" (local Apple Foundation Models via Ollama-compatible endpoints).
  • Local MLX Support: Built-in model picker and download management for Apple Silicon-optimized local models.
  • Native UI: Redesigned the "LLM" tab in the Setup Wizard with a new profile selector and controls.
  • Core Refactoring:
    • Updated the Rust core to handle profile resolution at runtime via a BTreeMap based profile store.
    • Added atomic JSON-based FFI endpoints (sp_llm_profiles_json, etc.) for seamless communication with the native Objective-C shell.
    • Implemented backward-compatible migration logic for existing configurations.

Technical Details

  • FFI: Added support for sp_llm_profiles_json, sp_llm_save_profiles_json, and sp_llm_test_profile_json.
  • Config Schema: Refactored LlmSection to store active_profile and a collection of profiles.
  • Reasoning Control: Improved support for reasoning_effort (OpenAI o-series) and thinking (GLM etc.) at the profile level.

Verification

  • Verified full build with make build.
  • Passed unit tests in koe-core/src/config.rs for profile resolution and default states.
  • Manually verified profile switching, adding, and saving in the native macOS UI.

@missuo missuo merged commit 4619197 into missuo:main Apr 10, 2026
@thedavidweng thedavidweng deleted the feat/llm-multi-profiles branch April 10, 2026 09:56
@missuo

missuo commented Apr 10, 2026

Copy link
Copy Markdown
Owner
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants