Update OpenAI voice runtime and restore packaged microphone access - #170
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request updates Node.js and macOS build configuration, adds OpenAI voices and model settings, changes OpenAI request parameters, and centralizes handling for ChangesPlatform runtime configuration
OpenAI models and voices
Expected abort handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant OpenAI
participant StreamAdapters
participant ConversationHandlers
participant ConversationStore
OpenAI->>StreamAdapters: Return stream abort error
StreamAdapters->>ConversationHandlers: Classify error
ConversationHandlers->>ConversationStore: Suppress expected abort
ConversationHandlers->>ConversationStore: Log unexpected error
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/services/apiService.ts (1)
801-812: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse model-specific reasoning effort values. The OpenAI model list allows
gpt-5.1,gpt-5.2,gpt-5.4, andgpt-5.5, but these models do not supportminimal; requests can fail. Apply the fix to bothcreateSummarizationResponseandcreateContextAnalysisResponse.🤖 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/services/apiService.ts` around lines 801 - 812, Update the model-specific reasoning configuration in both createSummarizationResponse and createContextAnalysisResponse so gpt-5.1, gpt-5.2, gpt-5.4, and gpt-5.5 use supported effort values instead of minimal. Preserve the existing special handling for gpt-5.6 and ensure all gpt-5 model branches send a valid reasoning effort.
🧹 Nitpick comments (2)
src/modules/conversation/toolCallHandler.ts (2)
79-85: 🎯 Functional Correctness | 🔵 TrivialAdd the
signal.abortedfallback used elsewhere for cancellation handling.
handleToolCallcreates its ownabortControllerat line 64 and passesabortController.signaltocreateOpenAIResponse. The catch blocks at lines 83 and 105 check onlyisExpectedAbortError(error).chatOrchestrator.tsandspeechQueue.tscheck bothabortController.signal.abortedandisExpectedAbortError(error)for the same kind of cancellation.If a provider rethrows a cancellation as an error without the expected
name, this handler falls through todependencies.logErrorand shows an error message during an intentional cancellation. Add the same fallback check for consistency with the other cancellation paths.Also applies to: 98-111
🤖 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/modules/conversation/toolCallHandler.ts` around lines 79 - 85, Update both catch blocks in handleToolCall, including the continuation attempt and response creation error paths, to treat abortController.signal.aborted as cancellation alongside isExpectedAbortError(error). Preserve the existing early-return behavior so intentional cancellations do not reach dependencies.logError or display an error message.
79-111: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMissing
signal.abortedfallback in two cancellation paths that own anAbortController. Both sites create a dedicatedAbortController, pass its signal intocreateOpenAIResponse, and check onlyisExpectedAbortError(error)in the catch block.chatOrchestrator.ts'srunChat(line 457) andspeechQueue.ts'senqueueSpeech(line 46) checksignal.abortedin addition toisExpectedAbortError(error)for the same kind of cancellation, so these two sites are inconsistent with the rest of the cancellation handling this PR introduces.
src/modules/conversation/toolCallHandler.ts#L79-L111: addabortController.signal.aborted ||beforeisExpectedAbortError(error)in the catch blocks at lines 83 and 105.src/stores/conversationStore.ts#L987-L1018: addllmAbortController.value?.signal.aborted ||beforeisExpectedAbortError(error)in the catch block at line 998.🤖 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/modules/conversation/toolCallHandler.ts` around lines 79 - 111, Add the owning AbortController signal-aborted check to the cancellation conditions in the catch blocks at src/modules/conversation/toolCallHandler.ts lines 79-111, covering both the initial and retry continuation paths, before isExpectedAbortError(error). Also update the catch block at src/stores/conversationStore.ts lines 987-1018 to check llmAbortController.value?.signal.aborted before isExpectedAbortError(error), preserving existing handling for non-cancellation errors.
🤖 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.
Inline comments:
In `@build/entitlements.mac.plist`:
- Around line 11-12: Add the mac.extendInfo.NSMicrophoneUsageDescription entry
to the entitlements configuration with a clear microphone-access explanation,
alongside the existing com.apple.security.device.audio-input permission.
---
Outside diff comments:
In `@src/services/apiService.ts`:
- Around line 801-812: Update the model-specific reasoning configuration in both
createSummarizationResponse and createContextAnalysisResponse so gpt-5.1,
gpt-5.2, gpt-5.4, and gpt-5.5 use supported effort values instead of minimal.
Preserve the existing special handling for gpt-5.6 and ensure all gpt-5 model
branches send a valid reasoning effort.
---
Nitpick comments:
In `@src/modules/conversation/toolCallHandler.ts`:
- Around line 79-85: Update both catch blocks in handleToolCall, including the
continuation attempt and response creation error paths, to treat
abortController.signal.aborted as cancellation alongside
isExpectedAbortError(error). Preserve the existing early-return behavior so
intentional cancellations do not reach dependencies.logError or display an error
message.
- Around line 79-111: Add the owning AbortController signal-aborted check to the
cancellation conditions in the catch blocks at
src/modules/conversation/toolCallHandler.ts lines 79-111, covering both the
initial and retry continuation paths, before isExpectedAbortError(error). Also
update the catch block at src/stores/conversationStore.ts lines 987-1018 to
check llmAbortController.value?.signal.aborted before
isExpectedAbortError(error), preserving existing handling for non-cancellation
errors.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 50aee353-9708-4f7c-95e0-6bb4862f8a0b
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (22)
.github/workflows/build.ymlbuild/entitlements.mac.plistelectron-builder.json5electron/main/settingsManager.tspackage.jsonsrc/components/settings/AssistantSettingsTab.vuesrc/components/settings/CoreSettingsTab.vuesrc/components/wizard/OnboardingWizard.vuesrc/modules/conversation/__tests__/chatOrchestrator.test.tssrc/modules/conversation/__tests__/speechQueue.test.tssrc/modules/conversation/__tests__/streamHandler.test.tssrc/modules/conversation/chatOrchestrator.tssrc/modules/conversation/reminderHandler.tssrc/modules/conversation/speechQueue.tssrc/modules/conversation/streamHandler.tssrc/modules/conversation/toolCallHandler.tssrc/services/apiService.tssrc/services/llmProviders/streamAdapters.tssrc/stores/conversationStore.tssrc/stores/generalStore.tssrc/stores/settingsStore.tssrc/utils/isAbortError.ts
Summary
gpt-4o-mini-ttsand expose the current OpenAI voice setgpt-5.6-lunaas the default summarization model while preserving saved user configurationAPIUserAbortErroras an expected cancellation across chat, tool, stream, video, and TTS flowsWhy
The hardened packaged macOS app could initialize VAD but macOS TCC denied microphone capture because the signed bundle lacked
com.apple.security.device.audio-input. Development builds were unaffected, which made the failure appear to be in VAD or STT.The SDK update also changed the user-initiated abort error type, so cancellation handling now recognizes both browser
AbortErrorand OpenAIAPIUserAbortError.Impact
Installed macOS builds can request and receive microphone access, allowing audio to reach VAD and STT. OpenAI TTS uses the newer speech model and voices, and new/default OpenAI summarization configuration uses
gpt-5.6-luna.Validation
npm test— 26 files, 124 tests passednpx vue-tsc --noEmitplutil -lint build/entitlements.mac.plistgit diff --checkcodesign --verify --deep --stricthdiutil verifySummary by CodeRabbit
New Features
Bug Fixes
Tests