Claude-Gemini Integration Tool 'CGMB' v1.1.0: Implementing Windows Support

Published: (January 12, 2026 at 11:00 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

Version 1.1.0 of CGMB (Claude‑Gemini Multimodal Bridge) adds full Windows support, OCR for scanned PDFs, URL auto‑routing, and support for the latest Gemini models (gemini-3-flash, gemini-2.5-flash).

New Features in v1.1.0

FeatureDescriptionStatus
🪟 Windows SupportPath normalization & drive‑letter handling✅ Full support
📝 OCR FeatureScanned PDF support✅ New
🔄 URL Auto‑RoutingLayer selection by URL type✅ New
🚀 Latest Modelsgemini-3-flash, gemini-2.5-flash✅ Supported

Windows Path Normalization

Background

  • v1.0 only handled Unix‑style paths.
  • Windows paths:
    • Start with a drive letter (C:, D: …)
    • Use backslashes (\) as separators
    • May contain mixed forward slashes (C:/Users/...)

Implementation (CGMBServer.ts)

// Detect Windows absolute path pattern (case‑insensitive)
const isWindowsAbsolutePath = /^[A-Za-z]:[\/\\]/.test(filePath);

if (isWindows && isWindowsAbsolutePath) {
  // Normalize forward slashes to backslashes
  preprocessedPath = filePath.replace(/\//g, '\\');
}

const normalizedPath = path.normalize(preprocessedPath);

// Absolute path detection (considering Windows pattern)
const isAbsolute = path.isAbsolute(normalizedPath) || isWindowsAbsolutePath;
const resolvedPath = isAbsolute
  ? normalizedPath
  : path.resolve(baseDir, normalizedPath);

Key points

  • Regex /^[A-Za-z]:[\/\\]/ detects drive letters.
  • Slashes are unified before calling path.normalize().
  • The result of path.isAbsolute() is combined with the Windows pattern detection.

Prompt‑Based Path Detection

// Regex to detect both Windows and Unix paths
const filePathRegex = /(?:[A-Za-z]:\\[^\s"'<>|]+\.[a-zA-Z0-9]+|\/(?!https?:)[^\s"'<>|]+\.[a-zA-Z0-9]+|\.\.?\/[^\s"'<>|]+\.[a-zA-Z0-9]+)/gi;

const localPathsInPrompt = prompt.match(filePathRegex) || [];

Usage examples

CGMB analyze C:\Users\name\Documents\report.pdf
CGMB analyze /home/user/documents/report.pdf

URL Auto‑Routing

The tool now determines the URL type and routes the request to the optimal AI layer.

private detectUrlType(url: string): 'pdf' | 'image' | 'audio' | 'web' {
  const lower = url.toLowerCase();
  const urlPath = lower.split('?')[0] ?? lower;

  if (urlPath.endsWith('.pdf') || lower.includes('/pdf')) {
    return 'pdf';
  }

  if (/\.(png|jpg|jpeg|gif|webp|bmp|svg)$/.test(urlPath)) {
    return 'image';
  }

  if (/\.(mp3|wav|m4a|ogg|flac|aac)$/.test(urlPath)) {
    return 'audio';
  }

  return 'web';
}

Routing Table

URL TypeDestinationReason
PDFAI StudioOCR processing via Gemini File API
Images / AudioAI StudioMultimodal processing
Web pagesGemini CLIReal‑time information retrieval

Installation & Upgrade

# New installation
npm install -g claude-gemini-multimodal-bridge

# Upgrade
npm update -g claude-gemini-multimodal-bridge

Version Comparison

Itemv1.0.0v1.1.0
Windows Support❌ Unix only✅ Full support
OCR Feature❌ None✅ Scanned PDF support
URL RoutingBasic✅ Type‑based auto‑selection
Gemini Modelsgemini-2.0-flashgemini-3-flash, gemini-2.5-flash

Future Plans

  • More advanced routing algorithms
  • Quick support for new Gemini models
  • Performance optimizations
  • GitHub:
  • README:
  • NPM:

Feedback and issues are welcome!

Back to Blog

Related posts

Read more »

Hello, Newbie Here.

Hi! I'm falling back into the realm of S.T.E.M. I enjoy learning about energy systems, science, technology, engineering, and math as well. One of the projects I...