[PR #4221] [MERGED] Fix Roleplay reasoning summaries and Claude Opus 5 parameters #6288

Closed
opened 2026-10-23 04:08:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4221
Author: @SpicyMarinara
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/roleplay-reasoning-opus5


📝 Commits (1)

  • db78d59 fix: surface reasoning and support Claude Opus 5

📊 Changes

4 files changed (+414 additions, -62 deletions)

View changed files

📝 packages/server/src/services/llm/providers/anthropic.provider.ts (+25 -14)
📝 packages/server/src/services/llm/providers/claude-subscription.provider.ts (+12 -8)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+107 -39)
📝 scripts/regressions/provider-compat.regression.ts (+270 -1)

📄 Description

Why

Roleplay could report hidden GPT-5.6 reasoning-token usage while persisting no readable summary, leaving the message without its brain-icon affordance. Claude Opus 5 was already present in the model catalog, but its current adaptive-thinking, summarized-display, effort, sampling, and explicit-disable semantics were not fully serialized across both Anthropic connection paths.

What changed

  • recover GPT-5.6 reasoning summaries from final Responses payloads and deduplicate them against streamed summary deltas
  • request readable summaries whenever Roleplay captures reasoning
  • support Claude Opus 5 adaptive thinking and low through max effort for direct Anthropic API connections
  • preserve explicit effort and summarized thinking through Claude Subscription connections
  • strip unsupported temperature, top_p, and top_k values for Opus 5
  • keep explicit thinking: disabled authoritative and free of conflicting effort configuration
  • add provider regressions for catalog metadata, request bodies, summary recovery, deduplication, and disable behavior

Validation

  • pnpm check
  • pnpm regression:providers
  • pnpm --filter @marinara-engine/server lint

Manual verification

  • Generate a new GPT-5.6 Sol Roleplay response with Show Thoughts enabled and verify the brain icon opens the readable reasoning summary.
  • Generate with Claude Opus 5 through an Anthropic API connection at max effort.
  • Generate with Claude Opus 5 through Claude Subscription at xhigh effort.
  • Select no reasoning for Opus 5 and verify the request succeeds with thinking disabled.

No linked issue is currently attached; please open or link a tracking issue if required by the maintainer workflow.


🔄 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/Pasta-Devs/Marinara-Engine/pull/4221 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/roleplay-reasoning-opus5` --- ### 📝 Commits (1) - [`db78d59`](https://github.com/Pasta-Devs/Marinara-Engine/commit/db78d592a57a9be922c9bf35110db6c2e700fd25) fix: surface reasoning and support Claude Opus 5 ### 📊 Changes **4 files changed** (+414 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/services/llm/providers/anthropic.provider.ts` (+25 -14) 📝 `packages/server/src/services/llm/providers/claude-subscription.provider.ts` (+12 -8) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+107 -39) 📝 `scripts/regressions/provider-compat.regression.ts` (+270 -1) </details> ### 📄 Description ## Why Roleplay could report hidden GPT-5.6 reasoning-token usage while persisting no readable summary, leaving the message without its brain-icon affordance. Claude Opus 5 was already present in the model catalog, but its current adaptive-thinking, summarized-display, effort, sampling, and explicit-disable semantics were not fully serialized across both Anthropic connection paths. ## What changed - recover GPT-5.6 reasoning summaries from final Responses payloads and deduplicate them against streamed summary deltas - request readable summaries whenever Roleplay captures reasoning - support Claude Opus 5 adaptive thinking and `low` through `max` effort for direct Anthropic API connections - preserve explicit effort and summarized thinking through Claude Subscription connections - strip unsupported `temperature`, `top_p`, and `top_k` values for Opus 5 - keep explicit `thinking: disabled` authoritative and free of conflicting effort configuration - add provider regressions for catalog metadata, request bodies, summary recovery, deduplication, and disable behavior ## Validation - `pnpm check` - `pnpm regression:providers` - `pnpm --filter @marinara-engine/server lint` ## Manual verification - [ ] Generate a new GPT-5.6 Sol Roleplay response with Show Thoughts enabled and verify the brain icon opens the readable reasoning summary. - [ ] Generate with Claude Opus 5 through an Anthropic API connection at `max` effort. - [ ] Generate with Claude Opus 5 through Claude Subscription at `xhigh` effort. - [ ] Select no reasoning for Opus 5 and verify the request succeeds with thinking disabled. No linked issue is currently attached; please open or link a tracking issue if required by the maintainer workflow. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6288
No description provided.