[GH-ISSUE #21136] feat: Accept 'developer' role in inbound Chat Completions API #58059

Closed
opened 2026-05-05 22:15:34 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @jbraseth on GitHub (Feb 3, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21136

Description

OpenWebUI's /api/chat/completions endpoint rejects messages with role: "developer", returning a Pydantic validation error. The developer role was introduced by OpenAI in early 2025 as a replacement for system in newer API versions (starting with the o1 model family). It is functionally identical to system — it carries system/instruction context.

This affects any client targeting the current OpenAI Chat Completions spec, including:

  • OpenAI Codex CLI (v0.59+)
  • OpenAI Codex VS Code extension (current versions)
  • Agent frameworks and IDE integrations using the newer OpenAI API format

Steps to Reproduce

Send a Chat Completions request to OpenWebUI's API with a developer role message:

curl -X POST https://<openwebui-instance>/api/chat/completions \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      {"role": "developer", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello"}
    ]
  }'

Expected Behavior

The request succeeds, with developer treated equivalently to system.

Actual Behavior

Pydantic validation error:

[{'type': 'literal_error', 'loc': ('body', 'messages', 0, 'SystemMessage', 'role'),
  'msg': "Input should be 'system'", 'input': 'developer'},
 {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'UserMessage', 'role'),
  'msg': "Input should be 'user'", 'input': 'developer'},
 {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'AssistantMessage', 'role'),
  'msg': "Input should be 'assistant'", 'input': 'developer'},
 {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'ToolMessage', 'role'),
  'msg': "Input should be 'tool'", 'input': 'developer'}]

Context

OpenWebUI already handles the developer role in the outbound direction — PR #10617 maps systemdeveloper when sending requests to o1/o3 models. This issue is about the inbound direction: accepting developer from API clients.

The fix would be adding developer as a valid role in the inbound message schema and mapping it to system before processing.

Version

OpenWebUI v0.7.2

Originally created by @jbraseth on GitHub (Feb 3, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21136 ## Description OpenWebUI's `/api/chat/completions` endpoint rejects messages with `role: "developer"`, returning a Pydantic validation error. The `developer` role was introduced by OpenAI in early 2025 as a replacement for `system` in newer API versions (starting with the o1 model family). It is functionally identical to `system` — it carries system/instruction context. This affects any client targeting the current OpenAI Chat Completions spec, including: - OpenAI Codex CLI (v0.59+) - OpenAI Codex VS Code extension (current versions) - Agent frameworks and IDE integrations using the newer OpenAI API format ## Steps to Reproduce Send a Chat Completions request to OpenWebUI's API with a `developer` role message: ```bash curl -X POST https://<openwebui-instance>/api/chat/completions \ -H "Authorization: Bearer <api-key>" \ -H "Content-Type: application/json" \ -d '{ "model": "your-model-id", "messages": [ {"role": "developer", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello"} ] }' ``` ## Expected Behavior The request succeeds, with `developer` treated equivalently to `system`. ## Actual Behavior Pydantic validation error: ``` [{'type': 'literal_error', 'loc': ('body', 'messages', 0, 'SystemMessage', 'role'), 'msg': "Input should be 'system'", 'input': 'developer'}, {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'UserMessage', 'role'), 'msg': "Input should be 'user'", 'input': 'developer'}, {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'AssistantMessage', 'role'), 'msg': "Input should be 'assistant'", 'input': 'developer'}, {'type': 'literal_error', 'loc': ('body', 'messages', 0, 'ToolMessage', 'role'), 'msg': "Input should be 'tool'", 'input': 'developer'}] ``` ## Context OpenWebUI already handles the `developer` role in the **outbound** direction — PR #10617 maps `system` → `developer` when sending requests to o1/o3 models. This issue is about the **inbound** direction: accepting `developer` from API clients. The fix would be adding `developer` as a valid role in the inbound message schema and mapping it to `system` before processing. ## Version OpenWebUI v0.7.2
Author
Owner

@pr-validator-bot commented on GitHub (Feb 3, 2026):

⚠️ Missing Issue Title Prefix

@jbraseth, your issue title is missing a prefix (e.g., bug:, feat:, docs:).

Please update your issue title to include one of the following prefixes:

  • bug: Bug report or error you've encountered
  • feat: Feature request or enhancement suggestion
  • docs: Documentation issue or improvement request
  • question: Question about usage or functionality
  • help: Request for help or support

Example: bug: Login fails when using special characters in password

<!-- gh-comment-id:3842799433 --> @pr-validator-bot commented on GitHub (Feb 3, 2026): # ⚠️ Missing Issue Title Prefix @jbraseth, your issue title is missing a prefix (e.g., `bug:`, `feat:`, `docs:`). Please update your issue title to include one of the following prefixes: - **bug**: Bug report or error you've encountered - **feat**: Feature request or enhancement suggestion - **docs**: Documentation issue or improvement request - **question**: Question about usage or functionality - **help**: Request for help or support Example: `bug: Login fails when using special characters in password`
Author
Owner

@tjbck commented on GitHub (Feb 6, 2026):

This is unlikely to be caused by our backend, I'd encourage you to try again with another inference provider to make sure the error is occurring from open webui.

<!-- gh-comment-id:3857138410 --> @tjbck commented on GitHub (Feb 6, 2026): This is unlikely to be caused by our backend, I'd encourage you to try again with another inference provider to make sure the error is occurring from open webui.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58059