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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: fall back to the legacy stream when an older backend refuses a new chat field (#13130)
Daniel Han90e913e011f4
diff --git a/studio/frontend/src/features/chat/api/chat-generation-api.ts b/studio/frontend/src/features/chat/api/chat-generation-api.tsindex eb9cf013c34..a2b5d46c8df 100644--- a/studio/frontend/src/features/chat/api/chat-generation-api.ts+++ b/studio/frontend/src/features/chat/api/chat-generation-api.ts@@ -147,6 +147,10 @@ export function isLegacyFallbackChatGenerationAdmissionError((error instanceof ChatGenerationApiError &&error.status === 400 &&error.message === "Media chat runs use the legacy streaming path") ||+ // A backend older than this UI rejects request fields it does not know yet (#13010); its legacy stream ignores them.+ (error instanceof ChatGenerationApiError &&+ error.status === 400 &&+ error.message.startsWith("Unsupported durable request fields:")) ||(error instanceof ChatGenerationApiError &&error.status === 404 &&error.message === "Thread not found") ||diff --git a/studio/frontend/tests/chat-generation-reconnect.test.ts b/studio/frontend/tests/chat-generation-reconnect.test.tsindex ef6ab73b069..3e91f2db086 100644--- a/studio/frontend/tests/chat-generation-reconnect.test.ts+++ b/studio/frontend/tests/chat-generation-reconnect.test.ts@@ -251,6 +251,20 @@ test("credential-safe durable admission errors select the legacy stream", async);});+test("an older backend's unknown-field refusal selects the legacy stream", async () => {+ globalThis.fetch = (async () =>+ new Response(+ JSON.stringify({+ detail: "Unsupported durable request fields: sandbox_level",+ }),+ { status: 400, headers: { "content-type": "application/json" } },+ )) as typeof fetch;+ await assert.rejects(+ createChatGenerationRun(createInput()),+ (error: unknown) => isLegacyFallbackChatGenerationAdmissionError(error),+ );+});+test("missing history rows select the legacy stream", async () => {for (const [status, detail] of [[404, "Thread not found"],