Repository navigation
refactor(cli): list avatar looks through the generated client - #9224
Queued
jrusso1020 wants to merge 1 commit into
Queued
jrusso1020 wants to merge 1 commit into
jrusso1020 wants to merge 1 commit into
Conversation
The look list was the one HeyGen request the media-use client still wrote by hand. It now goes through the generated call. The request sent, the refusals and the paging are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
miguel-heygen
approved these changes
Dec 1, 2026
miguel-heygen
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed at 06fab81d387d. Clean migration of ownAvatarLooks to HyperframesCloudClient.listAvatarLooks:
- Preserves the
/v3/avatars/lookspath,ownership: "private",limit,tokenpaging, 30s timeout, auth +accept: application/jsonheaders, andfetchExplainednetwork-error wrapping. - Handles non-JSON / empty 2xx responses (
HyperframesApiErrorwith 2xx status orpageOf(undefined)->noList()), 401/403 re-auth hints, and other HTTP refusals consistently with the generated client'srequest()implementation.
Ran vitest run src/heygen src/commands/media-use (10 files, 214/214 passing), and all 69 CI checks including CodeQL are green at head.
jrusso1020
added this pull request to the merge queue
Dec 1, 2026
Any commits made after this event will not be merged.
This branch has not been deployed
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
hyperframes media-uselists a signed-in user's avatar looks through the generated HeyGen client, in place of a hand-built URL and fetch. The request sent and the looks returned are unchanged.Why
The generated client now has this call. Using it means the path and query names come from the API description, so a change there fails the build, not a run.
Related work
Follows #9150 (typed request bodies) and #9153 (the client resync that added the call).
How
Claude Fable 5.2
Changes
packages/cli/src/heygen/avatars.tsonly (+30 -26).fetchPagecallsclient.listAvatarLooks({ ownership: "private", limit, token })with the same 30 second timeout.accept: application/json, andfetchExplainedas its fetch, so a network failure still arrives as the same explained error.Self-review
Read against the generated client's request code. Same as before: path, query names and order, headers, the timeout, paging by
next_token, and the handling of an empty or non-JSON answer with a 2xx status (still "answered its avatars with no list").Two differences, both outside normal use:
Test plan
vitest run src/heygen src/commands/media-useinpackages/cli: 10 files, 214 tests pass, no test edited. The existing tests for this file pin the path,ownership,limit, the key header, paging to the limit, the sign-in refusal and the network failure text.tsc --noEmitforpackages/cli: clean.oxlint,oxfmt --checkand the comment check: clean.Not run against the live API.
Unit tests added/updated (no behaviour change; existing tests cover it)
Manual testing performed
Documentation updated (if applicable)
Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug
Authored by Rames (api-platform).
🤖 Generated with Claude Code