Skip to content

Kaeso 0.7.4: a bounded tool schema merge and no wait on every reply

Kaeso 0.7.4 is out. It fixes a low-severity security issue, where one crafted tool schema could keep the gateway's CPU busy, and it takes back a small wait that 0.7.3 added to every reply in organizations without sources. Here is what changed and how to update.

Published
Reading time
2 min
Author
Kaeso Team
Kaeso 0.7.4 in white on a dark ground, with a soft violet glow

Kaeso is the open-source AI gateway you run yourself: one address for your apps' model requests, with one set of keys, limits, logs and costs. Kaeso 0.7.4 is a small release with two fixes, one for security and one for speed.

Both are in the gateway. Nothing else changes: no setting, no database migration, no default.

A tool schema merge with a limit

Some providers want a tool's input schema as one object, while apps may describe it as a union of several shapes, each pointing at shared definitions with $ref. Kaeso merges such a union into one object before it sends the tool on.

Until 0.7.3, that merge expanded a definition again at every reference to it. A schema whose definitions refer to each other several times over grows exponentially that way, so one crafted tool from any valid API key could keep the gateway's CPU busy before any provider was called. The severity is low: it takes a key the gateway accepts, and it costs only CPU.

In 0.7.4, the merge expands each definition once, and it stops after 4,096 schemas, counting every reference it follows. A tool past that limit is refused as unsupported, in the app's own error format, before anything is sent. Real tools stay far below it. Format translation (opens in a new tab) lists the new refusal.

No wait on every reply

0.7.3 began to count a request once when a client both sends it through the gateway and reports it to a source. For that, the gateway notes each request before the reply goes out.

In an organization without sources, that note did nothing but read a cached answer, yet every reply still waited for a background task to read it. A request of an organization known to have no source, or a successful one without usage, now starts no task at all. Organizations with sources, or not known yet, behave as in 0.7.3, so requests reported by sources still count once.

The benchmark of 0.7.3 against 0.7.2 on one machine showed the median Kaeso adds a little higher at one and four clients; this wait is why. A new run with every 0.7 release side by side on one machine will follow on kaeso.app/benchmarks.

Updating from 0.7.3

Most installs update with one click from Instance › Updates: the updater verifies the signed release and checks your settings with the new gateway before it stops the old one. 0.7.4 has no database migration and refuses no setting that 0.7.3 accepts. With the installer, run sh install.sh --update; on Kubernetes, helm upgrade with --version 0.7.4. How Kaeso updates itself and checks your settings explains the updater.

Coming from 0.7.2 or earlier? Kaeso 0.7.3 sends Anthropic apps' requests to twelve providers' own Messages APIs and changes one default. The full changelog lists every change in 0.7.4.

By Kaeso Team

On this page

Own the gateway.Own the record.

curl -fsSLhttps://kaeso.app/install.sh | sh