feat: add OpenClaw User-Agent toggle, default off

Add a switch in the OpenClaw provider form to optionally send a browser
User-Agent header. The toggle defaults to off — only providers that
explicitly include headers in their preset or config will have it enabled.

Remove the previous auto-injection logic that force-added User-Agent on
every preset load and new provider creation.
This commit is contained in:
Jason
2026-03-09 10:36:11 +08:00
parent dd971246be
commit cc15d7b1e3
8 changed files with 67 additions and 0 deletions
@@ -1450,6 +1450,8 @@ export function ProviderForm({
onApiChange={openclawForm.handleOpenclawApiChange}
models={openclawForm.openclawModels}
onModelsChange={openclawForm.handleOpenclawModelsChange}
userAgent={openclawForm.openclawUserAgent}
onUserAgentChange={openclawForm.handleOpenclawUserAgentChange}
/>
)}