Skip to content

Fix moderation only checking left model's conversation in arena battles#3850

Open
Chessing234 wants to merge 1 commit intolm-sys:mainfrom
Chessing234:fix/arena-moderation-wrong-state-index
Open

Fix moderation only checking left model's conversation in arena battles#3850
Chessing234 wants to merge 1 commit intolm-sys:mainfrom
Chessing234:fix/arena-moderation-wrong-state-index

Conversation

@Chessing234
Copy link
Copy Markdown

Bug

In gradio_block_arena_anony.py and gradio_block_arena_vision_named.py, all_conv_text_right reads from states[0] (left model) instead of states[1] (right model):

all_conv_text_left = states[0].conv.get_prompt()
all_conv_text_right = states[0].conv.get_prompt()  # bug: should be states[1]

This means the right model's conversation is never passed to the moderation filter, allowing policy-violating content through unchecked.

Root cause

Copy-paste error. The correct version exists in gradio_block_arena_named.py (line 182), which uses states[1].

Fix

Change states[0]states[1] for all_conv_text_right in both files.

🤖 Generated with Claude Code

all_conv_text_right reads from states[0] (left model) instead of
states[1] (right model), so the right model's conversation is never
moderation-checked. This is a copy-paste error — the named arena file
(gradio_block_arena_named.py) correctly uses states[1].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant