Repository navigation
Releases
v0.1.3
Added
-
Prompt caching.
--cache-control keep(library:anthropicToOpenAI(body, { keepCacheControl: true })) passes Claude Code'scache_controlmarkers on to upstreams that read them, as{"type": "ephemeral"}on the OpenAI text parts of the marked system, text and tool-result blocks, at most 4. Default unchanged: dropped. -
Cached prompt tokens reported by the upstream (OpenAI's
cached_tokensor DeepSeek'sprompt_cache_hit_tokens) come back to Anthropic callers ascache_read_input_tokens, withinput_tokenscounting the rest, as Anthropic does.anthropicUsageOfis exported. -
Container image
ghcr.io/voightxyz/router(linux/amd64 and linux/arm64), built from this repository on every release, running as a non-root user with a health check. -
Single-file binaries for Linux (x64, arm64), macOS (arm64, x64) and Windows (x64) on every release, built with Node's single executable applications. Not signed by Apple or Microsoft.
npm run build:binarybuilds one for the current machine. -
Every release carries
SHA256SUMS, a CycloneDX SBOM and build provenance attestations for the binaries and the image. -
OpenSSF Scorecard analysis, with its badge in the README.
-
voight-check (python/): a Python command (3.10+), standard library only, that tells whether a model behind any OpenAI-compatible endpoint is ready for coding agents (tool calls repeated and validated against the schema, tool results, tool calls in streams, parallel calls, JSON output, long context, prompt caching).
Install
- npm:
npx @voightxyz/router@0.1.3 - Container:
docker run --rm -p 4000:4000 ghcr.io/voightxyz/router:0.1.3 --upstream <url> --model <id> - Binaries: download below, check them against
SHA256SUMS, and verify the build withgh attestation verify <file> --repo Voightxyz/router
v0.1.2
Added
- Tool call repair. Broken tool-call arguments are fixed before they reach the agent: JSON syntax (trailing or missing commas, raw line breaks and stray quotes in strings, single quotes, unquoted keys, Python literals, comments, a code fence or text around the object, missing closing brackets) and values that do not match the tool's schema (booleans, numbers and strings, arrays and objects sent as JSON strings). Nothing is invented: a guessed reading is only kept when every field is one the tool's schema declares, numbers that would lose digits are not converted, and an answer cut by the token limit is never repaired. On by default for Anthropic and Responses callers;
--tool-repair alladds/v1/chat/completions,--tool-repair offturns it off. Repairs are counted in the log line, never with content. - Library:
repairToolArguments,repairJson,coerceToSchema,toolSchemas,repairChatCompletion,createToolCallRepairStream, and arepairoption on the answer builders. - Tested setup guides for 12 coding agents in docs/guides: Claude Code, Codex CLI, OpenCode, Pi, Oh My Pi, Crush, Cline, Roo Code, Kilo Code, Continue, Aider and Goose.
- Field-by-field translation reference in docs/translation.md.
- Contributing guide and security policy.
Changed
- README reorganized: supported agents first, configuration in its own section, translation details moved to
docs/.
npm: https://www.npmjs.com/package/@voightxyz/router/v/0.1.2
v0.1.1
Added
- OpenAI Responses API (
POST /v1/responses), so Codex CLI works with any OpenAI-compatible model. Developer and system messages fold into the first system message; function, custom (freeform) and namespaced tools are supported; the stream carries the events Codex and the OpenAI SDKs read, ending inresponse.completed,response.incompleteor a retryableresponse.failed.previous_response_idis refused, since nothing is stored. - OpenRouter request shape. OpenRouter code works by changing only the base URL and the key: fallback models (
models), provider preferences (order,only,ignore,allow_fallbacks, matched by upstream name),usage.include,reasoning.effortandreasoning.exclude.route,transformsandpluginsare dropped, and/api/v1/...paths answer like/v1/.... --namelabels an upstream for logs and provider preferences.- Usage carries cached tokens when the upstream reports them.
npm: https://www.npmjs.com/package/@voightxyz/router/v/0.1.1
v0.1.0
First release.
- Anthropic Messages (
POST /v1/messages) translated to OpenAI Chat Completions and back, so Claude Code and the Anthropic SDKs work with any OpenAI-compatible model. Streaming, tool calls, images and tool errors included. - OpenAI Chat Completions passthrough (
POST /v1/chat/completions),GET /v1/modelsandGET /health. - Fallback across several upstreams.
voight-routercommand (npx @voightxyz/router) and a library export with the translation functions and the gateway handler.- Binds to
127.0.0.1by default; optional client token with--auth-token-env; upstream keys only from environment variables.
npm: https://www.npmjs.com/package/@voightxyz/router/v/0.1.0