[PR #3339] [MERGED] Fix Grok CLI roleplay context handling #5886

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

📋 Pull Request Information

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

Base: staging ← Head: agent/fix-grok-cli-roleplay-models


📝 Commits (2)

  • dbee8b5 Fix Grok CLI roleplay context handling
  • 38dfe13 Address Grok CLI review feedback

📊 Changes

3 files changed (+68 additions, -11 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+22 -6)
📝 packages/server/src/services/llm/providers/grok-subscription.provider.ts (+45 -5)

📄 Description

Linked issue

No linked issue. User-reported Grok CLI subscription regression during roleplay testing.

Why this change

Grok CLI subscription connections could expose model IDs that the user's local CLI login could not actually run, and large roleplay prompts could make the local CLI fail with max turns reached. The test message path was small enough to pass, which made the roleplay-only failure confusing.

What changed

  • Prefer grok-composer-2.5-fast from fetched Grok CLI models when available, and filter obviously unavailable model rows.
  • Start Grok CLI subscription connections with a safer 32k context window, including old connections that inherited the unsafe 128k default.
  • Run the CLI with a stricter one-shot system override and a clearer max turns reached diagnostic that points users toward lowering context or using the Composer model/default CLI model.
  • Updated the v2.1.1 changelog entry.

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

  • Ran pnpm check locally; it passed.
  • Ran git diff --check; it passed.
  • Could not perform a live Grok CLI request on this machine because grok is not installed on PATH.

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)

CHANGELOG.md was updated for v2.1.1. No version bump or user-facing docs change was needed.

UI evidence (if applicable)

N/A. This is connection behavior and helper copy only.


🔄 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/3339 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/7/2026 **Status:** ✅ Merged **Merged:** 7/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-grok-cli-roleplay-models` --- ### 📝 Commits (2) - [`dbee8b5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dbee8b5ce01a7736ad800914b666aabedb8536b6) Fix Grok CLI roleplay context handling - [`38dfe13`](https://github.com/Pasta-Devs/Marinara-Engine/commit/38dfe131a411bf8c92f91e81dfd00c1ef61a2b3f) Address Grok CLI review feedback ### 📊 Changes **3 files changed** (+68 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+22 -6) 📝 `packages/server/src/services/llm/providers/grok-subscription.provider.ts` (+45 -5) </details> ### 📄 Description ## Linked issue No linked issue. User-reported Grok CLI subscription regression during roleplay testing. ## Why this change Grok CLI subscription connections could expose model IDs that the user's local CLI login could not actually run, and large roleplay prompts could make the local CLI fail with `max turns reached`. The test message path was small enough to pass, which made the roleplay-only failure confusing. ## What changed - Prefer `grok-composer-2.5-fast` from fetched Grok CLI models when available, and filter obviously unavailable model rows. - Start Grok CLI subscription connections with a safer 32k context window, including old connections that inherited the unsafe 128k default. - Run the CLI with a stricter one-shot system override and a clearer `max turns reached` diagnostic that points users toward lowering context or using the Composer model/default CLI model. - Updated the v2.1.1 changelog entry. ## 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 - Ran `pnpm check` locally; it passed. - Ran `git diff --check`; it passed. - Could not perform a live Grok CLI request on this machine because `grok` is not installed on PATH. ## 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) CHANGELOG.md was updated for v2.1.1. No version bump or user-facing docs change was needed. ## UI evidence (if applicable) N/A. This is connection behavior and helper copy only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:04:50 +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#5886
No description provided.