@mmmbuto/anthmorph
v0.2.4
Published
High-performance Rust API bridge for Codex, Anthropic, OpenAI chat, and Responses
Maintainers
Readme
AnthMorph
AnthMorph is a high-performance Rust API bridge for modern AI coding clients.
Its main job is to let Codex and codex-vl use providers that do not expose the
latest OpenAI /responses API by translating, normalizing, and streaming across
Anthropic Messages, OpenAI legacy chat-completions, and Responses-style traffic.
Use it when a provider is powerful but speaks the wrong wire format for your client. AnthMorph keeps the local client surface stable, adapts model names and tool calls, applies local auth/rate-limit policy, and forwards to the selected backend with minimal runtime overhead.
Project Status
- Current line:
0.2.4 - Primary Codex API:
POST /v1/responses - Anthropic ingress:
POST /v1/messages,POST /v1/messages/count_tokens - OpenAI legacy ingress:
POST /v1/chat/completions,POST /chat/completions - Operational APIs:
GET /v1/models,GET /health - Target clients: Codex and codex-vl latest, plus Anthropic/OpenAI-compatible clients
- Target platforms: macOS, Linux, and Termux
What It Does
- Translates Codex/codex-vl Responses traffic to native Responses or legacy chat-completions backends.
- Accepts Anthropic Messages API traffic and adapts it to OpenAI-compatible or Anthropic-compatible backends.
- Accepts OpenAI legacy chat-completions traffic for clients and tools that still use
/chat/completions. - Streams Server-Sent Events for supported streaming paths.
- Normalizes configured/default models for clients that send
defaultor Claude-style model names. - Shortens long function/tool names for providers with stricter tool-name limits.
- Supports local ingress auth, backend API key forwarding, CORS allow-lists, and per-client rate limiting.
- Serves
/v1/modelsfrom backend discovery plus a local fallback model cache.
Install
Global npm install:
npm install -g @mmmbuto/anthmorphOn macOS, npm install builds the local binary with Cargo.
Local source build:
cargo build --releaseRun against a legacy OpenAI-compatible chat backend:
ANTHMORPH_BACKEND_URL=https://api.example.com/v1 \
ANTHMORPH_BACKEND_PROFILE=openai-generic \
ANTHMORPH_UPSTREAM_API=chat-completions \
ANTHMORPH_PRIMARY_MODEL=example/model \
ANTHMORPH_API_KEY="$PROVIDER_API_KEY" \
PORT=9876 \
anthmorphRun against a native Responses backend:
ANTHMORPH_BACKEND_URL=https://api.example.com/v1 \
ANTHMORPH_BACKEND_PROFILE=openai-generic \
ANTHMORPH_UPSTREAM_API=responses \
ANTHMORPH_PRIMARY_MODEL=example/model \
ANTHMORPH_API_KEY="$PROVIDER_API_KEY" \
PORT=9876 \
anthmorphCodex and codex-vl
Point Codex or codex-vl at AnthMorph with Responses wire format:
model = "example/model"
model_provider = "anthmorph"
[model_providers.anthmorph]
name = "Provider via AnthMorph"
base_url = "http://127.0.0.1:9876/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
requires_openai_auth = falseCodex sends /v1/responses to AnthMorph. AnthMorph then chooses the configured
upstream mode:
ANTHMORPH_UPSTREAM_API=responses -> {BACKEND_URL}/responses
ANTHMORPH_UPSTREAM_API=chat-completions -> {BACKEND_URL}/chat/completionsRuntime Surface
POST http://127.0.0.1:9876/v1/responses
POST http://127.0.0.1:9876/v1/messages
POST http://127.0.0.1:9876/v1/messages/count_tokens
POST http://127.0.0.1:9876/v1/chat/completions
POST http://127.0.0.1:9876/chat/completions
GET http://127.0.0.1:9876/v1/models
GET http://127.0.0.1:9876/healthEnvironment
Minimum direct environment:
PORT=9876
ANTHMORPH_BACKEND_URL=https://api.example.com/v1
ANTHMORPH_BACKEND_PROFILE=openai-generic
ANTHMORPH_UPSTREAM_API=chat-completions
ANTHMORPH_PRIMARY_MODEL=example/model
ANTHMORPH_API_KEY=...Optional:
ANTHMORPH_REASONING_MODEL=...
ANTHMORPH_INGRESS_API_KEY=...
ANTHMORPH_ALLOWED_ORIGINS=https://example.test
ANTHMORPH_RATE_LIMIT_PER_MINUTE=60
ANTHMORPH_STRICT_MODEL=true
ANTHMORPH_STREAM_CHUNK_TIMEOUT_SECS=30Validation
Local Rust tests:
cargo testDocker release checks:
./scripts/docker_release_checks.shDocs
- Packaging details: docs/PACKAGING.md
- Release guide: docs/RELEASE.md
- Changelog: CHANGELOG.md
License
Apache-2.0. See LICENSE.
Copyright (c) 2026 DioNanos
Contact
Maintained by DioNanos.
- General / dev: [email protected]
- Security disclosures: [email protected]
- Project hub: https://mmmbuto.com
