Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix: handle structured audio part type in chat adapter

Roland Tannous1e39e7d05f36
diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.ts
index f8aefda4387..8abe71fd62a 100644
--- a/studio/frontend/src/features/chat/api/chat-adapter.ts
+++ b/studio/frontend/src/features/chat/api/chat-adapter.ts
@@ -103,7 +103,8 @@ function findLatestUserAudioBase64(messages: RunMessages): string | undefined {
for (const part of message.content ?? []) {
if (part.type === "audio" && "audio" in part) {
- const raw = (part as { type: "audio"; audio: string }).audio;
+ const audioPart = (part as unknown as { type: "audio"; audio: string | { data: string; format: string } }).audio;
+ const raw = typeof audioPart === "string" ? audioPart : audioPart?.data;
if (raw) return raw.startsWith("data:") ? raw.split(",")[1] : raw;
}
}