fix(opencode): gate reasoning summaries by provider (#30973)
This commit is contained in:
@@ -1110,7 +1110,14 @@ export function options(input: {
|
||||
if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) {
|
||||
if (!input.model.api.id.includes("gpt-5-pro")) {
|
||||
result["reasoningEffort"] = "medium"
|
||||
result["reasoningSummary"] = "auto"
|
||||
if (
|
||||
input.model.api.npm === "@ai-sdk/openai" ||
|
||||
input.model.api.npm === "@ai-sdk/azure" ||
|
||||
input.model.api.npm === "@ai-sdk/github-copilot" ||
|
||||
input.model.api.npm === "@ai-sdk/amazon-bedrock/mantle"
|
||||
) {
|
||||
result["reasoningSummary"] = "auto"
|
||||
}
|
||||
if (input.model.api.npm === "@ai-sdk/openai" || input.model.api.npm === "@ai-sdk/amazon-bedrock/mantle") {
|
||||
result["include"] = INCLUDE_ENCRYPTED_REASONING
|
||||
}
|
||||
|
||||
@@ -89,6 +89,13 @@ export const prepare = Effect.fn("LLMRequestPrep.prepare")(function* (input: Pre
|
||||
providerOptions: input.provider.options,
|
||||
})
|
||||
const options = mergeOptions(mergeOptions(mergeOptions(base, input.model.options), input.agent.options), variant)
|
||||
if (
|
||||
input.model.api.npm === "@ai-sdk/azure" &&
|
||||
(input.provider.options.useCompletionUrls || input.model.options.useCompletionUrls || options.useCompletionUrls)
|
||||
) {
|
||||
delete options.reasoningSummary
|
||||
delete options.include
|
||||
}
|
||||
if (isOpenaiOauth) options.instructions = system.join("\n")
|
||||
|
||||
const messages =
|
||||
|
||||
Reference in New Issue
Block a user