Skip to content

added models and voice Id in types#713

Open
kanakagrawal-crypto wants to merge 1 commit into
juspay:releasefrom
kanakagrawal-crypto:models
Open

added models and voice Id in types#713
kanakagrawal-crypto wants to merge 1 commit into
juspay:releasefrom
kanakagrawal-crypto:models

Conversation

@kanakagrawal-crypto
Copy link
Copy Markdown

@kanakagrawal-crypto kanakagrawal-crypto commented Apr 16, 2026

Summary by CodeRabbit

  • New Features
    • Expanded voice selection with additional TTS voice models and voice ID options from ElevenLabs and Cartesia providers
    • Added support for new LLM model options in the playground, including Azure and Google Vertex configurations
    • Enhanced configuration options to expose additional voice and model choices to users

Copilot AI review requested due to automatic review settings April 16, 2026 07:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd8f984e-0ce8-4ae6-835c-cb498307eb33

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This change introduces new enum types for TTS voice models and IDs (ElevenLabs and Cartesia) and LLM models (Azure and Google Vertex), then extends the configuration options handler to expose these enums as selectable options via API endpoints.

Changes

Cohort / File(s) Summary
Voice and LLM Type Enums
app/ai/voice/agents/breeze_buddy/template/types.py, app/ai/voice/llm/types.py
Added four string enum types for voice models and IDs: ElevenLabsVoiceModel, ElevenLabsVoiceId, CartesiaVoiceModel, and CartesiaVoiceId with provider-specific constants; added two LLM model enums: AzureLLMModel with gpt-4o and GoogleVertexModel with gemini and Claude model options.
Configuration Handler Extension
app/api/routers/breeze_buddy/playground/handlers.py
Extended get_configuration_options_handler to populate and return three new configuration option lists: tts_voice_models (mapped per TTS provider), tts_voice_ids (mapped per TTS provider with enum member names as labels), and llm_models (mapped per LLM provider).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A rabbit's ode to options bright,
With ElevenLabs and Cartesia in sight,
Azure voices, Vertex dreams so clear,
Configuration blooms when choices appear! 🌸

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding new voice models and voice IDs as enum types across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit enumerations for TTS voice models/voice IDs and LLM model names, and exposes these as selectable options via the Breeze Buddy playground configuration options endpoint.

Changes:

  • Introduces ElevenLabsVoiceModel/Id and CartesiaVoiceModel/Id enums in Breeze Buddy template types.
  • Introduces AzureLLMModel and GoogleVertexModel enums in shared LLM types.
  • Extends the playground /playground/configurations/options response with tts_voice_models, tts_voice_ids, and llm_models.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
app/api/routers/breeze_buddy/playground/handlers.py Adds TTS voice model/ID option lists and LLM model option lists to the playground options response.
app/ai/voice/llm/types.py Adds enums for Azure and Vertex model names.
app/ai/voice/agents/breeze_buddy/template/types.py Adds enums enumerating known TTS voice models and voice IDs for ElevenLabs and Cartesia.

Comment on lines +154 to +161
# LLM models per provider (keyed by provider or provider__sdk)
llm_models = {
LLMProvider.AZURE.value: [
{"value": m.value, "label": m.value} for m in AzureLLMModel
],
LLMProvider.GOOGLE_VERTEX.value: [
{"value": m.value, "label": m.value} for m in GoogleVertexModel
],
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

llm_models is keyed only by provider, but Vertex model choice is SDK-dependent (Gemini via Google SDK vs Claude via Anthropic SDK). As-is, the options list can surface claude-3-5-sonnet even when the user selects google_vertex + sdk=google, which will route to the Gemini build_vertex_llm path and likely fail at runtime. Consider keying Vertex model options the same way as llm_thinking_fields (e.g., google_vertex__google vs google_vertex__anthropic) and separating Gemini vs Claude model lists accordingly.

Suggested change
# LLM models per provider (keyed by provider or provider__sdk)
llm_models = {
LLMProvider.AZURE.value: [
{"value": m.value, "label": m.value} for m in AzureLLMModel
],
LLMProvider.GOOGLE_VERTEX.value: [
{"value": m.value, "label": m.value} for m in GoogleVertexModel
],
# LLM models per provider (azure) or provider__sdk (google_vertex)
llm_models = {
LLMProvider.AZURE.value: [
{"value": m.value, "label": m.value} for m in AzureLLMModel
],
f"{LLMProvider.GOOGLE_VERTEX.value}__{LLMSdk.GOOGLE.value}": [
{"value": m.value, "label": m.value}
for m in GoogleVertexModel
if not m.value.startswith("claude-")
],
f"{LLMProvider.GOOGLE_VERTEX.value}__{LLMSdk.ANTHROPIC.value}": [
{"value": m.value, "label": m.value}
for m in GoogleVertexModel
if m.value.startswith("claude-")
],

Copilot uses AI. Check for mistakes.
Comment on lines +155 to +157
llm_models = {
LLMProvider.AZURE.value: [
{"value": m.value, "label": m.value} for m in AzureLLMModel
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The Azure model options here only include gpt-4o, but the Breeze Buddy Azure default is gpt-4o-automatic (see AZURE_BREEZE_BUDDY_OPENAI_MODEL default). If the playground UI relies on this list to populate a dropdown, users may be unable to select the currently configured default. Consider adding the default model string to AzureLLMModel (or generating the options from config + known models) so the options reflect what the backend actually supports.

Suggested change
llm_models = {
LLMProvider.AZURE.value: [
{"value": m.value, "label": m.value} for m in AzureLLMModel
azure_model_values = list(dict.fromkeys([*(m.value for m in AzureLLMModel), "gpt-4o-automatic"]))
llm_models = {
LLMProvider.AZURE.value: [
{"value": model_value, "label": model_value}
for model_value in azure_model_values

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

Comment thread app/ai/voice/llm/types.py
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/api/routers/breeze_buddy/playground/handlers.py (1)

154-162: Align llm_models keying with SDK-specific payload shape.

Lines 154-162 key Google Vertex models by provider only, while llm_thinking_fields is keyed by provider__sdk. Using the same key contract helps prevent invalid SDK/model combinations in the UI flow.

Suggested refactor
     llm_models = {
         LLMProvider.AZURE.value: [
             {"value": m.value, "label": m.value} for m in AzureLLMModel
         ],
-        LLMProvider.GOOGLE_VERTEX.value: [
-            {"value": m.value, "label": m.value} for m in GoogleVertexModel
+        f"{LLMProvider.GOOGLE_VERTEX.value}__{LLMSdk.GOOGLE.value}": [
+            {"value": GoogleVertexModel.GEMINI_2_0_FLASH.value, "label": GoogleVertexModel.GEMINI_2_0_FLASH.value}
+        ],
+        f"{LLMProvider.GOOGLE_VERTEX.value}__{LLMSdk.ANTHROPIC.value}": [
+            {"value": GoogleVertexModel.CLAUDE_3_5_SONNET.value, "label": GoogleVertexModel.CLAUDE_3_5_SONNET.value}
         ],
     }

Also applies to: 179-179

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/api/routers/breeze_buddy/playground/handlers.py` around lines 154 - 162,
The llm_models mapping uses provider-only keys for Google Vertex while the UI
expects provider__sdk keys like llm_thinking_fields; update the llm_models dict
so keys follow the provider__sdk contract (e.g., use
f"{LLMProvider.GOOGLE_VERTEX.value}__vertex" or the appropriate SDK suffix) for
Google Vertex entries (and any other non-Azure providers), keeping the same
value lists generated from GoogleVertexModel and AzureLLMModel; also apply the
same key change to the similar block referenced around the later occurrence (the
other llm_models usage at ~179) so model-to-SDK combinations are validated
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/api/routers/breeze_buddy/playground/handlers.py`:
- Around line 130-152: The tts_voice_models and tts_voice_ids mappings omit the
TTSProvider.SARVAM entries while tts_providers includes "sarvam", causing
missing-key runtime issues; update the dictionaries tts_voice_models and
tts_voice_ids to include a key for TTSProvider.SARVAM.value with an appropriate
list (even if empty or a placeholder) so the client always finds a defined value
for every provider in TTSProvider; locate the references to tts_voice_models and
tts_voice_ids alongside the enums ElevenLabsVoiceModel, CartesiaVoiceModel,
ElevenLabsVoiceId, and CartesiaVoiceId and add the SARVAM entries (and mirror
this change where similar maps are created later) to keep provider maps
exhaustive.

---

Nitpick comments:
In `@app/api/routers/breeze_buddy/playground/handlers.py`:
- Around line 154-162: The llm_models mapping uses provider-only keys for Google
Vertex while the UI expects provider__sdk keys like llm_thinking_fields; update
the llm_models dict so keys follow the provider__sdk contract (e.g., use
f"{LLMProvider.GOOGLE_VERTEX.value}__vertex" or the appropriate SDK suffix) for
Google Vertex entries (and any other non-Azure providers), keeping the same
value lists generated from GoogleVertexModel and AzureLLMModel; also apply the
same key change to the similar block referenced around the later occurrence (the
other llm_models usage at ~179) so model-to-SDK combinations are validated
consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9b94338f-2c10-45e1-8676-7ad72ac66b28

📥 Commits

Reviewing files that changed from the base of the PR and between b41e4c1 and dbed996.

📒 Files selected for processing (3)
  • app/ai/voice/agents/breeze_buddy/template/types.py
  • app/ai/voice/llm/types.py
  • app/api/routers/breeze_buddy/playground/handlers.py

Comment thread app/api/routers/breeze_buddy/playground/handlers.py
RAJU = "pzxut4zZz4GImZNlqQ3H"


class CartesiaVoiceModel(str, Enum):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@kanakagrawal-crypto When models change we need to again change these types, can you check if these providers have any api exposed which lists the models that they have ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

okay for now

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.

4 participants