opencode-agent[bot] 2 месяцев назад
Родитель
Сommit
0e88dd99e7

+ 1 - 2
packages/opencode/src/config/provider.ts

@@ -91,8 +91,7 @@ export const Info = Schema.Struct({
         }),
         timeout: Schema.optional(
           Schema.Union([PositiveInt, Schema.Literal(false)]).annotate({
-            description:
-              "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout.",
+            description: "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout.",
           }),
         ).annotate({
           description: "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout.",

+ 7 - 1
packages/opencode/test/provider/header-timeout.test.ts

@@ -17,7 +17,13 @@ afterEach(async () => {
 })
 
 const it = testEffect(
-  Layer.mergeAll(Provider.defaultLayer, Env.defaultLayer, Plugin.defaultLayer, TestLLMServer.layer, CrossSpawnSpawner.defaultLayer),
+  Layer.mergeAll(
+    Provider.defaultLayer,
+    Env.defaultLayer,
+    Plugin.defaultLayer,
+    TestLLMServer.layer,
+    CrossSpawnSpawner.defaultLayer,
+  ),
 )
 
 it.live("headerTimeout does not abort delayed SSE body after headers arrive", () =>

+ 14 - 1
packages/sdk/openapi.json

@@ -13588,7 +13588,20 @@
                     "enum": [false]
                   }
                 ],
-                "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
+                "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
+              },
+              "headerTimeout": {
+                "anyOf": [
+                  {
+                    "type": "integer",
+                    "exclusiveMinimum": 0
+                  },
+                  {
+                    "type": "boolean",
+                    "enum": [false]
+                  }
+                ],
+                "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
               },
               "chunkTimeout": {
                 "type": "integer",