fix: add xhigh reasoning effort for GitHub Copilot GPT-5 models (#10092)

Co-authored-by: Arthur Freitas Ramos <arthur@MacBook-Air-de-Arthur.local>
This commit is contained in:
Arthur
2026-01-24 02:09:47 -03:00
committed by GitHub
parent af5e405391
commit cf7e10c4e8
2 changed files with 101 additions and 1 deletions

View File

@@ -349,8 +349,12 @@ export namespace ProviderTransform {
return Object.fromEntries(OPENAI_EFFORTS.map((effort) => [effort, { reasoningEffort: effort }]))
case "@ai-sdk/github-copilot":
const copilotEfforts = iife(() => {
if (id.includes("5.1-codex-max") || id.includes("5.2")) return [...WIDELY_SUPPORTED_EFFORTS, "xhigh"]
return WIDELY_SUPPORTED_EFFORTS
})
return Object.fromEntries(
WIDELY_SUPPORTED_EFFORTS.map((effort) => [
copilotEfforts.map((effort) => [
effort,
{
reasoningEffort: effort,