[PR #739] [MERGED] Fix scene summary max token override #4756

Closed
opened 2026-10-22 04:10:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/739
Author: @Xelvanis
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Xelvanis

Base: main ← Head: fix/issue-721-scene-summary-max-token


📝 Commits (2)

  • 20a6274 Fix scene summary max token override
  • 45191ca Simplify scene summary token override

📊 Changes

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

View changed files

📝 packages/server/src/routes/scene.routes.ts (+2 -1)

📄 Description

Linked issue

Closes #721

Why this change

  • Scene summary generation was still requesting the fixed 1024-token budget even when a connection had a higher max-token override configured. Reasoning-heavy models such as Kimi K2.6 could then hit the short output budget and return an empty summary.

What changed

  • Updated scene conclusion summary generation to use the connection max-token override when present.
  • Kept the existing 1024-token scene summary default when no override is configured.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Reproduced before fix with a scratch provider harness: a connection override of 16000 still resulted in scene-summary-style maxTokens of 1024.
  • Verified after fix with the same scratch scenario: scene summary now passes maxTokens 16000 when the override is configured.
  • Re-ran the scratch provider harness after simplifying the production change to the inline provider.maxTokensOverrideValue ?? 1024 pattern.
  • pnpm check
  • Manual Docker and browser verification still needed if desired.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

N/A. This is a server-side token budget fix for scene summary generation.

Summary by CodeRabbit

  • New Features
    • Scene summary generation now supports provider-specific token limit configuration with a default fallback, enabling greater flexibility in response generation parameters.

Review Change Stack


🔄 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/739 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/12/2026 **Status:** ✅ Merged **Merged:** 5/12/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `main` ← **Head:** `fix/issue-721-scene-summary-max-token` --- ### 📝 Commits (2) - [`20a6274`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20a627405066fb1609935871242c2493185d9ad6) Fix scene summary max token override - [`45191ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/45191cac07b371b6ab53a4532d5c2b6696fe9931) Simplify scene summary token override ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/scene.routes.ts` (+2 -1) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #721 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Scene summary generation was still requesting the fixed 1024-token budget even when a connection had a higher max-token override configured. Reasoning-heavy models such as Kimi K2.6 could then hit the short output budget and return an empty summary. ## What changed <!-- List the key changes in this PR --> - Updated scene conclusion summary generation to use the connection max-token override when present. - Kept the existing 1024-token scene summary default when no override is configured. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Reproduced before fix with a scratch provider harness: a connection override of 16000 still resulted in scene-summary-style `maxTokens` of 1024. - Verified after fix with the same scratch scenario: scene summary now passes `maxTokens` 16000 when the override is configured. - Re-ran the scratch provider harness after simplifying the production change to the inline `provider.maxTokensOverrideValue ?? 1024` pattern. - `pnpm check` - Manual Docker and browser verification still needed if desired. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) N/A. This is a server-side token budget fix for scene summary generation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Scene summary generation now supports provider-specific token limit configuration with a default fallback, enabling greater flexibility in response generation parameters. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/739) <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:24 +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#4756
No description provided.