Repository navigation
codegen: resync gen/ from EF 2bb39f6a - #512
Conversation
Command surface: 7 existing command(s) changedChanged — these already existed, so a change can break existing calls.
|
|
Pushed 234b1fa to fix CI:
The govulncheck failure is the Go standard-library issue that also fails on main. #513 fixes it, so this PR needs a rebase after #513 merges. 🤖 Generated with Claude Code |
jrusso1020
left a comment
There was a problem hiding this comment.
Approve. I checked every new and changed example body against openapi/external-api.json at EF 2bb39f6a:
sts create:CreateSpeechConversionRequest.audiois a single discriminatedAssetUrl | AssetId | AssetBase64object (not an array), andvoice_idis required. Both examples send oneaudioobject plus--voice-id.--remove-background-noiseand--idempotency-keyexist as generated flags. The "instant voices" wording matches the endpoint description, which says professional clones are not supported.voices create: the body isanyOf[CreateModelAudioVoiceRequest (mode=professional), CreateInstantAudioVoiceRequest (mode=instant)], and both takeaudioas a list (1 to 10 items). The instant example setsmode,nameandaudio, which are exactly the instant variant's required fields. The professional example setsmodeandaudio(both required) plus optionalnameandlanguage. The retrain example setsmode=professionalplusvoice_id, which only the professional variant accepts. So the move into-dis correct now that those flags are gone.images create:modelis the constheygen-image-1, andidentity_imagesandreference_imagesare both required arrays (reference_imagesallows at most 1 item, and both examples send 1).num_images4 is within the 1 to 5 range, and9:16is in the aspect-ratio enum.- Dropped
video-translate caption getexample: the/captionpath is absent from the spec, and no caption command exists ingen/on main either, so it was already an orphan.
govulncheck is red here only because of the Go 1.25 stdlib advisories that #513 fixes. Land #513 first, then rebase this.
Need · Size · Reuse · Simpler: needed (prod spec drift), mostly generated code with 18 lines of hand-written examples, reuses the codegen pipeline, nothing simpler.
— Rames
Add examples for model audio sts create, model images create and model images get. Move the voices create examples into -d, since this spec drops its --name/--language/--mode/--voice-id flags, and add an instant voice example. Drop the video-translate caption get example, whose endpoint left the spec. Regenerating gen/ also repairs a corrupted em dash in gen/video.go. Co-Authored-By: Claude Opus 5.5 <[email protected]>
234b1fa to
43f0505
Compare
terencechotai2-commits
left a comment
There was a problem hiding this comment.
Post-merge review at 43f05052 (merged as ca6cd13 with an identical tree). The examples are correct. One item for the next release: the voices create flag removal breaks scripts written against v0.9.0/v0.10.0. It's declared in the PR body and the surface report, but it needs to land in the release notes.
Example bodies vs EF 2bb39f6a (the part you flagged)
- I built the CLI at this head and ran every
model.yamlexample against a capture stub. - I then validated each captured body with jsonschema (Draft 2020-12) against
openapi/external-api.jsonat2bb39f6a. - All 13 POST bodies are valid:
sts create×2:audiois one object. The second example sendsremove_background_noise: trueand theIdempotency-Keyheader.voices create×3:- instant (
audiois a one-item list, asmaxItems: 1requires); - professional new, with
name(EF's validator requires it withoutvoice_id); - professional retrain, with
voice_id.
- instant (
images create×2, plus the tts and videos examples.
- Negative controls, each rejected by the same validator:
stswithaudioas a list;- an instant voice with
audioas an object; - an instant voice with two recordings;
- a voice with no
mode; - images with two
reference_images.
- The three GETs hit the right paths. The
voices deleteexample still needs--forcenon-interactively, as on main.
Command surface. Main's gen/ has 114 commands; this head has 117, the three new ones. Nothing is removed. video-translate caption get was already gone from main's gen/, so dropping its example is just cleanup.
Caller impact: model audio voices create
--name,--language,--modeand--voice-idshipped in v0.9.0 and v0.10.0 (from #364) and are visible in--help. v0.10.0's own example was--name 'Narrator' --language en --mode professional -d '{"audio":[…]}'.- With this build, that invocation exits 2 with
unknown flag: --name. The same fields in-dwork. - RELEASE.md step 4 covers this: the next release needs a Breaking changes entry and a minor bump.
changelog-clifiles a resync under Internal, so it won't surface on its own. - Possible follow-up: these flags went away because the request is now a
mode-discriminated union.name,languageandmodeexist in both variants, so codegen could keep flattening fields shared by every variant.
Related upstream break, already live and outside this PR: EF#56126 (2026-10-09) made mode required. v0.10.0's "retrain" example (--voice-id <id> -d '{"audio":[…]}', no --mode) is now rejected by the API. Worth the same release note.
Run locally: go test ./... at this head, all packages pass. CI: every check passed.
— tai2
|
Correction to my review above: the example run sent 12 POST bodies (tts 2, sts 2, voices 3, images 2, videos 3), not 13. All 12 are valid against — tai2 |
Auto-generated PR: a production deploy shipped an updated OpenAPI spec. This PR contains the CLI command definitions regenerated from the now-live prod spec in
gen/.What changed
New commands
heygen model audio sts create--POST /v3/models/audio/stsheygen model images create--POST /v3/models/imagesheygen model images get--GET /v3/models/images/{generation_id}Changed commands
heygen model audio tts create: added--end-user-id,--expressiveness-boost,--model,--with-timestamps;--languagenow optionalheygen model audio voices create: removed--language,--mode,--name,--voice-idheygen model audio voices list: added--typeheygen voice speech create:--engineacceptsheygen_voiceheygen webhook endpoints create:--eventsacceptsvideo_generation.fail,video_generation.successheygen webhook endpoints update:--eventsacceptsvideo_generation.fail,video_generation.successheygen webhook events list:--event-typeacceptsvideo_generation.fail,video_generation.successPublic command surface only; commands hidden from
--helpare not listed.Compared against heygen-cli
mainat517c3f4f792b7cdd2d4ec613bb3256114da3b54f.If CI fails (e.g. missing examples), fix the issue and push to this branch.
Source commit: 2bb39f6a68b79ea24c194146b3242a8591b9f865
Triggered by: https://github.com/heygen-com/experiment-framework/commit/2bb39f6a68b79ea24c194146b3242a8591b9f865