Portage banner
SimonGino SimonGino

Portage

AI community

Description

Keep the harness, change the model. A self-hosted single-binary gateway that lets Claude Code and Codex CLI run any model — open-weight, self-hosted, or from whatever relay you pay for — by translating between Anthropic Messages, OpenAI Responses and Chat Completions.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Portage

**Keep the harness. Change the model.**

[![CI](https://github.com/SimonGino/portage/actions/workflows/ci.yml/badge.svg)](https://github.com/SimonGino/portage/actions/workflows/ci.yml) [![Go](https://img.shields.io/badge/Go-1.26%2B-00ADD8?logo=go&logoColor=white)](https://go.dev) [![Single binary](https://img.shields.io/badge/deploy-single%20binary-1B365D)](#quick-start)

[English](README.md) · [简体中文](README.zh-CN.md)

Portage is a self-hosted model gateway: put every model you can reach — official APIs, OpenAI-compatible relays, Ollama / vLLM on your own machine — behind one address, and run any of them inside agent harnesses like Claude Code and Codex CLI.

It works by translating protocols. Each harness speaks exactly one (Claude Code speaks Anthropic Messages, Codex CLI speaks OpenAI Responses, while most models only expose OpenAI Chat Completions). Portage translates between all three in the middle, and passes bytes through untouched when the protocols already match. Point the harness at Portage and switching models is one line of config — no patched clients, no forked harness, no wrapper scripts.

flowchart LR
    subgraph clients["The harness you already use"]
        CC["Claude Code
Anthropic Messages"] CX["Codex CLI
OpenAI Responses"] APP["Your scripts / SDK
Chat Completions"] end PG{{"Portage
one binary · SQLite · optional web admin"}} subgraph up["Whatever model you can get"] T["Open-weight models
via any OpenAI-compatible relay"] L["Your own hardware
Ollama · vLLM · MLX"] A["Anthropic · OpenAI
native"] end CC --> PG CX --> PG APP --> PG PG -- "different protocol → translate" --> T PG --> L PG -- "same protocol → byte passthrough" --> A

What you can run

The model you want Reached over In the harness
Open-weight models — whatever the good one is this month any OpenAI-compatible end