A dynamic provider for https://maki.sh for Tailscale's Aperture gateway
Files
README.md

maki-provider-aperture #

A Maki dynamic provider for Aperture LLM gateway. Fetches available models from an Aperture instance and enriches them with context window, token limits, and pricing data from models.dev.

Usage #

# Set the Aperture gateway URL (do not include /v1 suffix!)
export APERTURE_BASE_URL="https://your-aperture.something-weird.ts.net"

# Build, run, test
go build -o aperture ./cmd/aperture
./aperture info
./aperture resolve
./aperture models

# install
[[ -d "${HOME}/.config/maki/providers" ]] || install -dm 0700 "${HOME}/.config/maki/providers/"
install -m 0700 ./aperture "${HOME}/.config/maki/providers/"

# test maki integration
maki models

Subcommands #

Command Description
info Provider metadata (name, auth status)
models List available models with enriched metadata
resolve Return the Aperture base URL for API calls
login Not implemented (Aperture auth is handled by Tailscale)
logout Not implemented (^^^)
refresh Not implemented (^^^)

Model Metadata #

The models command fetches the model list from Aperture's /v1/models endpoint, then backfills context_window and max_output_tokens from the models.dev API. The models.dev data is cached at $XDG_CACHE_HOME/maki/aperture-models.dev-api.json (or ~/.cache/maki/) and refreshed every 24 hours.

Overrides #

Per-model and per-provider limit overrides can be set in ~/.config/maki/aperture-overrides.yml:

requesty:
  limit:
    context_window: 128000
    max_output_tokens: 8192
  models:
    openai/gpt-4o:
      context_window: 200000
      max_output_tokens: 16384

Overrides take precedence over models.dev data. Provider-level defaults apply to any model not explicitly listed.

Provider Aliases #

Some Aperture provider IDs are mapped to their models.dev equivalents:

Aperture ID models.dev ID
ollama ollama-cloud
zai zai-coding-plan

Environment Variables #

Variable Required Description
APERTURE_BASE_URL Yes Base URL of the Aperture gateway
XDG_CACHE_HOME No Cache directory (default: ~/.cache)