Diversio Engineering
On this page
PI PACKAGE EXTENSION

Image Router

Routes images only to an explicitly approved vision destination. Tool/RPC images require saved auto consent; no cross-model fallback.

Overview

Routes images only to an explicitly approved vision destination. Tool/RPC images require saved auto consent; no cross-model fallback.

Package docs also remain available on the package summary page at /docs/image-router, but this page focuses on the Pi-native extension surface: commands, tools, environment variables, packaged skills, and extension files.

Environment

  • export IMAGE_ROUTER_VISION_PROVIDER="openai-codex"
  • export IMAGE_ROUTER_VISION_MODEL="codex-1"

Extension Files

Primary extension path: pi-packages/image-router/extensions/image-router

  • index.ts

Installation

bash
# From the agent-skills-marketplace repo root
pi install "$PWD/pi-packages/image-router"

# From the Diversio monolith root
pi install "$PWD/agent-skills-marketplace/pi-packages/image-router"

Local test or verification snippet:

bash
# From the agent-skills-marketplace repo root
pi --no-extensions -e ./pi-packages/image-router

Problem

You're chatting with DeepSeek V4 Pro (or any text-only model) in Pi. You paste a screenshot. Nothing useful happens — the model can't see images.

Solution

This extension sends images to an explicitly approved destination:

The main model never sees the raw image — it reads a description like:

> [Image described by vision model: > The screenshot shows a React error page with a red banner reading…]

text
You paste an image
       │
       ▼
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Extension      │────▶│  Vision model    │────▶│  Your main model │
│  intercepts the │     │  (Codex / GPT /  │     │  receives a text │
│  image prompt   │     │   Claude, etc.)  │     │  description of  │
│                 │     │  describes it    │     │  the image       │
└─────────────────┘     └──────────────────┘     └─────────────────┘

Three ways images enter the conversation

Routing modes (per model)

Run /image-router to set the mode and per-model destination (or an explicit global default). Native vision-capable active models retain their normal image handling unless auto deliberately forces routing. This permission controls secondary routing, not the active model's own provider.