Merge pull request #4157 from ririnto/docs/config-reference-alignment

docs: align config reference with implementation
This commit is contained in:
YeonGyu-Kim
2026-05-21 12:58:11 +09:00
committed by GitHub
6 changed files with 28 additions and 20 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ export const OhMyOpenCodeConfigSchema = z.object({
/**
* Enable runtime fallback (default: false)
* Set to false to disable, or use object for advanced config:
* { "enabled": true, "retry_on_errors": [400, 429], "timeout_seconds": 30 }
* { "enabled": true, "retry_on_errors": [429, 500, 502, 503, 504], "timeout_seconds": 30 }
*/
runtime_fallback: z.union([z.boolean(), RuntimeFallbackConfigSchema]).optional(),
background_task: BackgroundTaskConfigSchema.optional(),
+2 -2
View File
@@ -3,13 +3,13 @@ import { z } from "zod"
export const RuntimeFallbackConfigSchema = z.object({
/** Enable runtime fallback (default: false) */
enabled: z.boolean().optional(),
/** HTTP status codes that trigger fallback (default: [400, 429, 503, 529]) */
/** HTTP status codes that trigger fallback (default: [429, 500, 502, 503, 504]) */
retry_on_errors: z.array(z.number()).optional(),
/** Maximum fallback attempts per session (default: 3) */
max_fallback_attempts: z.number().min(1).max(20).optional(),
/** Cooldown in seconds before retrying a failed model (default: 60) */
cooldown_seconds: z.number().min(0).optional(),
/** Session-level timeout in seconds to advance fallback when provider hangs (default: 30). Set to 0 to disable auto-retry signal detection (only error-based fallback remains active). */
/** Session-level timeout in seconds to advance fallback when provider hangs (default: 30). Set to 0 to disable timeout escalation and message.updated auto-retry signal detection. */
timeout_seconds: z.number().min(0).optional(),
/** Show toast notification when switching to fallback model (default: true) */
notify_on_fallback: z.boolean().optional(),