@memberjunction/ai-gemini 6.2.2 → 6.3.0-edge.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,84 @@
1
+ import { AIErrorType, BaseHostedSystemOneDecision, DecisionMediaType, DecisionParams, DecisionResult, SystemOneWireObject } from '@memberjunction/ai';
2
+ /**
3
+ * A `BaseDecision` driver for Google's Gemini Decisions API
4
+ * (`POST https://generativelanguage.googleapis.com/v1beta/decisions`), served by Gemini Decision 1
5
+ * (`gemini-decision-1`). The model scores closed-set questions in one forward pass instead of
6
+ * generating text, so a call bills input tokens only.
7
+ *
8
+ * Gemini's wire is the System One format with three differences, which this class handles; the
9
+ * answer mapping, renormalisation and the endpoint, key and error handling come from
10
+ * {@link BaseHostedSystemOneDecision}:
11
+ * - **Authentication** is the `x-goog-api-key` header, not a bearer token.
12
+ * - **The shared state is `input`**, not `state`. It takes text or `Content` blocks (text, image, audio,
13
+ * video, PDF). A request without media sends the state as text, an object state as JSON; a request
14
+ * with `DecisionParams.Media` sends a text block followed by one block per item, so the model reads
15
+ * them as one input.
16
+ * - **Usage** is `total_input_tokens` / `total_output_tokens`, mapped here onto the System One names.
17
+ * No `model` or `cost` field is returned on Google's `200` wire response (`ResolvedModel` falls back
18
+ * to the requested model unless a proxy or later revision includes `model`, so calibrations and run
19
+ * fitting can identify it); MJ prices the call from the model's cost rows.
20
+ *
21
+ * Questions go out as System One questions keyed by name: a Likelihood as `noul`, a Choice's options as
22
+ * `criteria: { value: description }`, a Score's levels as `criteria: [...]`, lowest first. Answers come
23
+ * back keyed the same way, with Choice probabilities keyed by option value and Score probabilities by
24
+ * 0-based level index (`"0"`..`"254"`), exactly as the System One mapping reads them. A Score answer's
25
+ * `legend` is ignored: MJ already holds the level names.
26
+ *
27
+ * Google answers a request it rejects, and a key it does not accept, with gateway `400 INVALID_ARGUMENT`,
28
+ * service `400 invalid_request`, or `403 PERMISSION_DENIED`; {@link GetHTTPErrorType} keeps all of them
29
+ * failover-eligible.
30
+ *
31
+ * When Gemini's input filter blocks the request (`prompt_feedback.block_reason`), the response has no
32
+ * answers; this driver fails the call with the block reason, as a failover-eligible error, since
33
+ * another decision model may answer.
34
+ */
35
+ export declare class GeminiDecision extends BaseHostedSystemOneDecision {
36
+ /** The Gemini Decisions API endpoint (Gemini API, v1beta). */
37
+ static readonly DEFAULT_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/decisions";
38
+ /** The model used when DecisionParams.Model is empty (Google accepts bare `gemini-decision-1` and `models/gemini-decision-1`). */
39
+ static readonly DEFAULT_MODEL = "gemini-decision-1";
40
+ protected get ServiceName(): string;
41
+ protected get DefaultModel(): string;
42
+ protected get DefaultEndpoint(): string;
43
+ protected get APIKeyDescription(): string;
44
+ protected get LegacyKeyVariable(): string;
45
+ /** Gemini Decision 1 reads images, audio, video and PDFs alongside the text state. */
46
+ get SupportedMediaTypes(): readonly DecisionMediaType[];
47
+ /** Google's API-key header, which the Gemini API takes in place of a bearer token. */
48
+ protected GetRequestHeaders(_model: string): Record<string, string>;
49
+ /**
50
+ * The request body: `{ model, input, questions }`. The System One body with its `state` sent as
51
+ * `input`: the state as text (an object state as JSON), or, with media, a text block followed by one
52
+ * `Content` block per item.
53
+ */
54
+ protected BuildRequestBody(model: string, params: DecisionParams): SystemOneWireObject;
55
+ /**
56
+ * Fixes two statuses whose `ErrorAnalyzer` reading is wrong for this API. `Default Decision` reaches
57
+ * Gemini Decision 1 as a power-matched fallback, and a `Fatal` error there would end its failover
58
+ * loop before the candidates behind it:
59
+ * - `400` — both Google's gateway `INVALID_ARGUMENT` (an invalid or expired API key) and the
60
+ * decisions service's `invalid_request` (`"* CreateDecisionRequest...: must have ..."`, which
61
+ * `ErrorAnalyzer` would classify as `VendorValidationError` or `InvalidRequest`) — is `ModelError`,
62
+ * since another model may answer. The message still names the cause.
63
+ * - `403` (`PERMISSION_DENIED`: missing key, restricted key, or API disabled for its project) reads
64
+ * as `Authentication` when the message names a permission; it is `ModelError` too.
65
+ *
66
+ * Not `Authentication` or `VendorValidationError`: on those the runner drops the vendor's other
67
+ * candidates, and the index it continues from then skips the next candidate (`BaseModelRunner`).
68
+ * `ErrorAnalyzer` keeps the rest: `401` stays a fatal `Authentication` error, `404` (`not_found` for
69
+ * an unknown model) reads as `ModelError`, and `429` (`RESOURCE_EXHAUSTED`) and `5xx` allow failover.
70
+ */
71
+ protected GetHTTPErrorType(status: number): AIErrorType | undefined;
72
+ /**
73
+ * Google's `200` wire response omits `model`. When the response names none, record the requested
74
+ * model (`ResolveModel(params)`) so `ModelSpecificResponseDetails`, calibration lookups and
75
+ * `fit-decision-calibration` identify the answering model.
76
+ */
77
+ protected DoDecide(params: DecisionParams): Promise<DecisionResult>;
78
+ /**
79
+ * Turns Gemini's `{ answers, usage, prompt_feedback }` into the System One `{ model, answers, usage }`,
80
+ * and throws when the input filter blocked the request.
81
+ */
82
+ protected UnwrapResponse(body: unknown, status: number): unknown;
83
+ }
84
+ //# sourceMappingURL=geminiDecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geminiDecision.d.ts","sourceRoot":"","sources":["../src/geminiDecision.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EAEX,2BAA2B,EAG3B,iBAAiB,EACjB,cAAc,EACd,cAAc,EAId,mBAAmB,EACtB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBACa,cAAe,SAAQ,2BAA2B;IAC3D,8DAA8D;IAC9D,gBAAuB,gBAAgB,gEAAgE;IAEvG,kIAAkI;IAClI,gBAAuB,aAAa,uBAAuB;IAE3D,SAAS,KAAK,WAAW,IAAI,MAAM,CAElC;IAED,SAAS,KAAK,YAAY,IAAI,MAAM,CAEnC;IAED,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAED,SAAS,KAAK,iBAAiB,IAAI,MAAM,CAExC;IAED,SAAS,KAAK,iBAAiB,IAAI,MAAM,CAExC;IAED,sFAAsF;IACtF,IAAoB,mBAAmB,IAAI,SAAS,iBAAiB,EAAE,CAEtE;IAED,sFAAsF;cACnE,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI5E;;;;OAIG;cACgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,mBAAmB;IAS/F;;;;;;;;;;;;;;;OAeG;cACgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI5E;;;;OAIG;cACsB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAQlF;;;OAGG;cACgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;CAW5E"}
@@ -0,0 +1,163 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var GeminiDecision_1;
8
+ import { BaseDecision, BaseHostedSystemOneDecision, CreateSystemOneHTTPError, IsSystemOneWireObject, NonEmptyString, RedactSecret, } from '@memberjunction/ai';
9
+ import { RegisterClass } from '@memberjunction/global';
10
+ /**
11
+ * A `BaseDecision` driver for Google's Gemini Decisions API
12
+ * (`POST https://generativelanguage.googleapis.com/v1beta/decisions`), served by Gemini Decision 1
13
+ * (`gemini-decision-1`). The model scores closed-set questions in one forward pass instead of
14
+ * generating text, so a call bills input tokens only.
15
+ *
16
+ * Gemini's wire is the System One format with three differences, which this class handles; the
17
+ * answer mapping, renormalisation and the endpoint, key and error handling come from
18
+ * {@link BaseHostedSystemOneDecision}:
19
+ * - **Authentication** is the `x-goog-api-key` header, not a bearer token.
20
+ * - **The shared state is `input`**, not `state`. It takes text or `Content` blocks (text, image, audio,
21
+ * video, PDF). A request without media sends the state as text, an object state as JSON; a request
22
+ * with `DecisionParams.Media` sends a text block followed by one block per item, so the model reads
23
+ * them as one input.
24
+ * - **Usage** is `total_input_tokens` / `total_output_tokens`, mapped here onto the System One names.
25
+ * No `model` or `cost` field is returned on Google's `200` wire response (`ResolvedModel` falls back
26
+ * to the requested model unless a proxy or later revision includes `model`, so calibrations and run
27
+ * fitting can identify it); MJ prices the call from the model's cost rows.
28
+ *
29
+ * Questions go out as System One questions keyed by name: a Likelihood as `noul`, a Choice's options as
30
+ * `criteria: { value: description }`, a Score's levels as `criteria: [...]`, lowest first. Answers come
31
+ * back keyed the same way, with Choice probabilities keyed by option value and Score probabilities by
32
+ * 0-based level index (`"0"`..`"254"`), exactly as the System One mapping reads them. A Score answer's
33
+ * `legend` is ignored: MJ already holds the level names.
34
+ *
35
+ * Google answers a request it rejects, and a key it does not accept, with gateway `400 INVALID_ARGUMENT`,
36
+ * service `400 invalid_request`, or `403 PERMISSION_DENIED`; {@link GetHTTPErrorType} keeps all of them
37
+ * failover-eligible.
38
+ *
39
+ * When Gemini's input filter blocks the request (`prompt_feedback.block_reason`), the response has no
40
+ * answers; this driver fails the call with the block reason, as a failover-eligible error, since
41
+ * another decision model may answer.
42
+ */
43
+ let GeminiDecision = class GeminiDecision extends BaseHostedSystemOneDecision {
44
+ static { GeminiDecision_1 = this; }
45
+ /** The Gemini Decisions API endpoint (Gemini API, v1beta). */
46
+ static { this.DEFAULT_ENDPOINT = 'https://generativelanguage.googleapis.com/v1beta/decisions'; }
47
+ /** The model used when DecisionParams.Model is empty (Google accepts bare `gemini-decision-1` and `models/gemini-decision-1`). */
48
+ static { this.DEFAULT_MODEL = 'gemini-decision-1'; }
49
+ get ServiceName() {
50
+ return 'Gemini Decisions API';
51
+ }
52
+ get DefaultModel() {
53
+ return GeminiDecision_1.DEFAULT_MODEL;
54
+ }
55
+ get DefaultEndpoint() {
56
+ return GeminiDecision_1.DEFAULT_ENDPOINT;
57
+ }
58
+ get APIKeyDescription() {
59
+ return 'a Gemini API key from Google AI Studio';
60
+ }
61
+ get LegacyKeyVariable() {
62
+ return 'AI_VENDOR_API_KEY__GEMINIDECISION';
63
+ }
64
+ /** Gemini Decision 1 reads images, audio, video and PDFs alongside the text state. */
65
+ get SupportedMediaTypes() {
66
+ return GEMINI_DECISION_MEDIA_TYPES;
67
+ }
68
+ /** Google's API-key header, which the Gemini API takes in place of a bearer token. */
69
+ GetRequestHeaders(_model) {
70
+ return { 'x-goog-api-key': this.Credential.APIKey, 'Content-Type': 'application/json' };
71
+ }
72
+ /**
73
+ * The request body: `{ model, input, questions }`. The System One body with its `state` sent as
74
+ * `input`: the state as text (an object state as JSON), or, with media, a text block followed by one
75
+ * `Content` block per item.
76
+ */
77
+ BuildRequestBody(model, params) {
78
+ const systemOneBody = super.BuildRequestBody(model, params);
79
+ const text = typeof params.State === 'string' ? params.State : JSON.stringify(params.State);
80
+ const input = params.Media && params.Media.length > 0
81
+ ? [{ type: 'text', text }, ...params.Media.map(toGeminiContent)]
82
+ : text;
83
+ return { model: systemOneBody['model'], input, questions: systemOneBody['questions'] };
84
+ }
85
+ /**
86
+ * Fixes two statuses whose `ErrorAnalyzer` reading is wrong for this API. `Default Decision` reaches
87
+ * Gemini Decision 1 as a power-matched fallback, and a `Fatal` error there would end its failover
88
+ * loop before the candidates behind it:
89
+ * - `400` — both Google's gateway `INVALID_ARGUMENT` (an invalid or expired API key) and the
90
+ * decisions service's `invalid_request` (`"* CreateDecisionRequest...: must have ..."`, which
91
+ * `ErrorAnalyzer` would classify as `VendorValidationError` or `InvalidRequest`) — is `ModelError`,
92
+ * since another model may answer. The message still names the cause.
93
+ * - `403` (`PERMISSION_DENIED`: missing key, restricted key, or API disabled for its project) reads
94
+ * as `Authentication` when the message names a permission; it is `ModelError` too.
95
+ *
96
+ * Not `Authentication` or `VendorValidationError`: on those the runner drops the vendor's other
97
+ * candidates, and the index it continues from then skips the next candidate (`BaseModelRunner`).
98
+ * `ErrorAnalyzer` keeps the rest: `401` stays a fatal `Authentication` error, `404` (`not_found` for
99
+ * an unknown model) reads as `ModelError`, and `429` (`RESOURCE_EXHAUSTED`) and `5xx` allow failover.
100
+ */
101
+ GetHTTPErrorType(status) {
102
+ return status === 400 || status === 403 ? 'ModelError' : undefined;
103
+ }
104
+ /**
105
+ * Google's `200` wire response omits `model`. When the response names none, record the requested
106
+ * model (`ResolveModel(params)`) so `ModelSpecificResponseDetails`, calibration lookups and
107
+ * `fit-decision-calibration` identify the answering model.
108
+ */
109
+ async DoDecide(params) {
110
+ const result = await super.DoDecide(params);
111
+ if (result.success && !NonEmptyString(result.ResolvedModel)) {
112
+ result.ResolvedModel = this.ResolveModel(params);
113
+ }
114
+ return result;
115
+ }
116
+ /**
117
+ * Turns Gemini's `{ answers, usage, prompt_feedback }` into the System One `{ model, answers, usage }`,
118
+ * and throws when the input filter blocked the request.
119
+ */
120
+ UnwrapResponse(body, status) {
121
+ if (!IsSystemOneWireObject(body)) {
122
+ return body;
123
+ }
124
+ const blockReason = readBlockReason(body['prompt_feedback']);
125
+ if (blockReason) {
126
+ const safeReason = RedactSecret(blockReason, this.Credential.APIKey);
127
+ throw CreateSystemOneHTTPError(`${this.ServiceName} blocked the input: ${safeReason}`, status, 'ModelError');
128
+ }
129
+ return { model: body['model'], answers: body['answers'], usage: toSystemOneUsage(body['usage']) };
130
+ }
131
+ };
132
+ GeminiDecision = GeminiDecision_1 = __decorate([
133
+ RegisterClass(BaseDecision, 'GeminiDecision')
134
+ ], GeminiDecision);
135
+ export { GeminiDecision };
136
+ /** The media types Gemini Decision 1 reads. */
137
+ const GEMINI_DECISION_MEDIA_TYPES = Object.freeze(['image', 'audio', 'video', 'document']);
138
+ /** One media item as a Gemini `Content` block: `{ type, mime_type, data | uri }`. */
139
+ function toGeminiContent(media) {
140
+ return media.URI
141
+ ? { type: media.Type, mime_type: media.MimeType, uri: media.URI }
142
+ : { type: media.Type, mime_type: media.MimeType, data: media.Data };
143
+ }
144
+ /** The block reason and its message from `prompt_feedback`, or undefined when the input was not blocked. */
145
+ function readBlockReason(feedback) {
146
+ if (!IsSystemOneWireObject(feedback)) {
147
+ return undefined;
148
+ }
149
+ const reason = NonEmptyString(feedback['block_reason']);
150
+ if (!reason || reason.toUpperCase() === 'BLOCK_REASON_UNSPECIFIED') {
151
+ return undefined;
152
+ }
153
+ const message = NonEmptyString(feedback['block_reason_message']);
154
+ return message ? `${reason} (${message})` : reason;
155
+ }
156
+ /** Maps Gemini's `{ total_input_tokens, total_output_tokens }` onto the System One `{ input_tokens, output_tokens }`. */
157
+ function toSystemOneUsage(usage) {
158
+ if (!IsSystemOneWireObject(usage)) {
159
+ return undefined;
160
+ }
161
+ return { input_tokens: usage['total_input_tokens'], output_tokens: usage['total_output_tokens'] ?? 0 };
162
+ }
163
+ //# sourceMappingURL=geminiDecision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geminiDecision.js","sourceRoot":"","sources":["../src/geminiDecision.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAEH,YAAY,EACZ,2BAA2B,EAC3B,wBAAwB,EAKxB,qBAAqB,EACrB,cAAc,EACd,YAAY,GAEf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAA2B;;IAC3D,8DAA8D;aACvC,qBAAgB,GAAG,4DAA4D,AAA/D,CAAgE;IAEvG,kIAAkI;aAC3G,kBAAa,GAAG,mBAAmB,AAAtB,CAAuB;IAE3D,IAAc,WAAW;QACrB,OA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C,EAAE,CAAC;AAC3G,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Behavior, FunctionResponseScheduling, type AuthToken, type CreateAuthTokenParameters, type LiveCallbacks, type LiveServerMessage, type LiveConnectConfig, type ContextWindowCompressionConfig, type FunctionDeclaration, type FunctionResponse, type Content, type Blob as GeminiBlob, type ActivityStart, type ActivityEnd, ThinkingLevel } from '@google/genai';
2
- import { BaseRealtimeModel, type ClientRealtimeSessionConfig, type IRealtimeSession, type RealtimeSessionParams, type RealtimeToolDefinition, type JSONObject, type RealtimeVoiceOption, type RealtimeAvatarStatus, type RealtimeDriverFacts } from '@memberjunction/ai';
2
+ import { BaseRealtimeModel, type RealtimeClientTransport, type ClientRealtimeSessionConfig, type IRealtimeSession, type RealtimeSessionParams, type RealtimeToolDefinition, type JSONObject, type RealtimeVoiceOption, type RealtimeAvatarStatus, type RealtimeDriverFacts } from '@memberjunction/ai';
3
3
  import { type GeminiThinkingLevel, type GeminiLiveEndpoint, type GeminiLiveResolvedProfile } from './geminiLiveProfiles.js';
4
4
  /**
5
5
  * The minimal subset of `@google/genai`'s `Session` that the realtime driver depends on. Declaring
@@ -73,6 +73,19 @@ export interface GeminiConnectArgs {
73
73
  export declare class GeminiRealtime extends BaseRealtimeModel {
74
74
  /** The ephemeral token MJ mints lives 30 minutes (GEMINI_CLIENT_TOKEN_EXPIRY_MS) and may open one connection per ~10 minutes of the cap plus a resume margin, so session resumption continues a conversation past Gemini's ~10-minute connection, and the token bounds the session. */
75
75
  static readonly DriverFacts: Readonly<RealtimeDriverFacts>;
76
+ /** Gemini Live caps each WebSocket connection at ~10 minutes (600 s). */
77
+ get DefaultCallDurationSeconds(): number | undefined;
78
+ /** Server-side Gemini Live sessions trust Google's native sessionResumption handles (with Attempt 2 fallback to seed). */
79
+ get TrustsNativeResumption(): boolean;
80
+ /**
81
+ * Resolves whether a client-direct session minted by this driver trusts native resumption handles.
82
+ * On the Developer API (`transport === 'direct'`), browser sessions authenticate with `v1alpha`
83
+ * ephemeral tokens, where resuming with a handle connects and restores an empty session; those
84
+ * sessions use `RealtimeConversationMemory` seeding (`false`). Relay sessions on Gemini Enterprise
85
+ * (`transport === 'relay'`) use server-side OAuth/API-key credentials on `v1`, where native
86
+ * `sessionResumption` handles preserve full audio context (`true`).
87
+ */
88
+ ClientSessionTrustsNativeResumption(transport?: RealtimeClientTransport): boolean;
76
89
  private geminiClient;
77
90
  private geminiTokenClient;
78
91
  constructor(apiKey: string);
@@ -123,8 +136,10 @@ export declare class GeminiRealtime extends BaseRealtimeModel {
123
136
  *
124
137
  * Expiry: the token opens connections (the first, and each resume, which Gemini counts as a new
125
138
  * session) until the session cap plus {@link GEMINI_CLIENT_TOKEN_CAP_SKEW_SECONDS} (at most
126
- * {@link GEMINI_CLIENT_TOKEN_EXPIRY_MS}), one per {@link GEMINI_LIVE_CONNECTION_SECONDS} of the cap plus
127
- * {@link GEMINI_CLIENT_TOKEN_RESUME_MARGIN}; the session's ability to send messages dies with it.
139
+ * {@link GEMINI_CLIENT_TOKEN_EXPIRY_MS}), one per effective connection length (`ConnectionMaxSeconds`, at most
140
+ * {@link GEMINI_LIVE_CONNECTION_SECONDS}) of the cap plus {@link GEMINI_CLIENT_TOKEN_RESUME_MARGIN}; the session's
141
+ * ability to send messages dies with it. The count rides `SessionConfig.tokenUses` so the browser refreshes before
142
+ * it spends the last use.
128
143
  *
129
144
  * @param params Session configuration (model, system prompt, tools, config bag).
130
145
  * @returns The minted {@link ClientRealtimeSessionConfig} the browser authenticates + applies.
@@ -238,14 +253,18 @@ export declare class GeminiRealtime extends BaseRealtimeModel {
238
253
  *
239
254
  * @param cfg The copy of the session config bag that is merged into the connect config. The keys are deleted from it.
240
255
  */
256
+ private static readonly CONSUMED_CONTINUITY_KEYS;
241
257
  private static scrubSharedKeys;
242
258
  /**
243
- * Keeps a config-bag `contextWindowCompression` only when it is an object. The bag is untyped
244
- * JSON, so a string, array or null would otherwise reach the wire and fail the session at
245
- * connect. A malformed value is replaced by the default and reported; a well-formed one wins
246
- * over the default, like every other bag key.
259
+ * Keeps a config-bag `contextWindowCompression` only when it is an object, or `null` / `false`
260
+ * when the caller explicitly disables compression. The bag is untyped JSON, so a string or array
261
+ * would otherwise reach the wire and fail the session at connect. A malformed value is replaced
262
+ * by the default and reported; a well-formed object wins over the default, and `null`/`false`
263
+ * deletes `contextWindowCompression` so uncompressed video uses the 120s limit.
247
264
  */
248
265
  private static ensureContextWindowCompression;
266
+ /** Returns true when `contextWindowCompression` is enabled on the resolved connect config. */
267
+ private static hasContextWindowCompression;
249
268
  /** Narrows an unenforced config-bag value to a real object — not a string, array, or null. */
250
269
  private static isPlainObject;
251
270
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"geminiRealtime.d.ts","sourceRoot":"","sources":["../src/geminiRealtime.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,QAAQ,EACR,0BAA0B,EAC1B,KAAK,SAAS,EACd,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EAEnC,KAAK,mBAAmB,EAExB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEZ,KAAK,IAAI,IAAI,UAAU,EACvB,KAAK,aAAa,EAClB,KAAK,WAAW,EAEhB,aAAa,EAChB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,iBAAiB,EAKjB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAK3B,KAAK,UAAU,EAGf,KAAK,mBAAmB,EAYxB,KAAK,oBAAoB,EAKzB,KAAK,mBAAmB,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAMH,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EACjC,MAAM,sBAAsB,CAAC;AA8D9B;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,iBAAiB,CA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