Providers: disable developer role for DashScope-compatible endpoints#24675
Merged
vincentkoc merged 6 commits intomainfrom Feb 24, 2026
Merged
Providers: disable developer role for DashScope-compatible endpoints#24675vincentkoc merged 6 commits intomainfrom
vincentkoc merged 6 commits intomainfrom
Conversation
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
2 tasks
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#24675) * Agents: disable developer role for DashScope-compatible endpoints * Agents: test DashScope developer-role compatibility * Gateway: test allowlisted sessions.patch model selection * Changelog: add DashScope role-compat fix note
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Describe the problem and fix in 2–5 bullets:
developerrole on message payloads and return 400 errors.developerrole.openai-completionsmodels assupportsDeveloperRole=falsein compat normalization, with regression tests for provider-id and base-url detection.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
DashScope-compatible endpoints now receive
systemrole behavior (via compatsupportsDeveloperRole=false) instead ofdeveloper, avoidingdeveloper role400s on these APIs.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
models.providers.*.baseUrlSteps
dashscope.aliyuncs.com,dashscope-intl.aliyuncs.com, ordashscope-us.aliyuncs.com).supportsDeveloperRoleis forced tofalse.Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/agents/model-compat.tscommit.src/agents/model-compat.tsand related tests/changelog entry.developerrole but match DashScope host patterns.Risks and Mitigations
provider === "dashscope"; tests cover positive paths.Greptile Summary
Added DashScope/Qwen API compatibility by setting
supportsDeveloperRole=falsefor DashScope-compatible OpenAI endpoints. DashScope APIs reject thedeveloperrole and return 400 errors, so OpenClaw now sendssystemrole instead. The fix follows the same pattern used for Z.ai and Moonshot providers, with detection via both explicit provider ID (dashscope) and base URL pattern matching (dashscope.aliyuncs.com,dashscope-intl.aliyuncs.com,dashscope-us.aliyuncs.com).normalizeModelCompatinsrc/agents/model-compat.ts:22Confidence Score: 5/5
Last reviewed commit: 759be86