feat: adds support for agent mip_opt_out#421
Conversation
WalkthroughA new optional boolean property, Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite as Test Suite
participant Client as AgentLiveClient
participant MockConn as Mock Connection
TestSuite->>Client: configure({ agent: { mip_opt_out: true/false/omitted } })
Client->>MockConn: send(JSON.stringify({ settings: { agent: { mip_opt_out: ... } } }))
MockConn-->>Client: ack
Client-->>TestSuite: configuration processed
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #421 +/- ##
=======================================
Coverage 75.13% 75.13%
=======================================
Files 26 26
Lines 1150 1150
Branches 291 291
=======================================
Hits 864 864
Misses 286 286 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PR Summary: Add
mip_opt_outAgent Settings Support🚀 TL;DR
Added
mip_opt_out: booleanfield to Agent configuration schema, allowing users to opt out of Deepgram Model Improvement Program. Fully tested with 3 new unit tests, all 229 tests passing, no breaking changes.📋 What Changed
Files Modified:
src/lib/types/AgentLiveSchema.ts- Addedmip_opt_out?: booleanfield to agent configurationtests/unit/live-client-message-handling.test.ts- Added 3 comprehensive unit testsNew Feature:
mip_opt_out: trueto their agent configuration to opt out of the Deepgram Model Improvement Programfalseper API spec)🎯 Why This Change
Per API specification requirements, agents need the ability to opt out of the Deepgram Model Improvement Program. This change implements the missing
mip_opt_outsetting in the JavaScript SDK to match the API capabilities.🔧 Implementation Details
Schema Addition:
Usage Example:
✅ Testing
New Unit Tests Added:
should accept mip_opt_out as true- Validatesmip_opt_out: trueconfigurationshould accept mip_opt_out as false- Validatesmip_opt_out: falseconfigurationshould work without mip_opt_out (default behavior)- Validates optional field behaviorTest Results:
🔍 Validation Performed
agent.configure()properly handles new fieldTypes of changes
What types of changes does your code introduce to the community JavaScript SDK?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Summary by CodeRabbit
New Features
Tests