Skip to content

Add OpenRouter STT provider#69

Open
shuimaoiko wants to merge 1 commit into
nibzard:mainfrom
shuimaoiko:codex/openrouter-stt-provider
Open

Add OpenRouter STT provider#69
shuimaoiko wants to merge 1 commit into
nibzard:mainfrom
shuimaoiko:codex/openrouter-stt-provider

Conversation

@shuimaoiko

Copy link
Copy Markdown

Summary

  • Add an openrouter provider for OpenRouter's current dedicated STT endpoint: POST /api/v1/audio/transcriptions.
  • Send the documented JSON payload with base64 input_audio, model, optional language, and temperature.
  • Use OPENROUTER_API_KEY for bearer auth and keep MP3 as the preferred Sapat conversion format.
  • Add aliases for current OpenRouter STT models such as Whisper, GPT-4o Transcribe, Voxtral, Qwen ASR, Parakeet, and MAI Transcribe.
  • Add mocked tests for request shape, auth, base64 encoding, format detection, language auto-detect omission, model aliases, provider availability, and API errors.

Note

This is intentionally separate from the older closed OpenRouter PR. That PR targeted the pre-plugin architecture and was closed because OpenRouter did not expose the claimed endpoint at the time. OpenRouter now documents the dedicated STT endpoint in its current official docs and API reference.

Validation

  • .venv/bin/python -m pytest tests/providers/test_openrouter.py tests/test_registry.py -q
  • .venv/bin/python -m pytest -q
  • .venv/bin/python -m black --check sapat/providers/openrouter.py tests/providers/test_openrouter.py
  • .venv/bin/python -m compileall sapat tests/providers/test_openrouter.py
  • git diff --check

Companion contribution for daytonaio/content#13. No secrets, private media, transcripts, or payout details are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant