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

@interview-sdk/adapter-gemini

v0.1.2

Published

Google Gemini provider adapter for @interview-sdk/core.

Readme

@interview-sdk/adapter-gemini

npm

Google Gemini provider adapter for @interview-sdk/core, built on @google/genai — Google's current unified SDK. The older @google/generative-ai package reached end-of-life on 2025-11-30; this adapter deliberately does not use it.

Install

npm install @interview-sdk/core @interview-sdk/adapter-gemini

Usage

import { GeminiAdapter } from '@interview-sdk/adapter-gemini';

const adapter = new GeminiAdapter({ apiKey: process.env.GEMINI_API_KEY });
// <InterviewWidget adapter={adapter} mode="client" ... />
// or: new ServerAnswerProcessor({ questions, rubric, adapter })

(AdapterRegistry from @interview-sdk/core is a separate, optional utility for looking an adapter up by string id at runtime — most apps just pass the adapter directly like above.)

GeminiAdapter accepts an optional model (defaults to gemini-3.5-flash; pass gemini-3.1-pro for heavier reasoning) and an optional pre-configured client for testing or Vertex/Enterprise mode.

Behavior

  • Splits AIMessage[] into Gemini's config.systemInstruction (developer content) and the contents array — Gemini uses 'user'/'model' role names (not 'assistant'), so assistant messages are mapped to 'model'.
  • Requests responseMimeType: 'application/json' (no responseSchema) when responseFormat: 'json' is set — the same reasoning as the other text adapters: our response shapes carry dynamic keys that Gemini's OpenAPI-subset schema format can't express.
  • Opts into retries explicitly. Unlike Claude's and OpenAI's SDKs, @google/genai does not retry rate-limit/server errors by default — this adapter passes httpOptions.retryOptions.attempts so Gemini's baseline resilience matches the other providers before core's own withRetry/ FailoverAdapter layer is even involved.
  • Normalizes every Gemini ApiError (a single generic class with a numeric .status, not a typed hierarchy like Claude/OpenAI) onto the shared Provider*Error taxonomy from @interview-sdk/core by branching on that status code.
  • Context-length overflow and a deprecated/retired model id both surface as a generic ApiError with no distinct type — context-length is detected heuristically from the message text.

Verified against

@google/[email protected], current as of 2026-07-04 — model names and the SDK package itself have changed before (Google previously shipped @google/generative-ai, now EOL); re-check before assuming this stays accurate for long.