Skip to content

fix: allow provider timeout overlays#83990

Merged
giodl73-repo merged 5 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/provider-timeout-overlay
May 22, 2026
Merged

fix: allow provider timeout overlays#83990
giodl73-repo merged 5 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/provider-timeout-overlay

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allows built-in provider overlays such as models.providers.openai.timeoutSeconds without requiring a full custom provider declaration.
  • Preserves the current-main contract that unknown/custom providers must declare both baseUrl and models, so typoed provider IDs do not become schema-valid overlays.
  • Prevents overlay-only provider entries from synthesizing fallback models for unknown model refs.
  • Guards Microsoft Foundry model-selection mutation against materialized timeout-only overlays.

Closes #83201.

Verification

  • git diff --check
  • pnpm 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.ts
  • node 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=dot
  • node scripts/run-vitest.mjs extensions/microsoft-foundry/index.test.ts --reporter=dot
  • node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-83990.tsbuildinfo
  • node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions-83990.tsbuildinfo
  • Real CLI config-load proof with OPENCLAW_CONFIG_PATH=... node scripts/run-node.mjs config validate for 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 baseUrl and models. 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 stale dist.

Exact steps or command run after this patch: Created a temp config with models.providers.openai.timeoutSeconds = 600 and ran OPENCLAW_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 with models.providers.typoProvider.timeoutSeconds = 600 and ran OPENCLAW_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/extension tsgo commands 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 both models.providers.typoProvider.baseUrl and models.providers.typoProvider.models errors. Focused Vitest passed 6 files / 361 tests; the Microsoft Foundry focused rerun passed 1 file / 29 tests; core and extension tsgo passed; oxfmt and git diff --check passed.

Observed result after fix: OpenClaw accepts the built-in openai timeout 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels May 19, 2026
@clawsweeper

clawsweeper Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Summary
The PR adds config input types/tests/help for provider timeout overlays and changes Microsoft Foundry model selection so timeout-only overlays remain non-declarative.

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
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Summary: Strong terminal proof supports a focused patch, with merge readiness depending mainly on maintainer acceptance of the compatibility semantics.

Rank-up moves:

  • Have a maintainer explicitly accept the non-declarative Foundry overlay semantics before merge.
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
Sufficient (terminal): The PR body includes after-fix terminal CLI config validation proof for accepted and rejected provider-overlay configs plus focused test, type, format, and diff-check output.

Risk before merge

  • Merging intentionally changes current-main Microsoft Foundry behavior: materialized timeout-only entries would no longer synthesize baseUrl, selected model metadata, or auth/profile rebinding during model selection.
  • The PR exports a raw config input type split from runtime provider declaration typing, so maintainers should accept that public type shape before it becomes SDK-facing surface.
  • Contributor proof covers CLI config validation and focused checks, but not a live model provider request or gateway restart.

Maintainer options:

  1. Accept non-declarative Foundry overlays (recommended)
    Maintainers can merge after explicitly accepting that timeout-only Microsoft Foundry entries preserve timeout settings but do not synthesize provider declarations or auth/profile rebinding during model selection.
  2. Request runtime selection proof
    If provider-runtime confidence is still needed, ask for a redacted gateway/config-load or Foundry model-selection proof before merge.
  3. Close as already covered
    If the Foundry follow-up semantics are not desired, close this PR because the central timeout-overlay validation bug was already merged in fix(config): allow bundled provider timeout overlays #83267.

Next step before merge
The protected maintainer label plus intentional provider compatibility/auth semantics require a human merge decision; no narrow ClawSweeper repair remains.

Security
Cleared: No concrete security or supply-chain concern was found; the diff does not change dependencies, workflows, permissions, secret storage, or external code execution.

Review details

Best 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:

  • P2: Provider timeout overlay behavior is a normal-priority config/provider fix with limited but real model-provider impact.
  • merge-risk: 🚨 compatibility: The PR changes current-main Microsoft Foundry overlay behavior for existing timeout-only configs.
  • merge-risk: 🚨 auth-provider: The PR deliberately prevents overlay-only Foundry configs from rebinding auth/profile metadata during model selection.
  • rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and Strong terminal proof supports a focused patch, with merge readiness depending mainly on maintainer acceptance of the compatibility semantics.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes after-fix terminal CLI config validation proof for accepted and rejected provider-overlay configs plus focused test, type, format, and diff-check output.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix terminal CLI config validation proof for accepted and rejected provider-overlay configs plus focused test, type, format, and diff-check output.

What I checked:

  • PR diff changes Foundry selection semantics: The PR patch adds a guard so Microsoft Foundry onModelSelected returns unless the provider config has a non-empty baseUrl and a models array, preventing timeout-only overlays from synthesizing provider declarations. (extensions/microsoft-foundry/provider.ts:27, 0f215f508789)
  • Current main already validates built-in timeout overlays: Current main makes model provider baseUrl/models optional in the schema, allows built-in provider overlay IDs, and still requires baseUrl/models for custom providers. (src/config/zod-schema.core.ts:432, b33deb41594e)
  • Current main materializes built-in overlays: Current main normalizes built-in overlay entries by filling missing baseUrl with an empty string and missing models with an empty array after schema validation. (src/config/validation.ts:79, b33deb41594e)
  • Current main prevents generic fallback synthesis without provider surface: The model resolver only treats configured fallback as available for mock models, explicit configured models, or provider configs with a non-empty baseUrl. (src/agents/pi-embedded-runner/model.ts:450, b33deb41594e)
  • Merged provenance for the central timeout-overlay fix: Merged pull request fix(config): allow bundled provider timeout overlays #83267 introduced the current built-in provider overlay validation/materialization and fallback guard behavior that this PR refines. (src/config/zod-schema.core.ts:432, ff871e162aaf)
  • Real behavior proof in PR body: The PR body reports terminal proof with real config validate commands for accepted built-in overlays and rejected unknown-provider overlays, plus focused Vitest, tsgo, format, and diff-check runs. (0f215f508789)

Likely related people:

  • giodl73-repo: Authored merged pull request fix(config): allow bundled provider timeout overlays #83267, which introduced the current provider timeout overlay validation, materialization, Foundry tolerance, and fallback guard behavior this PR refines. (role: introduced current timeout-overlay behavior and follow-up author; confidence: high; commits: ff871e162aaf, 1843302542bc; files: src/config/zod-schema.core.ts, src/config/validation.ts, src/agents/pi-embedded-runner/model.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against b33deb41594e.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels May 19, 2026
@giodl73-repo giodl73-repo force-pushed the user/giodl/provider-timeout-overlay branch from 329d85d to 2aef558 Compare May 19, 2026 15:04
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 19, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. labels May 19, 2026
@giodl73-repo giodl73-repo force-pushed the user/giodl/provider-timeout-overlay branch from 38bdf7a to 1843302 Compare May 21, 2026 01:13
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Frosted Merge Sprite

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: sleeps inside passing CI.
Image traits: location release reef; accessory green check lantern; palette pearl, teal, and neon green; mood curious; pose balancing on a branch marker; shell starlit enamel shell; lighting calm overcast light; background small green status lights.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Frosted Merge Sprite in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

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 timeoutSeconds, but they should not synthesize Foundry baseUrl, model declarations, selected-model metadata, or auth/profile rebinding unless the config entry is an actual provider declaration with a non-empty baseUrl and a models array.

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 /openai/v1 endpoint.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@giodl73-repo giodl73-repo merged commit bc9e601 into openclaw:main May 22, 2026
98 checks passed
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
galiniliev pushed a commit to galiniliev/openclaw that referenced this pull request May 25, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* fix: allow provider timeout overlays

* test: fix provider overlay fixture types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: models.providers.<id>.timeoutSeconds documented in schema as standalone-valid, rejected by startup validator on built-in providers

1 participant