Skip to content

Conversation

@pragmatrix
Copy link
Owner

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.

@pragmatrix pragmatrix requested a review from Copilot June 17, 2025 16:43
@pragmatrix pragmatrix marked this pull request as ready for review June 17, 2025 16:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_scope through 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_scope field in Input::Text to 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_scope functionality. Consider adding unit or integration tests to verify that overrides flow correctly through the system.
 billing_scope: Option<String>, 
@pragmatrix pragmatrix merged commit 7a188b6 into master Jun 17, 2025
6 checks passed
@pragmatrix pragmatrix deleted the override-billing-scope branch June 17, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants