Polyweave

@polyweave/optimization (1.0.3)

Published 2026-07-11 00:43:29 +00:00 by Dvorak

Installation

@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/
npm install @polyweave/optimization@1.0.3
"@polyweave/optimization": "1.0.3"

About this package

optimization

Performance and cost optimization wrappers for Polyweave.

Synopsis

import { createAutoBatcher, createCostCorrector } from '@polyweave/optimization';

const batcher = createAutoBatcher({ maxBatchSize: 10 });
const corrector = createCostCorrector({ provider: 'openai' });

Install

npm install @polyweave/optimization

API

createAutoBatcher(options)

Creates an auto-batching wrapper that coalesces concurrent requests into optimal batches.

createCostCorrector(options)

Creates a cost correction wrapper for post-hoc provider cost reconciliation.

Tests

npm test

Requirements

Node.js 18 or later. ESM only.

License

MIT

Dependencies

Development Dependencies

ID Version
@rigor/core *

Peer Dependencies

ID Version
@polyweave/core *
@polyweave/costs *

Keywords

polyweave optimization batching cost
Details
npm
2026-07-11 00:43:29 +00:00
39
John Dvorak
SEE LICENSE IN LICENSE
9.6 KiB
Assets (1)
Versions (6) View all
1.0.6 2026-07-17
1.0.7 2026-07-11
1.0.4 2026-07-11
1.0.3 2026-07-11
1.0.2 2026-07-10