[PR #3337] [MERGED] Fix Grok CLI model selection #5884

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

📋 Pull Request Information

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

Base: staging ← Head: agent/fix-grok-cli-model-selection


📝 Commits (1)

  • 7df3eb2 Fix Grok CLI model selection

📊 Changes

5 files changed (+302 additions, -144 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+37 -25)
📝 packages/server/src/routes/connections.routes.ts (+31 -36)
📝 packages/server/src/services/llm/providers/grok-subscription.provider.ts (+229 -69)
📝 packages/shared/src/constants/model-lists.ts (+4 -14)

📄 Description

Summary

Fix Grok CLI (Subscription) connections so Marinara no longer seeds or sends stale grok-build-* aliases that local Grok CLI installs can reject. The connection can now leave the model blank to use the CLI default, and model fetching calls grok models so users select IDs their local CLI actually supports.

Why

A user reported that the connection fetched models but test requests failed with unknown model id for grok-build-latest. That alias came from Marinara's static fallback list, not from the installed CLI account/model surface.

Changes

  • Remove the static Grok CLI model fallback list so stale aliases are not seeded.
  • Normalize older saved grok-build-* aliases to a blank model field.
  • Fetch Grok CLI models through grok models.
  • Allow Grok CLI connection tests/test messages to run with a blank model and use the local CLI default.
  • Improve the unavailable-model error with a direct fetch/clear-model recovery path.
  • Update the v2.1.1 changelog.

Validation

  • pnpm check
  • git diff --check

Manual Verification Needed

  • Verify on a machine with grok installed and authenticated that “Fetch Models from Grok CLI” returns selectable IDs.
  • Verify a blank Grok CLI model field sends a test request using the local CLI default.
  • Verify selecting a fetched model sends a test request with that exact ID.

Notes

Live Grok CLI execution was not available on this machine because grok is not installed locally.

Summary by CodeRabbit

  • New Features
    • Grok CLI subscriptions now detect available models automatically and support testing with the local default model when no model is selected.
  • Bug Fixes
    • Fixed Grok CLI connections from showing or saving outdated model aliases.
    • Improved connection saving and export so blank or invalid Grok model values are handled correctly.
    • Test requests now work for Grok CLI subscriptions even when no model is configured.

🔄 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/3337 **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-model-selection` --- ### 📝 Commits (1) - [`7df3eb2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7df3eb216d171ecd057e9e208a92a4793631477c) Fix Grok CLI model selection ### 📊 Changes **5 files changed** (+302 additions, -144 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+37 -25) 📝 `packages/server/src/routes/connections.routes.ts` (+31 -36) 📝 `packages/server/src/services/llm/providers/grok-subscription.provider.ts` (+229 -69) 📝 `packages/shared/src/constants/model-lists.ts` (+4 -14) </details> ### 📄 Description ## Summary Fix Grok CLI (Subscription) connections so Marinara no longer seeds or sends stale `grok-build-*` aliases that local Grok CLI installs can reject. The connection can now leave the model blank to use the CLI default, and model fetching calls `grok models` so users select IDs their local CLI actually supports. ## Why A user reported that the connection fetched models but test requests failed with `unknown model id` for `grok-build-latest`. That alias came from Marinara's static fallback list, not from the installed CLI account/model surface. ## Changes - Remove the static Grok CLI model fallback list so stale aliases are not seeded. - Normalize older saved `grok-build-*` aliases to a blank model field. - Fetch Grok CLI models through `grok models`. - Allow Grok CLI connection tests/test messages to run with a blank model and use the local CLI default. - Improve the unavailable-model error with a direct fetch/clear-model recovery path. - Update the v2.1.1 changelog. ## Validation - `pnpm check` - `git diff --check` ## Manual Verification Needed - Verify on a machine with `grok` installed and authenticated that “Fetch Models from Grok CLI” returns selectable IDs. - Verify a blank Grok CLI model field sends a test request using the local CLI default. - Verify selecting a fetched model sends a test request with that exact ID. ## Notes Live Grok CLI execution was not available on this machine because `grok` is not installed locally. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Grok CLI subscriptions now detect available models automatically and support testing with the local default model when no model is selected. * **Bug Fixes** * Fixed Grok CLI connections from showing or saving outdated model aliases. * Improved connection saving and export so blank or invalid Grok model values are handled correctly. * Test requests now work for Grok CLI subscriptions even when no model is configured. <!-- 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:04:48 +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#5884
No description provided.