fix(media-use): tag avatar-video heygen recipes with X-HeyGen-Client-Source#2391
Merged
Merged
Conversation
…Source The agent-driven video recipes (heygen video create) went out untagged, so media-use avatar / image-to-video usage landed as generic cli traffic and wasn't attributable to media-use. Add --headers "X-HeyGen-Client-Source: media-use" to the generating recipes (persistent flag, allowlisted by the CLI) so those videos carry client_source in master_video_table meta and show up in the API dashboards alongside the TTS path (#2365) and CLI (#2368).
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.
What
Add
--headers "X-HeyGen-Client-Source: media-use"to the generatingheygen video createrecipes inskills/media-use/references/operations.md(avatar video + image-to-video), plus a note requiring it on any generatingheygencommand.Why
media-use's avatar-video path is agent-driven — the skill instructs the agent to run
heygen video createdirectly (no wrapper script). Those recipes went out untagged, so media-use avatar / image-to-video usage landed inmaster_video_tableas genericcli:<agent>traffic with noclient_source— i.e. not attributable to media-use, and invisible to a media-use dashboard slice. This closes that gap so avatar-video free usage is measured alongside TTS (#2365) and the CLI (#2368).How
--headers "X-HeyGen-Client-Source: media-use"on bothheygen video createrecipes. It's the CLI's allowlisted attribution header and a persistent flag, so it works on every subcommand and can't override the reservedX-HeyGen-Sourcefree-gate header.video create/avatar create/video-translate; read-only discovery (avatar list,voice list) is explicitly exempt.Test plan
Pairs with
Backend persistence #41968 (allowlist already includes the values); once merged, tagged avatar videos carry
client_source=media-useinmaster_video_table.metadata, queryable viamvt.metadata:client_sourcein API Dashboard V3.