diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json index 8cfd742c..87e8af42 100644 --- a/apps/client/public/locales/en-US/translation.json +++ b/apps/client/public/locales/en-US/translation.json @@ -1191,5 +1191,9 @@ "Transcription failed": "Transcription failed", "Voice dictation is not configured": "Voice dictation is not configured", "Microphone is unavailable or already in use": "Microphone is unavailable or already in use", - "Audio recording is not available in this browser/context": "Audio recording is not available in this browser/context" + "Audio recording is not available in this browser/context": "Audio recording is not available in this browser/context", + "Request format": "Request format", + "How transcription requests are sent to the endpoint": "How transcription requests are sent to the endpoint", + "OpenAI-compatible (multipart/form-data)": "OpenAI-compatible (multipart/form-data)", + "OpenRouter (JSON, base64 audio)": "OpenRouter (JSON, base64 audio)" } diff --git a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx index b908fc03..78727bda 100644 --- a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx +++ b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx @@ -9,6 +9,7 @@ import { Modal, Paper, PasswordInput, + Select, Stack, Switch, Text, @@ -32,7 +33,10 @@ import { useTestAiConnectionMutation, useUpdateAiSettingsMutation, } from "@/features/workspace/queries/ai-settings-query.ts"; -import { IAiSettingsUpdate } from "@/features/workspace/services/ai-settings-service.ts"; +import { + IAiSettingsUpdate, + SttApiStyle, +} from "@/features/workspace/services/ai-settings-service.ts"; import AiMcpServers from "./ai-mcp-servers.tsx"; // No driver field: every endpoint is OpenAI-compatible, so the form carries only @@ -50,6 +54,7 @@ const formSchema = z.object({ // STT-specific fields. Empty base URL / key fall back to the chat ones. sttModel: z.string(), sttBaseUrl: z.string(), + sttApiStyle: z.enum(["multipart", "json"]), sttApiKey: z.string(), }); @@ -139,6 +144,7 @@ export default function AiProviderSettings() { embeddingApiKey: "", sttModel: "", sttBaseUrl: "", + sttApiStyle: "multipart" as SttApiStyle, sttApiKey: "", }, }); @@ -157,6 +163,7 @@ export default function AiProviderSettings() { embeddingApiKey: "", sttModel: settings.sttModel ?? "", sttBaseUrl: settings.sttBaseUrl ?? "", + sttApiStyle: settings.sttApiStyle ?? "multipart", sttApiKey: "", }); form.resetDirty(); @@ -184,6 +191,7 @@ export default function AiProviderSettings() { // server-side. sttModel: values.sttModel, sttBaseUrl: values.sttBaseUrl, + sttApiStyle: values.sttApiStyle, }; // Key semantics (never send the stored key back): @@ -671,6 +679,22 @@ export default function AiProviderSettings() { +