fix(qqbot): add stream config (#63746)

This commit is contained in:
Sliverp
2026-04-09 21:23:33 +08:00
committed by GitHub
parent 604777e441
commit 65b781f9ae
5 changed files with 41 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ Docs: https://docs.openclaw.ai
- Sessions/model selection: preserve catalog-backed session model labels and keep already-qualified session model refs stable when catalog metadata is unavailable, so Control UI model selection survives reloads without bogus provider-prefixed values. (#61382) Thanks @Mule-ME.
- Gateway/startup: keep WebSocket RPC available while channels and plugin sidecars start, hold `chat.history` unavailable until startup sidecars finish so synchronous history reads cannot stall startup (reported in #63450), refresh advertised gateway methods after deferred plugin reloads, and enforce the pre-auth WebSocket upgrade budget before the no-handler 503 path so upgrade floods cannot bypass connection limits during that window. (#63480) Thanks @neeravmakwana.
- Gateway/tailscale: start Tailscale exposure and the gateway update check before awaiting channel and plugin sidecar startup so remote operators are not locked out when startup sidecars stall.
- QQBot/streaming: make block streaming configurable per QQ bot account via `streaming.mode` (`"partial"` | `"off"`, default `"partial"`) instead of hardcoding it off, so responses can be delivered incrementally. (#63746)
## 2026.4.9

View File

@@ -100,6 +100,17 @@
"upgradeMode": {
"type": "string",
"enum": ["doc", "hot-reload"]
},
"streaming": {
"type": "object",
"additionalProperties": false,
"properties": {
"mode": {
"type": "string",
"enum": ["off", "partial"],
"default": "partial"
}
}
}
}
}
@@ -129,6 +140,17 @@
"type": "string",
"enum": ["doc", "hot-reload"]
},
"streaming": {
"type": "object",
"additionalProperties": false,
"properties": {
"mode": {
"type": "string",
"enum": ["off", "partial"],
"default": "partial"
}
}
},
"accounts": {
"type": "object",
"additionalProperties": {

View File

@@ -41,6 +41,14 @@ const QQBotSttSchema = z
.strict()
.optional();
const QQBotStreamingSchema = z
.object({
/** "partial" (default) enables block streaming; "off" disables it. */
mode: z.enum(["off", "partial"]).default("partial"),
})
.strict()
.optional();
const QQBotAccountSchema = z
.object({
enabled: z.boolean().optional(),
@@ -56,6 +64,7 @@ const QQBotAccountSchema = z
urlDirectUpload: z.boolean().optional(),
upgradeUrl: z.string().optional(),
upgradeMode: z.enum(["doc", "hot-reload"]).optional(),
streaming: QQBotStreamingSchema,
})
.strict();

View File

@@ -1151,7 +1151,7 @@ export async function startGateway(ctx: GatewayContext): Promise<void> {
},
},
replyOptions: {
disableBlockStreaming: true,
disableBlockStreaming: account.config.streaming?.mode === "off",
},
});

View File

@@ -57,6 +57,14 @@ export interface QQBotAccountConfig {
* - "hot-reload": run an in-place npm update flow
*/
upgradeMode?: "doc" | "hot-reload";
/**
* Block streaming configuration.
* - mode "partial" (default): enable block streaming for incremental delivery.
* - mode "off": buffer the full response before sending.
*/
streaming?: {
mode?: "off" | "partial";
};
}
/** Audio format policy controlling which formats can skip transcoding. */