Middleware that makes Gemini tool calling reliable and cheap.
package · open sourceWraps Google Gemini function calling in a middleware pipeline: an automatic multi-step tool loop plus the repair, validation and cost controls that production agents need.
highlights
- 01Tool filtering, schema compression, example injection, JSON repair, strict schema validation, retries with backoff, loop detection, result caching, context management and thought signatures.
- 02A multi-step tool runner with a token and usage tracker, so you can see what each call costs.
- 03Published on npm with ESM, CJS and TypeScript definitions.
built with
- typescript
- @google/genai
- zod
- tsup
- vitest