Osy#betaRun it on Osyrin: osyrin.com

Reference / Agent

Osysharp.Models.Gemini — Google's Gemini models as a provider

`Osysharp.Models.Gemini` is the class that talks to Google's Gemini API. Name it on the models it serves and every call to those models goes through it.

previewagentsguidekit

You are here: Building with agents › The kits › Models.Gemini

Summary#

Osysharp.Models.Gemini is the class that talks to Google's Gemini API. Name it on the models it serves and every call to those models goes through it.

Like the other two providers it is plain Osy# over HTTP, so it can be read whole and copied for a provider nobody has written yet.

PackageOsysharp.Models.Gemini, version 1.0.0
You add it withuse Osysharp.Models.Gemini; in the app's manifest.
It sits on[[agent-kit-llm|Llm]]
It also usesHttp — parts of the platform's own library
Its own test appA plant nursery that answers growers — kits/gemini/tests

Description#

What do you get without writing anything?#

  • Complete and stream, tools included.
  • Token counts reported to the meter.

When do you need it?#

When your models are Google's.

What does it expose?#

The tables below are generated from the kit itself, not written by hand: osy kits Osysharp.Models.Gemini --surface lists each of them with the code of the kit's own test app that uses it, and the tests that show it working.

Types you use

TypeWhat it is
GeminiClientThe Google Gemini API as an ILlmClient.
GeminiRequestWhat goes UP.
GeminiGenerationConfigThe sampling settings.
GeminiAnswerWhat comes back — from a whole call and from one streamed chunk alike, which is Gemini's own shape: a chunk is a response with fewer parts filled in.
GeminiPartOne part of a turn.
GeminiFunctionCallargs is a document, not text — Anthropic's shape rather than OpenAI's.
GeminiUsageThe token counts.

Go deeper#

  • [[agent-llm-calls#providers]] — how a provider is written and named
  • [[agent-llm-calls#models]] — saying which models the app has

Related

The map of the kits — which sits on which, and what each one is for

The agents family is 29 kits. Two are under everything: `Osysharp.Llm` for every model call and `Osysharp.Agents` for…

The Llm kit — call a model, and know what each call cost

`Osysharp.Llm` is the road every model call takes, written in Osy#: the operator's AI switch, the app's router, a…

The Llm kit — call a model, and know what each call cost

`Osysharp.Llm` is the road every model call takes, written in Osy#: the operator's AI switch, the app's router, a…