mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-14 07:32:19 +02:00
Enable plugins to override the model and provider for agent runs by returning modelOverride/providerOverride from the before_agent_start hook. The hook is now invoked early in run.ts (before resolveModel) so overrides take effect. The result is passed to attempt.ts via earlyHookResult to prevent double-firing. This enables security-critical use cases like routing PII-containing prompts to local models instead of cloud providers.