@meted/config
v0.1.0
Published
Configuration schema, modes and allocation policy for Meted.
Readme
@meted/config
Configuration schema, the four operating modes, and the allocation policy that turns an engine decision into a concrete instruction for a provider.
import { resolveAllocation } from "@meted/config";
const allocation = resolveAllocation({
mode: "balanced",
decision,
requestedMaxOutputTokens: 500, // never raised
modelMaxOutputTokens: 16384,
});| Mode | What it does |
| -------------- | ----------------------------------------------------------- |
| observe | Calculate and report. The upstream request is untouched. |
| conservative | Apply a generous ceiling. Catches runaway generations only. |
| balanced | Apply the engine's ceiling as-is. |
| aggressive | Tighten below it, and hint the target length in the prompt. |
Three rules hold in every mode:
- Meted never raises a ceiling the caller set for themselves
- Meted never allocates below what the engine called sufficient
- Meted never acts on a decision the engine was not confident about
@meted/config is isomorphic and runs in a Worker. @meted/config/node adds
filesystem-backed loading and environment overrides.
Apache-2.0. Part of Meted.
