npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@holokai/holo-provider-gemini

v1.4.5

Published

Google Gemini provider plugin for Holo LLM Gateway

Readme

@holokai/holo-provider-gemini

Google Gemini provider plugin for Holo LLM Gateway


Overview

The Gemini provider plugin enables Holo to communicate with Google's Gemini API. It provides bidirectional translation between Gemini's native API and the portable Holo format using the @google/genai SDK.

Key Features

  • Full Holo SDK integration with strict type safety
  • Bidirectional translation: Gemini native format <-> Holo universal format
  • Streaming support via streamGenerateContent
  • Tool calling / function calling
  • Vision and multimodal input
  • Embedding support via embedContent
  • Built-in pricing dataset with cost calculation
  • Thinking token and cache read cost tracking

Installation

npm install @holokai/holo-provider-gemini

Peer Dependencies

  • @holokai/holo-sdk ^1.2.2

Quick Start

Automatic Discovery

When installed in a Holo worker environment, this plugin is automatically discovered and loaded. No manual registration required.

Configuration

Add a provider configuration to your Holo deployment:

{
  "provider_type": "gemini",
  "plugin_id": "@holokai/holo-provider-gemini",
  "api_key": "${GEMINI_API_KEY}",
  "model": "gemini-2.0-flash",
  "config": {
    "defaultModel": "gemini-2.0-flash"
  }
}

Protocols

| Protocol | Capability | Route | Method | |--------------------------------|------------------|-----------------------------------------------|--------| | gemini.generateContent | Chat | /v1beta/models/:model:generateContent | POST | | gemini.streamGenerateContent | Chat (streaming) | /v1beta/models/:model:streamGenerateContent | POST | | gemini.embedContent | Embed | /v1beta/models/:model:embedContent | POST | | gemini.models | Models | /v1beta/models | GET |

The default protocol is gemini.generateContent.


Capabilities

{
    streaming: true,
    tools: true,
    vision: true,
    functionCalling: true,
    maxTokens: 1_000_000
}

Architecture

plugins/holo-provider-gemini/
├── src/
│   ├── index.ts                   Default export of plugin instance
│   ├── manifest.ts                Plugin manifest (family: 'gemini')
│   ├── plugin.ts                  GeminiProviderPlugin — routes, capabilities, pricing
│   ├── gemini.provider.ts         GeminiProvider — request execution via @google/genai
│   ├── gemini.auditor.ts          Audit record construction
│   ├── gemini.translator.ts       Holo <-> Gemini format translation
│   ├── gemini.wire.adapter.ts     Event-to-wire serialization (SSE/JSON)
│   ├── gemini.response.factory.ts Response envelope construction
│   └── gemini.pricing.ts          Built-in pricing dataset
├── tests/
│   └── fixtures/                  Conformance test fixtures
├── package.json
└── tsconfig.json

Holo Format Mapping

Request Translation (Holo -> Gemini)

| Holo Field | Gemini Field | |--------------------------------|------------------------------------| | messages[].role: 'user' | contents[].role: 'user' | | messages[].role: 'assistant' | contents[].role: 'model' | | messages[].content (text) | contents[].parts[].text | | messages[].content (image) | contents[].parts[].inlineData | | system | systemInstruction | | max_tokens | generationConfig.maxOutputTokens | | temperature | generationConfig.temperature | | top_p | generationConfig.topP | | top_k | generationConfig.topK | | stop_sequences | generationConfig.stopSequences | | tools | tools[].functionDeclarations |

Response Translation (Gemini -> Holo)

| Gemini Field | Holo Field | |--------------------------------------|------------------------------| | candidates[0].content.parts[].text | choices[0].message.content | | candidates[0].finishReason | choices[0].finish_reason | | usageMetadata.promptTokenCount | usage.prompt_tokens | | usageMetadata.candidatesTokenCount | usage.completion_tokens | | usageMetadata.totalTokenCount | usage.total_tokens |


Testing

Tests use the @holokai/holo-test conformance framework with fixture-driven testing:

npm test

License

MIT