Skip to content

feat:Update OpenAPI spec with streaming endpoint and new optional fields#135

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202507080923
Jul 8, 2025
Merged

feat:Update OpenAPI spec with streaming endpoint and new optional fields#135
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202507080923

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Jul 8, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new streaming endpoint for real-time voice previews during voice creation.
    • Added options to specify intro, outro, and instructions prompt when creating podcasts.
    • Added the ability to request text-to-voice previews in voice design requests.
  • Improvements

    • Clarified the description of the batch call retry endpoint to better explain its behavior.

@coderabbitai
Copy link

coderabbitai bot commented Jul 8, 2025

Walkthrough

The OpenAPI specification for the ElevenLabs API was updated to add a streaming endpoint for voice previews, clarify the behavior of the batch call retry endpoint, and introduce new optional fields for podcast creation and voice design requests. These changes expand API capabilities and refine request and response models.

Changes

File(s) Change Summary
src/libs/ElevenLabs/openapi.yaml Added streaming GET endpoint for voice previews; updated batch call retry description; added optional intro, outro, and instructions_prompt fields to podcast creation; added stream_previews boolean to voice design requests.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant VoiceEngine

    Client->>API: GET /v1/text-to-voice/{generated_voice_id}/stream
    API->>VoiceEngine: Request streaming audio for generated_voice_id
    VoiceEngine-->>API: Stream audio/mpeg data
    API-->>Client: Stream audio/mpeg data
Loading

Poem

A rabbit hopped to API hills,
Streaming voices with brand new thrills.
Podcasts now with intros, too—
Outros, prompts, a stylish cue.
Batch calls clearer, options anew,
ElevenLabs grows, as rabbits knew!
🐇🎤

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202507080923

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV merged commit 2620a0b into main Jul 8, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202507080923 branch July 8, 2025 09:24
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update OpenAPI spec with streaming endpoint and new optional fields Jul 8, 2025
Copy link

@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

♻️ Duplicate comments (1)
src/libs/ElevenLabs/openapi.yaml (1)

12235-12255: See earlier comment: DRY out repeated properties
Same three properties duplicated here. Please factor them out into a common component to avoid divergence in future edits.

🧹 Nitpick comments (3)
src/libs/ElevenLabs/openapi.yaml (3)

1486-1488: Fix grammatical typo in endpoint description
Small copy-editing nit: “Stream a the voice preview” → “Stream the voice preview”.

-      description: Stream a the voice preview for a generated voice as it is being generated.
+      description: Stream the voice preview for a generated voice as it is being generated.

1510-1515: Consider hinting streaming semantics in the media-type
For long-lived byte streams many clients leverage text/event-stream or set transfer-encoding: chunked. You already mark the operation with x-fern-streaming: true; consider also adding

headers:
  Transfer-Encoding:
    schema:
      type: string
      enum: [chunked]

or a vendor extension such as x-streaming-media: true to improve SDK generation & docs clarity.


9095-9095: Minor wording tweak for clarity
“calling failed and no-response recipients again” → “calling recipients that failed or had no response again”.

-      description: 'Retry a batch call, calling failed and no-response recipients again.'
+      description: 'Retry a batch call, calling recipients that failed or had no response again.'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b4f90f and 5e6c555.

⛔ Files ignored due to path filters (11)
  • src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.CreateConvaiBatchCallingByBatchIdRetry.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.CreateConvaiBatchCallingByBatchIdRetry.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.IStudioClient.CreateStudioPodcasts.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ITextToVoiceClient.CreateTextToVoiceDesign.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ITextToVoiceClient.GetTextToVoiceByGeneratedVoiceIdStream.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyCreatePodcastV1ProjectsPodcastCreatePost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyCreatePodcastV1StudioPodcastsPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.VoiceDesignRequestModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.StudioClient.CreateStudioPodcasts.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.TextToVoiceClient.CreateTextToVoiceDesign.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.TextToVoiceClient.GetTextToVoiceByGeneratedVoiceIdStream.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/ElevenLabs/openapi.yaml (5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test / Build, test and publish
🔇 Additional comments (2)
src/libs/ElevenLabs/openapi.yaml (2)

1499-1507: Declare header requirement explicitly for consistency
Most paths in this spec mark xi-api-key as either required: true or nullable: true and required: false.
Here only nullable is set. Tools that rely on the required flag (e.g. strict generators, request validators) will treat this header as optional, which may not match server behaviour.

If the key is mandatory (as the description suggests), add required: true; if optional, keep nullable: true and add required: false for clarity.


23581-23586: Validate property interaction & naming
stream_previews toggles preview inclusion; ensure no existing flag (e.g. include_previews, return_previews) already covers this to avoid API confusion. Also verify server honours the default false.

Comment on lines +12128 to +12148
intro:
title: Intro
maxLength: 1500
type: string
description: The intro text that will always be added to the beginning of the podcast.
nullable: true
example: Welcome to the podcast.
outro:
title: Outro
maxLength: 1500
type: string
description: The outro text that will always be added to the end of the podcast.
nullable: true
example: Thank you for listening!
instructions_prompt:
title: Instructions Prompt
maxLength: 3000
type: string
description: Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone.
nullable: true
example: 'Ensure the podcast remains factual, accurate and appropriate for all audiences.'
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Duplicate field definitions – extract a shared component
intro, outro, and instructions_prompt are introduced here and re-defined verbatim in the next schema (lines 12235-12255). Keeping two copies invites drift.
Create a small reusable schema – e.g. PodcastIntroOutro – and $ref it from both request bodies.

🤖 Prompt for AI Agents
In src/libs/ElevenLabs/openapi.yaml around lines 12128 to 12148, the fields
intro, outro, and instructions_prompt are duplicated verbatim in another schema
at lines 12235-12255. To fix this, create a reusable schema component named
PodcastIntroOutro that includes these three fields, then replace the inline
definitions in both request bodies with a $ref to this new component to avoid
duplication and potential drift.

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