The short answer
AgentPlat supports Gemini through two model-adapter options: a native adapter for Google’s GenerateContent API and a Gemini preset on the OpenAI-compatible Chat Completions adapter. Choose the endpoint that fits your feature needs, pass credentials from your application and validate provider-specific behavior for your selected model.
Two ways to connect Gemini
AgentPlat offers a native @agentplat/model-gemini adapter for Google’s GenerateContent API. It also offers a gemini preset through @agentplat/model-openai-compatible, which speaks the OpenAI Chat Completions wire format. These are distinct protocol routes to model services. Select the native adapter when your application needs the native API contract; use the compatible preset only when the chosen endpoint supports that contract and its expected features.
Both options fit the public ModelAdapter boundary. The first execution guide shows where a model adapter enters a runtime path, while the package reference lists the separately installable AgentPlat packages.
Pass credentials explicitly
The application provides the Gemini API key, either in the adapter options or through an execution-scoped credential. The adapters do not read environment variables themselves. Your server chooses how secrets are stored, how a credential maps to a tenant, and which model identifier to use.
For a local setup, an application may configure the compatible adapter with a local base URL and no API key. For Google’s hosted API, configure the supported endpoint and credential according to Google’s current instructions. Keep provider-specific configuration out of shared conversation content and public client code.
Validate the behavior of the chosen route
Protocol support is not a feature-equivalence guarantee. Streaming, safety settings, tool calling, structured output and model options can differ between the native GenerateContent API and a compatible endpoint. Confirm what the exact model and route support, and build tests around the requests your application actually sends.
Use the native adapter or compatible preset as an invocation component. The Inference Control guide describes controls around calls that pass through an integrated path. Calls made separately with a Google SDK remain an application responsibility unless they are routed through corresponding controls.
Sources and further reading
- AgentPlat model adapter quickstart
- AgentPlat inference controls
- Google Gemini GenerateContent API
- AgentPlat Gemini adapter source
Documentation reviewed . Consult the linked documentation for current implementation details.