[PR #2652] [MERGED] [codex] Fix connection model picker and generation responsiveness #5707

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

📋 Pull Request Information

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

Base: staging ← Head: codex/fix-connections-generation-responsiveness


📝 Commits (2)

  • e29c4c4 fix connection model picker and generation responsiveness
  • ce45567 address coderabbit yield feedback

📊 Changes

8 files changed (+67 additions, -100 deletions)

View changed files

📝 packages/client/src/components/connections/ConnectionEditor.tsx (+3 -53)
📝 packages/server/src/routes/connections.routes.ts (+5 -1)
📝 packages/server/src/routes/generate.routes.ts (+31 -27)
📝 packages/server/src/routes/generate/dry-run-route.ts (+14 -9)
📝 packages/server/src/services/llm/base-provider.ts (+6 -2)
📝 packages/server/src/services/llm/providers/anthropic.provider.ts (+1 -1)
📝 packages/server/src/services/llm/providers/google.provider.ts (+1 -1)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+6 -6)

📄 Description

Summary

  • Anchor the connection editor model dropdown to the model search field so the Fetch Models panel moves with the field during editor scroll.
  • Make fetched-model HTML error hints say "connection" for non-image providers while preserving "image service" for image-generation connections.
  • Add cooperative event-loop yields during burst token fan-out in generation and dry-run streaming, and allow async LLM token callbacks across OpenAI, Anthropic, and Google provider paths.

Why

Users reported that the connection model picker floated away from the model field while scrolling. Another report noted that large or buffered generations could monopolize server responsiveness, delaying chat navigation and health checks while Marinara fanned provider output into tiny SSE token chunks.

Validation

  • pnpm --filter @marinara-engine/client lint
  • pnpm --filter @marinara-engine/client build
  • pnpm --filter @marinara-engine/server lint
  • pnpm --filter @marinara-engine/server build
  • git diff --check

Manual verification

  • Manually verify the connection editor model dropdown stays attached to the model search field while scrolling.
  • Manually verify /api/health remains responsive during a long generation on a Node 24 runtime.

Issue

No linked issue yet; one should be opened before submission per CONTRIBUTING.md.

Summary by CodeRabbit

  • Bug Fixes

    • Improved connection troubleshooting hints by showing provider-specific guidance when validating base URLs.
  • Performance Improvements

    • Made token streaming more responsive and reliable during generation, reducing potential event-loop stalls.
    • Ensured token callbacks complete before continuing streaming flow across supported LLM providers.
  • UI/UX Improvements

    • Simplified model dropdown placement and anchoring to be more consistent relative to the trigger.

🔄 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/2652 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 6/20/2026 **Status:** ✅ Merged **Merged:** 6/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/fix-connections-generation-responsiveness` --- ### 📝 Commits (2) - [`e29c4c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e29c4c4e02728a1195a7ab7bb4a7e78bb5f463bb) fix connection model picker and generation responsiveness - [`ce45567`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ce45567c9d3ff0fcc79551e2bbee32bf12e95632) address coderabbit yield feedback ### 📊 Changes **8 files changed** (+67 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+3 -53) 📝 `packages/server/src/routes/connections.routes.ts` (+5 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+31 -27) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+14 -9) 📝 `packages/server/src/services/llm/base-provider.ts` (+6 -2) 📝 `packages/server/src/services/llm/providers/anthropic.provider.ts` (+1 -1) 📝 `packages/server/src/services/llm/providers/google.provider.ts` (+1 -1) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+6 -6) </details> ### 📄 Description ## Summary - Anchor the connection editor model dropdown to the model search field so the Fetch Models panel moves with the field during editor scroll. - Make fetched-model HTML error hints say "connection" for non-image providers while preserving "image service" for image-generation connections. - Add cooperative event-loop yields during burst token fan-out in generation and dry-run streaming, and allow async LLM token callbacks across OpenAI, Anthropic, and Google provider paths. ## Why Users reported that the connection model picker floated away from the model field while scrolling. Another report noted that large or buffered generations could monopolize server responsiveness, delaying chat navigation and health checks while Marinara fanned provider output into tiny SSE token chunks. ## Validation - `pnpm --filter @marinara-engine/client lint` - `pnpm --filter @marinara-engine/client build` - `pnpm --filter @marinara-engine/server lint` - `pnpm --filter @marinara-engine/server build` - `git diff --check` ## Manual verification - Manually verify the connection editor model dropdown stays attached to the model search field while scrolling. - Manually verify `/api/health` remains responsive during a long generation on a Node 24 runtime. ## Issue No linked issue yet; one should be opened before submission per `CONTRIBUTING.md`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved connection troubleshooting hints by showing provider-specific guidance when validating base URLs. * **Performance Improvements** * Made token streaming more responsive and reliable during generation, reducing potential event-loop stalls. * Ensured token callbacks complete before continuing streaming flow across supported LLM providers. * **UI/UX Improvements** * Simplified model dropdown placement and anchoring to be more consistent relative to the trigger. <!-- 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:18:43 +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#5707
No description provided.