[PR #3785] [MERGED] fix: honor connection max output tokens in Noodle #6103

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

📋 Pull Request Information

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

Base: staging ← Head: agent/3764-noodle-max-output-tokens


📝 Commits (4)

  • e4b5bca chore: start issue 3764
  • 1973b7c fix: honor Noodle connection max output tokens
  • 9c47389 test: use explicit strict token assertions
  • 9f505e2 Merge branch 'staging' into agent/3764-noodle-max-output-tokens

📊 Changes

2 files changed (+33 additions, -5 deletions)

View changed files

📝 packages/server/src/routes/noodle.routes.ts (+12 -4)
📝 scripts/regressions/noodle-prompt.regression.ts (+21 -1)

📄 Description

Linked issue

Closes #3764

Why this change

  • Noodle ignored the enabled Max Output Tokens value saved in a connection's Default Chat Parameters. It instead sent its internal character-count budget, causing models that need a larger output allowance to truncate or fail.

What changed

  • Resolve Noodle's profile-setup and timeline-refresh output budgets from the saved connection Max Output Tokens value when that parameter is enabled.
  • Fall back to Noodle's existing character-count calculation when the value is absent or its send toggle is disabled.
  • Preserve the existing model-known maximum and connection-level hard cap.
  • Add regression coverage for enabled, disabled, absent, legacy, and capped values.

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

  • Automated: pnpm regression:noodle passed locally.
  • Automated: pnpm check passed locally.
  • Manually verify a Noodle refresh sends the enabled connection Max Output Tokens value for both missing-profile generation and timeline generation.
  • Manually verify disabling Max Output Tokens restores Noodle's calculated character-count budget.

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)

  • Not applicable; no UI change.

Summary by CodeRabbit

  • Bug Fixes
    • Improved generated profile and timeline responses by honoring configured output-token limits from connection defaults.
    • Added support for explicitly disabling maximum token settings and applying overrides.
    • Ensured resolved token limits are consistently clamped to safe values.
  • Tests
    • Expanded regression coverage to validate defaulting, disabled behavior, override precedence, and clamping.

🔄 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/3785 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/18/2026 **Status:** ✅ Merged **Merged:** 7/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/3764-noodle-max-output-tokens` --- ### 📝 Commits (4) - [`e4b5bca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e4b5bca11365d06d9ae8dcacc83d971bce98ccb7) chore: start issue 3764 - [`1973b7c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1973b7c887267fb19d16bea65dcf1c40621a7835) fix: honor Noodle connection max output tokens - [`9c47389`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c47389c86b008f02f513fc8e5f11fc33a5d1e4a) test: use explicit strict token assertions - [`9f505e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f505e244cefe97e415687e3d07fe9d05a338734) Merge branch 'staging' into agent/3764-noodle-max-output-tokens ### 📊 Changes **2 files changed** (+33 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/noodle.routes.ts` (+12 -4) 📝 `scripts/regressions/noodle-prompt.regression.ts` (+21 -1) </details> ### 📄 Description ## Linked issue Closes #3764 ## Why this change - Noodle ignored the enabled Max Output Tokens value saved in a connection's Default Chat Parameters. It instead sent its internal character-count budget, causing models that need a larger output allowance to truncate or fail. ## What changed - Resolve Noodle's profile-setup and timeline-refresh output budgets from the saved connection Max Output Tokens value when that parameter is enabled. - Fall back to Noodle's existing character-count calculation when the value is absent or its send toggle is disabled. - Preserve the existing model-known maximum and connection-level hard cap. - Add regression coverage for enabled, disabled, absent, legacy, and capped values. ## 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 - Automated: `pnpm regression:noodle` passed locally. - Automated: `pnpm check` passed locally. - Manually verify a Noodle refresh sends the enabled connection Max Output Tokens value for both missing-profile generation and timeline generation. - Manually verify disabling Max Output Tokens restores Noodle's calculated character-count budget. ## 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) - Not applicable; no UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved generated profile and timeline responses by honoring configured output-token limits from connection defaults. * Added support for explicitly disabling maximum token settings and applying overrides. * Ensured resolved token limits are consistently clamped to safe values. * **Tests** * Expanded regression coverage to validate defaulting, disabled behavior, override precedence, and clamping. <!-- 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-23 04:07:06 +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#6103
No description provided.