Support to override the billing scope for the remote playback option#42
Merged
pragmatrix merged 1 commit intomasterfrom Jun 17, 2025
Merged
Support to override the billing scope for the remote playback option#42pragmatrix merged 1 commit intomasterfrom
pragmatrix merged 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for an optional billing scope that can be overridden for remote playback, ensuring billing records can attribute charges correctly.
- Extend protocol and core types to carry
billing_scopethrough events - Update context switch and services to unpack and (partially) forward
billing_scope - Revise examples to initialize the new field
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/protocol.rs | Added billing_scope to ClientEvent::Text |
| src/context_switch.rs | Unpack and forward billing_scope in ClientEvent::Text handler |
| services/playback/src/lib.rs | Map billing_scope in playback service (currently hardcoded None) |
| services/azure/src/synthesize.rs | Updated pattern match to accept extra fields (..) |
| services/aristech/src/synthesize.rs | Simplified pattern match using .. |
| examples/azure-synthesize.rs | Initialize billing_scope: None |
| examples/aristech-synthesize.rs | Initialize billing_scope: None |
| core/src/conversation.rs | Added billing_scope to Input::Text |
Comments suppressed due to low confidence (2)
core/src/conversation.rs:281
- [nitpick] Consider adding a doc comment for the new
billing_scopefield inInput::Textto explain its purpose and how consumers should use it.
billing_scope: Option<String>,
src/protocol.rs:51
- There are no tests covering the new
billing_scopefunctionality. Consider adding unit or integration tests to verify that overrides flow correctly through the system.
billing_scope: Option<String>,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For situations in which no billing scope is used, it's useful to override it, specifically for remote playbacks which may be billed depending what's being played back.