Skip to content

feat/vision sidecar - #206

Open
Desperado wants to merge 4 commits into
mainfrom
feat/vision-sidecar
Open

Desperado wants to merge 4 commits into
mainfrom
feat/vision-sidecar

Conversation

@Desperado

Copy link
Copy Markdown
Contributor
  • fix(update): make TestExtractBinaryZip arch-aware
  • feat: add gemma 4 vision sidecar for text-only backends like z.ai glm

@qualitymaxapp

qualitymaxapp Bot commented Sep 18, 2026

Copy link
Copy Markdown

QualityMax Review

Verdict: COMMENT · Confidence: evidence-backed scan

Files eligible: 11 · Files reviewed: 11 · Files with findings: 0 · Findings: 0 · Inline cards: 0

Priority findings

priority location finding
No blocking findings

Review gates

gate status
AI diff review completed · eligible 11, reviewed 11 · LLM · served gemini-3.1-flash-lite
SAST completed · eligible 11, reviewed 11 · hybrid · served claude-haiku-4-5-20251001 · requested qwen3.7-plus
Overall review evidence clean
Inline evidence not needed

Important files

file risk note next step
No findings

Change diagram — Flow

graph TD
    A[User Input: Prompt + Images] --> B{ShouldUseVisionSidecar?}
    B -- Yes --> C[DescribeImagesWithGemma (Cerebras)]
    C --> D[BuildSidecarAugmentedPrompt]
    D --> E[RunCLI (Main LLM)]
    B -- No --> E
    E --> F[Final Response]
Loading

Review lifecycle

Use the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 1 prior card(s) are stale/resolved on this head. Thread reconciliation resolved 1/1 superseded QualityMax thread(s). @qmax Q&A is tracked separately.

Proof legend: VERIFIED independently judged patch · REPRODUCED verified finding · GROUNDED deterministic evidence · MODEL-ONLY model judgment.

QualityMax project results are available in the configured project.

Receipt · commit 2650b2be9b7e73e304f2703cdf501df258530164 · run 2026-09-18T11:26:53+00:00 · model served claude-haiku-4-5-20251001, gemini-3.1-flash-lite · model requested qwen3.7-plus, gemini-3.1-flash-lite · model review recorded — 1343 model output tokens · model source repository ai_review_preferences.preferred_model · re-review 3 · proof counts {}

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

@qualitymaxapp

qualitymaxapp Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ QualityMax Pipeline

Gate Result
🔍 AI diff review ✅ Clean · gemini-3.1-flash-lite · completed · 11 eligible / 11 reviewed · gemini-3.1-flash-lite
🔍 SAST completed · 11 eligible / 11 reviewed · claude-haiku-4-5-20251001
🔍 Canonical PR review delivery completed · 0 eligible / 0 reviewed · exact-head review #5247243486 and overview #5728556476 confirmed
🧪 Repo Tests ✅ 850/850 passed (go)

Powered by QualityMax — AI-Powered Test Automation

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

@qualitymaxapp

qualitymaxapp Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ QualityMax Diff Analysis — WARN

The vision sidecar implementation is well-integrated and logically sound, but the prompt injection mitigation is insufficient. The current sanitization strategy for the description output is easily bypassed, potentially allowing the vision model to influence the main LLM's behavior via indirect prompt injection.

🟡 Finding 1: security

File: internal/agent/cerebras_vision.go:175 | Severity: warning

What: The sanitization of the vision sidecar description is weak and susceptible to prompt injection.

Fix: Instead of simple string replacement, consider using a more robust delimiter or a structured format (like JSON) for the description. Alternatively, instruct the main LLM in its system prompt to treat the content within tags as untrusted data rather than instructions.

Fix with your LLM agent
<your-llm-agent> "Fix the security issue in internal/agent/cerebras_vision.go at line 175: The sanitization of the vision sidecar description is weak and susceptible to prompt injection."
Fix all findings with your LLM agent
<your-llm-agent> "Fix all QualityMax review findings in this PR:\n- security in internal/agent/cerebras_vision.go:175: The sanitization of the vision sidecar description is weak and susceptible to prompt injection."

Change diagram — Flow

graph TD
    A[User Input: Prompt + Images] --> B{ShouldUseVisionSidecar?}
    B -- Yes --> C[DescribeImagesWithGemma (Cerebras)]
    C --> D[BuildSidecarAugmentedPrompt]
    D --> E[RunCLI (Main LLM)]
    B -- No --> E
    E --> F[Final Response]
Loading

Analyzed commit 67ffe068 with gemini-3.1-flash-lite (12 files, 11598 tokens) | Customize review preferences

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

Comment thread internal/agent/cerebras_vision.go
@qualitymaxapp qualitymaxapp Bot added the bug Something isn't working label Sep 18, 2026

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QualityMax Review — canonical overview updated; inline findings are attached to this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working qualitymax:reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant