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

@pedrofariasx/antigravity-openai-adapter

v1.0.5

Published

OpenAI-compatible API adapter for antigravity-claude-proxy. Converts OpenAI Chat Completions format to Anthropic Messages API format.

Readme

AGO Adapter (Antigravity OpenAI Adapter)

License: MIT

An adapter that exposes an OpenAI-compatible API to communicate with antigravity-claude-proxy. This allows using applications that expect the OpenAI API with Claude and Gemini models available through Antigravity.

How it Works

┌──────────────────┐     ┌─────────────────────┐     ┌────────────────────────────┐
│  OpenAI-enabled  │────▶│  This Adapter       │────▶│  antigravity-claude-proxy  │
│  Application     │     │  (OpenAI → Anthropic│     │  (Anthropic → Google       │
│  (Chat API)      │     │   format)           │     │   Generative AI)           │
└──────────────────┘     └─────────────────────┘     └────────────────────────────┘
  1. Receives requests in OpenAI Chat Completions API format.
  2. Converts to Anthropic Messages API format.
  3. Forwards to antigravity-claude-proxy.
  4. Converts responses back to OpenAI format.
  5. Supports full streaming (SSE).
  6. Automatic Proxy Management: Can automatically start the upstream proxy if it's running on localhost.
  7. Transparent Routing: Unknown routes (like WebUI) are automatically proxied to the upstream.

Prerequisites

  • Node.js 18 or higher
  • antigravity-claude-proxy (automatically handled if on localhost, otherwise needs to be running)

Installation

Option 1: npm / npx

# Run directly with npx (automatic proxy start)
npx @pedrofariasx/antigravity-openai-adapter start

# Or install globally
npm install -g @pedrofariasx/antigravity-openai-adapter
antigravity-openai-adapter start

Option 2: Docker

# Using Docker Compose
docker-compose up -d

# Using Docker Stack (Swarm)
docker stack deploy -c docker-stack.yml antigravity

Option 3: Clone Repository

git clone https://github.com/pedrofariasx/antigravity-openai-adapter
cd antigravity-openai-adapter
npm install
npm start

Quick Start

1. Start the Adapter

npx @pedrofariasx/antigravity-openai-adapter start

By default, the adapter will:

  1. Start on http://localhost:8081.
  2. Check if antigravity-claude-proxy is needed.
  3. Automatically run npx antigravity-claude-proxy@latest start if the upstream is configured to localhost.
  4. Proxy all non-API requests (like the WebUI) to the upstream proxy.

2. Use with OpenAI Applications

Configure your application to use:

Base URL: http://localhost:8081/v1
API Key: any-value (or your configured API_KEY)

API Endpoints

| Endpoint | Method | Description | |----------|--------|-----------| | /v1/chat/completions | POST | Chat Completions (main) | | /v1/models | GET | List available models | | /health | GET | Health Check | | /* | * | Proxied to antigravity-claude-proxy (WebUI, etc) |


Configuration

The adapter supports configuration via config.json, environment variables, or CLI arguments. It also supports .env files.

Environment Variables

| Variable | Description | Default | |----------|-----------|--------| | PORT | Server port | 8081 | | UPSTREAM_URL | antigravity-claude-proxy URL | http://localhost:8080 | | API_KEY | API Key for this adapter | - | | UPSTREAM_API_KEY | API Key for upstream proxy | test | | AUTO_START_PROXY | Auto-start proxy via npx | true | | DEBUG | Enable debug logging | false |

CLI Arguments

antigravity-openai-adapter start --port=3000 --upstream=http://localhost:9000 --no-proxy --debug
  • --no-proxy: Disables automatic starting of the upstream proxy.

Features Supported

✅ Supported

  • Chat Completions API
  • Streaming (SSE)
  • System messages
  • Multi-turn conversations
  • Tool/Function calling
  • Vision (Images)
  • Temperature, top_p, max_tokens, stop sequences
  • Unified routing for API and WebUI

❌ Not Supported

  • Embeddings (/v1/embeddings)
  • Legacy Completions (/v1/completions)
  • Assistants API, Files API, Fine-tuning

Development

# Clone and install
git clone https://github.com/pedrofariasx/antigravity-openai-adapter
cd antigravity-openai-adapter
npm install

# Run in development mode (with watch)
npm run dev

# Run tests
npm test

License

MIT