Skip to content

fix(app): hide MLX LLM provider on builds without mlx feature#68

Merged
missuo merged 1 commit into
missuo:mainfrom
erning:fix/hide-mlx-llm-on-x86
Apr 10, 2026
Merged

fix(app): hide MLX LLM provider on builds without mlx feature#68
missuo merged 1 commit into
missuo:mainfrom
erning:fix/hide-mlx-llm-on-x86

Conversation

@erning

@erning erning commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

On x86_64 builds, the mlx cargo feature is disabled (see Makefile / project.yml), but the Setup Wizard still hardcoded the "MLX (Apple Silicon)" entry in the LLM provider popup. This PR hides that option on builds that do not include the mlx feature, mirroring the pattern already used for the ASR provider popup.

No behavior change for Apple Silicon builds — the MLX LLM option still appears as before.

Changes

  • koe-core/src/llm/mod.rs: add supported_providers() that conditionally includes "mlx" behind #[cfg(feature = "mlx")].
  • koe-core/src/lib.rs: expose sp_core_supported_llm_providers() FFI (mirrors the existing sp_core_supported_local_providers).
  • KoeApp/Koe/Bridge/SPRustBridge.{h,m}: add -supportedLlmProviders.
  • KoeApp/Koe/SetupWizard/SPSetupWizardWindowController.m: only add the MLX LLM menu item when the Rust core reports it as supported.

Test plan

  • `cargo check --manifest-path koe-core/Cargo.toml` (default features) passes
  • `cargo check --manifest-path koe-core/Cargo.toml --no-default-features --features "sherpa-onnx,apple-speech"` passes
  • `make build` on Apple Silicon — MLX LLM option still visible in Setup Wizard
  • `make build-x86_64` — MLX LLM option hidden in Setup Wizard

Mirror the ASR provider pattern: expose a feature-gated
`supported_llm_providers()` from koe-core and let the Setup Wizard
query it, so the x86_64 build (which omits the `mlx` cargo feature)
no longer shows the MLX LLM option.
@missuo missuo merged commit b5ed7b3 into missuo:main Apr 10, 2026
@erning erning deleted the fix/hide-mlx-llm-on-x86 branch April 10, 2026 04:08
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