From 5bbf337d114f3fa08428151337be8fe76159a411 Mon Sep 17 00:00:00 2001 From: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com> Date: Wed, 17 Jun 2026 14:22:05 +0200 Subject: [PATCH 1/2] docs: update proxy route examples --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a625c045..6a8fcb7b 100644 --- a/README.md +++ b/README.md @@ -126,15 +126,18 @@ const proxy = Proxy.create({ apiKey: 'sk-...', routes: { 'POST /v1/chat/completions': mppx.charge({ amount: '0.05' }), - 'POST /v1/completions': mppx.stream({ amount: '0.0001' }), - 'GET /v1/models': mppx.free(), + 'POST /v1/completions': mppx.tempo.session({ + amount: '0.0001', + unitType: 'token', + }), + 'GET /v1/models': true, }, }), stripe({ apiKey: 'sk-...', routes: { 'POST /v1/charges': mppx.charge({ amount: '0.01' }), - 'GET /v1/customers/:id': mppx.free(), + 'GET /v1/customers/:id': true, }, }), ], @@ -155,7 +158,7 @@ This exposes the following routes: | Route | Pricing | | ---------------------------------- | ---------------------------- | | `POST /openai/v1/chat/completions` | charge **$0.005** | -| `POST /openai/v1/completions` | stream **$0.0001 per token** | +| `POST /openai/v1/completions` | session **$0.0001 per token** | | `GET /openai/v1/models` | free | | `POST /stripe/v1/charges` | charge **$0.01** | | `GET /stripe/v1/customers/:id` | free | From 1604649481e2b7fa0adc504f4a2d0d657dc34e72 Mon Sep 17 00:00:00 2001 From: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com> Date: Wed, 17 Jun 2026 15:48:23 +0200 Subject: [PATCH 2/2] docs: add proxy route examples changeset --- .changeset/update-proxy-route-docs.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/update-proxy-route-docs.md diff --git a/.changeset/update-proxy-route-docs.md b/.changeset/update-proxy-route-docs.md new file mode 100644 index 00000000..6a8df8f8 --- /dev/null +++ b/.changeset/update-proxy-route-docs.md @@ -0,0 +1,5 @@ +--- +'mppx': patch +--- + +Updated proxy route examples to use current route handler APIs.