- Update shouldTriggerFallback() to use reason !== null for default behavior
- Add resolveAgentModelFallbackOnErrors() resolver in model-input.ts
- Add resolveRunModelFallbackOnErrors() in agent-scope.ts
- Wire fallbackOnErrors through resolveModelFallbackOptions()
- Update agent-command.ts call site
- Update cron/isolated-agent/run.ts call site
- Wire fallbackOnErrors through runFallbackCandidate and runFallbackAttempt
- Use coerceToFailoverErrorWithConfig when fallbackOnErrors is provided
- Fix "all" mode to use status >= 400 instead of fixed list
- Fix "all" mode to not trigger fallback for non-HTTP errors
- Update comments to match actual default status codes (include 504, 404)
- Add fallbackOnErrors to runWithImageModelFallback for consistency
Addresses review feedback from Greptile:
- Critical: fallbackOnErrors parameter is now actually used
- Logic: "all" now correctly covers all 4xx/5xx status codes
- Logic: "all" no longer triggers fallback for unrelated runtime errors
- Style: Comments now match actual implementation
- Add FallbackOnErrorCodes type: all, default, or number array
- Add fallbackOnErrors field to AgentModelConfig
- Add shouldTriggerFallback() function
- Support custom HTTP status codes that trigger fallback
Users can configure which errors trigger fallback:
- default: Server errors + rate limits (5xx, 429, 408)
- all: All errors including client errors (400, 401, 403)
- number[]: Custom status codes
- Added a test to ensure no warnings for legacy Brave config when bundled web search allowlist compatibility is applied.
- Updated validation logic to incorporate compatibility configuration for bundled web search plugins.
- Refactored the ensureRegistry function to utilize the new compatibility handling.
* test: align extension runtime mocks with plugin-sdk
Update stale extension tests to mock the plugin-sdk runtime barrels that production code now imports, and harden the Signal tool-result harness around system-event assertions so the channels lane matches current extension boundaries.
Regeneration-Prompt: |
Verify the failing channels-lane tests against current origin/main in an isolated worktree before changing anything. If the failures reproduce on main, keep the fix test-only unless production behavior is clearly wrong. Recent extension refactors moved Telegram, WhatsApp, and Signal code onto plugin-sdk runtime barrels, so update stale tests that still mock old core module paths to intercept the seams production code now uses. For Signal reaction notifications, avoid brittle assertions that depend on shared queued system-event state when a direct harness spy on enqueue behavior is sufficient. Preserve scope: only touch the failing tests and their local harness, then rerun the reproduced targeted tests plus the full channels lane and repo check gate.
* test: fix extension test drift on main
* fix: lazy-load bundled web search plugin registry
* test: make matrix sweeper failure injection portable
* fix: split heavy matrix runtime-api seams
* fix: simplify bundled web search id lookup
* test: tolerate windows env key casing
Reuse pi-ai's Anthropic client injection seam for streaming, and add
the OpenClaw-side provider discovery, auth, model catalog, and tests
needed to expose anthropic-vertex cleanly.
Signed-off-by: sallyom <somalley@redhat.com>