Google model connectors for @grafctory/llms.
Connects AI jobs to Google models, ready to work alongside any other task in a pipeline. Long runs proceed reliably to completion, and every result a job receives from a model can be trusted as complete. The cost of each request is logged under the labels of the job issuing it, so any spike can be traced back to its source.
npm install @grafctory/gear # the job executor
npm install @grafctory/llms # AI tasks and shared services
npm install @grafctory/llms-google # this package
Node.js 22 or later is required.
This package stands in for the Google GenAI SDK: import SDK values and types from here, never from @google/genai.
It ships the SDK release its workarounds are tested against. A separately installed copy may be another release,
and the client then no longer matches the SDK types the consumer imports from that copy.
TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json.
The legacy "node" resolver is not supported.
See the API reference.
This project is licensed under the Apache 2.0 License – see LICENSE file for details.
Grafctory™ is a trademark of Metreeca srl.
Creates a Gemini API client that works around known API limitations.
Extracts the output text of a Gemini API response.
Extracts the output text of a Gemini API response as a JSON payload.
Extracts the embedding of a Gemini API response.
Google model connectors.
Connects AI jobs to Google models, ready to work alongside any other task in a pipeline. Long runs proceed reliably to completion, and every result a job receives from a model can be trusted as complete. The cost of each request is logged under the labels of the job issuing it, so any spike can be traced back to its source.
Stands in for the Google GenAI SDK, whose whole surface it re-exports: import SDK values and types from here rather than from
@google/genai, so they always match the client and no direct dependency on the SDK is needed.See