-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Foundry Entra ID onboarding fails to save with "Unrecognized key: thinkingLevelMap" #91011
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
The built-in Entra ID (managed identity) onboarding for the
microsoft-foundryprovider can't complete: it writes athinkingLevelMapkey on each model entry that the provider schema rejects, so the atomic config write rolls back and nothing persists.Steps to reproduce
Cognitive Services OpenAI Userrole.openclaw models auth login --provider microsoft-foundry --method entra-id.Expected behavior
Onboarding writes a valid provider config and persists it, leaving a working
microsoft-foundryprovider that authenticates via Entra.Actual behavior
The connection test passes, then the config write fails validation and rolls back:
There's no way to finish onboarding this way.
OpenClaw version
2026.6.1 (
2e08f0f)Operating system
Ubuntu 26.04
Install method
npm global
Model
gpt-5.4 / gpt-5.4-mini (Azure AI Foundry reasoning models). I only tested reasoning models, so I don't know whether
thinkingLevelMapis also emitted for non-reasoning models; if it's added for every model the bug would reproduce more broadly.Provider / routing chain
openclaw -> microsoft-foundry (Azure AI Foundry, Entra ID / managed identity auth)
Additional provider/model setup details
System-assigned managed identity (Entra), token audience
https://cognitiveservices.azure.com. There's no API key here: with Entra, OpenClaw fetches an Azure access token (viaaz account get-access-token) instead of using a key.Logs, screenshots, and evidence
models.providers.microsoft-foundry.models.0: Unrecognized key: "thinkingLevelMap" The write is atomic, so on that validation error the whole thing rolls back and the on-disk config is untouched.Impact and severity
microsoft-foundrywith Entra ID via the built-in flow.Additional information
Why it happens. The provider-config writer (
buildFoundryProviderConfig/provider.onModelSelected) puts athinkingLevelMapfield on each entry undermodels.providers.*.models[], but the schema for that path doesn't allowthinkingLevelMap. So the writer and the schema are out of sync, and validation rejects the write.It's specifically a write-path problem.
normalizeResolvedModelre-addsthinkingLevelMapin memory at request time, so it doesn't occur at runtime and never reaches the validator on read. The only place it appeared in my testing is the disk write that onboarding performs.Source pointers. Paths below are repo source at tag
v2026.6.1(the running build ships these bundled underdist/).buildFoundryProviderConfiginextensions/microsoft-foundry/shared.ts(~line 340; it spreadsthinkingLevelMaponto each model entry at ~line 380), and theonModelSelectedhook inextensions/microsoft-foundry/provider.ts(~line 27; emitsthinkingLevelMapat ~line 99).normalizeResolvedModel(plugin-SDK helper insrc/plugins/provider-runtime.ts), invoked fromextensions/microsoft-foundry/provider.ts(~line 165), which restoresthinkingLevelMapin memory at request time.Fix I'd suggest. Either allow
thinkingLevelMaponmodels.providers.*.models[]in the schema, or strip it in the writer before persisting as it's rebuilt at runtime bynormalizeResolvedModel.Workaround I used. I hand-authored a
microsoft-foundryprovider block (cloned from a working custom provider whose model objects carry nothinkingLevelMap) and pointed the agent bindings at it with a rawconfig set, which doesn't go throughonModelSelectedand so never re-emits the field. That holds, but it means the supported onboarding path can't be used as-is.