mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-16 11:52:26 +03:00
fix(models): hide unsupported Gemini Live discovery (#11710)
Obrigado! Validado em lote combinado (8 PRs, release/v3.8.51): - Follow-up correto de #10590/#10591 — omite modelos Gemini Live-only da descoberta dinâmica, preserva chat para modelos híbridos. - Teste focado atualizado: `tests/unit/gemini-models-parser.test.ts` — 6/6 verde. - Gates estáticos do lote OK (typecheck, lint sem regressão, complexity, cognitive, file-size, changelog-integrity).
This commit is contained in:
@@ -72,14 +72,21 @@ test("parseGeminiModelsList maps generateContent image models to the chat endpoi
|
||||
assert.deepEqual(proImage!.supportedEndpoints, ["chat"]);
|
||||
});
|
||||
|
||||
test("parseGeminiModelsList maps embedContent and bidiGenerateContent", () => {
|
||||
test("parseGeminiModelsList maps embeddings without advertising unsupported Gemini Live", () => {
|
||||
const models = parseGeminiModelsList(SAMPLE);
|
||||
assert.deepEqual(models.find((m) => m.id === "text-embedding-004")!.supportedEndpoints, [
|
||||
"embeddings",
|
||||
]);
|
||||
assert.deepEqual(models.find((m) => m.id === "gemini-live-2.5-flash")!.supportedEndpoints, [
|
||||
"audio",
|
||||
]);
|
||||
assert.equal(models.some((m) => m.id === "gemini-live-2.5-flash"), false);
|
||||
const [hybrid] = parseGeminiModelsList({
|
||||
models: [
|
||||
{
|
||||
name: "models/gemini-live-hybrid",
|
||||
supportedGenerationMethods: ["generateContent", "bidiGenerateContent"],
|
||||
},
|
||||
],
|
||||
});
|
||||
assert.deepEqual(hybrid.supportedEndpoints, ["chat"]);
|
||||
});
|
||||
|
||||
test("parseGeminiModelsList maps Veo predictLongRunning models to the videos endpoint", () => {
|
||||
|
||||
Reference in New Issue
Block a user