Browse Source

fix(config): accept deprecated runtimeOverride to avoid discarding configs

FailoverConfigSchema is strict. Removing runtimeOverride meant any
existing config with fallback.runtimeOverride failed validation and
loadConfigFromPath returned null, silently dropping the entire config
file. Restore the field as a deprecated no-op so old configs still load.
Michael Henke 1 month ago
parent
commit
25fe089201
2 changed files with 15 additions and 0 deletions
  1. 4 0
      oh-my-opencode-slim.schema.json
  2. 11 0
      src/config/schema.ts

+ 4 - 0
oh-my-opencode-slim.schema.json

@@ -390,6 +390,10 @@
           "default": true,
           "description": "When true (default), empty provider responses are treated as failures, triggering fallback/retry. Set to false to treat them as successes.",
           "type": "boolean"
+        },
+        "runtimeOverride": {
+          "description": "DEPRECATED: no longer used. Previously controlled whether out-of-chain runtime model picks triggered fallback. Fallback is now always disabled when a user explicitly selects a model via /model.",
+          "type": "boolean"
         }
       },
       "additionalProperties": false

+ 11 - 0
src/config/schema.ts

@@ -197,6 +197,17 @@ export const FailoverConfigSchema = z
         'When true (default), empty provider responses are treated as failures, ' +
           'triggering fallback/retry. Set to false to treat them as successes.',
       ),
+    // DEPRECATED: accepted for backward compatibility but no longer used.
+    // Fallback is now always disabled when a user explicitly selects a model
+    // via /model, so this flag has no effect.
+    runtimeOverride: z
+      .boolean()
+      .optional()
+      .describe(
+        'DEPRECATED: no longer used. Previously controlled whether out-of-chain ' +
+          'runtime model picks triggered fallback. Fallback is now always ' +
+          'disabled when a user explicitly selects a model via /model.',
+      ),
   })
   .strict();