fix: allow provider timeout overlays#83990
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. by source inspection. Current main validates built-in timeout overlays and its Foundry test expects a timeout-only entry to synthesize a selected model, which is the behavior this PR intentionally changes. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge after maintainers accept non-declarative Foundry overlays and the exported input type shape; otherwise close this PR as superseded by #83267. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Current main validates built-in timeout overlays and its Foundry test expects a timeout-only entry to synthesize a selected model, which is the behavior this PR intentionally changes. Is this the best way to solve the issue? Yes, with maintainer acceptance. The PR keeps the merged schema validation boundary and narrows Foundry mutation instead of adding another config path, but the compatibility semantics are a product/owner decision. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b33deb41594e. |
329d85d to
2aef558
Compare
38bdf7a to
1843302
Compare
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Frosted Merge Sprite Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Provider/config owner confirmation for ClawSweeper's rank-up item: I accept the compatibility semantics in this PR: timeout-only Microsoft Foundry entries should remain non-declarative overlays during model selection. They may carry provider-level settings such as That keeps the config contract aligned with the rest of this PR: built-in provider overlays are valid for provider-level tuning, while declarative provider/model selection behavior still requires a concrete provider declaration. It also avoids turning an overlay-only Foundry config into a relative @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
* fix: allow provider timeout overlays * test: fix provider overlay fixture types
Summary
models.providers.openai.timeoutSecondswithout requiring a full custom provider declaration.baseUrlandmodels, so typoed provider IDs do not become schema-valid overlays.Closes #83201.
Verification
git diff --checkpnpm exec oxfmt --check --threads=1 extensions/microsoft-foundry/index.test.ts extensions/microsoft-foundry/provider.ts src/agents/pi-embedded-runner/model.test.ts src/config/config-misc.test.ts src/config/schema.help.ts src/config/types.models.ts src/config/types.openclaw.ts src/plugin-sdk/provider-model-shared.tsnode scripts/run-vitest.mjs src/config/config-misc.test.ts src/config/schema.test.ts src/config/schema.help.quality.test.ts src/agents/pi-embedded-runner/model.test.ts extensions/microsoft-foundry/index.test.ts --reporter=dotnode scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts --reporter=dotnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-83990.tsbuildinfonode scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-83990.tsbuildinfoOPENCLAW_CONFIG_PATH=... node scripts/run-node.mjs config validatefor accepted and rejected provider-overlay configs.Real behavior proof
Behavior addressed: Built-in provider-level timeout overlays can be set without declaring custom models, while unknown/custom provider IDs still fail validation unless they declare a full provider with
baseUrlandmodels. Overlay-only entries also do not synthesize fallback models.Real environment tested: WSL-native source checkout on Node 24.15.0 at commit
1843302542, using the source CLI path after rebuilding staledist.Exact steps or command run after this patch: Created a temp config with
models.providers.openai.timeoutSeconds = 600and ranOPENCLAW_CONFIG_PATH=/tmp/openclaw-83990-proof.at1ov6/openclaw-valid.json OPENCLAW_HOME=/tmp/openclaw-83990-proof.at1ov6/home-valid node scripts/run-node.mjs config validate; created a second temp config withmodels.providers.typoProvider.timeoutSeconds = 600and ranOPENCLAW_CONFIG_PATH=/tmp/openclaw-83990-proof.at1ov6/openclaw-invalid.json OPENCLAW_HOME=/tmp/openclaw-83990-proof.at1ov6/home-invalid node scripts/run-node.mjs config validate. Also ran the focused tests, formatting, diff check, and core/extensiontsgocommands listed above.Evidence after fix: The valid built-in overlay config printed
Config valid: /tmp/openclaw-83990-proof.at1ov6/openclaw-valid.json. The invalid unknown-provider overlay exited 1 and printed bothmodels.providers.typoProvider.baseUrlandmodels.providers.typoProvider.modelserrors. Focused Vitest passed 6 files / 361 tests; the Microsoft Foundry focused rerun passed 1 file / 29 tests; core and extensiontsgopassed; oxfmt andgit diff --checkpassed.Observed result after fix: OpenClaw accepts the built-in
openaitimeout overlay through the real config validator, rejects a typoed overlay-only provider through the same CLI path, leaves Microsoft Foundry timeout-only overlays unchanged during model selection, and keeps model resolution from fabricating unknown fallback models from overlays alone.What was not tested: No live model provider request was sent and no gateway process was restarted; this change is scoped to config validation/config-load, model selection metadata, and resolver behavior.