mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 22:32:12 +03:00
* feat(providers): add OpenRouter speech-to-text (audio transcription) provider Adds OpenRouter as a speech-to-text provider for POST /v1/audio/transcriptions. Transcription requests route to OpenRouter's dedicated STT endpoint (https://openrouter.ai/api/v1/audio/transcriptions), converting the multipart audio upload into OpenRouter's JSON input_audio { data, format } shape and forwarding optional language, temperature, and response_format fields. OpenRouter STT reuses your existing OpenRouter connection, so no separate credential is required. Eleven transcription models are available (Deepgram Nova-3, Microsoft MAI-Transcribe 1.5, NVIDIA Parakeet, Mistral Voxtral, Qwen3 ASR, Google Chirp 3, and the OpenAI Whisper / GPT-4o transcribe family). The media-providers STT playground card now narrows its model picker to transcription-only models, so the OpenRouter chat catalog is not shown for speech-to-text, and the provider page shows an existing-connection note for OpenRouter STT. * fix(providers): address OpenRouter STT review feedback - Extract the OpenRouter transcription handler into open-sse/handlers/openrouterTranscription.ts to keep audioTranscription.ts under the file-size cap. - Qualify the STT card's submitted model id with the connection's provider prefix so OpenRouter models route to OpenRouter rather than the model's own vendor (the transcription route resolves the provider from the leading segment of the model id). - Coerce temperature to a number and forward timestamp_granularities on the JSON input_audio payload; match the base MIME type when resolving the audio format so codec parameters (e.g. audio/webm;codecs=opus) do not fall back to wav. - Split the OpenRouter cases into tests/unit/audio-transcription-openrouter.test.ts and add coverage for temperature, timestamp granularities, MIME codec params, and qualified-id routing.