modron's rebirth
  • Rust 98.9%
  • Nix 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
~larandar 71d46eb7b2 docs: record what execution changed, and supersede the registry section
`docs/tower-adapter-layer.md` was written before any of it was built. Four
things it did not anticipate are now recorded there, three of which cost
something: `provider-openai` had to exist before step 2 was possible at all;
the pivot's ENDPOINT TYPES then had to follow, which is the step the plan was
actually missing, since no adapter crate can build a
`TypedEndpointConverter` it cannot name the source marker of; the orphan rule
bit once on `Anthropic <-> OpenAI`, exactly where `adapter-extraction.md`
said it would; and the hazard that bit was the opposite of the one named --
not two adapters claiming a request, but a terminal layer rejecting one its
own stack had already translated.

What it bought is measured rather than asserted: fourteen registrations to
two adapters, any `Named` provider now translating without a Rust edit, and
`ANTHROPIC_COMPATIBLE_PROVIDERS` left with no registry to drift from.

`docs/adapter-extraction.md` gets a supersession note rather than an edit.
Its registry section describes a file that no longer exists; the rest of it
-- the orphan-rule analysis, the member-versus-excluded rule, the two classes
of provider -- still holds, and a plan that was executed is worth keeping as
what it was.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-19 21:53:05 +02:00
ai-gateway adapter: one layer per dialect, and the registry is gone 2026-09-19 21:52:43 +02:00
crates adapter: one layer per dialect, and the registry is gone 2026-09-19 21:52:43 +02:00
docs docs: record what execution changed, and supersede the registry section 2026-09-19 21:53:05 +02:00
nix nix: openssl is in the build graph after all 2026-09-19 21:06:39 +02:00
.env.template control-plane: remove the vendor's transport, keep the seam 2026-09-19 06:04:58 +02:00
.gitignore feat: dynamic router for cloud gateway (#220) 2025-07-11 11:42:19 -07:00
Cargo.lock adapter: one layer per dialect, and the registry is gone 2026-09-19 21:52:43 +02:00
Cargo.toml adapter-anthropic: take the converters, and give the pivot a crate 2026-09-19 21:29:50 +02:00
flake.lock nix: package modron-rs as a flake 2026-09-19 04:08:07 +02:00
flake.nix nix: package modron-rs as a flake 2026-09-19 04:08:07 +02:00
LICENSE Create LICENSE 2025-06-02 23:33:03 -07:00
NOTICE fork: take ai-gateway at v0.2.0-beta.30, the last Apache-2.0 release 2026-09-19 02:44:04 +02:00
README.md adapter-bedrock: move the provider out of the workspace 2026-09-19 05:04:58 +02:00
rustfmt.toml init 2025-04-01 08:40:28 -07:00

modron-rs

The Ting estate's model router: one OpenAI-compatible and Anthropic-compatible door in front of several providers, with load balancing, rate limiting and OpenTelemetry built in.

modron is the estate's name for the capability — how a machine reaches a model. This is the program that answers it.

What this is a fork of, and why

modron-rs is a fork of Helicone/ai-gateway, taken at v0.2.0-beta.30 (081f310be779f27122e6038e81e2359c44db4ecb, 2025-07-20) — the last release published under the Apache License, Version 2.0.

Upstream relicensed to GPL-3.0 on 2025-11-21, in a commit that was also the last commit it ever received; the documentation section for the project was taken down, and of fifty-nine forks, none became a maintained continuation. Apache-2.0 §2 grants an irrevocable licence, so the tree at the fork point remains Apache-2.0 permanently. This repository diverges before the relicence and carries no code from it.

The fork point is a release, not merely the last Apache commit. The forty-four commits between them are almost entirely Helicone's own hosted buildout — ECR pushes, Terraform, Valkey, multi-region deployment, a Postgres listener feeding their control plane, prompt-input logging to their backend. That is coupling a self-hosted router wants less of, so the tag is both the cleaner provenance anchor and the smaller surface.

See NOTICE for attribution and the statement of modification required by Apache-2.0 §4(b).

What was removed

Everything that was Helicone's project furniture rather than the program: their CI, container and deployment definitions (.github/, Dockerfile, infrastructure/, render.yaml), release automation (cliff.toml, dist-workspace.toml), editor and agent configuration, benchmarks, examples, the test-script workspace members, and the project documents that the estate keeps at the organisation level instead.

What remains is the gateway, its five crates, the lock file, and four files of paperwork.

Configuration

Two surfaces, and neither is a dashboard or a management API — which is most of why this fork exists.

Provider credentials come from the environment, one variable per provider, so a secret manager renders one file and nothing else needs to know:

OPENAI_API_KEY      ANTHROPIC_API_KEY      GEMINI_API_KEY
AWS_ACCESS_KEY      AWS_SECRET_KEY

Routing is YAML, declared and diffable:

routers:
  my-router:
    load-balance:
      chat:
        strategy: model-latency
        models:
          - anthropic/claude-3-7-sonnet
          - bedrock/anthropic.claude-3-7-sonnet-v1:0

Run it with -c <config.yaml>. The helicone: block in the shipped examples configures an optional connection to the upstream vendor's hosted control plane; features: none leaves it off, which is how the fork-point release ships and the only mode the estate uses.

Building

A Cargo workspace on edition 2024, with Cargo.lock committed and no git dependencies at all — every one of its 577 packages comes from crates.io.

That was not true at the fork point, and the difference is most of the work this tree has had done to it. Upstream carried sixteen git-sourced packages across two forked repositories, two of them on contributors' personal accounts. async-openai turned out to be the published 0.29.0 plus four lines and went back to the registry. stubr was replaced by wiremock-rs, the crate it had vendored a copy of. aws-sdk-bedrockruntime — one line that made cargo clone 2.3 GB, against 50 MB for the whole of crates.io — left with the Bedrock adapter, which is excluded from the workspace rather than merely feature-gated, because nix vendors whatever a lock names whether a target uses it or not.

rustfmt.toml uses nightly-only options; cargo fmt on stable ignores them and will reformat the tree.