Skip to content

feat(capabilities): Merge byoc capabilities with existing capabilities and pricing#3871

Merged
eliteprox merged 3 commits intomasterfrom
feat/merge-external-capabilities
Feb 11, 2026
Merged

feat(capabilities): Merge byoc capabilities with existing capabilities and pricing#3871
eliteprox merged 3 commits intomasterfrom
feat/merge-external-capabilities

Conversation

@eliteprox
Copy link
Collaborator

@eliteprox eliteprox commented Feb 11, 2026

What does this pull request do? Explain your changes. (required)

Merges BYOC external capability pricing into the existing OrchestratorInfo.CapabilitiesPrices response, making BYOC capabilities discoverable through the same gRPC channel used for built-in capabilities like Live Video to Video. This eliminates the need for clients to call a separate HTTP endpoint to discover which BYOC capabilities an orchestrator offers and at what price.

A new Capability_BYOC (37) enum value is used as the capability ID, with the registered BYOC capability name (e.g., "comfystream") placed in the PriceInfo.Constraint field — the same pattern used by LV2V models (capability 35 + constraint = model_id).

Specific updates (required)

  • Added Capability_BYOC = 37 to the capability enum in core/capabilities.go and registered "byoc" in CapabilityNameLookup
  • Enhanced GetCapabilitiesPrices in core/orchestrator.go to iterate over registered external capabilities (ExternalCapabilities.Capabilities) and append a PriceInfo entry for each, using Capability_BYOC as the capability ID and the capability name as the constraint
  • Price resolution follows the existing pattern: looks up per-sender pricing first, falls back to the "default" price, and skips capabilities with no valid price

How did you test each of these updates (required)

  • Tested against the companion Python gateway client (livepeer-python-gateway) which parses capabilities_prices entries with capability 37 to discover BYOC capabilities and construct payment tickets using the same _select_price_info path as LV2V

Does this pull request close any open issues?

No

Checklist:

…g logic

- Introduced Capability_BYOCExternal constant to represent the new BYOC external capability.
- Updated CapabilityNameLookup to include a name for BYOC external capability.
- Enhanced GetCapabilitiesPrices method in orchestrator to append pricing for BYOC external capabilities, ensuring seamless integration with existing pricing logic.
@github-actions github-actions bot added the go Pull requests that update Go code label Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.51619%. Comparing base (f117b44) to head (e386a7b).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/orchestrator.go 70.58824% 3 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3871         +/-   ##
===================================================
+ Coverage   32.47906%   32.51619%   +0.03713%     
===================================================
  Files            170         170                 
  Lines          41673       41690         +17     
===================================================
+ Hits           13535       13556         +21     
+ Misses         27113       27111          -2     
+ Partials        1025        1023          -2     
Files with missing lines Coverage Δ
core/capabilities.go 81.57895% <ø> (ø)
core/orchestrator.go 72.70115% <70.58824%> (-0.05290%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f117b44...e386a7b. Read the comment docs.

Files with missing lines Coverage Δ
core/capabilities.go 81.57895% <ø> (ø)
core/orchestrator.go 72.70115% <70.58824%> (-0.05290%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eliteprox eliteprox changed the title feat(capabilities): Add BYOC external capability and integrate pricin… feat(capabilities): Merge byoc capabilities with existing capabilities and pricing Feb 11, 2026
- Introduced multiple test cases for BYOC external capabilities, including validation of pricing logic and edge cases.
- Implemented tests to ensure correct pricing retrieval for both default and sender-specific scenarios.
- Added checks for handling zero and negative prices, as well as cases with nil external capabilities.
@j0sh
Copy link
Collaborator

j0sh commented Feb 11, 2026

🚢 🇮🇹

- Renamed Capability_BYOCExternal to Capability_BYOC for consistency.
- Updated CapabilityNameLookup and related tests to reflect the new naming.
- Adjusted orchestrator pricing logic to use the updated capability constant.
@eliteprox eliteprox enabled auto-merge (squash) February 11, 2026 05:22
@eliteprox eliteprox disabled auto-merge February 11, 2026 05:29
@eliteprox eliteprox enabled auto-merge (squash) February 11, 2026 05:29
@eliteprox eliteprox merged commit d654ac5 into master Feb 11, 2026
19 of 20 checks passed
@eliteprox eliteprox deleted the feat/merge-external-capabilities branch February 11, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants