Skip to content

Says SwiftLM Not Installed #207

Description

@brianmrobertson

It keeps telling me that SwiftLM isn't installed, and I'm not sure how to fix it. I have tried following all hte GitHub instructions without any success.

Activity

solderzzc commented on Sep 6, 2026

@solderzzc
Member

Hi @brianmrobertson, thanks for the report! To help narrow this down, could you share a bit more detail:

  1. OS and hardware — macOS version and chip (Apple Silicon M1/M2/M3/M4, or Intel)?
  2. What you're running — are you using the SharpAI Aegis desktop app, or a manual/CLI setup?
  3. Exact error — the precise error message/text (or a screenshot) of where it says SwiftLM isn't installed?
  4. Steps taken so far — which install instructions you followed, and at what step this message appears?
  5. Logs — if you're using Aegis, any logs from its install/setup step would help a lot.

SwiftLM currently targets Apple Silicon Macs, so if you're on an Intel Mac or a different OS, that would explain it. It's also possible this is a macOS Gatekeeper/permissions issue blocking the downloaded binary from running — let us know your setup and we can pin it down.

brianmrobertson commented on Sep 6, 2026

@brianmrobertson
Author

solderzzc commented on Sep 6, 2026

@solderzzc
Member

Thanks for the report, Brian — sorry for the trouble.

Two things:

  1. The screenshot and log you mentioned in your email reply didn't make it into this thread (email replies to GitHub notifications strip attachments) — could you attach them directly here on the issue page instead? Click "Add your comment" at the bottom of Says SwiftLM Not Installed #207 and drag the screenshot/log file in (or paste the log text in a code block). Without the actual error text we can't pin down which specific check is failing.

  2. In the meantime: you're on an Apple Silicon Mac (M1 Pro) on macOS Tahoe 26.6.2, using the Aegis desktop app — that's a fully supported configuration, so this isn't a "your hardware/OS isn't supported" message, it's something specific to your install that we need the log to diagnose. A couple of things worth trying while we wait on the log:

    • Fully quit the Aegis app (not just close the window) and relaunch it — the install-status check runs at startup, and a stale check from an earlier session can sometimes report the old state.
    • If you have Settings → AI Engine open, check whether it shows different status in different places (an install badge vs. a running-status indicator) — if so, a screenshot of that screen specifically would help.

We'll dig further as soon as we have the actual log text.

brianmrobertson commented on Sep 6, 2026

@brianmrobertson
Author

brianmrobertson commented on Sep 7, 2026

@brianmrobertson
Author

I have tried completely closing the app and restarting it.

I don’t think I see different statuses in different places.

I sent the logs and screenshot yesterday. Just let me know if you need anything else to help troubleshoot.

Thank you for your help.

solderzzc commented on Sep 7, 2026

@solderzzc
Member

Thanks for your patience, Brian, and for confirming you've already tried a full quit/restart.

Update on our end: we dug into the app's own code and found a real gap — right now, when the SwiftLM install fails, the app doesn't actually capture or show WHY it failed (network issue, a corrupted download, a disk problem, etc.) — it just shows the generic "Binary installation failed" message you saw. That's a real bug we're fixing on our side regardless of your specific case, but it also means we can't yet tell from your screenshot/log alone what actually went wrong — the log you sent was for a different component (the Llama Server), not the SwiftLM install attempt itself.

Two things that would help narrow it down while we get that fix in:

  1. Could you click the INSTALL button on the SwiftLM card one more time and let us know what happens — does it succeed this time, fail the same way, or show anything different?
  2. Roughly how much free disk space does your Mac have? (Settings → General → Storage) — a failed extraction from low disk space is one plausible cause.

Sorry this is taking a few rounds — we want to actually fix the root cause for you, not just guess.

brianmrobertson commented on Sep 7, 2026

@brianmrobertson
Author
  1. When I click INSTALL again, it just gives me the Binary Installation Failed message.
  2. I have 101GB of free disk space.

I have also tried the following in Terminal:

  • Clone the repository with recursive submodules: git clone --recursive https://github.com/SharpAI/SwiftLMMove into the project
  • directory: cd SwiftLM
  • Run the build script to compile Metal kernels and the binary: ./build.sh
  • Here is everything that was produced in termina from these commands. Not sure if it will help at all.

Last login: Sun Sep 6 13:40:04 on ttys001
brianmrobertson@MacBookPro ~ % git clone --recursive https://github.com/SharpAI/SwiftLM
Cloning into 'SwiftLM'...
remote: Enumerating objects: 6323, done.
remote: Counting objects: 100% (1292/1292), done.
remote: Compressing objects: 100% (459/459), done.
remote: Total 6323 (delta 988), reused 868 (delta 832), pack-reused 5031 (from 2)
Receiving objects: 100% (6323/6323), 33.94 MiB | 20.49 MiB/s, done.
Resolving deltas: 100% (3098/3098), done.
Submodule 'mlx-swift' (https://github.com/SharpAI/mlx-swift.git) registered for path 'mlx-swift'
Submodule 'mlx-swift-lm' (https://github.com/SharpAI/mlx-swift-lm.git) registered for path 'mlx-swift-lm'
Cloning into '/Users/brianmrobertson/SwiftLM/mlx-swift'...
remote: Enumerating objects: 12623, done.
remote: Counting objects: 100% (2605/2605), done.
remote: Compressing objects: 100% (1020/1020), done.
remote: Total 12623 (delta 1795), reused 1586 (delta 1585), pack-reused 10018 (from 2)
Receiving objects: 100% (12623/12623), 11.41 MiB | 13.60 MiB/s, done.
Resolving deltas: 100% (8907/8907), done.
Cloning into '/Users/brianmrobertson/SwiftLM/mlx-swift-lm'...
remote: Enumerating objects: 7761, done.
remote: Counting objects: 100% (951/951), done.
remote: Compressing objects: 100% (349/349), done.
remote: Total 7761 (delta 723), reused 604 (delta 602), pack-reused 6810 (from 3)
Receiving objects: 100% (7761/7761), 5.67 MiB | 12.27 MiB/s, done.
Resolving deltas: 100% (5449/5449), done.
Submodule path 'mlx-swift': checked out '5639a6d9e6a7ab785e102d88d741879f529fce56'
Submodule path 'mlx-swift-lm': checked out '50d35c1b0b4232105ac15100d0713130407f71fe'
brianmrobertson@MacBookPro ~ % cd SwiftLM
brianmrobertson@MacBookPro SwiftLM % ./build.sh

SwiftLM Build Script                      

==============================================

=> [1/4] Initializing submodules...

=> [2/4] Checking dependencies and resolving packages...
Fetching https://github.com/apple/swift-log.git from cache
Fetching https://github.com/apple/swift-system.git from cache
Fetching https://github.com/apple/swift-argument-parser from cache
Fetching https://github.com/swiftlang/swift-syntax.git from cache
Fetching https://github.com/apple/swift-http-types.git from cache
Fetching https://github.com/apple/swift-numerics from cache
Fetched https://github.com/apple/swift-log.git from cache (0.61s)
Fetching https://github.com/apple/swift-metrics.git from cache
Fetched https://github.com/apple/swift-metrics.git from cache (0.51s)
Fetching https://github.com/apple/swift-certificates.git from cache
Fetched https://github.com/apple/swift-numerics from cache (1.21s)
Fetched https://github.com/apple/swift-system.git from cache (1.22s)
Fetched https://github.com/apple/swift-argument-parser from cache (1.22s)
Fetched https://github.com/apple/swift-http-types.git from cache (1.24s)
Fetched https://github.com/swiftlang/swift-syntax.git from cache (1.27s)
Fetching https://github.com/swift-server/swift-service-lifecycle.git from cache
Fetching https://github.com/huggingface/swift-transformers from cache
Fetching https://github.com/apple/swift-async-algorithms.git from cache
Fetching https://github.com/apple/swift-nio.git from cache
Fetching https://github.com/apple/swift-configuration.git from cache
Fetched https://github.com/apple/swift-configuration.git from cache (0.37s)
Fetched https://github.com/apple/swift-async-algorithms.git from cache (0.41s)
Fetching https://github.com/huggingface/swift-jinja.git from cache
Fetched https://github.com/huggingface/swift-transformers from cache (0.41s)
Fetched https://github.com/swift-server/swift-service-lifecycle.git from cache (0.55s)
Fetching https://github.com/apple/swift-asn1.git from cache
Fetched https://github.com/apple/swift-certificates.git from cache (0.70s)
Fetching https://github.com/ibireme/yyjson.git from cache
Fetched https://github.com/apple/swift-asn1.git from cache (0.32s)
Fetching https://github.com/apple/swift-distributed-tracing.git from cache
Fetching https://github.com/scinfu/SwiftSoup.git from cache
Fetching https://github.com/hummingbird-project/hummingbird from cache
Fetched https://github.com/huggingface/swift-jinja.git from cache (0.62s)
Fetched https://github.com/ibireme/yyjson.git from cache (0.47s)
Fetching https://github.com/apple/swift-nio-http2.git from cache
Fetching https://github.com/apple/swift-nio-ssl.git from cache
Fetched https://github.com/apple/swift-nio.git from cache (1.14s)
Fetching https://github.com/apple/swift-crypto.git from cache
Fetched https://github.com/apple/swift-distributed-tracing.git from cache (0.53s)
Fetched https://github.com/apple/swift-nio-http2.git from cache (0.38s)
Fetched https://github.com/scinfu/SwiftSoup.git from cache (0.42s)
Fetching https://github.com/apple/swift-algorithms.git from cache
Fetching https://github.com/apple/swift-nio-transport-services.git from cache
Fetching https://github.com/apple/swift-collections.git from cache
Fetched https://github.com/hummingbird-project/hummingbird from cache (0.46s)
Computing version for https://github.com/apple/swift-numerics
Fetching https://github.com/mattt/EventSource.git from cache
Fetched https://github.com/apple/swift-nio-ssl.git from cache (0.51s)
Fetched https://github.com/apple/swift-crypto.git from cache (0.41s)
Fetching https://github.com/apple/swift-http-structured-headers.git from cache
Fetching https://github.com/apple/swift-atomics.git from cache
Fetched https://github.com/apple/swift-algorithms.git from cache (0.46s)
Fetching https://github.com/swift-server/async-http-client.git from cache
Fetched https://github.com/mattt/EventSource.git from cache (0.46s)
Fetching https://github.com/apple/swift-nio-extras.git from cache
Fetched https://github.com/apple/swift-nio-transport-services.git from cache (0.67s)
Fetched https://github.com/apple/swift-collections.git from cache (0.67s)
Fetching https://github.com/huggingface/swift-huggingface.git from cache
Fetching https://github.com/apple/swift-service-context.git from cache
Fetched https://github.com/apple/swift-atomics.git from cache (0.86s)
Fetched https://github.com/apple/swift-http-structured-headers.git from cache (0.86s)
Computed https://github.com/apple/swift-numerics at 1.1.1 (3.80s)
Computing version for https://github.com/scinfu/SwiftSoup.git
Fetched https://github.com/huggingface/swift-huggingface.git from cache (0.36s)
Fetched https://github.com/apple/swift-nio-extras.git from cache (0.54s)
Fetched https://github.com/apple/swift-service-context.git from cache (0.37s)
Fetched https://github.com/swift-server/async-http-client.git from cache (0.62s)
Computed https://github.com/scinfu/SwiftSoup.git at 2.13.4 (0.39s)
Computing version for https://github.com/apple/swift-argument-parser
Computed https://github.com/apple/swift-argument-parser at 1.7.1 (0.44s)
Computing version for https://github.com/hummingbird-project/hummingbird
Computed https://github.com/hummingbird-project/hummingbird at 2.22.0 (0.48s)
Computing version for https://github.com/huggingface/swift-transformers
Computed https://github.com/huggingface/swift-transformers at 1.2.1 (0.40s)
Computing version for https://github.com/swift-server/async-http-client.git
Computed https://github.com/swift-server/async-http-client.git at 1.33.1 (0.44s)
Computing version for https://github.com/swift-server/swift-service-lifecycle.git
Computed https://github.com/swift-server/swift-service-lifecycle.git at 2.11.0 (0.39s)
Computing version for https://github.com/apple/swift-nio-transport-services.git
Computed https://github.com/apple/swift-nio-transport-services.git at 1.28.0 (0.39s)
Computing version for https://github.com/apple/swift-nio-ssl.git
Computed https://github.com/apple/swift-nio-ssl.git at 2.37.0 (0.56s)
Computing version for https://github.com/apple/swift-nio-http2.git
Computed https://github.com/apple/swift-nio-http2.git at 1.43.0 (0.39s)
Computing version for https://github.com/apple/swift-nio-extras.git
Computed https://github.com/apple/swift-nio-extras.git at 1.34.0 (0.45s)
Computing version for https://github.com/apple/swift-nio.git
Computed https://github.com/apple/swift-nio.git at 2.99.0 (0.50s)
Computing version for https://github.com/apple/swift-metrics.git
Computed https://github.com/apple/swift-metrics.git at 2.10.1 (0.37s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.12.0 (0.40s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.5.1 (0.37s)
Computing version for https://github.com/apple/swift-distributed-tracing.git
Computed https://github.com/apple/swift-distributed-tracing.git at 1.4.1 (0.39s)
Computing version for https://github.com/apple/swift-configuration.git
Computed https://github.com/apple/swift-configuration.git at 1.2.0 (0.73s)
Computing version for https://github.com/apple/swift-collections.git
Computed https://github.com/apple/swift-collections.git at 1.4.1 (0.49s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.3.0 (0.37s)
Computing version for https://github.com/apple/swift-async-algorithms.git
Computed https://github.com/apple/swift-async-algorithms.git at 1.1.3 (0.42s)
Computing version for https://github.com/ibireme/yyjson.git
Computed https://github.com/ibireme/yyjson.git at 0.12.0 (0.53s)
Computing version for https://github.com/apple/swift-crypto.git
Computed https://github.com/apple/swift-crypto.git at 4.5.0 (0.51s)
Computing version for https://github.com/huggingface/swift-huggingface.git
Computed https://github.com/huggingface/swift-huggingface.git at 0.9.0 (0.39s)
Computing version for https://github.com/huggingface/swift-jinja.git
Computed https://github.com/huggingface/swift-jinja.git at 2.3.5 (0.37s)
Computing version for https://github.com/apple/swift-service-context.git
Computed https://github.com/apple/swift-service-context.git at 1.3.0 (0.41s)
Computing version for https://github.com/apple/swift-algorithms.git
Computed https://github.com/apple/swift-algorithms.git at 1.2.1 (0.48s)
Computing version for https://github.com/apple/swift-asn1.git
Computed https://github.com/apple/swift-asn1.git at 1.7.0 (0.48s)
Computing version for https://github.com/apple/swift-certificates.git
Computed https://github.com/apple/swift-certificates.git at 1.19.0 (0.50s)
Computing version for https://github.com/apple/swift-http-structured-headers.git
Computed https://github.com/apple/swift-http-structured-headers.git at 1.7.0 (0.40s)
Computing version for https://github.com/apple/swift-system.git
Computed https://github.com/apple/swift-system.git at 1.6.4 (0.42s)
Computing version for https://github.com/mattt/EventSource.git
Computed https://github.com/mattt/EventSource.git at 1.4.1 (0.40s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 600.0.1 (0.60s)
Creating working copy for https://github.com/ibireme/yyjson.git
Working copy of https://github.com/ibireme/yyjson.git resolved at 0.12.0
Creating working copy for https://github.com/apple/swift-system.git
Working copy of https://github.com/apple/swift-system.git resolved at 1.6.4
Creating working copy for https://github.com/apple/swift-distributed-tracing.git
Working copy of https://github.com/apple/swift-distributed-tracing.git resolved at 1.4.1
Creating working copy for https://github.com/apple/swift-http-types.git
Working copy of https://github.com/apple/swift-http-types.git resolved at 1.5.1
Creating working copy for https://github.com/apple/swift-crypto.git
Working copy of https://github.com/apple/swift-crypto.git resolved at 4.5.0
Creating working copy for https://github.com/apple/swift-async-algorithms.git
Working copy of https://github.com/apple/swift-async-algorithms.git resolved at 1.1.3
Creating working copy for https://github.com/apple/swift-atomics.git
Working copy of https://github.com/apple/swift-atomics.git resolved at 1.3.0
Creating working copy for https://github.com/hummingbird-project/hummingbird
Working copy of https://github.com/hummingbird-project/hummingbird resolved at 2.22.0
Creating working copy for https://github.com/swift-server/async-http-client.git
Working copy of https://github.com/swift-server/async-http-client.git resolved at 1.33.1
Creating working copy for https://github.com/huggingface/swift-jinja.git
Working copy of https://github.com/huggingface/swift-jinja.git resolved at 2.3.5
Creating working copy for https://github.com/apple/swift-metrics.git
Working copy of https://github.com/apple/swift-metrics.git resolved at 2.10.1
Creating working copy for https://github.com/huggingface/swift-huggingface.git
Working copy of https://github.com/huggingface/swift-huggingface.git resolved at 0.9.0
Creating working copy for https://github.com/apple/swift-configuration.git
Working copy of https://github.com/apple/swift-configuration.git resolved at 1.2.0
Creating working copy for https://github.com/mattt/EventSource.git
Working copy of https://github.com/mattt/EventSource.git resolved at 1.4.1
Creating working copy for https://github.com/scinfu/SwiftSoup.git
Working copy of https://github.com/scinfu/SwiftSoup.git resolved at 2.13.4
Creating working copy for https://github.com/apple/swift-nio.git
Working copy of https://github.com/apple/swift-nio.git resolved at 2.99.0
Creating working copy for https://github.com/apple/swift-nio-extras.git
Working copy of https://github.com/apple/swift-nio-extras.git resolved at 1.34.0
Creating working copy for https://github.com/apple/swift-nio-transport-services.git
Working copy of https://github.com/apple/swift-nio-transport-services.git resolved at 1.28.0
Creating working copy for https://github.com/apple/swift-argument-parser
Working copy of https://github.com/apple/swift-argument-parser resolved at 1.7.1
Creating working copy for https://github.com/apple/swift-certificates.git
Working copy of https://github.com/apple/swift-certificates.git resolved at 1.19.0
Creating working copy for https://github.com/apple/swift-asn1.git
Working copy of https://github.com/apple/swift-asn1.git resolved at 1.7.0
Creating working copy for https://github.com/swiftlang/swift-syntax.git
Working copy of https://github.com/swiftlang/swift-syntax.git resolved at 600.0.1
Creating working copy for https://github.com/apple/swift-collections.git
Working copy of https://github.com/apple/swift-collections.git resolved at 1.4.1
Creating working copy for https://github.com/apple/swift-nio-http2.git
Working copy of https://github.com/apple/swift-nio-http2.git resolved at 1.43.0
Creating working copy for https://github.com/apple/swift-http-structured-headers.git
Working copy of https://github.com/apple/swift-http-structured-headers.git resolved at 1.7.0
Creating working copy for https://github.com/apple/swift-numerics
Working copy of https://github.com/apple/swift-numerics resolved at 1.1.1
Creating working copy for https://github.com/apple/swift-service-context.git
Working copy of https://github.com/apple/swift-service-context.git resolved at 1.3.0
Creating working copy for https://github.com/apple/swift-algorithms.git
Working copy of https://github.com/apple/swift-algorithms.git resolved at 1.2.1
Creating working copy for https://github.com/swift-server/swift-service-lifecycle.git
Working copy of https://github.com/swift-server/swift-service-lifecycle.git resolved at 2.11.0
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.12.0
Creating working copy for https://github.com/apple/swift-nio-ssl.git
Working copy of https://github.com/apple/swift-nio-ssl.git resolved at 2.37.0
Creating working copy for https://github.com/huggingface/swift-transformers
Working copy of https://github.com/huggingface/swift-transformers resolved at 1.2.1
=> [2/4] Checking build dependencies...
cmake: cmake version 4.4.3

=> [3/4] Building Metal kernels (mlx.metallib)...
-- The C compiler identification is AppleClang 21.0.0.21000101
-- The CXX compiler identification is AppleClang 21.0.0.21000101
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building MLX for arm64 processor on Darwin
-- Metal found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework
-- Building with macOS SDK version 26.5
-- Accelerate found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework
-- Downloading json
-- Using the multi-header code from /Users/brianmrobertson/SwiftLM/.build/metallib_build/_deps/json-src/include/
-- Downloading gguflib
-- {fmt} version: 12.1.0
-- Build type: Release
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Configuring done (9.7s)
-- Generating done (0.1s)
CMake Warning (unused-cli):
Manually-specified variables were not used by the project:

MLX_ENABLE_NAX

-- Build files have been written to: /Users/brianmrobertson/SwiftLM/.build/metallib_build
Compiling Metal shaders...
[ 9%] Building quantized_nax.air
[ 9%] Building arg_reduce.air
[ 9%] Building steel_attention_nax.air
[ 13%] Building steel_gemm_splitk_nax.air
[ 18%] Building steel_attention.air
[ 18%] Building steel_gemm_gather_nax.air
[ 18%] Building steel_gemm_fused_nax.air
[ 18%] Building fp_quantized_nax.air
[ 18%] Building gemv_masked.air
[ 18%] Building steel_gemm_segmented.air
[ 22%] Building steel_gemm_splitk.air
[ 27%] Building steel_gemm_masked.air
[ 31%] Building steel_gemm_gather.air
[ 36%] Building steel_gemm_fused.air
[ 36%] Building steel_conv_general.air
[ 40%] Building steel_conv.air
[ 45%] Building unary.air
[ 45%] Building ternary.air
[ 50%] Building sort.air
[ 54%] Building logsumexp.air
[ 54%] Building softmax.air
[ 59%] Building scan.air
[ 63%] Building fp_quantized.air
[ 63%] Building quantized.air
[ 68%] Building reduce.air
[ 68%] Building fft.air
[ 68%] Building copy.air
[ 68%] Building binary_two.air
[ 72%] Building binary.air
[ 72%] Building arange.air
[ 72%] Building scaled_dot_product_attention.air
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/kernels/scaled_dot_product_attention.metal:5:
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/kernels/sdpa_vector.h:118:13: warning: unused function 'turbo_dequant_k' [-Wunused-function]
static void turbo_dequant_k(
^
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/kernels/sdpa_vector.h:149:13: warning: unused function 'turbo_dequant_v' [-Wunused-function]
static void turbo_dequant_v(
^
2 warnings generated.
[ 77%] Building rope.air
[ 77%] Building rms_norm.air
[ 77%] Building random.air
[ 81%] Building layer_norm.air
[ 86%] Building gemv.air
[ 90%] Building conv.air
[ 95%] Building fence.air
[100%] Building mlx.metallib
[100%] Built target mlx-metallib
✅ Built and copied default.metallib to .build/arm64-apple-macosx/release/

=> [4/4] Building SwiftLM (release)...
warning: 'mlx-swift': Invalid Exclude '/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/fmt/test': File not found.
Building for production...
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/core/moe_stream_op.cpp:5:
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/core/moe_stream_op.h:8:
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/ssd_streamer.h:33:5: warning: '/' within block comment [-Wcomment]
33 | /**
| ^
1 warning generated.
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/ssd_streamer.mm:4:
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/ssd_streamer.h:33:5: warning: '/
' within block comment [-Wcomment]
33 | /**
| ^
1 warning generated.
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx-c/mlx/c/fast.cpp:11:
In file included from /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/core/moe_stream_op.h:8:
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx/mlx/backend/metal/ssd_streamer.h:33:5: warning: '/*' within block comment [-Wcomment]
33 | /**
| ^
1 warning generated.
/Users/brianmrobertson/SwiftLM/mlx-swift/Source/MLX/MLXFast.swift:338:25: warning: result of call to 'withCString' is unused [#no-usage]
336 | var result = mlx_array_new()
337 |
338 | safetensorsPath.withCString { pathPtr in
| `- warning: result of call to 'withCString' is unused [#no-usage]
339 | tensorName.withCString { namePtr in
340 | mlx_fast_streamed_gather_mm(

/Users/brianmrobertson/SwiftLM/mlx-swift/Source/MLX/MLXFast.swift:411:25: warning: result of call to 'withCString' is unused [#no-usage]
409 | expertIndex: UInt32
410 | ) {
411 | safetensorsPath.withCString { pathPtr in
| - warning: result of call to 'withCString' is unused [#no-usage] 412 | tensorName.withCString { namePtr in 413 | mlx_fast_submit_prefetch(pathPtr, namePtr, expertIndex) /Users/brianmrobertson/SwiftLM/mlx-swift/Source/MLXNN/Module.swift:1402:34: warning: conditional downcast from 'T?' to 'T' does nothing 1400 | // note: this gives a warning but it does in fact do something 1401 | // in the case where this is e.g. ParameterInfo<MLXArray?> 1402 | if let value = value as? T { | - warning: conditional downcast from 'T?' to 'T' does nothing
1403 | return value
1404 | } else {

/Users/brianmrobertson/SwiftLM/mlx-swift/Source/MLXNN/Module.swift:1515:36: warning: conditional downcast from 'T?' to 'T' does nothing
1513 | // note: this gives a warning but it does in fact do something
1514 | // in the case where this is e.g. ModuleInfo<Linear?>
1515 | if let module = module as? T {
| `- warning: conditional downcast from 'T?' to 'T' does nothing
1516 | return module
1517 | } else {

/Users/brianmrobertson/SwiftLM/mlx-swift/Source/MLXNN/Module.swift:288:13: warning: default will never be executed
286 | return isAllNone ? .none : .array(result)
287 |
288 | default:
| - warning: default will never be executed 289 | fatalError("Unexpected leaf \(vk) = \(v)") 290 | } /Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/Evaluate.swift:1877:47: warning: conditional cast from 'any LanguageModel' to 'any BaseLanguageModel' always succeeds 1875 | if let mtpModel = draftModel as? DualModelMTP { 1876 | // Set up the dual-model MTP reference 1877 | mtpModel.mainModelRef = context.model as? any BaseLanguageModel | - warning: conditional cast from 'any LanguageModel' to 'any BaseLanguageModel' always succeeds
1878 | iterator = try MTPTokenIterator(
1879 | input: input,

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/Load.swift:163:13: warning: initialization of immutable value 'knownPrefixes' was never used; consider replacing with assignment to '' or removing it [#no-usage]
161 | // We probe the ExpertStreamerManager weight map with common VLM prefixes
162 | // and fall back to the bare path if none match.
163 | let knownPrefixes = ["language_model.", "model.language_model.", ""]
| `- warning: initialization of immutable value 'knownPrefixes' was never used; consider replacing with assignment to '
' or removing it [#no-usage]
164 | for (path, module) in model.leafModules().flattened() {
165 | if let sl = module as? SwitchLinear {

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/Load.swift:180:25: warning: variable 'matchedCandidate' was written to, but never read
178 | let candidates = [expert0Name, stripped0Name, strippedMtpName] + allPrefixes.map { $0 + stripped0Name } + allPrefixes.map { $0 + strippedMtpName }
179 | var foundUnstacked = false
180 | var matchedCandidate = ""
| `- warning: variable 'matchedCandidate' was written to, but never read
181 |
182 | for candidate in candidates {

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/SwitchLayers.swift:322:24: warning: will never be executed
317 | outShape[outShape.count - 1] = downProj.outputDims
318 | let result = MLXArray.zeros(outShape).asType(.float16)
319 | if doSort {
| - note: condition always evaluates to true 320 | return MLX.squeezed(scatterUnsort(x: result, invOrder: inverseOrder, shape: indices.shape), axis: -2) 321 | } 322 | return MLX.squeezed(result, axis: -2) | - warning: will never be executed
323 | }
324 |

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/SwitchLayers.swift:461:29: warning: will never be executed
456 | slotPerToken: slotPerToken, slotExperts: slotExperts)
457 |
458 | if doSort {
| - note: condition always evaluates to true 459 | return MLX.squeezed(scatterUnsort(x: x, invOrder: inverseOrder, shape: indices.shape), axis: -2) 460 | } 461 | return MLX.squeezed(x, axis: -2) | - warning: will never be executed
462 | }
463 |
/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLLM/Models/Gemma4Text.swift:259:17: warning: 'quantizedMatmul(::scales:biases:transpose:groupSize:bits:mode:stream:)' is deprecated: renamed to 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' #DeprecatedDeclaration
257 |
258 | override func callAsFunction(_ x: MLXArray) -> MLXArray {
259 | let y = quantizedMatmul(
| |- warning: 'quantizedMatmul(::scales:biases:transpose:groupSize:bits:mode:stream:)' is deprecated: renamed to 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' #DeprecatedDeclaration
| `- note: use 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' instead
260 | x, weight, scales: scales, biases: biases,
261 | transpose: true, groupSize: groupSize, bits: bits, mode: mode)

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLLM/Models/Gemma4Text.swift:1205:13: warning: variable 'output2D' was never mutated; consider changing to 'let' constant
1203 | let scatterIdx2D = selectedCanonicalShaped.reshaped([B * S, totalCandidates]).asType(.int32)
1204 | let selectedLogits2D = selectedLogits.reshaped([B * S, totalCandidates])
1205 | var output2D = output.reshaped([B * S, vocabSize])
| `- warning: variable 'output2D' was never mutated; consider changing to 'let' constant
1206 | let rowIndices = MLXArray.arange(B * S).asType(.int32).reshaped([B * S, 1])
1207 | output2D[rowIndices, scatterIdx2D] = selectedLogits2D

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXVLM/Models/Gemma4.swift:641:17: warning: 'quantizedMatmul(::scales:biases:transpose:groupSize:bits:mode:stream:)' is deprecated: renamed to 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' #DeprecatedDeclaration
639 |
640 | override func callAsFunction(_ x: MLXArray) -> MLXArray {
641 | let y = quantizedMatmul(
| |- warning: 'quantizedMatmul(::scales:biases:transpose:groupSize:bits:mode:stream:)' is deprecated: renamed to 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' #DeprecatedDeclaration
| `- note: use 'quantizedMM(::scales:biases:transpose:groupSize:bits:mode:stream:)' instead
642 | x, weight, scales: scales, biases: biases,
643 | transpose: true, groupSize: groupSize, bits: bits, mode: mode)

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:752:49: warning: type 'any KVCache' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
750 | // KVCacheSimple is a cache object (not a neural-network Module), so we
751 | // iterate the cache array — mirroring the pattern in Server.swift.
752 | let cache = await container.perform { ctx in ctx.model.newCache(parameters: params) }
| `- warning: type 'any KVCache' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
753 | if config.turboKV {
754 | for layer in cache {

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/KVCache.swift:38:17: note: protocol 'KVCache' does not conform to the 'Sendable' protocol
36 | ///
37 | /// See LanguageModel/newCache(parameters:)
38 | public protocol KVCache: Evaluatable {
| `- note: protocol 'KVCache' does not conform to the 'Sendable' protocol
39 | /// get the current offset
40 | var offset: Int { get }

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:752:97: warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
750 | // KVCacheSimple is a cache object (not a neural-network Module), so we
751 | // iterate the cache array — mirroring the pattern in Server.swift.
752 | let cache = await container.perform { ctx in ctx.model.newCache(parameters: params) }
| `- warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
753 | if config.turboKV {
754 | for layer in cache {

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:768:40: warning: capture of 'lmInput' with non-Sendable type 'LMInput' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
766 | if config.enableMTP, ctx.model is (any MTPLanguageModel) {
767 | return try MLXLMCommon.generateMTP(
768 | input: lmInput,
| `- warning: capture of 'lmInput' with non-Sendable type 'LMInput' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
769 | cache: cache,
770 | parameters: params,

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/LanguageModel.swift:60:15: note: struct 'LMInput' does not conform to the 'Sendable' protocol
58 | /// The ModelContext holds the UserInputProcessor associated with a
59 | /// LanguageModel.
60 | public struct LMInput {
| `- note: struct 'LMInput' does not conform to the 'Sendable' protocol
61 | public let text: Text
62 | public let image: ProcessedImage?

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:769:40: warning: capture of 'cache' with non-Sendable type '[any KVCache]' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
767 | return try MLXLMCommon.generateMTP(
768 | input: lmInput,
769 | cache: cache,
| `- warning: capture of 'cache' with non-Sendable type '[any KVCache]' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
770 | parameters: params,
771 | context: ctx,

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/KVCache.swift:38:17: note: protocol 'KVCache' does not conform to the 'Sendable' protocol
36 | ///
37 | /// See LanguageModel/newCache(parameters:)
38 | public protocol KVCache: Evaluatable {
| `- note: protocol 'KVCache' does not conform to the 'Sendable' protocol
39 | /// get the current offset
40 | var offset: Int { get }

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:770:45: warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
768 | input: lmInput,
769 | cache: cache,
770 | parameters: params,
| `- warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
771 | context: ctx,
772 | numMTPTokens: config.numMTPTokens

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:778:45: warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
776 | input: lmInput,
777 | cache: cache,
778 | parameters: params,
| `- warning: reference to captured var 'params' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
779 | context: ctx
780 | )

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/ModelDownloadManager.swift:152:27: warning: reference to captured var 'self' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
150 | guard !Task.isCancelled else { return }
151 | await MainActor.run {
152 | guard let self, self.refreshGeneration == generation else { return }
| `- warning: reference to captured var 'self' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
153 | self.apply(scanned: scanned, incomplete: incomplete, unrecognized: unrecognized)
154 | }

/Users/brianmrobertson/SwiftLM/Sources/MLXInferenceCore/InferenceEngine.swift:752:76: warning: returning a task-isolated 'Array' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
750 | // KVCacheSimple is a cache object (not a neural-network Module), so we
751 | // iterate the cache array — mirroring the pattern in Server.swift.
752 | let cache = await container.perform { ctx in ctx.model.newCache(parameters: params) }
| |- warning: returning a task-isolated 'Array' value as a 'sending' result risks causing data races; this is an error in the Swift 6 language mode
| |- note: returning a task-isolated 'Array' value risks causing races since the caller assumes the value can be safely sent to other isolation domains
| `- note: 'Array' is a non-Sendable type
753 | if config.turboKV {
754 | for layer in cache {

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/DeepseekV3DFlash.swift:406:13: warning: variable 'weights' was never mutated; consider changing to 'let' constant
404 | // Strip HuggingFace VLM wrapper prefix present in some checkpoints (e.g. kimi_k25).
405 | let llmPrefix = "language_model."
406 | var weights = weights.count > 0 && weights.keys.first!.hasPrefix(llmPrefix)
| `- warning: variable 'weights' was never mutated; consider changing to 'let' constant
407 | ? Dictionary(uniqueKeysWithValues: weights.map { k, v in
408 | (k.hasPrefix(llmPrefix) ? String(k.dropFirst(llmPrefix.count)) : k, v)

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:964:61: warning: type 'any DualModelMTP' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
962 | configuration: assistantConfig
963 | ) { _ in }
964 | mtpAssistantModelRef = await assistantContainer.perform { assistantContext in
| `- warning: type 'any DualModelMTP' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
965 | assistantContext.model as? (any DualModelMTP)
966 | }

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/LanguageModel.swift:276:17: note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
274 |
275 | /// A protocol for MTP language models that act as independent draft models but require a reference to the main model (e.g. Gemma 4 Assistant).
276 | public protocol DualModelMTP: MTPLanguageModel {
| `- note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
277 | var mainModelRef: (any BaseLanguageModel)? { get set }
278 | }

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:973:21: warning: capture of 'mtpAssistantModelRef' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
971 | // The assistant drafts for this trunk, so it needs a reference to it.
972 | await container.perform { mainContext in
973 | mtpAssistantModelRef?.mainModelRef = mainContext.model
| `- warning: capture of 'mtpAssistantModelRef' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
974 | }
975 | print("[SwiftLM] MTP assistant ready ((self.numMtpTokens) tokens/round)")

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/LanguageModel.swift:276:17: note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
274 |
275 | /// A protocol for MTP language models that act as independent draft models but require a reference to the main model (e.g. Gemma 4 Assistant).
276 | public protocol DualModelMTP: MTPLanguageModel {
| `- note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
277 | var mainModelRef: (any BaseLanguageModel)? { get set }
278 | }

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:973:21: warning: reference to captured var 'mtpAssistantModelRef' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
971 | // The assistant drafts for this trunk, so it needs a reference to it.
972 | await container.perform { mainContext in
973 | mtpAssistantModelRef?.mainModelRef = mainContext.model
| `- warning: reference to captured var 'mtpAssistantModelRef' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
974 | }
975 | print("[SwiftLM] MTP assistant ready ((self.numMtpTokens) tokens/round)")

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:1247:35: warning: capture of 'mtpAssistantModelRef' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
1245 | dflashModel: dflashModel, dflashBlockSize: dflashBlockSizeConfig,
1246 | dflashTargetModel: dflashTargetModel,
1247 | mtpAssistant: mtpAssistantModelRef
| `- warning: capture of 'mtpAssistantModelRef' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
1248 | )
1249 | } catch {

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/LanguageModel.swift:276:17: note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
274 |
275 | /// A protocol for MTP language models that act as independent draft models but require a reference to the main model (e.g. Gemma 4 Assistant).
276 | public protocol DualModelMTP: MTPLanguageModel {
| `- note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
277 | var mainModelRef: (any BaseLanguageModel)? { get set }
278 | }

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:1247:35: warning: reference to captured var 'mtpAssistantModelRef' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
1245 | dflashModel: dflashModel, dflashBlockSize: dflashBlockSizeConfig,
1246 | dflashTargetModel: dflashTargetModel,
1247 | mtpAssistant: mtpAssistantModelRef
| `- warning: reference to captured var 'mtpAssistantModelRef' in concurrently-executing code; this is an error in the Swift 6 language mode #SendableClosureCaptures
1248 | )
1249 | } catch {

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:1969:78: warning: capture of 'mtpAssistant' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
1967 | let remainingTokens = lmInput.text.tokens[startIndex...]
1968 | let trimmedInput = LMInput(tokens: remainingTokens)
1969 | if config.mtp, let mtpCtx = mtpContext(main: context, assistant: mtpAssistant) {
| `- warning: capture of 'mtpAssistant' with non-Sendable type '(any DualModelMTP)?' in a '@sendable' closure; this is an error in the Swift 6 language mode #SendableClosureCaptures
1970 | stream = try MLXLMCommon.generateMTP(
1971 | input: trimmedInput, cache: cache, parameters: params, context: mtpCtx, numMTPTokens: config.numMtpTokens

/Users/brianmrobertson/SwiftLM/mlx-swift-lm/Libraries/MLXLMCommon/LanguageModel.swift:276:17: note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
274 |
275 | /// A protocol for MTP language models that act as independent draft models but require a reference to the main model (e.g. Gemma 4 Assistant).
276 | public protocol DualModelMTP: MTPLanguageModel {
| `- note: protocol 'DualModelMTP' does not conform to the 'Sendable' protocol
277 | var mainModelRef: (any BaseLanguageModel)? { get set }
278 | }

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:2445:25: warning: initialization of immutable value 'dur' was never used; consider replacing with assignment to '' or removing it [#no-usage]
2443 | let postMemSnap = MemoryUtils.snapshot()
2444 | print("srv slot done: id 0 | gen_tokens=(completionTokenCount) | OS_RAM=(String(format: "%.1f", postMemSnap.os))GB | MEM_DEMAND=(String(format: "%.1f", postMemSnap.demand))GB | GPU_MEM=(String(format: "%.1f", postMemSnap.gpu))GB")
2445 | let dur = genDur
| `- warning: initialization of immutable value 'dur' was never used; consider replacing with assignment to '
' or removing it [#no-usage]
2446 | let tokPerSec = genTokPerSec
2447 | let logContent: Any = hasToolCalls ? NSNull() : fullText

/Users/brianmrobertson/SwiftLM/Sources/SwiftLM/Server.swift:3069:54: warning: conditional cast from 'any DualModelMTP' to 'any LanguageModel' always succeeds
3067 | /// Returns nil when MTP does not apply, so callers fall through to plain generation.
3068 | func mtpContext(main: ModelContext, assistant: (any DualModelMTP)?) -> ModelContext? {
3069 | if let assistant, let assistantModel = assistant as? (any LanguageModel) {
| `- warning: conditional cast from 'any DualModelMTP' to 'any LanguageModel' always succeeds
3070 | return ModelContext(
3071 | configuration: main.configuration,

/Users/brianmrobertson/SwiftLM/SwiftBuddy/SwiftBuddy/ViewModels/ServerManager.swift:235:52: warning: no 'async' operations occur within 'await' expression
233 | let sseStream = AsyncStream { cont in
234 | Task {
235 | for await token in await engine.generate(messages: chatMessages, config: reqConfig) {
| `- warning: no 'async' operations occur within 'await' expression
236 | let chunk = "{"id":"(reqId)","object":"chat.completion.chunk","created":(created),"model":(escapedModelId),"choices":[{"index":0,"delta":{"content":"(jsonEscape(token.text))"},"finish_reason":null}]}"
237 | cont.yield(ByteBuffer(string: "data: (chunk)\n\n"))

/Users/brianmrobertson/SwiftLM/SwiftBuddy/SwiftBuddy/ViewModels/ServerManager.swift:249:44: warning: no 'async' operations occur within 'await' expression
247 | // ── Non-streaming: collect full response ────────────
248 | var fullText = ""
249 | for await token in await engine.generate(messages: chatMessages, config: reqConfig) {
| `- warning: no 'async' operations occur within 'await' expression
250 | fullText += token.text
251 | }
[374/374] Linking SwiftBuddy
Build complete! (455.96s)

==============================================
✅ Build complete!
Binary: .build/release/SwiftLM
Metallib: .build/arm64-apple-macosx/release/mlx.metallib

brianmrobertson@MacBookPro SwiftLM % .build/release/SwiftLM --model mlx-community/gemma-4-26b-a4b-it-4bit --port 5413
[SwiftLM] Loading model: mlx-community/gemma-4-26b-a4b-it-4bit
[SwiftLM] Loading from local cache: /Users/brianmrobertson/.cache/huggingface/hub/models--mlx-community--gemma-4-26b-a4b-it-4bit/snapshots/0d77464eeb233a2da68ebf9d7dc4edaac7db956d
MLX error: Failed to load the default metallib. library not found library not found library not found library not found at /Users/brianmrobertson/SwiftLM/mlx-swift/Source/Cmlx/mlx-c/mlx/c/memory.cpp:69
brianmrobertson@MacBookPro SwiftLM %

solderzzc commented on Sep 7, 2026

@solderzzc
Member

Really appreciate the extra effort here, Brian — that manual build is genuinely useful, even though it doesn't directly explain the app's error. Two things from it:

  1. Your build actually succeeded ("Build complete!", produced both the SwiftLM binary and mlx.metallib) — the failure you hit after that was just at runtime, when running the binary directly from .build/release/SwiftLM, it couldn't find mlx.metallib because that file landed in a different build output folder (.build/arm64-apple-macosx/release/) than the binary itself. That's a path issue specific to running a manual build directly, not a sign anything's broken on your machine — this at least confirms your Xcode/build toolchain itself is fine.
  2. Unfortunately this doesn't tell us why the Aegis app's own download-based install is failing — that's a completely different path (Aegis downloads a pre-built binary+metallib pair as a matched archive, it doesn't compile from source), so the two failures aren't the same mechanism.

Honest status: with 101GB free (ruling out disk space) and a full quit/restart already tried, we're genuinely out of quick things to check on your end. The real fix is on us — right now the app doesn't capture/report why a SwiftLM install actually fails, so we can't see it even when it happens right in front of us. That fix isn't shipped yet.

One thing NOT worth trying: manually copying your self-built binary into Aegis's expected folder won't work — the app verifies installed binaries against a pinned checksum for security, so a self-built one (different bytes than our official release) would just get rejected the same way, not accepted.

We'll follow up here once the improved error-reporting lands and can actually tell us what's failing on your machine. Sorry this is taking a while — thanks for sticking with it.

brianmrobertson commented on Sep 7, 2026

@brianmrobertson
Author

How can I clear ALL data from the app? I delete the app and the folder under Application Support, but when I reinstall the app, it remembers all my settings, cameras, etc. I want to delete absolutely everything and start from the beginning, but I can't figure out where the other files are.

Thank you.

solderzzc commented on Sep 7, 2026

@solderzzc
Member

Good question — there are actually two separate data locations, and the one you're missing is a hidden folder:

  1. ~/Library/Application Support/sharpai-aegis — this is what you already deleted (Electron's own app data).
  2. ~/.aegis-ai — a hidden folder directly in your home directory (not under Application Support), which is where the app actually stores its real config, cameras, and settings. Since it starts with a dot, Finder won't show it unless you press Cmd+Shift+. (period) to reveal hidden files, or use Terminal.

To fully wipe everything:

rm -rf ~/.aegis-ai
rm -rf ~/Library/Application\ Support/sharpai-aegis

Then reinstall/relaunch and it should be a true clean slate.

Not directly related to your original issue, but if you're already wiping things — this is a good opportunity: after this reset, try the SwiftLM install fresh and let us know if it behaves any differently (same failure, different failure, or works). Not expecting it to fix things, but worth knowing either way.

solderzzc commented on Sep 7, 2026

@solderzzc
Member

Quick update, Brian — we found and fixed the actual root cause on our end: the app genuinely had no way to capture or report why a SwiftLM install fails (it was always just showing a generic "Binary installation failed" no matter what actually went wrong).

We're building a targeted 0.2.10 version right now with that fix (plus a related one) specifically so we can finally see the real error on your machine. I'll post a download link here once it's ready — should be within the next while. Thanks again for all the detail you've provided, it made tracking this down much faster.

brianmrobertson commented on Sep 7, 2026

@brianmrobertson
Author

That is what I was looking for. I appreciate the quick reply.

I did try a fresh install, but I still receive the SwiftLM error. I figured it was worth a shot to see if it changed anything.

That's great news that you were able to get it corrected on your end, and I look forward to receiving the download link for the update so we can hopefully figure out what is causing the SwiftLM installation failure.

Thank you.

solderzzc commented on Sep 7, 2026

@solderzzc
Member

Brian — here's the 0.2.10 build with the fix:

Download: https://releases.sharpai.org/releases/SharpAI-Aegis-0.2.10-arm64.dmg

This isn't a public release yet (it's a targeted build for your case specifically), so please don't share the link, but it's the same signed app either way.

What changed: we found the actual root cause — a stale hardcoded fallback version in the SwiftLM installer that pointed at a build whose download file had been renamed, causing a 404 on any fresh install (unrelated to your machine specifically — this would have affected any first-time installer). We fixed the underlying resolution logic and verified it end-to-end ourselves before sending this to you.

To test:

  1. Quit the current app completely and install this build over it (or do a full data wipe first per the earlier instructions, if you'd like a completely clean test).
  2. Go to Settings → AI Engine and click INSTALL on the SwiftLM card.

It should now install successfully. If it doesn't, whatever error message appears should now be a real, specific reason instead of the generic "Binary installation failed" — please share exactly what it says if so.

Thanks again for your patience and all the detail through this — it made finding the real cause possible.

brianmrobertson commented on Sep 9, 2026

@brianmrobertson
Author

Yes, it did install successfully and I am not receiving the error anymore.

Do you know why Telegram and Aegis would provide a Fetch error when I try to use it? I thought it might be related to the SwiftLM error earlier, but it didn’t go away once that installed.

solderzzc commented on Sep 9, 2026

@solderzzc
Member

That's great news on SwiftLM, Brian — glad that one's finally sorted, and thank you for sticking with all the back-and-forth on it.

The Telegram issue is a separate thing (not related to SwiftLM) — it's the notification/messaging integration, not the local model. To help us track it down, could you share a bit more:

  1. Exact error text — the precise message you see (screenshot is great if easy).
  2. Where it happens — is this when you click "Test" on the Telegram channel in Settings, or when it actually tries to send you a notification?
  3. Network setup — are you on a network that uses a VPN or proxy to reach the internet? Telegram's servers are blocked in some regions/networks, and that can look exactly like a generic fetch failure.

While we wait on that, we already found something worth fixing on our side regardless: right now, if the connection to Telegram's servers fails for any reason, the app doesn't capture the actual reason (network unreachable, blocked, bad token, etc.) — it just shows a generic, unhelpful error. We're going to fix that so this kind of thing is diagnosable from the error message itself next time, instead of needing a back-and-forth like this.

Thanks again for all the detail you've given us throughout this thread — it's genuinely made a difference in tracking both issues down.

1 remaining item

solderzzc commented on Sep 10, 2026

@solderzzc
Member

Found the real root cause, Brian, and it's genuinely a different bug from the SwiftLM one — good catch that it didn't go away.

What was happening: when you ask a question through Telegram, it triggers a call to Aegis's local AI engine on your machine. If that connection hiccups for any reason (the engine still starting up, briefly restarting to load a model, etc.), the app was showing the raw internal error text ("fetch failed") instead of anything useful — exactly the red X you saw.

Fix: here's a targeted 0.2.11 build with the fix (same base as the 0.2.10 build you already have, minimal changes):

Download: https://releases.sharpai.org/releases/SharpAI-Aegis-0.2.11-arm64.dmg

Same as before — this isn't a public release yet, so please don't share the link further, but it's the same signed/notarized app.

What changed:

  1. The underlying connection error is now translated into an actual explanation ("Can't reach Aegis's local AI engine — it may still be starting up, or may have crashed...") instead of the raw "fetch failed" text.
  2. If it's Telegram's own API (not the local engine) that's having trouble, you'll now get a specific reason there too instead of a generic error.
  3. Found and fixed a related gap: if something failed while you were messaging the bot directly in Telegram (not through the app), you'd previously get total silence — no reply at all. Now you'll always get some response, even on failure.

To test:

  1. Quit the app completely and install this build over it.
  2. Try asking a video question again the same way you did before.

If you still see an error, it should now say something specific and useful rather than "fetch failed" — if so, please share exactly what it says and we'll keep digging. And separately: if this keeps happening intermittently, it likely means the local AI engine itself is having trouble staying up on your machine (not just an error-reporting gap) — let us know if it's a one-off or a repeat thing.

Thanks again for the detailed reports — they're what made both of these findable.

brianmrobertson commented on Sep 11, 2026

@brianmrobertson
Author

solderzzc commented on Sep 11, 2026

@solderzzc
Member

That error message confirms the 0.2.11 fix is working exactly as intended, Brian — thank you for confirming. That specific message ("Can't reach Aegis's local AI engine...") means the app is now correctly telling you why it's failing instead of the raw, meaningless "fetch failed" — which is real progress, even though it's telling us your local engine itself is having trouble staying up. Not something you're doing wrong on your end.

The new symptoms you're describing are genuinely useful and point at a real, separate issue worth digging into properly rather than guessing:

  1. Local LLM shows "Active" then stops when you switch to a different screen in the app.
  2. Local VLM won't load at all, across multiple models you've tried.
  3. Gemini (cloud) works fine — confirms this isn't your network, it's specific to the local engine.

To actually find the root cause (not guess at it), could you get us:

  1. The LLM server log — Settings → AI Engine → the LLM section should have a live log/console view (or a "view logs" option) — please copy/paste or screenshot what it shows right before/when it stops.
  2. The VLM install/load error specifically — when you try to load a VLM and it fails, is there any error text shown at all, or does it just silently never become active? A screenshot of exactly what you see would help.
  3. Roughly how much free RAM does your Mac have available when this happens (Activity Monitor → Memory tab)? Local models are memory-hungry, and a crash tied to switching screens can sometimes actually be a memory-pressure kill that just happens to line up with when the app briefly does extra work on a screen change, not the screen change itself.

Please don't apologize for the reports — this is exactly the kind of detailed, patient testing that makes the app better for everyone who installs it after you. We'll keep working through these with you.

solderzzc commented on Sep 11, 2026

@solderzzc
Member

@brianmrobertson Thanks a lot for providing so many useful details, we are working on this bug. Pls wait for our next hotfix.

solderzzc commented on Sep 11, 2026

@solderzzc
Member

Update, Brian — I actually ran the app myself this time and reproduced real, concrete versions of both problems you described, rather than just reading your logs. Sorry that took a couple rounds to get to.

Local models failing to download: I hit this myself within a few minutes of testing — downloading a local model failed partway through with an HTTP 429 ("too many requests") from Hugging Face's servers, and the whole local AI engine process crashed outright instead of retrying. This strongly matches what you described trying multiple VLM models with no success — Hugging Face rate-limits anonymous downloads, and if several attempts happen close together (exactly what trying "multiple different ones" would do), it's easy to hit that limit. The real bug on our end: the app should retry automatically instead of just crashing. Filed and being worked on.

"Shows Active, then stops when I switch screens": I found a related, separate bug — after enabling Advanced settings and getting the local engine running, switching to a different screen and back made the engine controls/status disappear from the UI. But I checked directly: your actual saved settings are NOT lost — this is the app's display failing to reflect the real state, not an actual crash of your configuration. Also being worked on.

Neither of these is something you're doing wrong — they're real gaps in how the app handles a slow/rate-limited download and how it keeps its own UI in sync. Once both are fixed I'll get you another build to confirm. In the meantime, if you want to try local models again, spacing out download attempts by a few minutes each (rather than trying several back-to-back) will likely get further before hitting the rate limit.

Thanks again for pushing on this — finding it myself instead of just asking you to keep testing felt like the right next step.

solderzzc commented on Sep 11, 2026

@solderzzc
Member

Hi @brianmrobertson — thank you for sticking with this and for the precise error text; it turned out to be the key.

What was actually wrong (and it was on our side, not your setup): the app has an internal "LLM gateway" that every Telegram question (and the local-LLM chat) goes through. In the packaged builds you've been running, that gateway was silently failing to start on every launch — the app kept working, but anything that needed the gateway got a connection-refused error. That is exactly the Error: fetch failed you saw on 0.2.10 and the Can't reach Aegis's local AI engine … (ECONNREFUSED) on 0.2.11 (0.2.11 only made the wording clearer, it didn't fix the cause — sorry about that). It also explains why entering a Gemini key "just works": that path doesn't depend on the gateway. We found it by installing our own build and reproducing your exact error, then traced it to a packaging bug that the main line had already fixed but the hotfix builds you got were cut from before that fix.

0.2.12 (targeted build for you, not a public release — please don't share the link):

What's in it:

  1. The gateway now starts in the packaged app (verified on our machine: Telegram-style requests reach the local model and get answers).
  2. Model downloads from HuggingFace now retry automatically when HuggingFace rate-limits anonymous downloads (HTTP 429) — we reproduced a download dying at 87% with the whole engine crashing; that very likely explains "tried several models, none would install".

What I'd like you to try, in this order:

  1. Quit Aegis fully, install 0.2.12 over the old one, launch.
  2. Pick a local LLM (bottom bar → LLM → a Local Model) and wait for the green dot.
  3. Go to a different screen (e.g. Timeline or Aegis Home) and back — does the LLM still show active? If it "stops" again, tell me which screen you switched to.
  4. Ask a question through Telegram.

If anything still fails, the most useful thing is the app log: Settings → Advanced → Open Logs Folder (or ~/.aegis-ai/logs), and paste the lines around [Gateway] / [MLX-Engine] / ECONNREFUSED.

And please don't apologize for the reports — each one has found a real bug that other users would have hit too.

solderzzc commented on Sep 11, 2026

@solderzzc
Member

Quick follow-up, @brianmrobertson — if you haven't installed 0.2.12 yet, skip it and take 0.2.13 instead; if you already have, please update to 0.2.13:

After posting 0.2.12 we kept testing on our own machine and reproduced your VLM problem exactly: after downloading a vision model (we used LFM2-VL 450M from Staff Picks), clicking Load crashed the bundled inference server before it printed a single line — a packaging defect in how that binary finds its own libraries, present in every build you've had. 0.2.13 fixes that (the same model now loads in ~2 s and answers on our side), and it also extends the HuggingFace rate-limit retry to the download buttons in the model panels, which 0.2.12 had missed.

Everything from the previous message still applies (the Telegram / local-LLM fix is in both). Same asks:

  1. Quit Aegis fully, install 0.2.13, launch.
  2. Bottom bar → LLM → pick a Local Model, wait for the green dot; switch screens and back.
  3. Set Up VLM → Staff Picks → download one (the 450M one is the quickest) → Downloaded → Load. It should show as running within a few seconds.
  4. Ask something through Telegram.

If anything still misbehaves, the lines around [Gateway], [MLX-Engine], [LlamaManager] or dyld in the app log (~/.aegis-ai/logs, or Settings → Advanced → Open Logs Folder) will tell us exactly what happened.

Thanks again for your patience — three real bugs so far, all of them things other users would have hit.

brianmrobertson commented on Sep 12, 2026

@brianmrobertson
Author

I have installed 0.2.13 and here is where we stand.

  • Telegram provides the following error: ❌ Error: 🔴 Inference engine crashed: Inference engine crashed mid-stream. The model process exited unexpectedly. Please restart the engine and try again.

  • Skills (YOLO 2026) is stuck on installing 4/4.

  • The LLM continues to not load and here is the log.
    dyld[86313]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)

  • Here is the log from the VLM:
    dyld[84205]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[84674]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[85129]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[85693]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[86132]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[86580]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)
    dyld[86902]: Library not loaded: @rpath/libmtmd.0.dylib
    Referenced from: /Users/brianmrobertson/.aegis-ai/llama_binaries/b8502/macos-arm64-metal/llama-server
    Reason: tried: '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/tmp/llama-build/bin/libmtmd.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/tmp/llama-build/bin/libmtmd.0.dylib' (no such file)

solderzzc commented on Sep 14, 2026

@solderzzc
Member

Hi @brianmrobertson — 0.2.14 is ready, and it fixes the engine failure in your log:

https://releases.sharpai.org/releases/SharpAI-Aegis-0.2.14-arm64.dmg

Install it over 0.2.13 the usual way. You don't need to delete anything or run any commands. When the local AI engine starts, 0.2.14 checks the engine copy in your profile. If that copy can't run, 0.2.14 replaces it with the working one it ships with.

What was wrong. 0.2.10–0.2.12 copied a broken engine binary into ~/.aegis-ai/llama_binaries/b8502/. 0.2.13 included a fixed binary, but it kept using the old copy it found there. Your log shows exactly that: the path is that folder, and the /tmp/llama-build it searches is a leftover from our build machine.

How we tested it. We set up a profile with that same broken engine copy, one that fails with the same Library not loaded: @rpath/libmtmd.0.dylib error as your log. Then we installed 0.2.14 on top. The broken copy was replaced, both the LLM and the VLM started, and a real chat reply came back. That test profile came from 0.2.12, not 0.2.13, but that doesn't change anything. 0.2.13 never touched that folder, which is the bug itself, so your profile is in the same state we tested.

Your other two symptoms:

  • Telegram's "Inference engine crashed mid-stream" was caused by the same engine problem. The engine never started, and that message wrongly describes it as a crash. It should go away once the engine runs. That misleading message is logged as a separate bug.
  • YOLO skill stuck at 4/4: the last step of a skill install waits on the engine, so this should also clear once the engine runs. We haven't confirmed that on your exact setup, though. If it's still stuck after 0.2.14, just tell us. There's a known issue with how that step shows progress, and it's already fixed for the next release.

Sorry this took three versions. Thank you for the precise logs; they're what let us find it.

brianmrobertson commented on Sep 15, 2026

@brianmrobertson
Author

That seemed to fix most of the issues.

  • If I ask a question on Telegram, it seems to work, but I never get a response. It just provides the following:

[{"name": "video_search", "arguments": {"query": "person in front of camera", "time_range": "today", "camera": "Living room"}}]Searching for recorded clips of a person in the Living room camera from today.

  • I am getting an error when trying to run YOLO, and here it is:

● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
{"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
[env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
[env_config] Optimized runtime not installed for mps, will use PyTorch fallback
[env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
{"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
{"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
{"event": "error", "message": "Failed to load model: No module named 'ultralytics'", "retriable": false}
● [Aegis] Crashed (exit 1). Restarting (1/3)...
● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
{"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
[env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
[env_config] Optimized runtime not installed for mps, will use PyTorch fallback
[env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
{"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
{"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
{"event": "error", "message": "Failed to load model: No module named 'ultralytics'", "retriable": false}
● [Aegis] Crashed (exit 1). Restarting (2/3)...
● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
{"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
[env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
[env_config] Optimized runtime not installed for mps, will use PyTorch fallback
[env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
{"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
{"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
{"event": "error", "message": "Failed to load model: No module named 'ultralytics'", "retriable": false}
● [Aegis] Crashed (exit 1). Restarting (3/3)...
● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
{"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
[env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
[env_config] Optimized runtime not installed for mps, will use PyTorch fallback
[env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
{"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
{"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
{"event": "error", "message": "Failed to load model: No module named 'ultralytics'", "retriable": false}
● [Aegis] Process exited with code 1

solderzzc commented on Sep 17, 2026

@solderzzc
Member

Hi @brianmrobertson — thanks again for the detailed logs, they made this one straightforward to pin down.

YOLO skill fix: the mps fallback path was unconditionally importing ultralytics, but mps installs never ship torch/ultralytics — they're meant to run the pre-built ONNX model via CoreML/CPU instead. That's exactly what triggered your No module named 'ultralytics' crash loop. Fixed in #210 and #212, now on master.

Since the skill installer does a one-time clone with no update mechanism, could you uninstall and reinstall the yolo-detection-2026 skill to pick up the fix?

  1. Open the Aegis-AI app → Skills sidebar → Installed tab
  2. Uninstall yolo-detection-2026
  3. Switch to the Store tab and reinstall yolo-detection-2026
  4. Try running it again and let us know if the ultralytics error is gone

We're still looking at the Telegram response issue separately — no action needed from you on that yet.

solderzzc commented on Sep 17, 2026

@solderzzc
Member

Hi @brianmrobertson — two updates on the items from your last report.

0.2.15 is published. It fixes the reply problem where you got a raw [{"name": "video_search", ...}] line instead of an answer. The model's tool call was arriving in a format the app didn't recognize, so it was shown to you verbatim; 0.2.15 recognizes it, runs the search, and returns the real answer.
https://releases.sharpai.org/releases/SharpAI-Aegis-0.2.15-arm64.dmg

YOLO skill is fixed on master (#210, #212). The No module named 'ultralytics' crash came from the fallback path importing a package that isn't shipped with the CoreML/CPU install; that path now uses the bundled ONNX model. The Store serves the fixed yolo-detection-2026.

Thanks for the logs on both, they pinned each one down directly.

brianmrobertson commented on Sep 17, 2026

@brianmrobertson
Author

I installed 0.2.15, uninstalled YOLO, and reinstalled it. I am still receiving the following errors:

  • [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
    {"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
    [env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
    [env_config] Optimized runtime not installed for mps, will use PyTorch fallback
    [env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
    {"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
    {"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
    {"event": "error", "message": "Failed to load model: No module named 'onnxruntime'", "retriable": false}
    ● [Aegis] Crashed (exit 1). Restarting (1/3)...
    ● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
    {"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
    [env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
    [env_config] Optimized runtime not installed for mps, will use PyTorch fallback
    [env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
    {"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
    {"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
    {"event": "error", "message": "Failed to load model: No module named 'onnxruntime'", "retriable": false}
    ● [Aegis] Crashed (exit 1). Restarting (2/3)...
    ● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
    {"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
    [env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
    [env_config] Optimized runtime not installed for mps, will use PyTorch fallback
    [env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
    {"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
    {"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
    {"event": "error", "message": "Failed to load model: No module named 'onnxruntime'", "retriable": false}
    ● [Aegis] Crashed (exit 1). Restarting (3/3)...
    ● [Aegis] Started: /Users/brianmrobertson/.aegis-ai/skills/yolo-detection-2026/scripts/detect.py
    {"event": "progress", "stage": "init", "message": "Detecting compute hardware..."}
    [env_config] Apple Silicon: Apple M1 Pro (16384MB unified)
    [env_config] Optimized runtime not installed for mps, will use PyTorch fallback
    [env_config] Detected: backend=mps, device=mps, gpu=Apple M1 Pro, format=onnx, framework_ok=False
    {"event": "progress", "stage": "init", "message": "Hardware: Apple M1 Pro (mps)"}
    {"event": "progress", "stage": "model", "message": "Loading yolo26n model (onnx format)..."}
    {"event": "error", "message": "Failed to load model: No module named 'onnxruntime'", "retriable": false}
    ● [Aegis] Process exited with code 1

solderzzc commented on Sep 18, 2026

@solderzzc
Member

Thanks for retesting, @brianmrobertson — your new log actually tells us the fix in #210/#212 worked, and it uncovered the real problem underneath.

What changed. Before, the crash was No module named 'ultralytics'. Now it is No module named 'onnxruntime'. Both come from the same root cause: the Python environment that runs detect.py on your Mac has none of the skill's dependencies installed. On Apple Silicon this skill deliberately ships without PyTorch/ultralytics and runs the pre-built yolo26n.onnx through ONNX Runtime, so onnxruntime is the one package it cannot do without. The line "will use PyTorch fallback" in your log is misleading on Apple Silicon — there is no PyTorch to fall back to.

Why it survived an uninstall and reinstall. The dependency install happens once, during skill deployment. If that step did not complete (or completed into a different interpreter than the one that later runs the skill), reinstalling the skill files does not fix it, and nothing in the app checks that the dependencies actually import before it starts the detector. That check is missing, and we are fixing it.

Two things that would pin it down exactly. In Terminal:

ls -l ~/.aegis-ai/skills/yolo-detection-2026/.venv/bin/python3 ; python3 -V
~/.aegis-ai/skills/yolo-detection-2026/.venv/bin/python3 -c "import sys, onnxruntime; print(sys.executable, onnxruntime.get_available_providers())"

The first tells us whether the skill's private environment was created at all and what your system Python is. The second tells us whether ONNX Runtime is there and whether it has the CoreML backend.

Workaround you can use right now, if that environment exists:

~/.aegis-ai/skills/yolo-detection-2026/.venv/bin/python3 -m pip install "onnxruntime>=1.19.0" "numpy>=1.24.0,<2.0.0" opencv-python-headless Pillow

Then start the YOLO skill again. If the first command printed "No such file or directory", the environment was never created — send us that output and do not run the install line; we will ship a proper fix instead.

— PM session

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions