Skip to content

Fix OpenRouter reasoning instruction role#5221

Merged
badlogic merged 2 commits into
earendil-works:mainfrom
PriNova:fix/openrouter-system-role
May 31, 2026
Merged

Fix OpenRouter reasoning instruction role#5221
badlogic merged 2 commits into
earendil-works:mainfrom
PriNova:fix/openrouter-system-role

Conversation

@PriNova

@PriNova PriNova commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

OpenRouter reasoning requests now use system messages for system prompts by default instead of developer messages. OpenAI reasoning models keep the existing developer behavior.

Why

OpenRouter docs describe the Chat Completions request schema with system, user, assistant, and tool roles, while its OpenAPI spec also includes developer, so role support is not consistently documented across surfaces:

Some routed providers behind OpenRouter reject developer messages for reasoning requests. Using system is the safer common denominator for OpenRouter chat completions while retaining developer for OpenAI reasoning models.

Fixes #5117 #5229

@badlogic badlogic merged commit b177333 into earendil-works:main May 31, 2026
1 check passed
@badlogic

Copy link
Copy Markdown
Collaborator

cheers!

@PriNova PriNova deleted the fix/openrouter-system-role branch June 1, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qwen 3.7 Max on OpenRouter is broken

2 participants