Sfoglia il codice sorgente

fix: show reasoning summaries for gemini models (#4491)

Co-authored-by: Copilot <[email protected]>
Tommy D. Rossi 3 mesi fa
parent
commit
9de1242d9b
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10 0
      packages/opencode/src/provider/transform.ts

+ 10 - 0
packages/opencode/src/provider/transform.ts

@@ -141,6 +141,12 @@ export namespace ProviderTransform {
       result["promptCacheKey"] = sessionID
       result["promptCacheKey"] = sessionID
     }
     }
 
 
+    if (providerID === "google") {
+      result["thinkingConfig"] = {
+        includeThoughts: true,
+      }
+    }
+
     if (modelID.includes("gpt-5") && !modelID.includes("gpt-5-chat")) {
     if (modelID.includes("gpt-5") && !modelID.includes("gpt-5-chat")) {
       if (modelID.includes("codex")) {
       if (modelID.includes("codex")) {
         result["store"] = false
         result["store"] = false
@@ -178,6 +184,10 @@ export namespace ProviderTransform {
         return {
         return {
           ["anthropic" as string]: options,
           ["anthropic" as string]: options,
         }
         }
+      case "@ai-sdk/google":
+        return {
+          ["google" as string]: options,
+        }
       case "@ai-sdk/gateway":
       case "@ai-sdk/gateway":
         return {
         return {
           ["gateway" as string]: options,
           ["gateway" as string]: options,