OpenClaw Config: You can't set headers for an embedding provider
I'm trying to configure an Azure Foundry embeddings provider and I need to be able to add an "api-key" header according to OpenClaw. I'm having to do this manually since OpenClaw isn't allowed to edit it's own settings :(
The problem is the UI treats the header field as a string so you're not able to configure the headers object. Since there's no "raw" mode my only option is to drop out to the terminal and use the CLI:
Also notice that API key field isn't properly left aligned.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 2, 2026, 8:00 PM ET / 00:00 UTC.
Summary Keep open. Current main still routes object-valued config schema fields without fixed child properties through the scalar editor path, so provider headers can be staged and saved as a string instead of a JSON object.
Reproducibility: yes. from source inspection: an object-valued schema field without fixed properties falls through to the string editor and stages text for save. I did not run the WinUI app or a live Azure Foundry gateway, so this is source-reproducible rather than an executed UI repro.
Next step This is a narrow config editor repair with clear source files and validation commands, and it does not require a new config option or product decision.
Review details
Best possible solution:
Add generic object-map editing for schema fields like headers, preserving JSON object values through validation and save while keeping existing scalar and array behavior intact.
Do we have a high-confidence way to reproduce the issue?
Yes, from source inspection: an object-valued schema field without fixed properties falls through to the string editor and stages text for save. I did not run the WinUI app or a live Azure Foundry gateway, so this is source-reproducible rather than an executed UI repro.
Is this the best way to solve the issue?
Yes, the best fix is in the existing schema config editor: support object/additionalProperties fields as JSON objects or key-value maps instead of adding provider-specific Azure-only UI or relying on the CLI workaround.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The exact Azure Foundry schema is not checked into this repository, so the repro is source-based against the generic object-schema path plus the issue screenshot rather than a live gateway run.
Codex review notes: model gpt-5.5, reasoning high; reviewed against bfeb3b5c90be.
Label changes
Label changes:
- add
P2: This blocks configuring at least one embedding provider through the supported Config UI, but there is a CLI workaround and limited blast radius. - add
impact:auth-provider: The affected field is provider authentication/configuration data needed to route embedding requests to Azure Foundry. - add
issue-rating: π platinum hermit: Current issue advisory state selects this label. - add
clawsweeper:needs-live-repro: Current issue advisory state selects this label. - add
clawsweeper:queueable-fix: Current issue advisory state selects this label. - add
clawsweeper:fix-shape-clear: Current issue advisory state selects this label.
Label justifications:
P2: This blocks configuring at least one embedding provider through the supported Config UI, but there is a CLI workaround and limited blast radius.impact:auth-provider: The affected field is provider authentication/configuration data needed to route embedding requests to Azure Foundry.
Evidence reviewed
Acceptance criteria:
- ./build.ps1
- dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
- dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
What I checked:
- Issue report: The issue body says Azure Foundry embeddings require an
api-keyheader, the Config UI treats the header field as a string, and the current workaround is using the CLI. - Object schema handling:
SchemaConfigEditoronly renders nested object sections when the schema object has fixedproperties; otherwise it callsRenderFieldfor that object-valued field. (src/OpenClaw.Tray.WinUI/Controls/SchemaConfigEditor.xaml.cs:121, bfeb3b5c90be) - String fallback:
RenderFieldhandles enum, boolean, number, and array explicitly, then sends every other type through the string editor;RenderStringFielddisplays non-string JSON withToString()and stages edits astextBox.Text. (src/OpenClaw.Tray.WinUI/Controls/SchemaConfigEditor.xaml.cs:230, bfeb3b5c90be) - Existing JSON editor precedent: Complex arrays already get a JSON text editor that parses and stages a
JsonElement; there is no equivalent object editor for header maps. (src/OpenClaw.Tray.WinUI/Controls/SchemaConfigEditor.xaml.cs:431, bfeb3b5c90be) - Save path: Config saves apply
_pendingChangesto the full JSON root and callPatchConfigDetailedAsync, so a string-staged header value would be sent to the gateway as a string. (src/OpenClaw.Tray.WinUI/Pages/ConfigPage.xaml.cs:524, bfeb3b5c90be) - Read-only JSON preview: The Config page exposes a
RichTextBlockJSON preview with copy support, not an editable raw JSON mode. (src/OpenClaw.Tray.WinUI/Pages/ConfigPage.xaml:272, bfeb3b5c90be)
Likely related people:
- RΓ©gis Brid:
git blameandgit log --followattribute the currentSchemaConfigEditor,ConfigPage, andConfigEditorModelimplementation to commit7d9152f427a3007cbe663513ef34c89719473a41. (role: introduced current config editor behavior; confidence: medium; commits: 7d9152f427a3; files:src/OpenClaw.Tray.WinUI/Controls/SchemaConfigEditor.xaml.cs,src/OpenClaw.Tray.WinUI/Pages/ConfigPage.xaml.cs,src/OpenClaw.Tray.WinUI/Services/ConfigEditorModel.cs)
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-reviewcomments, 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-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto 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 explainto ask for more context, or@clawsweeper stopto stop active automation.
π€ This is an automated response from Repo Assist.
Thanks for the clear repro, @Stevenic! This is a known limitation in the embedding provider configuration UI β the headers field is currently treated as a plain string input instead of a structured key-value editor, so there's no way to set an object like {"api-key": "..."} through the GUI.
Workaround (until the UI is fixed): You've already found the right path β use the CLI directly:
openclaw config set embeddings.provider.headers '{"api-key": "YOUR_KEY"}'
For the root cause: the settings form likely needs a dedicated key-value pair editor component for header fields, similar to how environment variable editors work in other tools. A fix would involve updating the embedding provider settings page to detect object-typed fields and render a multi-row editor rather than a single text input.
The API key alignment issue (not left-aligned) appears to be a separate layout bug in the same settings panel and could be fixed alongside this.
This is a good enhancement to have on the backlog β the Azure Foundry / OpenAI-compatible embeddings path is increasingly common and headers (for api-key) are required by most providers.
Generated by π Repo Assist, see workflow run. Learn more.
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a
π€ This is an automated response from Repo Assist.
I've submitted a fix for this in a draft PR. The change adds a RenderJsonObjectField method to SchemaConfigEditor that:
- Renders a JSON text editor (multi-line, monospaced) for
object-typed schema fields without fixedproperties - Pre-populates with the current value (or
{}if not set) - Validates JSON on each keystroke and keeps Save disabled until the input is a valid object
- Shows an inline error when the input is not a valid JSON object
This is the same pattern already used for complex array fields. Once it lands, the headers field in the embedding provider config will render a proper JSON editor instead of a plain text box.
Generated by π Repo Assist, see workflow run.
Generated by π Repo Assist, see workflow run. Learn more.
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a