Skip to content

Releases

v2.2.0

Choose a tag to compare

@engel75 engel75 released this 23 Apr 18:39
feebd6b

What's New

Audio Transcription Support

  • Multipart/form-data handling: /v1/audio/transcriptions now properly proxies Whisper and other audio transcription requests to backends
  • Requests with file and model form fields are correctly routed based on the model parameter

SGLang Compatibility

  • Error passthrough: SGLang-specific error responses are now passed through verbatim instead of being re-wrapped
  • Responses API streaming: /v1/responses streaming is now supported by translating to /v1/chat/completions streaming and back

Bug Fixes

  • Fixed Content-Length header handling when re-wrapping upstream error bodies
  • Fixed multipart body buffering to preserve request body for proxying

Commits

  • 699c1a3 fix: preserve multipart body for proxy after parsing model field
  • 7b0ad2b fix: properly buffer multipart body before parsing
  • f26cbdb feat: handle multipart/form-data for /v1/audio/transcriptions
  • 51a99ee fix: rewrite upstream Content-Length header when rewrapping error body
  • 1a1f1d5 feat: pass sglang errors through verbatim and translate /v1/responses streaming

v2.1.0

Choose a tag to compare

@engel75 engel75 released this 16 Apr 17:17
a2e5dd7

What's New in v2.1.0

New API Endpoints

eiroute now proxies 18 additional OpenAI-compatible endpoints to backends:

OpenAI API:

  • POST /v1/responses — OpenAI Responses API
  • GET /v1/responses/{id} — Retrieve a response by ID
  • POST /v1/responses/{id}/cancel — Cancel a response by ID
  • POST /v1/embeddings — Text embeddings
  • POST /v1/classify — Text classification
  • POST /v1/tokenize — Token counting
  • POST /v1/detokenize — Token decoding
  • POST /v1/audio/transcriptions — Audio transcription (Whisper)
  • POST /v1/score — Text scoring
  • POST /v1/rerank — Rerank (v1)
  • POST /rerank — Rerank (root)
  • POST /v2/rerank — Rerank (v2)

Anthropic API:

  • POST /v1/messages — Anthropic Messages API
  • POST /v1/messages/count_tokens — Anthropic token counting

Ollama API:

  • POST /api/chat — Ollama Chat API
  • POST /api/generate — Ollama Generate API

WebSocket:

  • GET /v1/realtime — OpenAI Realtime API (WebSocket proxy with wss:// support)

Performance Improvements

  • Streaming body parsing: Request bodies are now parsed using streaming JSON token decoding (parseRoutingFields). Only the model field is read for routing — the rest of the body streams through to the backend without buffering the entire payload into memory, significantly reducing latency and memory usage for large requests.
  • Transport tuning:
    • 32KB per-connection read/write buffers (up from Go defaults)
    • TCP keepalive reduced from 30s to 15s for faster connection recycling
    • Connection pool: 256 max idle connections, 64 per host

Bug Fixes

  • Fixed: All API routes returning 404 — The gorilla/mux router was incorrectly used with "METHOD /path" route patterns. gorilla/mux.Handle() treats the entire string as a URL path, causing all route registrations to silently fail. Switched back to http.NewServeMux which natively supports "METHOD /path" patterns (Go 1.22+) and {id} wildcards.
  • Fixed: WebSocket wss:// never used — The WebSocket proxy unconditionally set the scheme to ws:// before checking if the backend URL used HTTPS, so wss:// connections were never established. The scheme is now checked first.
  • Fixed: Request IDs not correlatable with upstream proxies — uuid.New() was replaced with an atomic hex counter, producing IDs like 000000000000001f instead of c3839f1e-ccbf-4061-bd6f-d30a11dff92d. Hex counters are not globally unique (reset on restart) and cannot be correlated with upstream systems like Bifrost. Restored UUID generation.

New Sections in README

  • WebSocket Proxy — Documents wss:// support, concurrency limits, relay buffers, and timeouts
  • Performance — Documents transport tuning and streaming body parsing
  • Version command — ./eiroute version subcommand

Full Changelog

  • feat: proxy additional OpenAI-compatible endpoints to backend
  • feat: add messages/count_tokens, responses/{id}, responses/{id}/cancel, and realtime endpoints
  • perf: optimize proxy speed and connection handling
  • fix: use wss scheme for WebSocket connections to HTTPS backends
  • fix: replace gorilla/mux with http.NewServeMux to restore all API routes
  • fix: restore UUID request IDs for correlation with upstream proxies
  • docs: update README with new endpoints, WebSocket proxy, and performance section

v2.0.0

Choose a tag to compare

@engel75 engel75 released this 15 Apr 21:13
d15a1ba

What's New

OpenAI Responses API Support

eiroute now proxies POST /v1/responses requests to your backend. This endpoint is used by newer OpenAI API clients and supports advanced features like:

  • Multi-turn conversations with previous_response_id
  • Enhanced tool calling capabilities
  • Structured output with JSON schema

The route follows the same pattern as existing /v1/chat/completions and /v1/completions endpoints, including automatic backend selection, streaming support, semaphore-based rate limiting, and Request ID propagation.

Changes

  • Added POST /v1/responses route in cmd/eiroute/main.go
  • Added TestProxy_ResponsesRoute test in internal/router/router_test.go

Requirements

  • Backend must support the Responses API (e.g., sglang)
  • No configuration changes required - works with existing model definitions

v1.3.0

Choose a tag to compare

@engel75 engel75 released this 15 Apr 16:22
22f4eb2

Eiroute v1.3.0

Bug Fixes

Semaphore State Timing Fix
Previously, when Acquire() timed out due to a full semaphore, the log captured semaphore_used AFTER other requests had released their slots, showing misleading values like 0 or 1.

Now semaphore_used and semaphore_capacity are captured immediately when the timeout occurs, showing the true state at failure time.

v1.2.0

Choose a tag to compare

@engel75 engel75 released this 15 Apr 15:55
eca61b8

Eiroute v1.2.0

New Features

Backend Status in Error Logs
All error logs now include backend status information when a backend is involved:

  • backend - Backend name
  • backend_url - Backend URL
  • backend_healthy - Current health status
  • semaphore_used - Current semaphore usage
  • semaphore_capacity - Max semaphore capacity

Bug Fixes

Error Key Corrections

  • Upstream 429 → backend_overloaded (correct error key)
  • Eiroute semaphore overload → rate_limited (correct error key)
  • Error messages properly assigned to each key

Example Log Output

{"level":"WARN","msg":"request error","request_id":"...","error_key":"rate_limited","http_status":429,"backend":"minimax","backend_url":"http://...","backend_healthy":true,"semaphore_used":10,"semaphore_capacity":10}

v1.1.1

Choose a tag to compare

@engel75 engel75 released this 15 Apr 15:37
0ea4476

Eiroute v1.1.1

Bug Fixes

  • Fixed Docker image tags to include v prefix (e.g., v1.1.1 instead of 1.1.1)

v1.1.0

Choose a tag to compare

@engel75 engel75 released this 15 Apr 15:30
5716b82

Eiroute v1.1.0

New Features

Model Deprecation

  • Add deprecated: true to mark a model as deprecated
  • Add successor field to specify the replacement model name
  • Add deprecated_notice_interval to probabilistically show 303 deprecation notice
  • Add retry_after to set Retry-After header on 301/303 responses
  • New error templates: model_deprecated (303) and model_outdated (301)

Debug Logging

  • New debug status logger outputs every 10 seconds when log_level: debug
  • Shows backend status, active requests, memory usage, and system load average

Error Template Hot Reload

  • Error templates are now reloaded on /-/reload and SIGHUP
  • No restart needed when updating error templates

New Metrics

  • llm_router_upstream_429_total - Upstream 429 responses
  • llm_router_backend_overloaded_total - Local semaphore overload (429)
  • llm_router_upstream_errors_total - All upstream HTTP errors
  • llm_router_health_check_duration_seconds - Health check latency

Docker

  • Docker tags now include v prefix (e.g. v1.1.0 instead of 1.1.0)

Documentation

  • Updated README with YAML examples for active and deprecated models
  • Added AGENTS.md with GitHub workflow guidelines

Bug Fixes

  • Fixed semaphore recreation during hot reload (max_concurrent changes now applied)
  • Fixed HTTP 429 error logging (both upstream and local)
  • Swapped error keys: upstream 429 → backend_overloaded, eiroute overload → rate_limited

Breaking Changes

  • None - fully backward compatible

v1.0.0

Choose a tag to compare

@engel75 engel75 released this 15 Apr 13:23

Eiroute v1.0.0

Eiroute ist ein minimaler, aber schneller HTTP-Reverse-Proxy für selbst-gehostete OpenAI-kompatible LLM Backends (sglang, vLLM).

Features

  • Multi-Backend Support: Lastverteilung über mehrere Upstream-Backends
  • Model-basiertes Routing: Automatische Weiterleitung basierend auf dem model-Feld
  • Health Checks: Automatische Überwachung der Backend-Gesundheit mit konfigurierbarem Intervall
  • Hot Reload: Konfiguration ohne Neustart via POST /-/reload oder SIGHUP
  • Concurrency Control: Pro-Backend Semaphore für maximale gleichzeitige Requests
  • Streaming Support: SSE-Streams werden transparent durchgereicht

Fixes

  • Semaphore wird jetzt bei Hot-Reload mit neuer Kapazität neu erstellt
  • HTTP 429 Fehler werden korrekt geloggt (sowohl Upstream- als auch lokale Limits)
  • Error Keys getauscht: Upstream 429 -> backend_overloaded, lokale Limits -> rate_limited

Configuration

Siehe config.example.yaml für verfügbare Optionen.