refactor(core): simplify model requests

This commit is contained in:
Dax Raad 2026-06-24 10:51:41 -04:00
commit 17f312d537
21 changed files with 56 additions and 685 deletions

View file

@ -150,15 +150,12 @@ describe("OpencodePlugin", () => {
cost: [{ input: 1, output: 2, cache: { read: 0.1, write: 0 } }],
limit: { context: 1000, output: 100 },
})
expect(model.request).toMatchObject({ body: { custom: "value" }, generation: { temperature: 0.5 } })
expect(model.request.body).toEqual({ custom: "value" })
expect(model.request.body).toEqual({ custom: "value", temperature: 0.5 })
expect(model.variants).toEqual([
{
id: ModelV2.VariantID.make("high"),
headers: {},
body: {},
generation: { temperature: 0.2 },
options: {},
body: { temperature: 0.2 },
},
])
expect(