[GH-ISSUE #2811] [Issue]: Music DJ editor still shows Spotify prompt + tools after switching to YouTube #1428

Closed
opened 2026-10-21 05:33:44 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (Jun 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2811

Originally assigned to: @Romuromylus on GitHub.

Summary

In the Music DJ agent editor, switching the Music Player provider to YouTube leaves two sections looking Spotify-only: the Prompt Template preview still shows the Spotify built-in prompt, and the Tools / Function Calling section shows a bare "0/15 enabled" with the now-inert Spotify tool toggles still listed. This reads as "the YouTube mode is missing its prompt and tools," when in fact the backend already handles YouTube correctly.

Expected behavior

When the Music Player provider is set to YouTube:

  • The Prompt Template preview should show the YouTube built-in prompt (getDefaultAgentPrompt("youtube")) — the short, tool-free prompt that asks the model for a searchQuery.
  • The Tools / Function Calling section should make clear that YouTube mode is tool-free by design (Music DJ returns its pick as JSON and the app plays the top YouTube search result), rather than presenting a confusing "0/15 enabled" list of Spotify tools that get discarded on save.

Actual behavior

With the provider switched to YouTube:

  • The Prompt Template preview still renders the Spotify-worded built-in prompt (Spotify tool names, spotify: URIs, trackUris/trackNames).
  • The Tools section shows "0/15 enabled" and still lists the 6 Spotify tool toggles, with no explanation. Toggling any of them on is silently discarded on save (YouTube mode forces enabledTools: []).

This is purely an editor-display gap. At generation time the backend already does the right thing: it swaps to the YouTube prompt (getAgentFallbackPrompt / getDefaultPromptForAgent) and forces enabledTools: [] for YouTube via applyMusicPlayerSourceToMusicDjSettings. The editor just doesn't reflect the provider in these two sections.

Steps to reproduce

  1. Open the Music DJ agent in the agent editor.
  2. Under "Music Player", switch the provider from Spotify to YouTube.
  3. Look at the Prompt Template section — it still shows the Spotify built-in default.
  4. Expand Tools / Function Calling — it shows "0/15 enabled" and the Spotify tool toggles, with no indication that YouTube mode uses no tools.

Environment

  • Marinara Engine version: staging
  • Install type: source
  • OS + version: N/A (cross-platform; client UI)
  • Browser or app shell: web client

Logs, screenshots, or video

Additional context

Root cause is in packages/client/src/components/agents/AgentEditor.tsx:

  • defaultPrompt is memoized off agentDetailId only (always "spotify" for Music DJ), so the preview never reflects the YouTube provider.
  • The Tools / Function Calling FieldGroup and its selectedVisibleToolCount/availableVisibleToolCount summary are not provider-aware.

The backend YouTube prompt lives at packages/shared/src/constants/agent-prompts.ts (the youtube key), and provider-aware selection already happens in packages/server/src/services/generation/agent-resolution.ts and packages/server/src/services/agents/agent-executor.ts.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (Jun 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2811 Originally assigned to: @Romuromylus on GitHub. ## Summary In the Music DJ agent editor, switching the Music Player provider to YouTube leaves two sections looking Spotify-only: the Prompt Template preview still shows the Spotify built-in prompt, and the Tools / Function Calling section shows a bare "0/15 enabled" with the now-inert Spotify tool toggles still listed. This reads as "the YouTube mode is missing its prompt and tools," when in fact the backend already handles YouTube correctly. ## Expected behavior When the Music Player provider is set to YouTube: - The Prompt Template preview should show the YouTube built-in prompt (`getDefaultAgentPrompt("youtube")`) — the short, tool-free prompt that asks the model for a `searchQuery`. - The Tools / Function Calling section should make clear that YouTube mode is tool-free by design (Music DJ returns its pick as JSON and the app plays the top YouTube search result), rather than presenting a confusing "0/15 enabled" list of Spotify tools that get discarded on save. ## Actual behavior With the provider switched to YouTube: - The Prompt Template preview still renders the Spotify-worded built-in prompt (Spotify tool names, `spotify:` URIs, `trackUris`/`trackNames`). - The Tools section shows "0/15 enabled" and still lists the 6 Spotify tool toggles, with no explanation. Toggling any of them on is silently discarded on save (YouTube mode forces `enabledTools: []`). This is purely an editor-display gap. At generation time the backend already does the right thing: it swaps to the YouTube prompt (`getAgentFallbackPrompt` / `getDefaultPromptForAgent`) and forces `enabledTools: []` for YouTube via `applyMusicPlayerSourceToMusicDjSettings`. The editor just doesn't reflect the provider in these two sections. ## Steps to reproduce 1. Open the Music DJ agent in the agent editor. 2. Under "Music Player", switch the provider from Spotify to YouTube. 3. Look at the Prompt Template section — it still shows the Spotify built-in default. 4. Expand Tools / Function Calling — it shows "0/15 enabled" and the Spotify tool toggles, with no indication that YouTube mode uses no tools. ## Environment - Marinara Engine version: staging - Install type: source - OS + version: N/A (cross-platform; client UI) - Browser or app shell: web client ## Logs, screenshots, or video <!-- N/A — UI display gap; reproducible from the steps above. --> ## Additional context Root cause is in `packages/client/src/components/agents/AgentEditor.tsx`: - `defaultPrompt` is memoized off `agentDetailId` only (always `"spotify"` for Music DJ), so the preview never reflects the YouTube provider. - The Tools / Function Calling `FieldGroup` and its `selectedVisibleToolCount`/`availableVisibleToolCount` summary are not provider-aware. The backend YouTube prompt lives at `packages/shared/src/constants/agent-prompts.ts` (the `youtube` key), and provider-aware selection already happens in `packages/server/src/services/generation/agent-resolution.ts` and `packages/server/src/services/agents/agent-executor.ts`. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:33:44 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
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#1428
No description provided.