npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mmmbuto/anthmorph

v0.2.4

Published

High-performance Rust API bridge for Codex, Anthropic, OpenAI chat, and Responses

Readme

AnthMorph

Release npm License: Apache-2.0 Rust Platforms API Local First

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 default or 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/models from backend discovery plus a local fallback model cache.

Install

Global npm install:

npm install -g @mmmbuto/anthmorph

On macOS, npm install builds the local binary with Cargo.

Local source build:

cargo build --release

Run 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 \
anthmorph

Run 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 \
anthmorph

Codex 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 = false

Codex 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/completions

Runtime 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/health

Environment

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=30

Validation

Local Rust tests:

cargo test

Docker release checks:

./scripts/docker_release_checks.sh

Docs

License

Apache-2.0. See LICENSE.

Copyright (c) 2026 DioNanos


Contact

Maintained by DioNanos.