feat(config): allow runtime_fallback to be configured as boolean
Enable simple boolean configuration for runtime_fallback:
- "runtime_fallback": true - Enable with defaults
- "runtime_fallback": false - Disable
- "runtime_fallback": { ... } - Advanced object config (existing)
Updated schema, event handler, chat-message handler, and session hooks
to handle both boolean and object formats.
This commit is contained in:
+3
-1
@@ -121,7 +121,9 @@ export function createEventHandler(args: {
|
||||
const isRuntimeFallbackEnabled =
|
||||
hooks.runtimeFallback !== null &&
|
||||
hooks.runtimeFallback !== undefined &&
|
||||
(args.pluginConfig.runtime_fallback?.enabled ?? true)
|
||||
(typeof args.pluginConfig.runtime_fallback === "boolean"
|
||||
? args.pluginConfig.runtime_fallback
|
||||
: (args.pluginConfig.runtime_fallback?.enabled ?? true))
|
||||
|
||||
// Avoid triggering multiple abort+continue cycles for the same failing assistant message.
|
||||
const lastHandledModelErrorMessageID = new Map<string, string>()
|
||||
|
||||
Reference in New Issue
Block a user