Skip to content

feat:Update OpenAPI spec with new webhook model and LLM identifiers#155

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202508070927
Aug 7, 2025
Merged

feat:Update OpenAPI spec with new webhook model and LLM identifiers#155
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202508070927

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Aug 7, 2025

Summary by CodeRabbit

  • New Features
    • Added support for asynchronous webhook responses in the speech-to-text API.
    • Introduced two new large language model options: qwen3-30b-a3b and watt-tool-70b.

@coderabbitai
Copy link

coderabbitai bot commented Aug 7, 2025

Walkthrough

The OpenAPI specification for the ElevenLabs API was updated to include a new webhook response model for the speech-to-text endpoint, added two new LLM model identifiers to the LLM schema, and removed the nullable property from the speech-to-text response schema.

Changes

Cohort / File(s) Change Summary
OpenAPI Specification Updates
src/libs/ElevenLabs/openapi.yaml
Added SpeechToTextWebhookResponseModel schema; updated /v1/speech-to-text response to include this new model; added qwen3-30b-a3b and watt-tool-70b to LLM enum; removed nullable: true from response schema.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API
    participant Webhook

    Client->>API: POST /v1/speech-to-text
    alt Synchronous Response
        API-->>Client: SpeechToTextChunkResponseModel or MultichannelSpeechToTextResponseModel
    else Asynchronous/Webhook Response
        API-->>Client: SpeechToTextWebhookResponseModel (acceptance)
        API->>Webhook: Sends transcription result asynchronously
    end
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A whisk of YAML, a schema anew,
Two models join the LLM crew.
Webhooks now respond with cheer,
Accepting speech from far and near.
In docs we hop, improvements sprout—
The API grows, without a doubt!
🐇✨

✨ 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_202508070927

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.
  • 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.

Support

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

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 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 33473d7 into main Aug 7, 2025
2 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202508070927 branch August 7, 2025 09:28
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update OpenAPI spec with new webhook model and LLM identifiers Aug 7, 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

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

17882-17888: Consider alphabetically sorting the LLM enum to minimise future merge noise

The two new identifiers land mid-list. Keeping the enum alphabetised (qwen3-* before watt-*, etc.) makes diffs smaller and avoids accidental duplicates.


21973-21990: Nit: align naming & add basic format constraints for SpeechToTextWebhookResponseModel

  1. Title capitalisation: “ID” is normally uppercase (Request ID) to match other schemas.
  2. request_id would benefit from a simple pattern (^[A-Za-z0-9_-]+$) or at least format: uuid if that is the intended shape.
  3. Add a short description to the schema itself for parity with neighbours.
-        request_id:
-          title: Request Id
+        request_id:
+          title: Request ID
+          pattern: '^[A-Za-z0-9_-]+$'   # or `format: uuid`

These tweaks improve client generation and documentation clarity.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a2e0d0a and f09664e.

⛔ Files ignored due to path filters (7)
  • src/libs/ElevenLabs/Generated/ElevenLabs..JsonSerializerContext.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.ISpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.LLM.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToTextWebhookResponseModel.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SpeechToTextWebhookResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.SpeechToTextClient.CreateSpeechToText.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/ElevenLabs/openapi.yaml (3 hunks)

Comment on lines 5626 to 5633
anyOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
- $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'
oneOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
nullable: true
examples:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add webhook schema to oneOf or remove oneOf—current mix breaks spec validation

The schema now has both anyOf (with the new SpeechToTextWebhookResponseModel) and oneOf (without it).
OpenAPI generators treat oneOf as a mutually exclusive discriminator set; having a broader anyOf directly above it that contains an extra option makes the specification ambiguous and will fail validation in tools such as swagger-cli validate or openapi-generator.

Either extend oneOf to include the new model or drop oneOf entirely if exclusivity is no longer required.

                 oneOf:
                   - $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
                   - $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
+                  - $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
anyOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
- $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'
oneOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
nullable: true
examples:
anyOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
- $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'
oneOf:
- $ref: '#/components/schemas/SpeechToTextChunkResponseModel'
- $ref: '#/components/schemas/MultichannelSpeechToTextResponseModel'
- $ref: '#/components/schemas/SpeechToTextWebhookResponseModel'
examples:
🤖 Prompt for AI Agents
In src/libs/ElevenLabs/openapi.yaml around lines 5626 to 5633, the schema
defines both anyOf and oneOf with inconsistent sets, where anyOf includes
SpeechToTextWebhookResponseModel but oneOf does not, causing spec validation
errors. To fix this, either add SpeechToTextWebhookResponseModel to the oneOf
list to keep exclusivity or remove the oneOf property entirely if exclusivity is
not needed, ensuring the schema is consistent and valid.

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