polypus

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0

README

Polypus

OpenAI-compatible gateway and switchyard sidecar.

Releases (for agents)

  1. Full product release: merge releasable changes to main. Auto patch release cuts git tag vX.Y.Z, runs GoReleaser, calls Docker release (reusable workflow), and verify inspects GHCR X.Y.Z (and :latest when applicable). Binaries and images share app version X.Y.Z.

  2. Packaging-only / base image rebuild: when the diff since the last v* tag touches only Docker/packaging paths, Auto patch skips Go tagging. Packaging rebuild (after green CI on main, or manual dispatch) publishes immutable GHCR tags X.Y.Z-rN (N >= 1) using binaries from the existing vX.Y.Z GitHub Release. Do not cut a new Go tag for Dockerfile-only work.

  3. OCI labels: org.opencontainers.image.version is always app semver X.Y.Z. Rebuild counter appears only in the image tag and com.behaviorengineering.image.rebuild-revision (rN or empty).

  4. Consumers: pin ghcr.io/ORG/polypus:X.Y.Z or X.Y.Z-rN in images.env after publish-complete (full Auto patch verify for plain tags; Docker release success for -rN).

  5. Platforms: both images are built for linux/amd64 and linux/arm64 from docker-bake.hcl in one bake. Switchyard builds natively on an arm64 runner. A packaging rebuild of a tag released before arm64 builds stays linux/amd64.

Manual packaging rebuild:

gh workflow run packaging-rebuild.yml -f tag=v0.2.40 -f image_revision=1

Licence

Apache 2.0, see LICENSE. The Switchyard image also carries NVIDIA's Switchyard licence and notice under /usr/share/doc/polypus-switchyard/.

Directories

Path Synopsis
cmd
polypus command
polypus-smoke command
polypus-smoke: multi-channel L1 probes against a Polypus gateway.
polypus-smoke: multi-channel L1 probes against a Polypus gateway.
internal
batch/service
Package service runs OpenAI-shaped batches on the providers that support them (Anthropic Message Batches, OpenRouter's Batch API, Workers AI async batch).
Package service runs OpenAI-shaped batches on the providers that support them (Anthropic Message Batches, OpenRouter's Batch API, Workers AI async batch).
cli
clients/catalog
Package catalog holds what the provider model-catalog clients share: the OpenAI Models API shapes, a TTL cache, a strict list with stale-cache fallback, and a process-scoped client registry.
Package catalog holds what the provider model-catalog clients share: the OpenAI Models API shapes, a TTL cache, a strict list with stale-cache fallback, and a process-scoped client registry.
clients/openaicompat
Package openaicompat lists models from, and pings, OpenAI-compatible backends: local servers, hosted APIs such as DeepInfra, OpenRouter's models API and Switchyard.
Package openaicompat lists models from, and pings, OpenAI-compatible backends: local servers, hosted APIs such as DeepInfra, OpenRouter's models API and Switchyard.
clients/openrouter
Package openrouter is the OpenRouter Batch API client.
Package openrouter is the OpenRouter Batch API client.
config
Package config holds Polypus gateway defaults and runtime options.
Package config holds Polypus gateway defaults and runtime options.
errors
Package errors defines typed domain errors for Polypus.
Package errors defines typed domain errors for Polypus.
gateway/upstream
Package upstream provides per-target circuit breakers for Polypus dials (Switchyard, OpenAI-shaped leaves, Cloudflare).
Package upstream provides per-target circuit breakers for Polypus dials (Switchyard, OpenAI-shaped leaves, Cloudflare).
ratelimit
Package ratelimit is the provider-neutral shape of an upstream rate limit.
Package ratelimit is the provider-neutral shape of an upstream rate limit.
smoke
Package smoke runs multi-channel L1 probes against a Polypus gateway.
Package smoke runs multi-channel L1 probes against a Polypus gateway.
pkg
polypus
Package polypus is the public product façade for the Polypus inference gateway.
Package polypus is the public product façade for the Polypus inference gateway.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL