From fc263526bc02533768fb1bdb307ae5b6c48c0d8f Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Fri, 12 Jun 2026 22:13:48 +0000 Subject: [PATCH] fix(gallery): make opus a meta backend so the platform variant is auto-selected (#9813) The realtime/WebRTC path loads the "opus" codec backend by name, but on macOS arm64 only "metal-opus" is installable, so Load("opus") failed with "opus backend not available". The root cause: unlike llama-cpp and whisper, the opus entry was a concrete CPU backend (it carried a uri and no capabilities map) rather than a meta backend, so nothing mapped "opus" to the platform-appropriate variant. Restructure opus to mirror llama-cpp/whisper: "opus" becomes a meta backend with a capabilities map (default -> cpu-opus, metal -> metal-opus) and no uri; the CPU image moves to a new "cpu-opus" concrete (and its dev variant to "cpu-opus-development"). Installing "opus" now resolves to metal-opus on Apple Silicon and cpu-opus elsewhere, and Load("opus") works on every platform via the meta pointer - so the realtime endpoint needs no special casing. This reverts the realtime_webrtc.go resolution helper from the earlier approach in favor of the gallery-level fix. Assisted-by: claude:claude-opus-4-8 [Claude Code] Signed-off-by: Ettore Di Giacinto --- backend/index.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/backend/index.yaml b/backend/index.yaml index a3af8e01cc95..cfde2fea6baa 100644 --- a/backend/index.yaml +++ b/backend/index.yaml @@ -1163,11 +1163,11 @@ - &opus name: "opus" alias: "opus" - uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-opus" + capabilities: + default: "cpu-opus" + metal: "metal-opus" urls: - https://opus-codec.org/ - mirrors: - - localai/localai-backends:latest-cpu-opus license: BSD-3-Clause description: | Opus audio codec backend for encoding and decoding audio. @@ -1177,7 +1177,11 @@ - opus - WebRTC - realtime - - CPU +- !!merge <<: *opus + name: "opus-development" + capabilities: + default: "cpu-opus-development" + metal: "metal-opus-development" - &silero-vad name: "silero-vad" uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-silero-vad" @@ -1603,7 +1607,12 @@ mirrors: - localai/localai-backends:master-metal-darwin-arm64-local-store - !!merge <<: *opus - name: "opus-development" + name: "cpu-opus" + uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-opus" + mirrors: + - localai/localai-backends:latest-cpu-opus +- !!merge <<: *opus + name: "cpu-opus-development" uri: "quay.io/go-skynet/local-ai-backends:master-cpu-opus" mirrors: - localai/localai-backends:master-cpu-opus