mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-21 05:10:58 +08:00
fix: ensure azure has store = true by default (#22764)
This commit is contained in:
@@ -793,6 +793,10 @@ export function options(input: {
|
||||
result["store"] = false
|
||||
}
|
||||
|
||||
if (input.model.api.npm === "@ai-sdk/azure") {
|
||||
result["store"] = true
|
||||
}
|
||||
|
||||
if (input.model.api.npm === "@openrouter/ai-sdk-provider") {
|
||||
result["usage"] = {
|
||||
include: true,
|
||||
|
||||
@@ -100,6 +100,24 @@ describe("ProviderTransform.options - setCacheKey", () => {
|
||||
})
|
||||
expect(result.store).toBe(false)
|
||||
})
|
||||
|
||||
test("should set store=true for azure provider by default", () => {
|
||||
const azureModel = {
|
||||
...mockModel,
|
||||
providerID: "azure",
|
||||
api: {
|
||||
id: "gpt-4",
|
||||
url: "https://azure.com",
|
||||
npm: "@ai-sdk/azure",
|
||||
},
|
||||
}
|
||||
const result = ProviderTransform.options({
|
||||
model: azureModel,
|
||||
sessionID,
|
||||
providerOptions: {},
|
||||
})
|
||||
expect(result.store).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe("ProviderTransform.options - zai/zhipuai thinking", () => {
|
||||
|
||||
Reference in New Issue
Block a user