feat(cli): heygen generate defaults images to nano-banana-2.1 (#7591)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
James Russo
2026-11-12 05:28:02 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 245904d55a
commit fc7cb1aad8
6 changed files with 13 additions and 9 deletions
@@ -131,7 +131,7 @@ export default defineCommand({
model: {
type: "string",
description:
"image: nano-banana-2 (default), nano-banana-2.1, gpt-image-2.5, gpt-image-2.6, gpt-image-2.6-flare, minimax-h3-image (2K) or minimax-h3-image-4k",
"image: nano-banana-2.1 (default), nano-banana-2, gpt-image-2.5, gpt-image-2.6, gpt-image-2.6-flare, minimax-h3-image (2K) or minimax-h3-image-4k",
},
bpm: { type: "string", description: "music: tempo, 60–180" },
vocals: {
+4 -4
View File
@@ -134,7 +134,7 @@ describe("generate", () => {
references: [ref],
});
expect(sent[0]!.body).toMatchObject({
model: "nano-banana-2",
model: "nano-banana-2.1",
prompt: "empty room",
reference_images: [{ type: "base64", media_type: "image/jpeg" }],
});
@@ -883,7 +883,7 @@ describe("generate", () => {
} as const;
await expect(
generate(request, undefined, creditsOf(priceOf(request)) ?? undefined),
).rejects.toThrow("this step needs about 111");
).rejects.toThrow("this step needs about 56");
});
it("prices before making", () => {
@@ -930,7 +930,7 @@ describe("generate", () => {
"gpt-image-2.5 at 16:9, about 66 credits (charged on the vendor's bill), with about $0.0125 a reference; vendor price x1.5 on an API key, x1.6545 in HyperFrames credits",
);
expect(priceOf({ type: "image", out: "a.png" }).basis).toBe(
"nano-banana-2, $0.067 an image; vendor price x1.5 on an API key, x1.6545 in HyperFrames credits",
"nano-banana-2.1, $0.0336 an image and $0.00168 a reference; vendor price x1.5 on an API key, x1.6545 in HyperFrames credits",
);
});
@@ -1184,7 +1184,7 @@ describe("generate", () => {
it("keeps a call under the person's credit limit, or refuses it before sending", () => {
const shot = creditsOf(priceOf({ type: "video", out: "a.mp4", seconds: 6 }));
expect(shot).toBe(108);
expect(creditsOf(priceOf({ type: "image", out: "a.png" }))).toBe(111);
expect(creditsOf(priceOf({ type: "image", out: "a.png" }))).toBe(56);
expect(() => checkLimit(shot, 108)).not.toThrow();
expect(() => checkLimit(shot, 30)).toThrow("about 108 credits, over --max-credits 30");
expect(() => checkLimit(null, 30)).toThrow("cannot be priced ahead");
+5 -1
View File
@@ -163,7 +163,11 @@ interface Route extends JobRoute {
type Media = (path: string, kind: "image" | "audio" | "video") => Record<string, unknown>;
const DEFAULTS = { image: "nano-banana-2", video: "heygen-video-1", music: "lyria-3-pro" } as const;
const DEFAULTS = {
image: "nano-banana-2.1",
video: "heygen-video-1",
music: "lyria-3-pro",
} as const;
export const VENDOR_PRICED_IMAGES = new Set([
"gpt-image-2.5",
"gpt-image-2.6",
+1 -1
View File
@@ -76,7 +76,7 @@ export function priceOf(r: GenerateRequest): Price {
switch (r.type) {
case "image": {
const refs = r.references?.length ?? 0;
const model = r.model ?? "nano-banana-2";
const model = r.model ?? "nano-banana-2.1";
if (model === "nano-banana-2") return image(NANO_IMAGE, "nano-banana-2, $0.067 an image");
if (model === "nano-banana-2.1")
return image(
+1 -1
View File
@@ -18,7 +18,7 @@
"files": 13
},
"media-use": {
"hash": "61f2d9d424f6576a",
"hash": "b5430d00ee53f81e",
"files": 125
},
"remotion-to-hyperframes": {
+1 -1
View File
@@ -48,7 +48,7 @@ The file lands at `--out` and the media ledger records it as generated, with the
| Type | Model | Price |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| image | nano-banana-2 (default), or nano-banana-2.1, gpt-image-2.5, gpt-image-2.6, gpt-image-2.6-flare, minimax-h3-image (2K) or minimax-h3-image-4k with `--model` | 1.5x the vendor price on an API key: $0.10 an image; nano-banana-2.1 $0.05 plus $0.0025 a reference; gpt-image about $0.054–0.079 by aspect plus $0.019 a reference; minimax-h3-image $0.0375 (4K $0.105) plus $0.0225 a reference. A plan charges the vendor price x1.6545 in credits; gpt-image and minimax-h3-image are charged on the vendor's bill |
| image | nano-banana-2.1 (default), or nano-banana-2, gpt-image-2.5, gpt-image-2.6, gpt-image-2.6-flare, minimax-h3-image (2K) or minimax-h3-image-4k with `--model` | 1.5x the vendor price on an API key: $0.10 an image; nano-banana-2.1 $0.05 plus $0.0025 a reference; gpt-image about $0.054–0.079 by aspect plus $0.019 a reference; minimax-h3-image $0.0375 (4K $0.105) plus $0.0225 a reference. A plan charges the vendor price x1.6545 in credits; gpt-image and minimax-h3-image are charged on the vendor's bill |
| video | heygen-video-1, 768p | $0.02 a second from a prompt or first frame; $0.05 a second with a reference picture, voice or guide clip, and the guide's seconds count too (1080p costs about twice) |
| lipsync | HeyGen lipsync, speed | 7 credits a second of the video on a plan |
| avatar | talking photo | $4.83 a minute of speech |