[GH-ISSUE #5862] [Issue]: Illustrator selects incorrect avatar references #3236

Closed
opened 2026-10-21 06:00:53 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Sep 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5862

Originally assigned to: @SpicyMarinara on GitHub.

Summary

When Send Avatar References is enabled, the Illustrator agent may select avatars belonging to unrelated characters from the global character library. Deterministic selection can cause the same incorrect references to be reused repeatedly.

Expected behavior

Avatar references should correspond only to characters intended for the current scene. Passive text matching should prioritize characters active in the current chat, while global-library characters should require an explicit, unambiguous name match.

Actual behavior

The reference resolver appears to compare generated text with names of all saved characters, allowing common or ambiguous words to match unrelated global-library characters. Multiple cards with the same or similar names may also be selected.

Steps to reproduce

  1. Save multiple character cards, including cards with short or common names.
  2. Enable Send Avatar References for the Illustrator agent.
  3. Generate a scene containing words that overlap with saved character names.
  4. Inspect the avatar references sent to the image provider.

Environment

  • Marinara Engine version: 2.4.4 (build 2.4.4+1a299369ac70, commit 1a299369ac)
  • Install type: Not provided
  • OS + version: Windows 11 per user report; support diagnostics report Windows 10.0.26200 (x64)
  • Browser or app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0

Logs, screenshots, or video

No logs provided. Attached Mermaid logic diagram: https://cdn.discordapp.com/attachments/1545578574122192906/1545581202713616444/mermaid-diagram-2026-09-05-014644.png?ex=6a9caa2a&is=6a9b58aa&hm=55dfa709aa9b547c3b72ad766e13ed7fd1618b2aaf1dd7381919161adf76bb55

Additional context

Illustrator agent version 1.0.4. Active connection is Text through OpenRouter using z-ai/glm-5.2. If the chat has one active character and name resolution fails, the resolver could safely fall back to that character. Ambiguous names should not select multiple cards. A team member noted that characters present in the group chat should be prioritized.

Discord thread: Illustrator selects incorrect avatar references
Discord thread link: https://discord.com/channels/1417099416812392641/1545578574122192906
Requested by: Kuc0 (kuc0, Discord ID 108988150629531648)

Discord thread transcript (5 messages)
[2026-09-04T23:37:27.532Z] ClaudZeta: Marinara Engine: 2.4.4
Illustrator agent: v1.0.4

When Send Avatar References is enabled, the Illustrator may select avatars belonging to unrelated characters from the global character library.

The reference resolver appears to compare the generated text against the names of all saved characters. Common words or ambiguous names can therefore produce false matches. Because selection order is deterministic, the same incorrect references may be used repeatedly, making the feature appear stuck.

Steps to reproduce

Save multiple character cards, including cards with short or common names.

Enable Send Avatar References for the Illustrator agent.

Generate a scene containing words that overlap with saved character names.

Inspect the references sent to the image provider.

Actual result
Unrelated character references may be selected from the global library. Multiple cards with the same or similar name may also be selected.

Expected result
References should correspond only to characters intended for the current scene.

Suggested behavior

Passive text matching should consider only characters active in the current chat.

Global-library characters should require an explicit, unambiguous name match.

Ambiguous names should not select multiple cards.

If the chat has one active character and name resolution fails, the resolver should safely fall back to that character.

Support diagnostics

Marinara Engine diagnostics
Version: 2.4.4
Build: 2.4.4+1a299369ac70
Commit: 1a299369ac70
Server OS: Windows 10.0.26200 (x64)
Server memory: heap 324.5 / 4288 MiB; RSS 662.4 MiB
Client OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0
GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), or similar
Active connection: Text
Connection provider: openrouter
LLM model: z-ai/glm-5.2

(Browser reports w10 so that's what the diagnostics say but the machine is running on w11 - also, bug report written by GPT 5.6, I know nothing about this stuff)
[Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578574122192906]

[2026-09-04T23:37:28.533Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578578320560170]

[2026-09-04T23:38:10.465Z] ClaudZeta: Illustrator selects incorrect avatar references
[Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578754196250658]

[2026-09-04T23:47:54.311Z] ClaudZeta: here's a graph the AI gave me of the logic the agent follows as of now, I don't know if it's 100% correct or if for you guys it might be redundant anyway, but I'm just putting this here cause it might be useful I guess

[attached image 1: https://cdn.discordapp.com/attachments/1545578574122192906/1545581202713616444/mermaid-diagram-2026-09-05-014644.png?ex=6a9caa2a&is=6a9b58aa&hm=55dfa709aa9b547c3b72ad766e13ed7fd1618b2aaf1dd7381919161adf76bb55&]
[Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545581203023732798]

[2026-09-05T09:52:31.084Z] Kuc0: It should prioritize characters present in the group chat, yeah.
[Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545733358838087731]

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 @SpicyMarinara on GitHub (Sep 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5862 Originally assigned to: @SpicyMarinara on GitHub. ## Summary When Send Avatar References is enabled, the Illustrator agent may select avatars belonging to unrelated characters from the global character library. Deterministic selection can cause the same incorrect references to be reused repeatedly. ## Expected behavior Avatar references should correspond only to characters intended for the current scene. Passive text matching should prioritize characters active in the current chat, while global-library characters should require an explicit, unambiguous name match. ## Actual behavior The reference resolver appears to compare generated text with names of all saved characters, allowing common or ambiguous words to match unrelated global-library characters. Multiple cards with the same or similar names may also be selected. ## Steps to reproduce 1. Save multiple character cards, including cards with short or common names. 2. Enable Send Avatar References for the Illustrator agent. 3. Generate a scene containing words that overlap with saved character names. 4. Inspect the avatar references sent to the image provider. ## Environment - Marinara Engine version: 2.4.4 (build 2.4.4+1a299369ac70, commit 1a299369ac70) - Install type: Not provided - OS + version: Windows 11 per user report; support diagnostics report Windows 10.0.26200 (x64) - Browser or app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0 ## Logs, screenshots, or video No logs provided. Attached Mermaid logic diagram: https://cdn.discordapp.com/attachments/1545578574122192906/1545581202713616444/mermaid-diagram-2026-09-05-014644.png?ex=6a9caa2a&is=6a9b58aa&hm=55dfa709aa9b547c3b72ad766e13ed7fd1618b2aaf1dd7381919161adf76bb55 ## Additional context Illustrator agent version 1.0.4. Active connection is Text through OpenRouter using z-ai/glm-5.2. If the chat has one active character and name resolution fails, the resolver could safely fall back to that character. Ambiguous names should not select multiple cards. A team member noted that characters present in the group chat should be prioritized. Discord thread: Illustrator selects incorrect avatar references Discord thread link: https://discord.com/channels/1417099416812392641/1545578574122192906 Requested by: Kuc0 (kuc0, Discord ID 108988150629531648) <details> <summary>Discord thread transcript (5 messages)</summary> ```text [2026-09-04T23:37:27.532Z] ClaudZeta: Marinara Engine: 2.4.4 Illustrator agent: v1.0.4 When Send Avatar References is enabled, the Illustrator may select avatars belonging to unrelated characters from the global character library. The reference resolver appears to compare the generated text against the names of all saved characters. Common words or ambiguous names can therefore produce false matches. Because selection order is deterministic, the same incorrect references may be used repeatedly, making the feature appear stuck. Steps to reproduce Save multiple character cards, including cards with short or common names. Enable Send Avatar References for the Illustrator agent. Generate a scene containing words that overlap with saved character names. Inspect the references sent to the image provider. Actual result Unrelated character references may be selected from the global library. Multiple cards with the same or similar name may also be selected. Expected result References should correspond only to characters intended for the current scene. Suggested behavior Passive text matching should consider only characters active in the current chat. Global-library characters should require an explicit, unambiguous name match. Ambiguous names should not select multiple cards. If the chat has one active character and name resolution fails, the resolver should safely fall back to that character. Support diagnostics Marinara Engine diagnostics Version: 2.4.4 Build: 2.4.4+1a299369ac70 Commit: 1a299369ac70 Server OS: Windows 10.0.26200 (x64) Server memory: heap 324.5 / 4288 MiB; RSS 662.4 MiB Client OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), or similar Active connection: Text Connection provider: openrouter LLM model: z-ai/glm-5.2 (Browser reports w10 so that's what the diagnostics say but the machine is running on w11 - also, bug report written by GPT 5.6, I know nothing about this stuff) [Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578574122192906] [2026-09-04T23:37:28.533Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578578320560170] [2026-09-04T23:38:10.465Z] ClaudZeta: Illustrator selects incorrect avatar references [Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545578754196250658] [2026-09-04T23:47:54.311Z] ClaudZeta: here's a graph the AI gave me of the logic the agent follows as of now, I don't know if it's 100% correct or if for you guys it might be redundant anyway, but I'm just putting this here cause it might be useful I guess [attached image 1: https://cdn.discordapp.com/attachments/1545578574122192906/1545581202713616444/mermaid-diagram-2026-09-05-014644.png?ex=6a9caa2a&is=6a9b58aa&hm=55dfa709aa9b547c3b72ad766e13ed7fd1618b2aaf1dd7381919161adf76bb55&] [Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545581203023732798] [2026-09-05T09:52:31.084Z] Kuc0: It should prioritize characters present in the group chat, yeah. [Discord message: https://discord.com/channels/1417099416812392641/1545578574122192906/1545733358838087731] ``` </details> ## 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 06:00:53 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.

<!-- gh-comment-id:5551229924 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Owner: @SpicyMarinara, implementation by Codex in Issue Sweep PR #5865. I have read the issue and all current comments. Work will target staging, reuse existing code, and include focused regression proof; unrelated open/draft PRs remain untouched.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 5, 2026):

Completed on staging in #5865 (merge 314a71a586).

Scoped passive Illustrator avatar matching to the current chat and made explicit-name resolution unambiguous.

Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.

<!-- gh-comment-id:5552144800 --> @SpicyMarinara commented on GitHub (Sep 5, 2026): Completed on staging in #5865 (merge 314a71a5862f120284bb24014e401e226be79866). Scoped passive Illustrator avatar matching to the current chat and made explicit-name resolution unambiguous. Focused regression proof and manual verification boundaries are documented in the PR. Required checks and the full final regression matrix passed; CodeRabbit completed review with all threads resolved. Closing as completed on staging, not a main release.
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#3236
No description provided.