Skip to content

Commit fc26352

Browse files
committed
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 <mudler@localai.io>
1 parent 51f4f67 commit fc26352

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

backend/index.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,11 +1163,11 @@
11631163
- &opus
11641164
name: "opus"
11651165
alias: "opus"
1166-
uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-opus"
1166+
capabilities:
1167+
default: "cpu-opus"
1168+
metal: "metal-opus"
11671169
urls:
11681170
- https://opus-codec.org/
1169-
mirrors:
1170-
- localai/localai-backends:latest-cpu-opus
11711171
license: BSD-3-Clause
11721172
description: |
11731173
Opus audio codec backend for encoding and decoding audio.
@@ -1177,7 +1177,11 @@
11771177
- opus
11781178
- WebRTC
11791179
- realtime
1180-
- CPU
1180+
- !!merge <<: *opus
1181+
name: "opus-development"
1182+
capabilities:
1183+
default: "cpu-opus-development"
1184+
metal: "metal-opus-development"
11811185
- &silero-vad
11821186
name: "silero-vad"
11831187
uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-silero-vad"
@@ -1603,7 +1607,12 @@
16031607
mirrors:
16041608
- localai/localai-backends:master-metal-darwin-arm64-local-store
16051609
- !!merge <<: *opus
1606-
name: "opus-development"
1610+
name: "cpu-opus"
1611+
uri: "quay.io/go-skynet/local-ai-backends:latest-cpu-opus"
1612+
mirrors:
1613+
- localai/localai-backends:latest-cpu-opus
1614+
- !!merge <<: *opus
1615+
name: "cpu-opus-development"
16071616
uri: "quay.io/go-skynet/local-ai-backends:master-cpu-opus"
16081617
mirrors:
16091618
- localai/localai-backends:master-cpu-opus

0 commit comments

Comments
 (0)