mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
test(ai): align merged tests with callable providers
This commit is contained in:
@@ -161,10 +161,10 @@ void explicitAsset
|
||||
ai.image.generate({ model: openaiModel, prompt: "A lighthouse", images: ["AQID"] })
|
||||
// @ts-expect-error Plain source objects must be lifted into `Media.Asset` first.
|
||||
ai.image.generate({ model: openaiModel, prompt: "A lighthouse", images: [{ type: "bytes", data: new Uint8Array() }] })
|
||||
// @ts-expect-error Masks are media assets, not strings.
|
||||
ai.image.generate({
|
||||
model: openaiModel,
|
||||
prompt: "A lighthouse",
|
||||
// @ts-expect-error Masks are media assets, not strings.
|
||||
providerOptions: { mask: "https://example.com/mask.png" },
|
||||
})
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ describe("AI promise client", () => {
|
||||
input: Schema.Struct({ path: Schema.String }),
|
||||
execute: async () => "hello",
|
||||
})
|
||||
const model = openai.chat("gpt-4o-mini")
|
||||
const model = openaiProvider.chat("gpt-4o-mini")
|
||||
|
||||
const looped = await ai.collect(ai.loop({ model, prompt: "Read the file.", tools: [read_file] }))
|
||||
expect(looped.text).toBe("Hello world")
|
||||
|
||||
@@ -69,10 +69,10 @@ Video.start({
|
||||
aspect: "1280:720",
|
||||
providerOptions: { contentModeration: { publicFigureThreshold: "low" }, outputFormat: "future-format" },
|
||||
})
|
||||
// @ts-expect-error Known Runway nested options retain their value kind.
|
||||
Video.start({
|
||||
model: runwayModel,
|
||||
prompt: "Kite",
|
||||
// @ts-expect-error Known Runway nested options retain their value kind.
|
||||
providerOptions: { contentModeration: { publicFigureThreshold: 1 } },
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user