Skip to content

Releases: Lexus2016/claude-flow

v2.1.1 — Fix npm name collision

17 Mar 18:11

Choose a tag to compare

What changed

The claude-flow package name on npm belongs to an unrelated project (ruvnet/claude-flow). Users running npm install -g claude-flow were getting the wrong package — a v3.5.x agent orchestration tool instead of our proxy bridge.

Fixed

  • All installation instructions now use npm install -g github:Lexus2016/claude-flow instead of npm install -g claude-flow
  • Added warning notices about the npm name conflict in all README files (EN, UA, RU)
  • Removed npx sections (incompatible with GitHub-based installs)

Install

npm install -g github:Lexus2016/claude-flow

Closes #1

v2.1.0 — Gemini thinking tokens fix

16 Mar 21:08

Choose a tag to compare

What's New

Fix: Gemini 2.5 thinking tokens leaking through OpenRouter

Gemini 2.5 Flash/Pro models have thinking/reasoning enabled by default. Without explicit disable, thinking tokens leak into the output stream through OpenRouter, producing messy output with internal monologue mixed into task results.

Changes:

  • sanitize.js: Inject reasoning.effort="none" for Gemini 2.5+ models to disable thinking via OpenRouter API
  • sanitize.js: Add reasoning_content to filtered content types (OpenRouter reasoning blocks)
  • sanitize.js: Add isGeminiThinkingModel() helper with future-proofing for Gemini 3.x
  • test.js: 15 new tests for Gemini thinking fix (133 total, all passing)

Affected models:

  • google/gemini-2.5-flash — thinking disabled
  • google/gemini-2.5-pro — thinking disabled
  • google/gemini-3* — future-proofed
  • google/gemini-2.5-flash-lite — excluded (thinking off by default)

Install/Update

npm install -g claude-flow@latest

v2.0.1 — max_tokens clamping

04 Mar 08:08

Choose a tag to compare

What's New

Provider-specific max_tokens clamping — prevents request failures on providers with hard output token limits.

The Problem

Claude Code sends max_tokens: 16384+ by default (Anthropic's limit). DeepSeek's native API rejects any request with max_tokens > 8192, causing silent failures.

The Fix

The proxy now automatically clamps max_tokens to the provider's hard limit before forwarding:

Claude Code sends:  max_tokens: 16384
Proxy clamps to:    max_tokens: 8192  (DeepSeek limit)
Upstream receives:  max_tokens: 8192  ✓

Details

  • providers.js: new maxOutputTokens field per provider (DeepSeek: 8192)
  • sanitizeRequestBody() now accepts opts.maxOutputTokens for clamping
  • OpenRouter has no cap (OpenRouter handles limits internally)
  • No clamping when value is already under the limit
  • Backward compatible — opts parameter is optional

Tests

118 tests (99 unit + 19 integration), all passing.

Full Changelog: v2.0.0...v2.0.1

v2.0.0 — Sanitizing Proxy

04 Mar 07:33

Choose a tag to compare

What's New

Sanitizing HTTP Proxy — a complete proxy server that sits between Claude Code CLI and non-Anthropic providers (OpenRouter, DeepSeek, OpenAI, Gemini, etc.), removing Anthropic-internal content types that cause upstream errors.

New Commands

# Standalone proxy server
claude-flow proxy openrouter

# Run with auto-proxy (recommended)
claude-flow run -- claude -p "Hello"

Sanitization

Removes/transforms these Anthropic-internal types before forwarding:

  • thinking, redacted_thinking — extended thinking blocks
  • server_tool_use, web_search_tool_result — server-side tool types
  • tool_reference — converted to text block
  • cache_control — stripped from all objects
  • $schema — removed from tool input schemas (recursive)
  • thinking parameter — removed from request body

Features

  • Zero dependencies — Node.js built-in http + global fetch only
  • Node 18+ compatible — uses getReader() for stream forwarding
  • Streaming SSE — transparent forwarding with graceful disconnect handling
  • Auto-retry — 429, 502, 503, 529 with exponential backoff + Retry-After parsing
  • Safe by default — sanitization errors fall back to original request
  • 10-minute timeout — AbortController on all upstream requests
  • 10MB request limit — prevents OOM on oversized payloads
  • Anthropic error format — all proxy errors return proper { type: "error", error: { ... } }

Testing

114 tests (95 unit + 19 integration), all passing.

Breaking Changes

  • Version bumped to 2.0.0
  • run command now auto-starts proxy (use --no-proxy to disable)

Programmatic API

const { createProxy, sanitizeRequestBody } = require('claude-flow');

// Start proxy
const proxy = await createProxy({
  targetUrl: 'https://openrouter.ai/api',
  authHeader: 'Authorization',
  authValue: 'Bearer sk-or-...',
  port: 0,  // random available port
});
console.log(`Proxy on ${proxy.url}`);

// Or just sanitize
const clean = sanitizeRequestBody(requestBody);

Full Changelog: v1.0.0...v2.0.0

v1.2.0 — Updated to February 2026 models

27 Feb 20:06

Choose a tag to compare

What's New

All models updated to February 2026 versions

Old → New:

Provider Was Now
Anthropic Claude Sonnet 4, Opus 4, Haiku 4 Claude Sonnet 4.6, Opus 4.6, Haiku 4.5
OpenAI GPT-4.1, GPT-4.1 Mini/Nano GPT-5.2, GPT-5.2 Mini, GPT-5.2 Thinking
DeepSeek V3, R1 V3.2 (hybrid thinking), R1-0528
Gemini 2.5 Pro, 2.5 Flash 3.1 Pro Preview, 3 Flash Preview

New Chinese models in OpenRouter catalog

  • MiniMax M2.5#1 token volume on OpenRouter
  • Kimi K2.5 — multimodal, 100 parallel agents
  • Qwen 3.5 — 397B MoE, 17B active
  • GLM-5 and GLM-4.5 Air (already included)

Install

npm install -g claude-flow
claude-flow setup openrouter
eval $(claude-flow env)

v1.1.0 — Bridge any AI model to Claude Code CLI

27 Feb 19:51

Choose a tag to compare

What's New

Rewritten Documentation

The README has been completely rewritten to properly explain the real problem claude-flow solves:

The Three Walls

1. Response Format Incompatibility
Every AI provider (DeepSeek, OpenAI, Gemini, GLM, Qwen, Llama) returns responses in different formats. Claude Code expects Anthropic's specific streaming events, content blocks, tool_use structures, and stop reasons. claude-flow routes requests through Anthropic-compatible proxy endpoints that translate responses between formats.

2. Authentication Trap
Claude Code has an undocumented quirk: ANTHROPIC_API_KEY must be set to an empty string ("") for proxy providers — not absent, not unset. claude-flow handles this automatically.

3. Configuration Complexity
6 environment variables, zero official documentation, different combinations per provider. One wrong setting = crash or silent failure. claude-flow gets it right with one command.

Architecture Diagram

Added clear architecture diagrams in all three README languages showing the flow:

Claude Code CLI → Provider's Anthropic-compatible endpoint → Any AI Model
                  (translates response format)

Supported Providers

  • OpenRouter — 200+ models (GPT, DeepSeek, Gemini, GLM, Llama, Qwen, Mistral...)
  • DeepSeek — V3, R1 (reasoning) via native Anthropic-compatible API
  • OpenAI — GPT-4.1, o3
  • Gemini — 2.5 Pro, 2.5 Flash
  • Custom — Any Anthropic-compatible endpoint

Documentation

Install

npm install -g claude-flow
claude-flow setup openrouter
eval $(claude-flow env)
claude -p "Hello from any AI model!"

Zero dependencies. Node.js >= 18.