Skip to content

GeminiConfig

Defined in: core/src/providers/gemini.ts:33

Standard options that any provider config can accept to configure fallbacks inline.

apiKey: string;

Defined in: core/src/providers/gemini.ts:34


optional baseUrl?: string;

Defined in: core/src/providers/gemini.ts:38

Any endpoint speaking the Generative Language REST dialect, including a proxy or gateway. Defaults to the Generative Language API.


optional bearer?: boolean;

Defined in: core/src/providers/gemini.ts:44

Send the credential as Authorization: Bearer instead of x-goog-api-key (Antigravity OAuth).


optional effort?: "none" | "low" | "medium" | "high" | "max";

Defined in: core/src/providers/gemini.ts:54

Bound default; a per-call effort overrides it.


optional fallbackOptions?: FallbackOptions<Provider>;

Defined in: core/src/fallback.ts:94

Custom cooldown or telemetry options for the fallback pool.

ProviderFallbackConfig.fallbackOptions


optional fallbacks?: readonly FallbackCandidate[];

Defined in: core/src/fallback.ts:88

Secondary and tertiary providers to try if this provider fails/exhausts: hand-built Providers, preset-id FallbackSpecs, or both.

ProviderFallbackConfig.fallbacks


optional fetchImpl?: (input, init?) => Promise<Response>;

Defined in: core/src/providers/gemini.ts:65

MDN Reference

Parameter Type
input RequestInfo | URL
init? RequestInit

Promise<Response>


optional headers?: Record<string, string>;

Defined in: core/src/providers/gemini.ts:66


optional id?: string;

Defined in: core/src/providers/gemini.ts:52

Names the provider in errors and logs.


optional instanceSessionId?: string;

Defined in: core/src/providers/gemini.ts:50

The id sessionHeader carries when a call has no sessionId.


optional jsonWithTools?: JsonWithTools;

Defined in: core/src/providers/gemini.ts:63

How the schema rides on a call that also carries tools. See JsonWithTools. Note that it is the model’s answer, not the endpoint’s: measured 2026-09-07, gemini-3.5-flash and gemini-3.5-flash-lite called their tool under responseJsonSchema every time, while gemini-3.8-flash managed 3/10. probeJsonWithTools asks the one you actually serve. Overridable per call.


optional maxTokens?: number;

Defined in: core/src/providers/gemini.ts:64


model: string;

Defined in: core/src/providers/gemini.ts:35


optional path?: string;

Defined in: core/src/providers/gemini.ts:41

Explicit path override when a backend has custom routing (Antigravity: /v1internal:streamGenerateContent?alt=sse).


optional projectId?: string;

Defined in: core/src/providers/gemini.ts:46

Google Antigravity (Cloud Code Assist) project id for the request envelope.


optional sessionHeader?: string;

Defined in: core/src/providers/gemini.ts:48

Header that carries StreamOptions.sessionId.


optional watchdog?: WatchdogOptions;

Defined in: core/src/fallback.ts:92

Watch every candidate separately. A silent candidate then times out and rotates; wrapping the completed pool would abort the whole chain instead. Fallback specs inherit this unless they set their own watchdog.

ProviderFallbackConfig.watchdog