feat(remote_signer): emit model_id in create_signed_ticket Kafka events#3947
feat(remote_signer): emit model_id in create_signed_ticket Kafka events#3947eliteprox wants to merge 8 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
This will go in |
5c9ec54 to
e1e784f
Compare
e1e784f to
f533245
Compare
f533245 to
6bad183
Compare
…ng tests - Implemented the ModelIDForCapability method in the Capabilities struct to return the constrained model ID for a given capability, ensuring deterministic results when multiple models are present. - Added unit tests for ModelIDForCapability to cover various scenarios, including nil receivers, no constraints, single constrained models, and handling of ambiguous model cases. - Updated the remote signer to include the model ID in the event payload for LiveVideoToVideo capabilities.
…al resolution - Modified the test for ModelIDForCapability to reflect that multiple models resolve to the lexicographically first ID instead of returning an empty string. - Adjusted the expected output in the test case to return "comfyui" for the Capability_LiveVideoToVideo capability.
- Updated the payment processing logic to include an optional `AuthID` in the `RemotePaymentState` and `authResponse` structures. - Modified the `doPaymentWithStateAndAuthID` function to accept and set the `AuthID` from the request header or callback response. - Added tests to verify the correct handling of `AuthID` in various scenarios, including fallback behavior and error handling when the `AuthID` changes unexpectedly. - Ensured that the `AuthID` is included in the response payload for better tracking and debugging.
Shared livepeerci/build:cache caused PR Docker tags (pr-3947, feat-add-model-id-signer-kafka) to point at an older livepeer binary while metadata listed the PR head SHA. Skip registry cache on pull_request builds and pass GIT_REVISION to bust the compile layer.
82844a9 to
cfe860a
Compare
…ined model ID resolution - Introduced `CapabilityToPipeline` function to convert capabilities to their corresponding pipeline slugs, returning an empty string for unknown capabilities. - Implemented `ConstrainedPipelineModelID` method to return a deterministic pipeline/model ID pair based on per-capability constraints, ensuring lexicographical resolution when multiple capabilities are present. - Added unit tests for both new functions to validate their behavior under various scenarios, including handling of nil capabilities and multiple constraints. - Updated the remote signer to utilize the new constrained pipeline logic for improved payment processing.
…model-id-signer-kafka
|
Clearinghouse is tracking the related work as non-blocking side-tracks (label
|
Summary
Capabilities.ModelIDForCapability()to derive a model ID from per-capability constraintsmodel_idin the remote signercreate_signed_ticketKafka event for LV2V sessionsFixes OpenMeter/billing events showing
model_id: "unknown"when the gateway already sends model constraints in the capabilities protobuf on each/generate-live-paymentrequest.Test plan
go test -tags=mainnet,experimental ./core/ -run TestModelIDForCapabilitycreate_signed_ticketevents include realmodel_idfor LV2V