[GH-ISSUE #8866] [Issue]: Professor Mari references plans the user never saw, and fails on large-context OpenRouter models (402) #8530

Closed
opened 2026-11-07 16:43:34 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mayhair on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8866

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Professor Mari has two bugs that make her unreliable:

  1. She refers to a plan you never got to see. On multi-step tasks she sometimes writes out a full answer or plan, then runs a few more checks and ends with something like "I checked X and Y, the original plan I made is still there." The plan itself isn't anywhere in the chat, so you're left with a reply that points at nothing.
  2. She fails on some OpenRouter models. With Kimi K3.1 Pro she can't do anything at all. With Gemini 4 Argon she does one step and then fails. Both show an error about credits or context, even when the account has credits and the request is small.

What this means for users

  • Lost answers: you ask Mari for a plan or a multi-step change, she does the work, and the part you asked for (the plan, the list, the explanation) is missing from her final message. You have to ask again, often more than once, and it costs extra requests.
  • Misleading replies: "the plan is still there" sounds like a finished answer, so it's easy to assume she answered when she didn't.
  • Mari unusable on large-context OpenRouter models: on models with a ~1M token window, Mari fails on the first or second step with a 402 error, so those models simply don't work for her. Normal roleplay chat on the same connection works fine, which makes the cause hard to spot.
  • Confusing error message: the error says "The request may exceed the available context budget", which sends users looking at their context size when the real cause is something else.

Expected behavior

  • When Mari finishes a task, her final message contains the full answer or plan the user asked for.
  • Mari works on OpenRouter models with large context windows, using a reasonable amount of output per reply, and recovers if the provider says a request is too large or too expensive.

Actual behavior

Missing plan (seen with Claude models):
Mari's final message reads like "I checked this and that, the original plan I made is still there." The plan isn't visible anywhere.

OpenRouter (Kimi K3.1 Pro: fails immediately; Gemini 4 Argon: fails after one action):

The request may exceed the available context budget. OpenRouter API error 402: This request requires more credits, or fewer max_tokens. You requested up to 929637 tokens, but can only afford 176108.

Why it happens

Missing plan. Mari works in rounds. Two things make her text disappear without her knowing:

  • Only her last round's message is kept as her answer; text from earlier rounds is folded into the step timeline. If she writes the plan, then runs a check, the saved answer is just the line about the check. Nothing in her instructions tells her this.
  • Some rounds are rejected and never shown (for example, when she says a change is done before any result confirms it, or sends text without finishing or running a command). The rejected text stays in her own memory, so she thinks you already saw it.

OpenRouter 402. Mari used the connection's Max Tokens as her output budget for every reply. On OpenRouter connections this is often filled from the model's whole window: 943,718 tokens for a 1M-context Kimi K3.1 Pro. OpenRouter reserves credits for the worst case (the prompt plus every requested output token) and refuses the request before the model runs. Gemini 4 Argon's connection had a smaller limit (65,536), so its first request went through. After one action the prompt grew (command results are added every step), and the reservation passed the balance.

Steps to reproduce

Missing plan:

  1. Open Professor Mari with a Claude connection.
  2. Ask for a multi-step change that she will plan and then verify, e.g. "plan out and make these changes to my character, then check they saved".
  3. Look at her final message: it can end with "the original plan is still there" with no plan visible.

OpenRouter:

  1. Create an OpenRouter connection for moonshotai/kimi-k3.1-pro (Max Context 1,048,576; Max Tokens left at its auto-filled ~943k).
  2. Use it for Professor Mari and ask: "read and see if there's any character called Laura here".
  3. The request fails with the 402 error above. With google/gemini-4-argon, Mari completes one action, then fails the same way.

Environment

  • Marinara Engine version: 2.5.1 (also reproduced on staging at 24083470c)
  • Install type: termux (Android APK-managed)
  • OS + version: Android 16
  • Browser or app shell: Marinara Android app

Logs, screenshots, or video

Error text is above. Connection settings for the failing connections:

Connection Model Max Context Max Tokens
Kimi K3.1 Pro (OpenRouter) moonshotai/kimi-k3.1-pro 1,048,576 943,718
Gemini 4 Argon (OpenRouter) google/gemini-4-argon 1,048,576 65,536

Additional context

  • Fix: draft PR #8865. Owner: @mayhair.
  • Workaround until it merges: lower the Max Tokens on the OpenRouter connection (e.g. to 32,768). This avoids the 402 but also limits normal chat replies on that connection.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @mayhair on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8866 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Professor Mari has two bugs that make her unreliable: 1. **She refers to a plan you never got to see.** On multi-step tasks she sometimes writes out a full answer or plan, then runs a few more checks and ends with something like *"I checked X and Y, the original plan I made is still there."* The plan itself isn't anywhere in the chat, so you're left with a reply that points at nothing. 2. **She fails on some OpenRouter models.** With Kimi K3.1 Pro she can't do anything at all. With Gemini 4 Argon she does one step and then fails. Both show an error about credits or context, even when the account has credits and the request is small. ## What this means for users - **Lost answers:** you ask Mari for a plan or a multi-step change, she does the work, and the part you asked for (the plan, the list, the explanation) is missing from her final message. You have to ask again, often more than once, and it costs extra requests. - **Misleading replies:** "the plan is still there" sounds like a finished answer, so it's easy to assume she answered when she didn't. - **Mari unusable on large-context OpenRouter models:** on models with a ~1M token window, Mari fails on the first or second step with a 402 error, so those models simply don't work for her. Normal roleplay chat on the same connection works fine, which makes the cause hard to spot. - **Confusing error message:** the error says "The request may exceed the available context budget", which sends users looking at their context size when the real cause is something else. ## Expected behavior - When Mari finishes a task, her final message contains the full answer or plan the user asked for. - Mari works on OpenRouter models with large context windows, using a reasonable amount of output per reply, and recovers if the provider says a request is too large or too expensive. ## Actual behavior **Missing plan** (seen with Claude models): Mari's final message reads like *"I checked this and that, the original plan I made is still there."* The plan isn't visible anywhere. **OpenRouter (Kimi K3.1 Pro: fails immediately; Gemini 4 Argon: fails after one action):** ``` The request may exceed the available context budget. OpenRouter API error 402: This request requires more credits, or fewer max_tokens. You requested up to 929637 tokens, but can only afford 176108. ``` ## Why it happens **Missing plan.** Mari works in rounds. Two things make her text disappear without her knowing: - Only her *last* round's message is kept as her answer; text from earlier rounds is folded into the step timeline. If she writes the plan, then runs a check, the saved answer is just the line about the check. Nothing in her instructions tells her this. - Some rounds are rejected and never shown (for example, when she says a change is done before any result confirms it, or sends text without finishing or running a command). The rejected text stays in her own memory, so she thinks you already saw it. **OpenRouter 402.** Mari used the connection's Max Tokens as her output budget for every reply. On OpenRouter connections this is often filled from the model's whole window: **943,718** tokens for a 1M-context Kimi K3.1 Pro. OpenRouter reserves credits for the worst case (the prompt plus every requested output token) and refuses the request before the model runs. Gemini 4 Argon's connection had a smaller limit (65,536), so its first request went through. After one action the prompt grew (command results are added every step), and the reservation passed the balance. ## Steps to reproduce **Missing plan:** 1. Open Professor Mari with a Claude connection. 2. Ask for a multi-step change that she will plan and then verify, e.g. "plan out and make these changes to my character, then check they saved". 3. Look at her final message: it can end with "the original plan is still there" with no plan visible. **OpenRouter:** 1. Create an OpenRouter connection for `moonshotai/kimi-k3.1-pro` (Max Context 1,048,576; Max Tokens left at its auto-filled ~943k). 2. Use it for Professor Mari and ask: "read and see if there's any character called Laura here". 3. The request fails with the 402 error above. With `google/gemini-4-argon`, Mari completes one action, then fails the same way. ## Environment - Marinara Engine version: 2.5.1 (also reproduced on `staging` at `24083470c`) - Install type: termux (Android APK-managed) - OS + version: Android 16 - Browser or app shell: Marinara Android app ## Logs, screenshots, or video Error text is above. Connection settings for the failing connections: | Connection | Model | Max Context | Max Tokens | |---|---|---|---| | Kimi K3.1 Pro (OpenRouter) | `moonshotai/kimi-k3.1-pro` | 1,048,576 | 943,718 | | Gemini 4 Argon (OpenRouter) | `google/gemini-4-argon` | 1,048,576 | 65,536 | ## Additional context - **Fix:** draft PR #8865. Owner: @mayhair. - **Workaround until it merges:** lower the Max Tokens on the OpenRouter connection (e.g. to 32,768). This avoids the 402 but also limits normal chat replies on that connection. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:43:34 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Nov 5, 2026):

Fixed by #8865, merged into staging in 9b9275a1af. Thank you, @mayhair.

<!-- gh-comment-id:6658084485 --> @SpicyMarinara commented on GitHub (Nov 5, 2026): Fixed by #8865, merged into staging in 9b9275a1af. Thank you, @mayhair.
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#8530
No description provided.