Skip to content

Develop => main#534

Merged
tegnike merged 6 commits into
mainfrom
develop
Jun 23, 2026
Merged

Develop => main#534
tegnike merged 6 commits into
mainfrom
develop

Conversation

@tegnike

@tegnike tegnike commented Jun 23, 2026

Copy link
Copy Markdown
Owner

新機能

  • かんたん設定のAI会話設定を拡充しました。
    • AIサービスごとのAPIキー、エンドポイント、URL、モデルなどを、かんたん設定内で直接設定できるようにしました。
    • OpenRouter、LM Studio、Ollama、Dify、Custom APIなど、モデル名や接続URLを個別に扱うサービス向けの入力欄を追加しました。
  • かんたん設定の音声設定を拡充しました。
    • VOICEVOX、AivisSpeech、Aivis Cloud API、Style-Bert-VITS2、GSVI TTS、ElevenLabs、Cartesia、OpenAI TTS、Azure OpenAI TTSの主要設定を、音声エンジンに応じて表示するようにしました。
    • AivisSpeechの話者一覧を読み込み、選択できるようにしました。
  • AIモデル定義を更新しました。
    • OpenAI、Anthropic、Google、xAI、Groq、Cohere、Mistral、Fireworksなどのモデル一覧を更新しました。
    • OpenAIのAudio、Whisper、TTSモデル一覧を更新し、Audio Modeのデフォルトモデルを gpt-4o-mini-audio-preview に変更しました。

改善

  • かんたん設定のAIサービス選択を、各サービスのロゴ付きリスト表示に変更しました。
  • かんたん設定の入力欄や選択欄をテーマ対応の見た目に整理しました。
  • かんたん設定の説明文を、サービスや音声エンジンごとの必須項目が分かる内容に更新しました。
  • AIサービスロゴコンポーネントの型を AIService に揃え、不要な any キャストを削除しました。

バグ修正

  • AivisSpeech話者一覧の読み込み失敗時に空配列へフォールバックするようにしました。
  • Aivis Cloud APIのスタイルID入力で、不正な数値入力を 0 に正規化するようにしました。

テスト

  • AIモデル定義の更新に合わせてモデル関連テストを更新しました。
  • Audio Modeのデフォルトモデル変更に合わせてE2Eテストの期待値を更新しました。

ドキュメント・翻訳

  • かんたん設定のAI会話・音声設定説明文を日本語翻訳で更新しました。

その他

  • Vercel AI SDK関連パッケージと ai パッケージを更新しました。

Summary by CodeRabbit

  • New Features
    • 設定の案内を改善し、選択したAIサービス/音声エンジンに応じて必要項目を表示するようになりました。
    • AI会話UIの選択体験を整理し、音声側の設定もエンジン別に切り替え可能になりました。
    • モデル一覧と既定の音声モデルを最新内容に更新しました。
  • Documentation
    • クイックスタートの説明文を、サービスに応じて必要項目を設定する内容へ更新しました。
  • Bug Fixes
    • 音声モード時の選択モデル挙動を期待値に合わせて更新しました。
  • Tests
    • 音声モード関連のE2Eテストを新しいモデル設定に合わせて更新しました。

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0533106c-d07f-43f6-be9e-99473cfa2bd9

📥 Commits

Reviewing files that changed from the base of the PR and between 7a2fd77 and fc67641.

📒 Files selected for processing (1)
  • src/components/settings/index.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/components/settings/index.tsx

Walkthrough

Quick Start設定画面がAIサービス別・音声エンジン別の分岐UIに再編され、AIモデル定義とOpenAI音声既定値が更新されました。関連する依存関係、文言、単体テスト、E2Eテストも合わせて変更されています。

Changes

Quick Startとモデル設定更新

Layer / File(s) Summary
モデル定義と既定値更新
package.json, src/features/constants/aiModels.ts, src/__tests__/features/constants/aiModels.test.ts
@ai-sdk/*ai の依存バージョンが更新され、複数サービス(OpenAI・Anthropic・Google・XAI・Groq・Cohere・MistralAI・Fireworks)のモデル一覧・推論メタ情報・Google検索グラウンディング対象・OpenAI音声既定値(tts-1gpt-4o-mini-audio-preview)が差し替えられ、それに合わせて単体テスト期待値も更新されています。
AIサービス設定UI再編
src/components/settings/quickStart.tsx, src/components/settings/modelProvider.tsx, src/components/settings/modelProvider/ServiceLogo.tsx, locales/ja/translation.json
Quick StartのAI会話設定がサービス別分岐UIへ移行し、サービス選択がListbox化され、getSelectedServiceApiKey/updateSelectedServiceApiKeyでAPIキー処理が整理され、renderQuickAIServiceSettingsで分岐描画され、ServiceLogoservice型がAIServiceへ統一され、説明文も現在の設定内容に合わせて更新されています。
音声エンジン詳細設定と検証
src/components/settings/quickStart.tsx, tests/e2e/settings-modes.spec.ts
aivis_speech選択時の話者一覧取得(/speakers_aivis.json をfetch、isSpeakerOptionで型ガード)、renderQuickVoiceSettingsによる音声エンジン別詳細設定表示、音声選択UIの共通クラス適用が追加され、OpenAI音声モードで使われるモデル名のE2E期待値が新しい既定値に更新されています。

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant QuickStart
  participant SpeakersJson as /speakers_aivis.json
  participant RenderVoice as renderQuickVoiceSettings
  User->>QuickStart: 音声エンジンを選択
  alt aivis_speechが選択された場合
    QuickStart->>SpeakersJson: 話者一覧を fetch
    SpeakersJson-->>QuickStart: speakers JSON を返す
    QuickStart->>QuickStart: isSpeakerOption で抽出
  end
  QuickStart->>RenderVoice: 選択中のエンジンに応じて呼び出し
  RenderVoice-->>QuickStart: エンジン別設定UI を返す
  QuickStart-->>User: 音声設定フォームを更新
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • tegnike/aituber-kit#533: src/components/settings/quickStart.tsxsrc/features/constants/aiModels.tslocales/ja/translation.json の同じ変更領域に直接重なっています。
  • tegnike/aituber-kit#522: Quick Start設定UIの再設計と関連するモデル・設定変更という点で、同じコードパスを扱っています。
  • tegnike/aituber-kit#520: src/features/constants/aiModels.ts と関連テストの更新が共通しており、モデル定義・既定値の変更に直接つながっています。
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning 「Develop => main」というタイトルはブランチのマージを示すメタ情報に過ぎず、このPRの実質的な変更内容(QuickStart機能の拡張、AIモデル定義の更新、UI改善など)を具体的に説明していない。 タイトルを「Enhance quick setup UI with service-specific settings and update AI model definitions」のような、実質的な変更内容を反映した具体的な説明に変更してください。
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/components/settings/quickStart.tsx (1)

158-233: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

APIキー取得/更新ロジックを1箇所に集約してください。

getSelectedServiceApiKeyupdateSelectedServiceApiKey が同じサービス分岐を二重管理しており、サービス追加時に片方だけ更新されると表示と保存が不整合になります。単一マップに寄せると差分漏れを防げます。

♻️ 提案差分
+  const serviceApiKeyAccessors: Partial<
+    Record<AIService, { get: () => string; set: (value: string) => void }>
+  > = {
+    openai: {
+      get: () => modelState.openaiKey,
+      set: (value) => settingsStore.setState({ openaiKey: value }),
+    },
+    anthropic: {
+      get: () => modelState.anthropicKey,
+      set: (value) => settingsStore.setState({ anthropicKey: value }),
+    },
+    google: {
+      get: () => modelState.googleKey,
+      set: (value) => settingsStore.setState({ googleKey: value }),
+    },
+    azure: {
+      get: () => modelState.azureKey,
+      set: (value) => settingsStore.setState({ azureKey: value }),
+    },
+    xai: {
+      get: () => modelState.xaiKey,
+      set: (value) => settingsStore.setState({ xaiKey: value }),
+    },
+    groq: {
+      get: () => modelState.groqKey,
+      set: (value) => settingsStore.setState({ groqKey: value }),
+    },
+    cohere: {
+      get: () => modelState.cohereKey,
+      set: (value) => settingsStore.setState({ cohereKey: value }),
+    },
+    mistralai: {
+      get: () => modelState.mistralaiKey,
+      set: (value) => settingsStore.setState({ mistralaiKey: value }),
+    },
+    perplexity: {
+      get: () => modelState.perplexityKey,
+      set: (value) => settingsStore.setState({ perplexityKey: value }),
+    },
+    fireworks: {
+      get: () => modelState.fireworksKey,
+      set: (value) => settingsStore.setState({ fireworksKey: value }),
+    },
+    deepseek: {
+      get: () => modelState.deepseekKey,
+      set: (value) => settingsStore.setState({ deepseekKey: value }),
+    },
+    openrouter: {
+      get: () => modelState.openrouterKey,
+      set: (value) => settingsStore.setState({ openrouterKey: value }),
+    },
+    dify: {
+      get: () => modelState.difyKey,
+      set: (value) => settingsStore.setState({ difyKey: value }),
+    },
+  }
+
-  const getSelectedServiceApiKey = () => {
-    switch (modelState.selectAIService) {
-      ...
-      default:
-        return ''
-    }
-  }
+  const getSelectedServiceApiKey = () =>
+    serviceApiKeyAccessors[modelState.selectAIService]?.get() ?? ''
 
-  const updateSelectedServiceApiKey = (value: string) => {
-    switch (modelState.selectAIService) {
-      ...
-    }
-  }
+  const updateSelectedServiceApiKey = (value: string) => {
+    serviceApiKeyAccessors[modelState.selectAIService]?.set(value)
+  }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/settings/quickStart.tsx` around lines 158 - 233, The
getSelectedServiceApiKey and updateSelectedServiceApiKey functions contain
duplicate switch statements that map service names to their corresponding API
key fields, creating a maintenance risk where adding a new service requires
updating both functions. Consolidate this logic by creating a single object/map
that maps each service name (openai, anthropic, google, azure, xai, groq,
cohere, mistralai, perplexity, fireworks, deepseek, openrouter, dify) to its
corresponding key field name (openaiKey, anthropicKey, etc.). Then refactor both
getSelectedServiceApiKey and updateSelectedServiceApiKey to use this shared map
to look up and access the appropriate key fields, eliminating the duplicate
switch statements and reducing the risk of inconsistency when adding new
services.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/components/settings/quickStart.tsx`:
- Around line 158-233: The getSelectedServiceApiKey and
updateSelectedServiceApiKey functions contain duplicate switch statements that
map service names to their corresponding API key fields, creating a maintenance
risk where adding a new service requires updating both functions. Consolidate
this logic by creating a single object/map that maps each service name (openai,
anthropic, google, azure, xai, groq, cohere, mistralai, perplexity, fireworks,
deepseek, openrouter, dify) to its corresponding key field name (openaiKey,
anthropicKey, etc.). Then refactor both getSelectedServiceApiKey and
updateSelectedServiceApiKey to use this shared map to look up and access the
appropriate key fields, eliminating the duplicate switch statements and reducing
the risk of inconsistency when adding new services.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e46775c3-ea27-4408-8392-4b0bb51a39af

📥 Commits

Reviewing files that changed from the base of the PR and between e7fc7ed and 7a2fd77.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • locales/ja/translation.json
  • package.json
  • src/__tests__/features/constants/aiModels.test.ts
  • src/components/settings/modelProvider.tsx
  • src/components/settings/modelProvider/ServiceLogo.tsx
  • src/components/settings/quickStart.tsx
  • src/features/constants/aiModels.ts
  • tests/e2e/settings-modes.spec.ts

@tegnike tegnike merged commit 8a282c4 into main Jun 23, 2026
10 checks passed
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