[PR #246] [MERGED] fix(connections): allow Claude (Subscription) chats past the baseUrl gate #4529

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/246
Author: @LukaTheHero
Created: 4/26/2026
Status: ✅ Merged
Merged: 4/26/2026
Merged by: @LukaTheHero

Base: main ← Head: fix/claude-subscription-base-url-gate


📝 Commits (1)

  • bf379e8 fix(connections): allow Claude (Subscription) chats past the baseUrl gate

📊 Changes

2 files changed (+7 additions, -0 deletions)

View changed files

📝 packages/server/src/routes/conversation.routes.ts (+3 -0)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+4 -0)

📄 Description

Summary

  • After #243, real chat messages with a Claude (Subscription) connection failed with No base URL configured for this connection, even though the connection test and test-message both succeeded.
  • Root cause: the provider has no HTTP endpoint (the Agent SDK uses local claude login credentials), so its defaultBaseUrl is "". resolveBaseUrl() therefore returned "", and the chat paths in generate.routes.ts and conversation.routes.ts both reject empty baseUrls. The test-message endpoint had an inline exemption; the chat paths did not.
  • Fix: centralize the exemption in resolveBaseUrl() (both copies) so a sentinel is returned for claude_subscription. The ClaudeSubscriptionProvider ignores baseUrl entirely, so the sentinel is harmless — it just clears the precondition.

Test plan

  • pnpm check passes (typecheck + lint + build).
  • Test message on a claude_subscription connection still works.
  • Send a real chat message on a claude_subscription connection → no longer errors with "No base URL configured…".
  • Autonomous conversation generation on a claude_subscription connection no longer errors at the baseUrl gate.

Notes

A few non-chat features (character-maker, lorebook-maker, encounter, scene, persona-maker, translate, prompt-reviewer, game) build their baseUrl inline with the same gate. They are not affected by user reports yet but would hit the same wall if pointed at a claude_subscription connection — worth a follow-up if we want full coverage.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Claude subscription connections without HTTP endpoints to work properly with schedule generation functionality.

🔄 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/246 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/26/2026 **Status:** ✅ Merged **Merged:** 4/26/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `fix/claude-subscription-base-url-gate` --- ### 📝 Commits (1) - [`bf379e8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bf379e8ff09543d310952b02397fcc6c05e7555c) fix(connections): allow Claude (Subscription) chats past the baseUrl gate ### 📊 Changes **2 files changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/conversation.routes.ts` (+3 -0) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+4 -0) </details> ### 📄 Description ## Summary - After #243, real chat messages with a Claude (Subscription) connection failed with `No base URL configured for this connection`, even though the connection test and test-message both succeeded. - Root cause: the provider has no HTTP endpoint (the Agent SDK uses local `claude login` credentials), so its `defaultBaseUrl` is `""`. `resolveBaseUrl()` therefore returned `""`, and the chat paths in `generate.routes.ts` and `conversation.routes.ts` both reject empty baseUrls. The test-message endpoint had an inline exemption; the chat paths did not. - Fix: centralize the exemption in `resolveBaseUrl()` (both copies) so a sentinel is returned for `claude_subscription`. The `ClaudeSubscriptionProvider` ignores `baseUrl` entirely, so the sentinel is harmless — it just clears the precondition. ## Test plan - [x] `pnpm check` passes (typecheck + lint + build). - [x] Test message on a `claude_subscription` connection still works. - [x] Send a real chat message on a `claude_subscription` connection → no longer errors with "No base URL configured…". - [x] Autonomous conversation generation on a `claude_subscription` connection no longer errors at the baseUrl gate. ## Notes A few non-chat features (character-maker, lorebook-maker, encounter, scene, persona-maker, translate, prompt-reviewer, game) build their baseUrl inline with the same gate. They are not affected by user reports yet but would hit the same wall if pointed at a `claude_subscription` connection — worth a follow-up if we want full coverage. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed Claude subscription connections without HTTP endpoints to work properly with schedule generation functionality. <!-- 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:08:26 +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#4529
No description provided.