Conversation
TTSプラグイン(COEIROINK, Style-Bert-VITS2)の audio.generated イベントペイロードを VOICEVOX と統一し、audio/audioUrl フィールドを追加。 LLMプラグイン(Anthropic, Google, Ollama)に response.generated イベントを追加し、 OpenAI と同じイベントパターンに統一。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughLLM plugins (Anthropic, Google, Ollama) now emit "response.generated" events after producing responses, with manifest updates declaring the new event type. TTS plugins (COEIROINK, SBV2) extend audio event payloads to include Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
plugins/coeiroink-tts/node.ts (1)
99-112:⚠️ Potential issue | 🟠 MajorUnify
execute()return shape across all branches.Line 188 returns
{ audioUrl, ... }, but guard/error paths (Line 99, Line 106, Line 111, Line 134, Line 160, Line 191) still omitaudioUrl. This makes outputs structurally inconsistent for downstream consumers.Proposed fix
async execute( inputs: Record<string, any>, context: NodeContext, ): Promise<Record<string, any>> { + const emptyResult = { audio: "", audioUrl: "", filename: "", duration: 0 }; const text = (inputs.text as string) ?? ""; if (!text) { await context.log("No text provided", "warning"); - return { audio: "", filename: "", duration: 0 }; + return emptyResult; } // Demo mode: skip TTS if connection is unavailable if (this.demoMode && !this.connectionAvailable) { const preview = text.length > 30 ? text.slice(0, 30) + "..." : text; await context.log(`[デモモード] TTS スキップ: ${preview}`, "info"); - return { audio: "", filename: "", duration: 0 }; + return emptyResult; } if (!this.speakerUuid) { await context.log("Speaker UUID not configured", "error"); - return { audio: "", filename: "", duration: 0 }; + return emptyResult; } @@ if (!prosodyResponse.ok) { const error = await prosodyResponse.text(); await context.log(`Prosody estimation failed: ${error}`, "error"); - return { audio: "" }; + return emptyResult; } @@ if (!synthResponse.ok) { const error = await synthResponse.text(); await context.log(`Synthesis failed: ${error}`, "error"); - return { audio: "" }; + return emptyResult; } @@ } catch (e) { await context.log(`COEIROINK error: ${String(e)}`, "error"); - return { audio: "" }; + return emptyResult; } }As per coding guidelines, "Use TypeScript type safety - match manifest types with TypeScript implementations for config, inputs, and outputs".
Also applies to: 134-135, 160-161, 188-191
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/coeiroink-tts/node.ts` around lines 99 - 112, The execute() method currently returns different object shapes across early-return/guard branches (e.g., when this.demoMode && !this.connectionAvailable, when !this.speakerUuid, and other error guards) while the success path returns { audioUrl, ... }; update every guard/error return in execute() to include the audioUrl property (use an empty string or null per your manifest type) so all returns match the declared output shape; locate returns inside execute(), especially around checks for this.demoMode, this.connectionAvailable, this.speakerUuid and any other early-return branches, and add audioUrl plus the existing audio, filename, duration fields to each returned object.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@plugins/coeiroink-tts/node.ts`:
- Around line 99-112: The execute() method currently returns different object
shapes across early-return/guard branches (e.g., when this.demoMode &&
!this.connectionAvailable, when !this.speakerUuid, and other error guards) while
the success path returns { audioUrl, ... }; update every guard/error return in
execute() to include the audioUrl property (use an empty string or null per your
manifest type) so all returns match the declared output shape; locate returns
inside execute(), especially around checks for this.demoMode,
this.connectionAvailable, this.speakerUuid and any other early-return branches,
and add audioUrl plus the existing audio, filename, duration fields to each
returned object.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
plugins/anthropic-llm/manifest.jsonplugins/anthropic-llm/node.tsplugins/coeiroink-tts/node.tsplugins/google-llm/manifest.jsonplugins/google-llm/node.tsplugins/ollama-llm/manifest.jsonplugins/ollama-llm/node.tsplugins/sbv2-tts/node.ts
COEIROINK と Style-Bert-VITS2 の execute() メソッドで、 ガード節やエラー時の返却オブジェクトに audioUrl が欠けていた問題を修正。 emptyResult パターンを導入し、全ての分岐で同じプロパティを返すように統一。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
概要
同じカテゴリのプラグイン間でイベント発火パターンが不統一だった問題を修正します。
TTSプラグイン
audio.generatedイベントのペイロードにaudio(ファイルパス)とaudioUrl(APIパス)を追加し、VOICEVOXと統一audioとaudioUrlをペイロードに追加execute()戻り値にもaudioUrlを追加LLMプラグイン
response.generatedイベント({text, model}ペイロード)を追加manifest.jsonのevents.emitsにもresponse.generatedを追加リファレンス実装
plugins/voicevox-tts/node.tsのイベントペイロード形式に統一plugins/openai-llm/node.tsのイベント発火パターンに統一テスト計画
audio.generatedイベントが正しいペイロードで発火されることresponse.generatedイベントが発火されることcloses #105
🤖 Generated with Claude Code
Summary by CodeRabbit