Skip to content

feat(litellm): add audio STT and TTS model routing aliases#376

Merged
sheepdestroyer merged 2 commits into
masterfrom
feat/audio-stt-tts-aliases
Jul 24, 2026
Merged

feat(litellm): add audio STT and TTS model routing aliases#376
sheepdestroyer merged 2 commits into
masterfrom
feat/audio-stt-tts-aliases

Conversation

@sheepdestroyer

@sheepdestroyer sheepdestroyer commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Adds audio STT (whisper-1, gpt-4o-mini-transcribe) and TTS (gpt-4o-mini-tts, tts-1) model routing aliases in litellm/config.yaml.

Summary by Sourcery

Add routing aliases for audio speech-to-text and text-to-speech models in the LiteLLM configuration to expose them as public model groups.

New Features:

  • Introduce audio transcription aliases for whisper-1 and gpt-4o-mini-transcribe models in the LiteLLM config.
  • Expose text-to-speech aliases for gpt-4o-mini-tts and tts-1 models as public audio_speech model groups.

@sourcery-ai

sourcery-ai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds audio transcription and text-to-speech routing aliases for OpenAI/Whisper and TTS models to litellm, and exposes them as first-class models and fallbacks in the default config.

File-Level Changes

Change Details Files
Expose audio STT/TTS models as top-level litellm models with appropriate routing and metadata.
  • Register whisper-1, gpt-4o-mini-tts, and tts-1 as available models under litellm_settings.model
litellm/config.yaml
Define audio transcription routing aliases for Whisper-based models.
  • Add whisper-1 alias pointing to openai/whisper-1 with local HTTP base and token, configured for audio_transcription mode
  • Add gpt-4o-mini-transcribe alias reusing openai/whisper-1 backend with identical connection and timeout settings, marked as public
litellm/config.yaml
Define text-to-speech routing aliases backed by OpenRouter TTS.
  • Add gpt-4o-mini-tts alias mapped to openrouter/openai/tts-1 with audio_speech mode and standard timeout
  • Add tts-1 alias mapped to the same openrouter/openai/tts-1 backend, also in audio_speech mode and public
litellm/config.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@sheepdestroyer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f87c47b7-bcd4-4aa0-8c62-1ba2e4f98371

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb3bf0 and 15ba617.

📒 Files selected for processing (1)
  • litellm/config.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/audio-stt-tts-aliases

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues, and left some high level feedback:

  • You added a gpt-4o-mini-transcribe model in model_list but didn’t include it in the litellm_settings routed models list, which may prevent it from being usable via the same routing mechanism as the other audio aliases.
  • The api_base and api_key for the whisper-1/gpt-4o-mini-transcribe aliases are hardcoded to a local endpoint and token; consider using configuration placeholders or environment-driven values to keep this file portable across environments.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- You added a `gpt-4o-mini-transcribe` model in `model_list` but didn’t include it in the `litellm_settings` routed models list, which may prevent it from being usable via the same routing mechanism as the other audio aliases.
- The `api_base` and `api_key` for the `whisper-1`/`gpt-4o-mini-transcribe` aliases are hardcoded to a local endpoint and token; consider using configuration placeholders or environment-driven values to keep this file portable across environments.

## Individual Comments

### Comment 1
<location path="litellm/config.yaml" line_range="34-36" />
<code_context>
     - agent-complex-core
     - agent-medium-core
     - agent-simple-core
+    - whisper-1
+    - gpt-4o-mini-tts
+    - tts-1
   fallbacks:
   - agent-simple-core:
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Consider adding `gpt-4o-mini-transcribe` to the allowed model aliases list for consistency.

You’ve added `whisper-1`, `gpt-4o-mini-tts`, and `tts-1` here, but not `gpt-4o-mini-transcribe`. If clients are expected to call that alias directly, it should also be included in `allowed_model_aliases` to avoid those requests being rejected by the allowlist logic.

Suggested implementation:

```
    - agent-complex-core
    - agent-medium-core
    - agent-simple-core
    - whisper-1
    - gpt-4o-mini-tts
    - gpt-4o-mini-transcribe
    - tts-1

```

Depending on how audio STT aliases are wired elsewhere in this config, you may also want to:
1. Add a corresponding compatibility alias entry for `gpt-4o-mini-transcribe` in the "AUDIO STT / TTS COMPATIBILITY ALIASES" section (similar to the existing `whisper-1` block), mapping it to the appropriate underlying model.
2. Ensure any routing or fallback logic that references STT aliases is updated to recognize `gpt-4o-mini-transcribe` if needed.
</issue_to_address>

### Comment 2
<location path="litellm/config.yaml" line_range="229-232" />
<code_context>
+# ================================================================================
+# AUDIO STT / TTS COMPATIBILITY ALIASES
+# ================================================================================
+- model_name: whisper-1
+  litellm_params:
+    model: openai/whisper-1
+    api_base: http://127.0.0.1:8084
+    api_key: local-token
+    request_timeout: 60
</code_context>
<issue_to_address>
**🚨 issue (security):** Using plain HTTP for the audio endpoint may be risky outside strictly local setups.

These aliases point to `api_base: http://127.0.0.1:8084` without TLS. If this config might be reused outside strictly local/container networking, please either switch to HTTPS or make it explicit that these settings are for local-only use to avoid accidental insecure exposure.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread litellm/config.yaml
Comment thread litellm/config.yaml
Comment on lines +229 to +232
- model_name: whisper-1
litellm_params:
model: openai/whisper-1
api_base: http://127.0.0.1:8084

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 issue (security): Using plain HTTP for the audio endpoint may be risky outside strictly local setups.

These aliases point to api_base: http://127.0.0.1:8084 without TLS. If this config might be reused outside strictly local/container networking, please either switch to HTTPS or make it explicit that these settings are for local-only use to avoid accidental insecure exposure.

@sheepdestroyer
sheepdestroyer force-pushed the feat/audio-stt-tts-aliases branch from b4006ae to 15ba617 Compare July 24, 2026 20:11

@sheepdestroyer sheepdestroyer left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Global Review — #376

  • Scope: litellm/config.yaml (STT/TTS routing aliases and public model allowlist)
  • Files & Sections Analyzed: allowed_public_models (added whisper-1, gpt-4o-mini-transcribe, gpt-4o-mini-tts, tts-1), model_list (added 4 audio model alias blocks).
  • Addressing Bot Feedback: Addressed Sourcery AI suggestion to include gpt-4o-mini-transcribe in allowed_public_models.
  • Test Verification: 363 passed, 0 failures.
  • Verdict: READY TO MERGE

@sheepdestroyer
sheepdestroyer merged commit ff5b840 into master Jul 24, 2026
8 checks passed
@sheepdestroyer
sheepdestroyer deleted the feat/audio-stt-tts-aliases branch July 24, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant