[PR #2671] [MERGED] Fix assigned provider and connection issue sweep #5711

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

📋 Pull Request Information

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

Base: staging ← Head: codex/spicymarinara-assigned-issues


📝 Commits (2)

  • caca4e0 Fix SpicyMarinara assigned issue sweep
  • afdc874 Address connection CodeRabbit feedback

📊 Changes

18 files changed (+466 additions, -151 deletions)

View changed files

📝 packages/client/src/components/connections/ConnectionEditor.tsx (+43 -11)
📝 packages/client/src/hooks/use-chats.ts (+7 -7)
📝 packages/client/src/hooks/use-connections.ts (+1 -0)
📝 packages/client/src/lib/connection-transfer.ts (+4 -0)
📝 packages/server/src/db/migrate.ts (+9 -1)
📝 packages/server/src/db/schema/connections.ts (+2 -0)
📝 packages/server/src/routes/connections.routes.ts (+20 -2)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+31 -12)
📝 packages/server/src/services/generation/generation-parameters.ts (+2 -5)
📝 packages/server/src/services/llm/providers/anthropic.provider.ts (+67 -41)
📝 packages/server/src/services/llm/providers/claude-subscription.provider.ts (+1 -1)
📝 packages/server/src/services/llm/providers/google.provider.ts (+152 -55)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+1 -1)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+117 -14)
📝 packages/server/src/services/storage/connections.storage.ts (+5 -0)
📝 packages/shared/src/schemas/connection.schema.ts (+1 -0)
📝 packages/shared/src/schemas/prompt.schema.ts (+1 -1)
📝 packages/shared/src/types/connection.ts (+2 -0)

📄 Description

Why this change

This PR addresses the open issues assigned to SpicyMarinara around provider error handling, generation-parameter validation, preset/connection state races, and Professor Mari local/custom endpoint tool fallback.

Addresses closed issues: #2651, #2659, #2660, #2661, #2662, #2663, #2664, #2665, #2666, #2667.

What changed

  • Surface Anthropic and Gemini streamed provider errors instead of treating partial output as success.
  • Surface Gemini blocked/empty responses instead of returning blank stop results.
  • Apply connection max-output caps across Anthropic, Google/Gemini, and Claude subscription budget paths.
  • Guard Anthropic/Gemini embedding calls from using inherited OpenAI-style /embeddings behavior.
  • Preserve top_p=0 and validate/salvage stored generation parameters with schema bounds.
  • Prevent metadata cache updates from overwriting newer chat fields such as promptPresetId.
  • Reset stale model-specific connection state when switching providers.
  • Add a Treat as local/custom endpoint connection toggle and Professor Mari JSON tool fallback path.

Validation

  • pnpm check
  • pnpm db:push attempted, but this checkout has no db:push script/command.
  • Manually verify Professor Mari workspace tool use against a custom-domain local endpoint.
  • Manually verify connection editor provider switching clears stale output caps.
  • Manually verify preset assignment no longer reverts under slow network conditions.

Notes

The local shell is Node v20.11.1, while the repo declares Node >=24 <26. Vite also warned that it prefers Node >=20.19 or >=22.12, but the build completed successfully.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Local / Custom Endpoint" toggle in connection settings for non-image-generation providers to support local endpoint configurations.
  • Improvements

    • Enhanced parameter validation with clearer error messages.
    • Improved generation parameter handling and normalization across supported providers.

🔄 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/2671 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 6/20/2026 **Status:** ✅ Merged **Merged:** 6/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/spicymarinara-assigned-issues` --- ### 📝 Commits (2) - [`caca4e0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/caca4e0da18622d1a96d2b934ced88572c340a19) Fix SpicyMarinara assigned issue sweep - [`afdc874`](https://github.com/Pasta-Devs/Marinara-Engine/commit/afdc8740ea64ff25edf2068b2922d8bfdec9a87a) Address connection CodeRabbit feedback ### 📊 Changes **18 files changed** (+466 additions, -151 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+43 -11) 📝 `packages/client/src/hooks/use-chats.ts` (+7 -7) 📝 `packages/client/src/hooks/use-connections.ts` (+1 -0) 📝 `packages/client/src/lib/connection-transfer.ts` (+4 -0) 📝 `packages/server/src/db/migrate.ts` (+9 -1) 📝 `packages/server/src/db/schema/connections.ts` (+2 -0) 📝 `packages/server/src/routes/connections.routes.ts` (+20 -2) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+31 -12) 📝 `packages/server/src/services/generation/generation-parameters.ts` (+2 -5) 📝 `packages/server/src/services/llm/providers/anthropic.provider.ts` (+67 -41) 📝 `packages/server/src/services/llm/providers/claude-subscription.provider.ts` (+1 -1) 📝 `packages/server/src/services/llm/providers/google.provider.ts` (+152 -55) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+1 -1) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+117 -14) 📝 `packages/server/src/services/storage/connections.storage.ts` (+5 -0) 📝 `packages/shared/src/schemas/connection.schema.ts` (+1 -0) 📝 `packages/shared/src/schemas/prompt.schema.ts` (+1 -1) 📝 `packages/shared/src/types/connection.ts` (+2 -0) </details> ### 📄 Description ## Why this change This PR addresses the open issues assigned to SpicyMarinara around provider error handling, generation-parameter validation, preset/connection state races, and Professor Mari local/custom endpoint tool fallback. Addresses closed issues: #2651, #2659, #2660, #2661, #2662, #2663, #2664, #2665, #2666, #2667. ## What changed - Surface Anthropic and Gemini streamed provider errors instead of treating partial output as success. - Surface Gemini blocked/empty responses instead of returning blank stop results. - Apply connection max-output caps across Anthropic, Google/Gemini, and Claude subscription budget paths. - Guard Anthropic/Gemini embedding calls from using inherited OpenAI-style /embeddings behavior. - Preserve top_p=0 and validate/salvage stored generation parameters with schema bounds. - Prevent metadata cache updates from overwriting newer chat fields such as promptPresetId. - Reset stale model-specific connection state when switching providers. - Add a Treat as local/custom endpoint connection toggle and Professor Mari JSON tool fallback path. ## Validation - pnpm check - pnpm db:push attempted, but this checkout has no db:push script/command. - [ ] Manually verify Professor Mari workspace tool use against a custom-domain local endpoint. - [ ] Manually verify connection editor provider switching clears stale output caps. - [ ] Manually verify preset assignment no longer reverts under slow network conditions. ## Notes The local shell is Node v20.11.1, while the repo declares Node >=24 <26. Vite also warned that it prefers Node >=20.19 or >=22.12, but the build completed successfully. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added "Local / Custom Endpoint" toggle in connection settings for non-image-generation providers to support local endpoint configurations. * **Improvements** * Enhanced parameter validation with clearer error messages. * Improved generation parameter handling and normalization across supported providers. <!-- 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:45 +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#5711
No description provided.