Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

fix: use gemini-3.7-flash-openai as sole Gemini model

rpone652036da0922
diff --git a/packages/gemini/README.md b/packages/gemini/README.md
index e69db86e..ace6d091 100644
--- a/packages/gemini/README.md
+++ b/packages/gemini/README.md
@@ -7,7 +7,7 @@ audio Artifact references. The model package owns the semantic request and exact
the selected Runtime Endpoint owns credentials, uploads and the service-specific wire format.
```xml
-<gemini:Generate id="describe" model="gemini-3.7-flash"
+<gemini:Generate id="describe" model="gemini-3.7-flash-openai"
instruction={instruction} prompt={prompt}>
<gemini:Reference media={reference-video}/>
</gemini:Generate>
diff --git a/packages/gemini/src/manifest.ts b/packages/gemini/src/manifest.ts
index 2fba2147..dfd03002 100644
--- a/packages/gemini/src/manifest.ts
+++ b/packages/gemini/src/manifest.ts
@@ -4,7 +4,7 @@ import { textDependency, textTypes } from "@hypit/text";
export const geminiModuleRef = { name: "@hypit/gemini", version: "1" } as const;
-export const geminiModels = ["gemini-3.1-pro-preview", "gemini-3.7-flash"] as const;
+export const geminiModels = ["gemini-3.7-flash-openai"] as const;
export type GeminiModel = typeof geminiModels[number];
export const geminiTypes = {
@@ -48,7 +48,7 @@ export const geminiMarkupSurfaces = [{
summary: "Selects the media Artifact Gemini reads." }] }],
ports: [{ name: "text", type: textTypes.text,
summary: "The generated answer, addressed as `<id>.text`." }],
- example: `<gemini:Generate id="describe" model="gemini-3.7-flash" instruction={instruction} prompt={prompt}>
+ example: `<gemini:Generate id="describe" model="gemini-3.7-flash-openai" instruction={instruction} prompt={prompt}>
<gemini:Reference media={reference-video}/>
</gemini:Generate>`,
notes: [
diff --git a/packages/gemini/test/surface.test.ts b/packages/gemini/test/surface.test.ts
index 6e8d61fc..bc6ecbc3 100644
--- a/packages/gemini/test/surface.test.ts
+++ b/packages/gemini/test/surface.test.ts
@@ -12,7 +12,7 @@ test("Gemini Surface builds one provider-neutral need with ordered media edges",
element: {
kind: "element", name: "gemini:Generate",
attributes: {
- id: "read", model: "gemini-3.7-flash",
+ id: "read", model: "gemini-3.7-flash-openai",
instruction: { kind: "reference", path: "instruction" },
prompt: { kind: "reference", path: "prompt" },
},
@@ -34,6 +34,6 @@ test("Gemini Surface builds one provider-neutral need with ordered media edges",
});
assert.equal(fragmentResult.fragments.length, 1);
const operation = fragmentResult.fragments[0]!.operations.find((item) => item.id === "generate");
- assert.deepEqual(operation?.producer, { module: geminiCapabilities["gemini-3.7-flash"].module, name: "request-gemini-3.7-flash" });
+ assert.deepEqual(operation?.producer, { module: geminiCapabilities["gemini-3.7-flash-openai"].module, name: "request-gemini-3.7-flash-openai" });
assert.deepEqual(fragmentResult.components[0]?.outputs, { text: "read.text" });
});
diff --git a/packages/provider-hypihub/src/gemini.ts b/packages/provider-hypihub/src/gemini.ts
index 99d8e87a..0c88be53 100644
--- a/packages/provider-hypihub/src/gemini.ts
+++ b/packages/provider-hypihub/src/gemini.ts
@@ -70,7 +70,7 @@ export function createHypiHubGeminiGenerator(options: HypiHubGeminiGeneratorOpti
const baseUrl = (options.baseUrl ?? "https://hypit.ai")
.replace(/\/(?:v1beta|v1)\/?$/iu, "")
.replace(/\/$/u, "");
- const model = options.model?.trim() || "gemini-3.1-pro-preview";
+ const model = options.model?.trim() || "gemini-3.7-flash-openai";
const timeout = options.requestTimeoutMs ?? 120_000;
const maxRateLimitRetries = options.maxRateLimitRetries ?? 3;
assert(Number.isSafeInteger(maxRateLimitRetries) && maxRateLimitRetries >= 0,
diff --git a/packages/provider-hypihub/test/gemini.test.ts b/packages/provider-hypihub/test/gemini.test.ts
index ef619403..36179992 100644
--- a/packages/provider-hypihub/test/gemini.test.ts
+++ b/packages/provider-hypihub/test/gemini.test.ts
@@ -9,7 +9,7 @@ test("HypiHub Gemini uses native wire format for text, image and video parts", a
let uploads = 0;
const generate = createHypiHubGeminiGenerator({
apiKey: "test-key",
- model: "gemini-3.7-flash",
+ model: "gemini-3.7-flash-openai",
baseUrl: "https://hypit.ai/v1",
fetch: async (input, init) => {
seenUrl = String(input);
@@ -29,7 +29,7 @@ test("HypiHub Gemini uses native wire format for text, image and video parts", a
{ inlineData: { mimeType: "image/png", data: "aW1hZ2U=" } },
{ inlineData: { mimeType: "video/mp4", data: "dmlkZW8=" } },
] }), "OK");
- assert.equal(seenUrl, "https://hypit.ai/v1beta/models/gemini-3.7-flash:generateContent");
+ assert.equal(seenUrl, "https://hypit.ai/v1beta/models/gemini-3.7-flash-openai:generateContent");
assert.equal(uploads, 2);
assert.deepEqual(seenBody?.contents, [{ role: "user", parts: [
{ text: "inspect" },
diff --git a/packages/provider-hypihub/test/provider.test.ts b/packages/provider-hypihub/test/provider.test.ts
index e640c986..ee1a0528 100644
--- a/packages/provider-hypihub/test/provider.test.ts
+++ b/packages/provider-hypihub/test/provider.test.ts
@@ -123,7 +123,7 @@ test("HypiHub fulfills Gemini through the Runtime endpoint and uploads every med
const video = await artifacts.put(new Uint8Array([4, 5, 6]), "video/mp4");
const request: Need = {
id: "need:hypihub-gemini",
- capability: geminiCapabilities["gemini-3.7-flash"],
+ capability: geminiCapabilities["gemini-3.7-flash-openai"],
returns: textTypes.text,
constraints: sealGeminiRequest({
instruction: "Answer briefly.", prompt: "Inspect both references.",
diff --git a/packages/provider-vertex/README.md b/packages/provider-vertex/README.md
index 398de16c..97d14a50 100644
--- a/packages/provider-vertex/README.md
+++ b/packages/provider-vertex/README.md
@@ -11,6 +11,6 @@ import { createVertexGeminiGenerator } from "@hypit/provider-vertex";
const generate = createVertexGeminiGenerator({
project: process.env.GOOGLE_CLOUD_PROJECT!,
credentials: process.env.GOOGLE_APPLICATION_CREDENTIALS_JSON!,
- model: "gemini-3.1-pro-preview",
+ model: "gemini-3.7-flash-openai",
});
```
diff --git a/packages/provider-vertex/src/gemini.ts b/packages/provider-vertex/src/gemini.ts
index 3d07d84d..73c793d0 100644
--- a/packages/provider-vertex/src/gemini.ts
+++ b/packages/provider-vertex/src/gemini.ts
@@ -29,7 +29,7 @@ function parseCredentials(value: Record<string, unknown> | string): Record<strin
export function createVertexGeminiGenerator(options: VertexGeminiGeneratorOptions) {
const project = options.project.trim();
assert(project.length > 0, "Vertex project is empty");
- const model = options.model?.trim() || "gemini-3.1-pro-preview";
+ const model = options.model?.trim() || "gemini-3.7-flash-openai";
const client = new GoogleGenAI({
vertexai: true,
project,
diff --git a/packages/provider-vertex/test/provider.test.ts b/packages/provider-vertex/test/provider.test.ts
index a15f5b84..77471844 100644
--- a/packages/provider-vertex/test/provider.test.ts
+++ b/packages/provider-vertex/test/provider.test.ts
@@ -15,7 +15,7 @@ test("Vertex Runtime provider exposes the same provider-neutral Gemini capabilit
credentials: credentialRef("env", "GOOGLE_APPLICATION_CREDENTIALS_JSON"),
});
await provider.install(registry);
- for (const model of ["gemini-3.1-pro-preview", "gemini-3.7-flash"] as const) {
+ for (const model of ["gemini-3.7-flash-openai"] as const) {
const resolution = registry.resolve({
id: `need:${model}`,
capability: geminiCapabilities[model],
diff --git a/packages/reference-video-tools/README.md b/packages/reference-video-tools/README.md
index a07c6993..80d61e66 100644
--- a/packages/reference-video-tools/README.md
+++ b/packages/reference-video-tools/README.md
@@ -137,5 +137,5 @@ Gemini uses `HYPIT_GEMINI_PROVIDER=auto|hypihub|vertex` to select its backend. T
provided by `@hypit/provider-hypihub` and `@hypit/provider-vertex`. HypiHub uses
`HYPIHUB_API_KEY` and optional `HYPIHUB_BASE_URL` (default `https://hypit.ai`); Vertex uses the
existing `GOOGLE_CLOUD_PROJECT`, `GOOGLE_APPLICATION_CREDENTIALS_JSON` and optional
-`GOOGLE_CLOUD_LOCATION`. The model defaults to `gemini-3.1-pro-preview`. A missing or insufficient
+`GOOGLE_CLOUD_LOCATION`. The model defaults to `gemini-3.7-flash-openai`. A missing or insufficient
user key should be resolved by obtaining a HypiHub key at https://hypit.ai, not by changing Source.
diff --git a/packages/reference-video-tools/src/tools.ts b/packages/reference-video-tools/src/tools.ts
index 057036ba..35bf40d1 100644
--- a/packages/reference-video-tools/src/tools.ts
+++ b/packages/reference-video-tools/src/tools.ts
@@ -1392,7 +1392,7 @@ export function createReferenceVideoTools(options: ToolOptions = {}): ReferenceV
...(projectPackageDirectories.length === 0 && expected.size === 0 ? { note: "no project-owned packages declared" } : {}),
};
}
- const model = options.model ?? process.env.GEMINI_MODEL?.trim() ?? "gemini-3.1-pro-preview";
+ const model = options.model ?? process.env.GEMINI_MODEL?.trim() ?? "gemini-3.7-flash-openai";
// Pacing is deployment policy, not author intent: it depends on the quota behind the credentials,
// which the calling agent has no way to know. It is settable here and through the environment, and
// deliberately not through a CLI flag.