[PR #15789] [MERGED] openai: map responses reasoning effort to think #46507

Closed
opened 2026-04-25 01:55:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15789
Author: @ParthSareen
Created: 4/24/2026
Status: Merged
Merged: 4/24/2026
Merged by: @ParthSareen

Base: mainHead: parth-map-responses-thinking


📝 Commits (1)

  • 2c3f76d openai: map responses reasoning effort to think

📊 Changes

2 files changed (+93 additions, -0 deletions)

View changed files

📝 openai/responses.go (+13 -0)
📝 openai/responses_test.go (+80 -0)

📄 Description

Summary

  • Map OpenAI Responses API reasoning.effort into api.ChatRequest.Think
  • Preserve explicit "max" reasoning for renderers that need it
  • Return a validation error for unsupported Responses reasoning effort values
  • Add table coverage for unset, low, medium, high, max, none, and invalid effort

Tests

  • go test ./openai
  • go test ./api ./openai ./cmd ./server

🔄 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/ollama/ollama/pull/15789 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 4/24/2026 **Status:** ✅ Merged **Merged:** 4/24/2026 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth-map-responses-thinking` --- ### 📝 Commits (1) - [`2c3f76d`](https://github.com/ollama/ollama/commit/2c3f76d00b43b9dd5c7d15081bd36f1f4d3b8a92) openai: map responses reasoning effort to think ### 📊 Changes **2 files changed** (+93 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `openai/responses.go` (+13 -0) 📝 `openai/responses_test.go` (+80 -0) </details> ### 📄 Description ## Summary - Map OpenAI Responses API `reasoning.effort` into `api.ChatRequest.Think` - Preserve explicit `"max"` reasoning for renderers that need it - Return a validation error for unsupported Responses reasoning effort values - Add table coverage for unset, `low`, `medium`, `high`, `max`, `none`, and invalid effort ## Tests - `go test ./openai` - `go test ./api ./openai ./cmd ./server` --- <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-25 01:55:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#46507