Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 21, 2025

Summary by CodeRabbit

  • New Features

    • Added new realtime server events for audio output lifecycle: buffer started, stopped, and cleared, enabling finer-grained audio state tracking.
  • Refactor

    • Renamed the realtime MCP execution type from “mcp_tool_call” to “mcp_call” and updated its description. This change may require updating client integrations that reference the old value.

@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

The OpenAPI schema was updated to rename an enum value from mcp_tool_call to mcp_call and adjust its description. Additionally, three new realtime server event object types were added under x-oaiMeta: OutputAudioBufferStarted, OutputAudioBufferStopped, and OutputAudioBufferCleared.

Changes

Cohort / File(s) Summary
OpenAPI schema updates
src/libs/tryAGI.OpenAI/openapi.yaml
Renamed enum value mcp_tool_callmcp_call for RealtimeMCPToolExecution.type and updated description. Added three x-oaiMeta event definitions: RealtimeServerEventOutputAudioBufferStarted, RealtimeServerEventOutputAudioBufferStopped, RealtimeServerEventOutputAudioBufferCleared.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant C as Client
    participant S as Realtime Server

    Note over S: New output audio buffer lifecycle events
    S-->>C: RealtimeServerEventOutputAudioBufferStarted
    S-->>C: RealtimeServerEventOutputAudioBufferStopped
    S-->>C: RealtimeServerEventOutputAudioBufferCleared

    Note over C,S: Enum rename in tool execution
    C->>S: RealtimeMCPToolExecution (type: "mcp_call")
    S-->>C: Acknowledgement / result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I thump my paws—new names, neat call!
From mcp_tool_call to mcp_call, that’s all.
The audio buffer hums—start, stop, clear—
Three fresh events for every ear.
I hop through specs with schema cheer!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "feat:@coderabbitai" is a short tag/mention and does not describe the PR's primary changes; the changeset actually renames an OpenAPI enum value (mcp_tool_call → mcp_call) and adds three realtime audio-buffer event entries to x-oaiMeta, so the title is too vague to convey the main change to reviewers. Please update the title to a concise, descriptive sentence such as "feat(openapi): rename RealtimeMCPToolExecution enum to mcp_call and add realtime audio buffer events" so reviewers can quickly understand the primary change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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_202509210621

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.

@HavenDV HavenDV merged commit f49b050 into main Sep 21, 2025
2 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202509210621 branch September 21, 2025 06:22
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Rename enum mcp_tool_call to mcp_call; add output audio buffer events Sep 21, 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: 0

🧹 Nitpick comments (1)
src/libs/tryAGI.OpenAI/openapi.yaml (1)

32995-33003: Add one-line descriptions for OutputAudioBuffer union entries; add samples & client dispatch/tests

Verified: event definitions, examples, generated models/enums/JsonConverters/JsonSerializerContext exist, and names match upstream (output_audio_buffer.started/stopped/cleared). The union entries in src/libs/tryAGI.OpenAI/openapi.yaml (≈lines 32995–33003) currently have only "type: object" — add brief descriptions so SDK/docs surface text. Also add e2e/sample payloads and update client event dispatch/tests to exercise these events.

Optional doc diff (apply to the union entries at the location above):

         - key: RealtimeServerEventOutputAudioBufferStarted
           path: <auto>
-          type: object
+          type: object
+          description: Emitted when the output audio buffer begins accumulating frames.
         - key: RealtimeServerEventOutputAudioBufferStopped
           path: <auto>
-          type: object
+          type: object
+          description: Emitted when the output audio buffer stops receiving frames.
         - key: RealtimeServerEventOutputAudioBufferCleared
           path: <auto>
-          type: object
+          type: object
+          description: Emitted when the output audio buffer is cleared of all frames.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dc37867 and 9859192.

⛔ Files ignored due to path filters (2)
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCall.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RealtimeMCPToolCallType.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/tryAGI.OpenAI/openapi.yaml (2 hunks)
🔇 Additional comments (1)
src/libs/tryAGI.OpenAI/openapi.yaml (1)

22198-22201: Enum rename is a breaking wire change — confirm downstream updates and announce migration.

openapi.yaml now uses mcp_call (src/libs/tryAGI.OpenAI/openapi.yaml ≈ lines 22200); no occurrences of mcp_tool_call were found in the repo search and generated serializers/enums reference updated converters (e.g. src/libs/tryAGI.OpenAI/Generated/JsonSerializerContext.g.cs includes RealtimeMCPToolCallTypeJsonConverter), so the spec and generated code were changed here.

Actions (choose one):

  • Coordinate as a breaking change: add a changelog entry, regenerate all SDKs/clients, bump version and publish release notes/announce migration; or
  • Provide backward compatibility: update JSON converters/ToEnum mappings to accept both "mcp_tool_call" and "mcp_call" for a migration window and mark the old value deprecated.

Also add the prior value to the schema for discoverability.

Minimal schema doc tweak:

-          description: The type of the item. Always `mcp_call`.
+          description: The type of the item. Always `mcp_call`. Previously `mcp_tool_call`.

Checks to run / confirm before release:

  • rg -nP '\bmcp_tool_call\b' -C3
  • rg -nP 'RealtimeMCPToolExecution|"\stype"\s:\s*"(mcp_tool_call|mcp_call)"' -C3
  • Verify generated JsonConverters/ToEnum mappings accept required literals and regenerate SDKs/clients.

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.

2 participants