@polyweave/optimization (1.0.4)
Published 2026-07-11 00:54:54 +00:00 by Dvorak
Installation
@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/npm install @polyweave/optimization@1.0.4"@polyweave/optimization": "1.0.4"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