[PR #10683] [MERGED] fix: restore compatibility for older o1 models (o1-mini, o1-preview) #22578

Closed
opened 2026-04-20 04:14:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/10683
Author: @grandtele
Created: 2/24/2025
Status: Merged
Merged: 2/25/2025
Merged by: @tjbck

Base: devHead: fix/openai-o1-legacy-roles


📝 Commits (1)

  • 8c02048 * fix: restore compatibility for older o1 models (o1-mini, o1-preview)

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 backend/open_webui/routers/openai.py (+8 -2)

📄 Description

Pull Request Checklist

  • Target branch: This pull request targets the dev branch.
  • Description: See the “Description” section below.
  • Changelog: Added a changelog entry following Keep a Changelog.
  • Documentation: No additional documentation changes needed.
  • Dependencies: No new dependencies introduced.
  • Testing: Basic tests performed locally; changes do not affect existing tests negatively.
  • Code review: Self-review performed; code adheres to project coding standards.
  • Prefix: Using the “fix” prefix because this pull request addresses a bug/compatibility issue.

Changelog Entry

Description

In PR #10617, we replaced the system role with the developer role for newer o1/o3 models. However, older models like o1-mini and o1-preview do not support the developer role. This pull request restores compatibility for those legacy models by remapping systemuser specifically for o1-mini and o1-preview.

Added

  • N/A

Changed

  • The role mapping logic to correctly handle older o1 models by setting systemuser instead of developer.

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • Compatibility for older o1 models (o1-mini, o1-preview) that do not support the developer role.

Security

  • N/A

Breaking Changes

  • None

Additional Information

  • N/A

Screenshots or Videos

  • N/A

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/10683 **Author:** [@grandtele](https://github.com/grandtele) **Created:** 2/24/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix/openai-o1-legacy-roles` --- ### 📝 Commits (1) - [`8c02048`](https://github.com/open-webui/open-webui/commit/8c020488ddf9c60a876686a46ea7f666542159be) * fix: restore compatibility for older o1 models (o1-mini, o1-preview) ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/openai.py` (+8 -2) </details> ### 📄 Description ### Pull Request Checklist - [x] **Target branch:** This pull request targets the `dev` branch. - [x] **Description:** See the “Description” section below. - [x] **Changelog:** Added a changelog entry following [Keep a Changelog](https://keepachangelog.com/). - [x] **Documentation:** No additional documentation changes needed. - [x] **Dependencies:** No new dependencies introduced. - [ ] **Testing:** Basic tests performed locally; changes do not affect existing tests negatively. - [x] **Code review:** Self-review performed; code adheres to project coding standards. - [x] **Prefix:** Using the “fix” prefix because this pull request addresses a bug/compatibility issue. --- # Changelog Entry ### Description In [PR #10617](https://github.com/open-webui/open-webui/pull/10617), we replaced the `system` role with the `developer` role for newer o1/o3 models. However, older models like `o1-mini` and `o1-preview` do not support the `developer` role. This pull request restores compatibility for those legacy models by remapping `system` → `user` specifically for `o1-mini` and `o1-preview`. ### Added - N/A ### Changed - The role mapping logic to correctly handle older o1 models by setting `system` → `user` instead of `developer`. ### Deprecated - N/A ### Removed - N/A ### Fixed - Compatibility for older o1 models (`o1-mini`, `o1-preview`) that do not support the `developer` role. ### Security - N/A ### Breaking Changes - None --- ### Additional Information - N/A ### Screenshots or Videos - N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:14:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#22578