Skip to content

Commit bcc1c29

Browse files
author
Zoo (VP)
committed
test(vertex): cover mixed-case unknown gemini model id
1 parent 71540ab commit bcc1c29

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎src/api/providers/__tests__/vertex.spec.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,21 @@ describe("VertexHandler", () => {
290290
expect(modelInfo.info.cacheWritesPrice).toBeUndefined()
291291
expect(modelInfo.info.tiers).toBeUndefined()
292292
})
293+
294+
it("should match a mixed-case unknown gemini-* id case-insensitively and keep the configured casing", () => {
295+
const testHandler = new VertexHandler({
296+
apiModelId: "Gemini-9.9-flash-exp",
297+
vertexProjectId: "test-project",
298+
vertexRegion: "us-central1",
299+
})
300+
301+
const modelInfo = testHandler.getModel()
302+
expect(modelInfo.id).toBe("Gemini-9.9-flash-exp")
303+
expect(modelInfo.info.inputPrice).toBeUndefined()
304+
expect(modelInfo.info.outputPrice).toBeUndefined()
305+
expect(modelInfo.info.cacheReadsPrice).toBeUndefined()
306+
expect(modelInfo.info.cacheWritesPrice).toBeUndefined()
307+
expect(modelInfo.info.tiers).toBeUndefined()
308+
})
293309
})
294310
})

0 commit comments

Comments
 (0)