Taming the Interactions API in the @google/genai SDK
dev.to·2d·
Discuss: DEV
🌈Gradual Languages
Preview
Report Post

Fixing TypeScript Inference in Google’s Gemini Interactions API

Google released beta support for a new Interactions API on 2025-12-11, described as "a unified interface for interacting with Gemini models and agents". The latest @google/genai SDK (v1.34.0 as of writing) surfaces this beta API, unlocking preview support for Deep Research tasks with background polling.

There’s just one problem: you can’t use it safely or sanely in TypeScript.

The Problem isn’t Verbosity, it’s Impossibility

When unknown appears in a union type, TypeScript doesn’t treat it as "one possible type among many." It treats it as…

Similar Posts

Loading similar posts...