{"version":3,"sources":["../src/configs/chat-model/base.config.chat-model.google.ts","../src/configs/chat-model/common.config.chat-model.google.ts","../src/configs/chat-model/response-schema.config.chat-model.google.ts","../src/configs/chat-model/reasoning.config.chat-model.google.ts","../src/configs/embedding-model/common.config.embedding-model.google.ts","../src/configs/embedding-model/base.config.embedding-model.google.ts","../src/configs/configs.google.ts","../src/provider/provider.google.ts","../src/models/pricing.json","../src/models/chat-models/types/roles.chat-model.google.ts","../src/models/chat-models/types/modalities.chat-model.google.ts","../src/models/chat-models/types/response.chat-model.google.ts","../src/models/chat-models/types/request.chat-model.google.ts","../src/models/chat-models/base-chat-model.google.ts","../src/models/chat-models/gemini-1.5-flash-001.google.ts","../src/models/chat-models/gemini-1.5-flash-002.google.ts","../src/models/chat-models/gemini-1.5-flash-latest.google.ts","../src/models/chat-models/gemini-1.5-flash.google.ts","../src/models/chat-models/gemini-1.5-pro-001.google.ts","../src/models/chat-models/gemini-1.5-pro-002.google.ts","../src/models/chat-models/gemini-1.5-pro-latest.google.ts","../src/models/chat-models/gemini-1.5-pro.google.ts","../src/models/chat-models/gemini-2.0-flash-exp.google.ts","../src/models/chat-models/gemini-2.0-flash.google.ts","../src/models/chat-models/gemini-2.0-flash-lite.google.ts","../src/models/chat-models/gemini-2.5-flash-lite.google.ts","../src/models/chat-models/gemini-2.5-flash-lite-preview-09-2025.google.ts","../src/models/chat-models/gemini-2.5-flash-preview-04-17.google.ts","../src/models/chat-models/gemini-2.5-flash.google.ts","../src/models/chat-models/gemini-2.5-pro-preview-03-25.google.ts","../src/models/chat-models/gemini-2.5-pro.google.ts","../src/models/chat-models/gemini-3.1-pro-preview-customtools.google.ts","../src/models/chat-models/gemini-3.1-pro-preview.google.ts","../src/models/chat-models/gemini-3.1-flash-lite.google.ts","../src/models/chat-models/gemini-3.5-flash.google.ts","../src/models/chat-models/gemini-3-flash-preview.google.ts","../src/models/chat-models/gemini-3-pro-preview.google.ts","../src/models/embedding-models/types/modalitites.embedding-model.google.ts","../src/models/embedding-models/types/response.embedding-model.google.ts","../src/models/embedding-models/types/request.embedding-model.google.ts","../src/models/embedding-pricing.json","../src/models/embedding-models/base-embedding-model.google.ts","../src/models/embedding-models/text-embedding-001.google.ts","../src/models/embedding-models/text-embedding-004.google.ts","../src/models/embedding-models/gemini-embedding-001.google.ts","../src/models/embedding-models/gemini-embedding-2.google.ts"],"names":["GOOGLE_SAFETY_CATEGORIES","GOOGLE_SAFETY_THRESHOLDS","formatSafetyLabel","value","prefix","letter","GOOGLE_SAFETY_CATEGORY_OPTIONS","category","GOOGLE_SAFETY_THRESHOLD_OPTIONS","threshold","temperature","max","_default","RangeConfigItem","CHAT_CONFIG","maxTokens","maxOutputTokens","stop","maxSequences","MultiStringConfigItem","topP","topK","frequencyPenalty","presencePenalty","seed","toolChoice","SelectStringConfigItem","safetySettings","PairedSelectConfigItem","reasoningEnabled","SelectBooleanConfigItem","maxReasoningTokens","minReasoningToken","maxReasoningToken","reasoningEffort","googleSearchTool","ChatModelBaseConfigSchema","maxTemperature","defaultTemperature","defaultTopP","z","ChatModelBaseConfigDef","responseSchema","ObjectSchemaConfigItem","ResponseSchema","responseFormat","GoogleChatModelResponseSchemaConfigDef","__spreadProps","__spreadValues","GoogleChatModelResponseSchemaConfigSchema","ChatModelReasoningConfigSchema","ChatModelReasoningConfigDef","dimensions","maxDimensions","EMBEDDING_CONFIG","EmbeddingModelBaseConfigSchema","EmbeddingModelBaseConfigDef","GoogleChatModelConfigs","GoogleEmbeddingModelConfigs","ProviderLiteral","Google","Gemini1_5Flash001Literal","Gemini1_5Flash001","Gemini1_5Flash001Options","Gemini1_5Flash001Schema","Gemini1_5Flash002Literal","Gemini1_5Flash002","Gemini1_5Flash002Options","Gemini1_5Flash002Schema","Gemini1_5FlashLatestLiteral","Gemini1_5FlashLatest","Gemini1_5FlashLatestOptions","Gemini1_5FlashLatestSchema","Gemini1_5FlashLiteral","Gemini1_5Flash","Gemini1_5FlashOptions","Gemini1_5FlashSchema","Gemini1_5Pro001Literal","Gemini1_5Pro001","Gemini1_5Pro001Options","Gemini1_5Pro001Schema","Gemini1_5Pro002Literal","Gemini1_5Pro002","Gemini1_5Pro002Options","Gemini1_5Pro002Schema","Gemini1_5ProLatestLiteral","Gemini1_5ProLatest","Gemini1_5ProLatestOptions","Gemini1_5ProLatestSchema","Gemini1_5ProLiteral","Gemini1_5Pro","Gemini1_5ProOptions","Gemini1_5ProSchema","Gemini2_0FlashLiteral","Gemini2_0Flash","Gemini2_0FlashOptions","Gemini2_0FlashSchema","Gemini2_0FlashLiteLiteral","Gemini2_0FlashLite","Gemini2_0FlashLiteOptions","Gemini2_0FlashLiteSchema","Gemini2_5FlashPreview0417Literal","Gemini2_5FlashPreview0417","Gemini2_5FlashPreview0417Options","Gemini2_5FlashPreview0417Schema","Gemini2_5ProPreview0325Literal","Gemini2_5ProPreview0325","Gemini2_5ProPreview0325Options","Gemini2_5ProPreview0325Schema","Gemini2_5FlashLiteral","Gemini2_5Flash","Gemini2_5FlashOptions","Gemini2_5FlashSchema","Gemini2_5ProLiteral","Gemini2_5Pro","Gemini2_5ProOptions","Gemini2_5ProSchema","Gemini3FlashPreviewLiteral","Gemini3FlashPreview","Gemini3FlashPreviewOptions","Gemini3FlashPreviewSchema","Gemini3_1ProPreviewLiteral","Gemini3_1ProPreview","Gemini3_1ProPreviewOptions","Gemini3_1ProPreviewSchema","Gemini3_1ProPreviewCustomtoolsLiteral","Gemini3_1ProPreviewCustomtools","Gemini3_1ProPreviewCustomtoolsOptions","Gemini3_1ProPreviewCustomtoolsSchema","Gemini3ProPreviewLiteral","Gemini3ProPreview","Gemini3ProPreviewOptions","Gemini3ProPreviewSchema","Gemini2_5FlashLiteLiteral","Gemini2_5FlashLite","Gemini2_5FlashLiteOptions","Gemini2_5FlashLiteSchema","Gemini2_5FlashLitePreview092025Literal","Gemini2_5FlashLitePreview092025","Gemini2_5FlashLitePreview092025Options","Gemini2_5FlashLitePreview092025Schema","Gemini3_5FlashLiteral","Gemini3_5Flash","Gemini3_5FlashOptions","Gemini3_5FlashSchema","Gemini3_1FlashLiteLiteral","Gemini3_1FlashLite","Gemini3_1FlashLiteOptions","Gemini3_1FlashLiteSchema","Text_Embedding_001Literal","Text_Embedding_001","Text_Embedding_001Options","Text_Embedding_001Schema","Text_Embedding_004Literal","Text_Embedding_004","Text_Embedding_004Options","Text_Embedding_004Schema","Gemini_Embedding_001Literal","Gemini_Embedding_001","Gemini_Embedding_001Options","Gemini_Embedding_001Schema","Gemini_Embedding_2Literal","Gemini_Embedding_2","Gemini_Embedding_2Options","Gemini_Embedding_2Schema","acc","key","options","modelName","ProviderError","model","parsedOptions","pricing_default","GoogleChatModelRoles","SystemRoleLiteral","UserRoleLiteral","AssistantRoleLiteral","ToolRoleLiteral","GoogleChatAssistantRoleLiteral","GoogleChatToolRoleLiteral","GoogleChatModelRolesMap","GoogleChatModelModalities","TextModalityLiteral","ImageModalityLiteral","PdfModalityLiteral","ToolCallModalityLiteral","ToolResponseModalityLiteral","ReasoningModalityLiteral","SearchResultModalityLiteral","ErrorModalityLiteral","GoogleChatModelModalitiesEnum","GoogleChatModelTextModalities","GoogleChatModelTextModalitiesEnum","GoogleChatModelTextVisionModalities","GoogleChatModelTextVisionModalitiesEnum","GoogleChatModelTextToolModalities","GoogleChatModelTextToolModalitiesEnum","GoogleSearchEntryPoint","GoogleGroundingChunkWeb","GoogleGroundingChunk","GoogleSegment","GoogleGroundingSupport","GoogleGroundingMetadata","GoogleCompleteChatTextResponse","GoogleCompleteChatToolResponse","GoogleCompleteChatServerSideToolCallResponse","GoogleCompleteChatServerSideToolResultResponse","GoogleCompleteChatResponse","GoogleStreamChatTextResponse","GoogleStreamChatToolResponse","GoogleStreamChatServerSideToolCallResponse","GoogleStreamChatServerSideToolResultResponse","GoogleStreamChatResponse","GoogleChatContentPartText","GoogleChatContentPartInlineData","GoogleChatContentPartFileData","GoogleChatContentPartFunctionCall","GoogleChatContentPartFunctionResponse","GoogleChatContentPartThinking","GoogleChatContent","GoogleChatSystemInstruction","GoogleChatTool","GoogleChatGoogleSearchTool","GoogleChatToolConfig","GoogleChatThinkingConfig","GoogleChatGenerationConfig","GoogleChatSafetySettings","GoogleChatRequest","BaseChatModelOptions","BaseChatModel","modelSchema","_a","urlWithoutTrailingSlash","_responseHeaders","responseData","delayMs","parseDuration","duration","match","data","retryInfo","detail","messages","message","content","__async","downloadPdf","url","headers","isRunningInBrowser","response","InvalidMessagesError","arrayBuffer","existsInGoogleFiles","fileId","existingFile","file","error","uploadPdfToGoogleFiles","pdfBuffer","uploadResponse","uploadUrl","uploadHeaders","fileUploadResponse","getGoogleFilesUrl","existingFileUri","base64Data","pdfBase64Prefix","convertBase64ToUint8Array","processedMessages","processedContent","fileUri","request","safeRequest","InvalidModelRequestError","parsedRequest","systemInstruction","generationConfig","toolConfig","_config","functionCallingConfig","config","Config","removeUndefinedEntries","part","role","_content","c","Base64ImageContentTypeLiteral","index","tools","tool","_toolChoice","_parsedConfig","InvalidConfigError","parsedConfig","transformedConfig","def","paramKey","paramValue","configToolChoice","responseSchemaConfig","stripBase64Prefix","prefixMatch","parsedMessages","parsedMessage","Message","normalizedMessages","lastMessage","nonSystemMessages","assistantContent","userContent","toolResponseContent","getNextExpectedRoles","obj","item","result","InvalidToolsError","transformedTools","parsedTool","Tool","resolve","transformedMessages","_b","_c","_d","_e","_f","safe","ModelResponseError","completeChatResponse","parsedResponse","candidate","contentItem","createReasoningContent","createTextContent","createToolCallContent","createSearchResultContent","chunk","support","safetyRatings","rating","createSafetyErrorContent","buffer","__asyncGenerator","lines","line","completeLine","structuredLine","partialResponse","messagePart","createPartialReasoningMessage","createPartialTextMessage","toolCall","createPartialToolCallMessage","createPartialSearchResultMessage","createPartialSafetyErrorMessage","query","__yieldStar","newData","newBuffer","currentIndex","newlineIndex","jsonStr","sanitizedHeaders","Gemini1_5Flash001Description","ChatModelSchema","Gemini1_5Flash002Description","Gemini1_5FlashLatestDescription","Gemini1_5FlashDescription","Gemini1_5Pro001Description","Gemini1_5Pro002Description","Gemini1_5ProLatestDescription","Gemini1_5ProDescription","Gemini2_0FlashExpLiteral","Gemini2_0FlashExpDescription","Gemini2_0FlashExpSchema","Gemini2_0FlashExpOptions","Gemini2_0FlashExp","Gemini2_0FlashDescription","Gemini2_0FlashLiteDescription","Gemini2_5FlashLiteDescription","Gemini2_5FlashLitePreview092025Description","Gemini2_5FlashPreview0417Description","Gemini2_5FlashDescription","Gemini2_5ProPreview0325Description","Gemini2_5ProDescription","Gemini3_1ProPreviewCustomtoolsDescription","Gemini3_1ProPreviewDescription","Gemini3_1FlashLiteDescription","Gemini3_5FlashDescription","Gemini3FlashPreviewDescription","Gemini3ProPreviewDescription","GoogleEmbeddingModelModalities","EmbeddingTextModalityLiteral","GoogleEmbeddingModelModalitiesEnum","GoogleGetEmbeddingsResponse","GoogleEmbeddingRequestInput","GoogleEmbeddingRequest","embedding_pricing_default","BaseEmbeddingModelOptions","BaseEmbeddingModel","requests","embeddingRequests","p","_parsedRequests","EmbeddingRequests","InvalidEmbeddingRequestsError","_requests","embeddings","embedding","FloatEmbeddingLiteral","entry","EmbeddingModelPrice","Text_Embedding_001_Description","EmbeddingModelSchema","Text_Embedding_004_Description","Gemini_Embedding_001_Description","Gemini_Embedding_2_Description"],"mappings":";;;;AAAA,IAAA,EAAA,CAAA,MAAA,CAAA,cAAA,CAAA,EAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,MAAA,CAAA,yBAAA,CAAA,IAAA,EAAA,CAAA,MAAA,CAAA,qBAAA,CAAA,IAAA,EAAA,CAAA,MAAA,CAAA,SAAA,CAAA,cAAA,CAAA,EAAA,CAAA,MAAA,CAAA,SAAA,CAAA,oBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,MAAA,CAAA,GAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAAA,EAAA,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AK/U,CAAAA,CAA4B,IAAA,CAAK,IAAI,EAAE,GAAA,CAC5C,MAAA,CAAQA,CAAAA,CAA4B,IAAA,CAAK,IAAI,CAAA,CAAE,MACjD,CAAA,CACA,MAAOqV,CAAAA,CAAqB9O,EAAyB,CACvD,CAAC,CAAA,CAEKE,EAAAA,CAA4B6O,CAAAA,CAG5B9O,EAAAA,CAAN,cAAiC+O,CAAmB,CAClD,WAAA,CAAY1O,CAAAA,CAAwC,CAClD,KAAA,CAAMH,EAAAA,CAA0BG,CAAO,EACzC,CACF","file":"index.mjs","sourcesContent":["import { z } from \"zod\";\n\nimport { googleSearchTool, maxTokens, safetySettings, stop, temperature, toolChoice, topP } from \"./common.config.chat-model.google\";\n\nconst ChatModelBaseConfigSchema = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number\n) =>\n  z.object({\n    temperature: temperature(maxTemperature, defaultTemperature).schema,\n    maxTokens: maxTokens(maxOutputTokens).schema,\n    stop: stop(maxSequences).schema,\n    topP: topP(defaultTopP).schema,\n    toolChoice: toolChoice.schema,\n    safetySettings: safetySettings.schema,\n    googleSearchTool: googleSearchTool.schema,\n  });\n\nconst ChatModelBaseConfigDef = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number\n) =>\n  ({\n    temperature: temperature(maxTemperature, defaultTemperature).def,\n    maxTokens: maxTokens(maxOutputTokens).def,\n    stop: stop(maxSequences).def,\n    topP: topP(defaultTopP).def,\n    toolChoice: toolChoice.def,\n    safetySettings: safetySettings.def,\n    googleSearchTool: googleSearchTool.def,\n  }) as const;\n\nexport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema };\n","import {\n  CHAT_CONFIG,\n  MultiStringConfigItem,\n  PairedSelectConfigItem,\n  RangeConfigItem,\n  SelectBooleanConfigItem,\n  SelectStringConfigItem,\n} from \"@adaline/provider\";\n\nconst GOOGLE_SAFETY_CATEGORIES = [\n  \"HARM_CATEGORY_HARASSMENT\",\n  \"HARM_CATEGORY_HATE_SPEECH\",\n  \"HARM_CATEGORY_SEXUALLY_EXPLICIT\",\n  \"HARM_CATEGORY_DANGEROUS_CONTENT\",\n  \"HARM_CATEGORY_CIVIC_INTEGRITY\",\n] as const;\n\nconst GOOGLE_SAFETY_THRESHOLDS = [\n  \"HARM_BLOCK_THRESHOLD_UNSPECIFIED\",\n  \"BLOCK_LOW_AND_ABOVE\",\n  \"BLOCK_MEDIUM_AND_ABOVE\",\n  \"BLOCK_ONLY_HIGH\",\n  \"BLOCK_NONE\",\n  \"OFF\",\n] as const;\n\nconst formatSafetyLabel = (value: string, prefix: string) =>\n  value\n    .replace(prefix, \"\")\n    .replace(/_/g, \" \")\n    .toLowerCase()\n    .replace(/\\b\\w/g, (letter: string) => letter.toUpperCase());\n\nconst GOOGLE_SAFETY_CATEGORY_OPTIONS = GOOGLE_SAFETY_CATEGORIES.map((category) => ({\n  value: category,\n  label: formatSafetyLabel(category, \"HARM_CATEGORY_\"),\n}));\n\nconst GOOGLE_SAFETY_THRESHOLD_OPTIONS = GOOGLE_SAFETY_THRESHOLDS.map((threshold) => ({\n  value: threshold,\n  label: formatSafetyLabel(threshold, \"HARM_BLOCK_THRESHOLD_\"),\n}));\n\nconst temperature = (max: number, _default: number) =>\n  RangeConfigItem({\n    param: \"temperature\",\n    title: CHAT_CONFIG.TEMPERATURE.title,\n    description: CHAT_CONFIG.TEMPERATURE.description,\n    min: 0.0,\n    max: max,\n    step: 0.01,\n    default: _default,\n  });\n\nconst maxTokens = (maxOutputTokens: number) =>\n  RangeConfigItem({\n    param: \"maxOutputTokens\",\n    title: CHAT_CONFIG.MAX_TOKENS.title,\n    description: CHAT_CONFIG.MAX_TOKENS.description,\n    min: 0,\n    max: maxOutputTokens,\n    step: 1,\n    default: 0,\n  });\n\nconst stop = (maxSequences: number) =>\n  MultiStringConfigItem({\n    param: \"stopSequences\",\n    title: CHAT_CONFIG.STOP(maxSequences).title,\n    description: CHAT_CONFIG.STOP(maxSequences).description,\n    max: maxSequences,\n  });\n\nconst topP = (_default: number) =>\n  RangeConfigItem({\n    param: \"topP\",\n    title: CHAT_CONFIG.TOP_P.title,\n    description: CHAT_CONFIG.TOP_P.description,\n    min: 0,\n    max: 1,\n    step: 0.01,\n    default: _default,\n  });\n\nconst topK = (_default: number) =>\n  RangeConfigItem({\n    param: \"topK\",\n    title: CHAT_CONFIG.TOP_K.title,\n    description: CHAT_CONFIG.TOP_K.description,\n    min: 1,\n    max: 40,\n    step: 1,\n    default: _default,\n  });\n\nconst frequencyPenalty = RangeConfigItem({\n  param: \"frequencyPenalty\",\n  title: CHAT_CONFIG.FREQUENCY_PENALTY.title,\n  description: CHAT_CONFIG.FREQUENCY_PENALTY.description,\n  min: -2,\n  max: 2,\n  step: 0.01,\n  default: 0,\n});\n\nconst presencePenalty = RangeConfigItem({\n  param: \"presencePenalty\",\n  title: CHAT_CONFIG.PRESENCE_PENALTY.title,\n  description: CHAT_CONFIG.PRESENCE_PENALTY.description,\n  min: -2,\n  max: 2,\n  step: 0.01,\n  default: 0,\n});\n\nconst seed = RangeConfigItem({\n  param: \"seed\",\n  title: CHAT_CONFIG.SEED.title,\n  description: CHAT_CONFIG.SEED.description,\n  min: 0,\n  max: 1000000,\n  step: 1,\n  default: 0,\n});\n\nconst toolChoice = SelectStringConfigItem({\n  param: \"toolChoice\",\n  title: \"Tool choice\",\n  description:\n    \"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.\",\n  default: \"auto\",\n  choices: [\"auto\", \"any\", \"none\"],\n});\n\nconst safetySettings = PairedSelectConfigItem({\n  param: \"safetySettings\",\n  title: \"Safety settings\",\n  description: \"The safety rating contains the category of harm and the harm probability level in that category for a piece of content.\",\n  fields: [\n    {\n      key: \"category\",\n      label: \"Category\",\n      choices: GOOGLE_SAFETY_CATEGORY_OPTIONS,\n    },\n    {\n      key: \"threshold\",\n      label: \"Threshold\",\n      choices: GOOGLE_SAFETY_THRESHOLD_OPTIONS,\n    },\n  ],\n  uniqueByField: \"category\",\n});\n\nconst reasoningEnabled = SelectBooleanConfigItem({\n  param: \"reasoningEnabled\",\n  title: \"Reasoning Enabled\",\n  description:\n    \"Controls whether the model is allowed to think for a longer period of time before generating a response. This can be useful for complex tasks that require more time to think.\",\n  default: false,\n});\n\nconst maxReasoningTokens = (minReasoningToken: number, maxReasoningToken: number) =>\n  RangeConfigItem({\n    param: \"thinkingBudget\",\n    title: \"Thinking budget\",\n    description: \"Specify the total tokens for thinking (or reasoning), where one token approximates four English characters.\",\n    min: minReasoningToken,\n    max: maxReasoningToken,\n    step: 1,\n    default: 0,\n  });\n\nconst reasoningEffort = SelectStringConfigItem({\n  param: \"thinkingLevel\",\n  title: \"Thinking Level\",\n  description:\n    \"Controls the depth of the model's reasoning process. Higher levels may result in more thorough reasoning but use more tokens.\",\n  default: \"LOW\",\n  choices: [\"MINIMAL\", \"LOW\", \"MEDIUM\", \"HIGH\"],\n});\n\nconst googleSearchTool = SelectBooleanConfigItem({\n  param: \"googleSearch\",\n  title: \"Google Search Tool\",\n  description: \"Controls whether the model is allowed to use the Google Search tool. Powered by Google.\",\n  default: false,\n});\n\nexport {\n  GOOGLE_SAFETY_CATEGORIES,\n  GOOGLE_SAFETY_CATEGORY_OPTIONS,\n  GOOGLE_SAFETY_THRESHOLDS,\n  GOOGLE_SAFETY_THRESHOLD_OPTIONS,\n  frequencyPenalty,\n  googleSearchTool,\n  maxReasoningTokens,\n  maxTokens,\n  presencePenalty,\n  reasoningEnabled,\n  safetySettings,\n  seed,\n  stop,\n  temperature,\n  reasoningEffort,\n  toolChoice,\n  topK,\n  topP,\n};\n","import { CHAT_CONFIG, ObjectSchemaConfigItem, SelectStringConfigItem } from \"@adaline/provider\";\nimport { ResponseSchema } from \"@adaline/types\";\n\nimport { ChatModelBaseConfigDef, ChatModelBaseConfigSchema } from \"./base.config.chat-model.google\";\n\nconst responseSchema = ObjectSchemaConfigItem({\n  param: \"response_schema\",\n  title: CHAT_CONFIG.RESPONSE_SCHEMA.title,\n  description: CHAT_CONFIG.RESPONSE_SCHEMA.description,\n  objectSchema: ResponseSchema,\n});\n\nconst responseFormat = SelectStringConfigItem({\n  param: \"response_format\",\n  title: CHAT_CONFIG.RESPONSE_FORMAT_WITH_SCHEMA.title,\n  description: CHAT_CONFIG.RESPONSE_FORMAT_WITH_SCHEMA.description,\n  default: \"text\",\n  choices: [\"text\", \"json_schema\"],\n});\n\nconst GoogleChatModelResponseSchemaConfigDef = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number\n) => ({\n  ...ChatModelBaseConfigDef(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n  responseFormat: responseFormat.def,\n  responseSchema: responseSchema.def,\n});\n\nconst GoogleChatModelResponseSchemaConfigSchema = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number\n) =>\n  ChatModelBaseConfigSchema(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP).extend({\n    responseFormat: responseFormat.schema,\n    responseSchema: responseSchema.schema,\n  });\n\nexport { GoogleChatModelResponseSchemaConfigDef, GoogleChatModelResponseSchemaConfigSchema };\n","import { maxReasoningTokens, reasoningEnabled, reasoningEffort } from \"./common.config.chat-model.google\";\n\nimport {\n  GoogleChatModelResponseSchemaConfigDef,\n  GoogleChatModelResponseSchemaConfigSchema,\n} from \"./response-schema.config.chat-model.google\";\n\nconst ChatModelReasoningConfigSchema = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number,\n  minReasoningToken: number,\n  maxReasoningToken: number,\n) =>\n  GoogleChatModelResponseSchemaConfigSchema(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP).extend({\n    reasoningEnabled: reasoningEnabled.schema,\n    maxReasoningTokens: maxReasoningTokens(minReasoningToken, maxReasoningToken).schema,\n    reasoningEffort: reasoningEffort.schema,\n  });\n\nconst ChatModelReasoningConfigDef = (\n  maxTemperature: number,\n  defaultTemperature: number,\n  maxOutputTokens: number,\n  maxSequences: number,\n  defaultTopP: number,\n  minReasoningToken: number,\n  maxReasoningToken: number,\n) =>\n  ({\n    ...GoogleChatModelResponseSchemaConfigDef(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n    reasoningEnabled: reasoningEnabled.def,\n    maxReasoningTokens: maxReasoningTokens(minReasoningToken, maxReasoningToken).def,\n    reasoningEffort: reasoningEffort.def,\n  });\n\nexport { ChatModelReasoningConfigDef, ChatModelReasoningConfigSchema };","import { EMBEDDING_CONFIG, RangeConfigItem } from \"@adaline/provider\";\n\nconst dimensions = (maxDimensions: number) =>\n  RangeConfigItem({\n    param: \"outputDimensionality\",\n    title: EMBEDDING_CONFIG.DIMENSIONS.title,\n    description: EMBEDDING_CONFIG.DIMENSIONS.description,\n    min: 1,\n    max: maxDimensions,\n    step: 1,\n    default: maxDimensions,\n  });\n\nexport { dimensions };\n","import { z } from \"zod\";\n\nimport { dimensions } from \"./common.config.embedding-model.google\";\n\nconst EmbeddingModelBaseConfigSchema = (maxDimensions: number) =>\n  z.object({\n    dimensions: dimensions(maxDimensions).schema,\n  });\n\nconst EmbeddingModelBaseConfigDef = (maxDimensions: number) =>\n  ({\n    dimensions: dimensions(maxDimensions).def,\n  }) as const;\n\nexport { EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema };\n","import {\n  ChatModelBaseConfigDef,\n  ChatModelBaseConfigSchema,\n  ChatModelReasoningConfigDef,\n  ChatModelReasoningConfigSchema,\n  GoogleChatModelResponseSchemaConfigDef,\n  GoogleChatModelResponseSchemaConfigSchema,\n} from \"./chat-model\";\nimport { EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema } from \"./embedding-model\";\n\nconst GoogleChatModelConfigs = {\n  base: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => ({\n    def: ChatModelBaseConfigDef(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n    schema: ChatModelBaseConfigSchema(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n  }),\n  responseSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => ({\n    def: GoogleChatModelResponseSchemaConfigDef(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n    schema: GoogleChatModelResponseSchemaConfigSchema(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP),\n  }),\n  reasoning: (\n    maxTemperature: number,\n    defaultTemperature: number,\n    maxOutputTokens: number,\n    maxSequences: number,\n    defaultTopP: number,\n    minReasoningToken: number,\n    maxReasoningToken: number,\n  ) => ({\n    def: ChatModelReasoningConfigDef(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP, minReasoningToken, maxReasoningToken),\n    schema: ChatModelReasoningConfigSchema(maxTemperature, defaultTemperature, maxOutputTokens, maxSequences, defaultTopP, minReasoningToken, maxReasoningToken),\n  }),\n} as const;\n\nconst GoogleEmbeddingModelConfigs = {\n  base: (maxDimensions: number) => ({\n    def: EmbeddingModelBaseConfigDef(maxDimensions),\n    schema: EmbeddingModelBaseConfigSchema(maxDimensions),\n  }),\n} as const;\n\nexport { GoogleChatModelConfigs, GoogleEmbeddingModelConfigs };\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType, ChatModelV1, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderError, ProviderV1 } from \"@adaline/provider\";\n\nimport * as Models from \"../models\";\n\nconst ProviderLiteral = \"google\";\nclass Google<C extends Models.BaseChatModelOptionsType, E extends Models.BaseEmbeddingModelOptionsType> implements ProviderV1<C, E> {\n  readonly version = \"v1\" as const;\n  readonly name = ProviderLiteral;\n  static readonly baseUrl: string = \"https://generativelanguage.googleapis.com/v1beta\";\n\n  private readonly chatModelFactories: Record<\n    string,\n    {\n      model: { new (options: any): ChatModelV1 };\n      modelOptions: z.ZodType<any>;\n      modelSchema: ChatModelSchemaType;\n    }\n  > = {\n    [Models.Gemini1_5Flash001Literal]: {\n      model: Models.Gemini1_5Flash001,\n      modelOptions: Models.Gemini1_5Flash001Options,\n      modelSchema: Models.Gemini1_5Flash001Schema,\n    },\n    [Models.Gemini1_5Flash002Literal]: {\n      model: Models.Gemini1_5Flash002,\n      modelOptions: Models.Gemini1_5Flash002Options,\n      modelSchema: Models.Gemini1_5Flash002Schema,\n    },\n    [Models.Gemini1_5FlashLatestLiteral]: {\n      model: Models.Gemini1_5FlashLatest,\n      modelOptions: Models.Gemini1_5FlashLatestOptions,\n      modelSchema: Models.Gemini1_5FlashLatestSchema,\n    },\n    [Models.Gemini1_5FlashLiteral]: {\n      model: Models.Gemini1_5Flash,\n      modelOptions: Models.Gemini1_5FlashOptions,\n      modelSchema: Models.Gemini1_5FlashSchema,\n    },\n    [Models.Gemini1_5Pro001Literal]: {\n      model: Models.Gemini1_5Pro001,\n      modelOptions: Models.Gemini1_5Pro001Options,\n      modelSchema: Models.Gemini1_5Pro001Schema,\n    },\n    [Models.Gemini1_5Pro002Literal]: {\n      model: Models.Gemini1_5Pro002,\n      modelOptions: Models.Gemini1_5Pro002Options,\n      modelSchema: Models.Gemini1_5Pro002Schema,\n    },\n    [Models.Gemini1_5ProLatestLiteral]: {\n      model: Models.Gemini1_5ProLatest,\n      modelOptions: Models.Gemini1_5ProLatestOptions,\n      modelSchema: Models.Gemini1_5ProLatestSchema,\n    },\n    [Models.Gemini1_5ProLiteral]: {\n      model: Models.Gemini1_5Pro,\n      modelOptions: Models.Gemini1_5ProOptions,\n      modelSchema: Models.Gemini1_5ProSchema,\n    },\n    // gemini-2.0-flash-exp is deprecated\n    // Removed from available models to prevent it from being used as a default\n    // [Models.Gemini2_0FlashExpLiteral]: {\n    //   model: Models.Gemini2_0FlashExp,\n    //   modelOptions: Models.Gemini2_0FlashExpOptions,\n    //   modelSchema: Models.Gemini2_0FlashExpSchema,\n    // },\n    [Models.Gemini2_0FlashLiteral]: {\n      model: Models.Gemini2_0Flash,\n      modelOptions: Models.Gemini2_0FlashOptions,\n      modelSchema: Models.Gemini2_0FlashSchema,\n    },\n    [Models.Gemini2_0FlashLiteLiteral]: {\n      model: Models.Gemini2_0FlashLite,\n      modelOptions: Models.Gemini2_0FlashLiteOptions,\n      modelSchema: Models.Gemini2_0FlashLiteSchema,\n    },\n\n    [Models.Gemini2_5FlashPreview0417Literal]: {\n      model: Models.Gemini2_5FlashPreview0417,\n      modelOptions: Models.Gemini2_5FlashPreview0417Options,\n      modelSchema: Models.Gemini2_5FlashPreview0417Schema,\n    },\n    [Models.Gemini2_5ProPreview0325Literal]: {\n      model: Models.Gemini2_5ProPreview0325,\n      modelOptions: Models.Gemini2_5ProPreview0325Options,\n      modelSchema: Models.Gemini2_5ProPreview0325Schema,\n    },\n    [Models.Gemini2_5FlashLiteral]: {\n      model: Models.Gemini2_5Flash,\n      modelOptions: Models.Gemini2_5FlashOptions,\n      modelSchema: Models.Gemini2_5FlashSchema,\n    },\n    [Models.Gemini2_5ProLiteral]: {\n      model: Models.Gemini2_5Pro,\n      modelOptions: Models.Gemini2_5ProOptions,\n      modelSchema: Models.Gemini2_5ProSchema,\n    },\n    [Models.Gemini3FlashPreviewLiteral]: {\n      model: Models.Gemini3FlashPreview,\n      modelOptions: Models.Gemini3FlashPreviewOptions,\n      modelSchema: Models.Gemini3FlashPreviewSchema,\n    },\n    [Models.Gemini3_1ProPreviewLiteral]: {\n      model: Models.Gemini3_1ProPreview,\n      modelOptions: Models.Gemini3_1ProPreviewOptions,\n      modelSchema: Models.Gemini3_1ProPreviewSchema,\n    },\n    [Models.Gemini3_1ProPreviewCustomtoolsLiteral]: {\n      model: Models.Gemini3_1ProPreviewCustomtools,\n      modelOptions: Models.Gemini3_1ProPreviewCustomtoolsOptions,\n      modelSchema: Models.Gemini3_1ProPreviewCustomtoolsSchema,\n    },\n    [Models.Gemini3ProPreviewLiteral]: {\n      model: Models.Gemini3ProPreview,\n      modelOptions: Models.Gemini3ProPreviewOptions,\n      modelSchema: Models.Gemini3ProPreviewSchema,\n    },\n    [Models.Gemini2_5FlashLiteLiteral]: {\n      model: Models.Gemini2_5FlashLite,\n      modelOptions: Models.Gemini2_5FlashLiteOptions,\n      modelSchema: Models.Gemini2_5FlashLiteSchema,\n    },\n    [Models.Gemini2_5FlashLitePreview092025Literal]: {\n      model: Models.Gemini2_5FlashLitePreview092025,\n      modelOptions: Models.Gemini2_5FlashLitePreview092025Options,\n      modelSchema: Models.Gemini2_5FlashLitePreview092025Schema,\n    },\n    [Models.Gemini3_5FlashLiteral]: {\n      model: Models.Gemini3_5Flash,\n      modelOptions: Models.Gemini3_5FlashOptions,\n      modelSchema: Models.Gemini3_5FlashSchema,\n    },\n    [Models.Gemini3_1FlashLiteLiteral]: {\n      model: Models.Gemini3_1FlashLite,\n      modelOptions: Models.Gemini3_1FlashLiteOptions,\n      modelSchema: Models.Gemini3_1FlashLiteSchema,\n    },\n  };\n\n  private readonly embeddingModelFactories: Record<\n    string,\n    {\n      model: { new (options: any): EmbeddingModelV1 };\n      modelOptions: z.ZodType<any>;\n      modelSchema: EmbeddingModelSchemaType;\n    }\n  > = {\n    [Models.Text_Embedding_001Literal]: {\n      model: Models.Text_Embedding_001,\n      modelOptions: Models.Text_Embedding_001Options,\n      modelSchema: Models.Text_Embedding_001Schema,\n    },\n    [Models.Text_Embedding_004Literal]: {\n      model: Models.Text_Embedding_004,\n      modelOptions: Models.Text_Embedding_004Options,\n      modelSchema: Models.Text_Embedding_004Schema,\n    },\n    [Models.Gemini_Embedding_001Literal]: {\n      model: Models.Gemini_Embedding_001,\n      modelOptions: Models.Gemini_Embedding_001Options,\n      modelSchema: Models.Gemini_Embedding_001Schema,\n    },\n    [Models.Gemini_Embedding_2Literal]: {\n      model: Models.Gemini_Embedding_2,\n      modelOptions: Models.Gemini_Embedding_2Options,\n      modelSchema: Models.Gemini_Embedding_2Schema,\n    },\n  };\n\n  chatModelLiterals(): string[] {\n    return Object.keys(this.chatModelFactories);\n  }\n\n  chatModelSchemas(): Record<string, ChatModelSchemaType> {\n    return Object.keys(this.chatModelFactories).reduce(\n      (acc, key) => {\n        acc[key] = this.chatModelFactories[key].modelSchema;\n        return acc;\n      },\n      {} as Record<string, ChatModelSchemaType>\n    );\n  }\n\n  chatModel(options: C): ChatModelV1 {\n    const modelName = options.modelName;\n    if (!(modelName in this.chatModelFactories)) {\n      throw new ProviderError({\n        info: `Google chat model: ${modelName} not found`,\n        cause: new Error(`Google chat model: ${modelName} not found, available chat models: \n          [${this.chatModelLiterals().join(\", \")}]`),\n      });\n    }\n\n    const model = this.chatModelFactories[modelName].model;\n    const parsedOptions = this.chatModelFactories[modelName].modelOptions.parse(options);\n    return new model(parsedOptions);\n  }\n\n  embeddingModelLiterals(): string[] {\n    return Object.keys(this.embeddingModelFactories);\n  }\n\n  embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType> {\n    return Object.keys(this.embeddingModelFactories).reduce(\n      (acc, key) => {\n        acc[key] = this.embeddingModelFactories[key].modelSchema;\n        return acc;\n      },\n      {} as Record<string, EmbeddingModelSchemaType>\n    );\n  }\n\n  embeddingModel(options: E): EmbeddingModelV1 {\n    const modelName = options.modelName;\n    if (!(modelName in this.embeddingModelFactories)) {\n      throw new ProviderError({\n        info: `Google embedding model: ${modelName} not found`,\n        cause: new Error(`Google embedding model: ${modelName} not found, available embedding models: \n          [${this.embeddingModelLiterals().join(\", \")}]`),\n      });\n    }\n\n    const model = this.embeddingModelFactories[modelName].model;\n    const parsedOptions = this.embeddingModelFactories[modelName].modelOptions.parse(options);\n    return new model(parsedOptions);\n  }\n}\n\nexport { Google, ProviderLiteral };\n","{\n  \"base-gemini-1-chat-model\": {\n    \"modelName\": \"base-gemini-1-chat-model\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0,\n            \"outputPricePerMillion\": 0\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.0-pro-001\": {\n    \"modelName\": \"gemini-1.0-pro-001\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.0-pro-latest\": {\n    \"modelName\": \"gemini-1.0-pro-latest\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.0-pro-vision\": {\n    \"modelName\": \"gemini-1.0-pro-vision\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.0-pro\": {\n    \"modelName\": \"gemini-1.0-pro\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-flash-001\": {\n    \"modelName\": \"gemini-1.5-flash-001\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.075,\n            \"outputPricePerMillion\": 0.3\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.15,\n            \"outputPricePerMillion\": 0.6\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-flash-002\": {\n    \"modelName\": \"gemini-1.5-flash-002\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.0375,\n            \"outputPricePerMillion\": 0.15\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.075,\n            \"outputPricePerMillion\": 0.3\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-flash-latest\": {\n    \"modelName\": \"gemini-1.5-flash-latest\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.075,\n            \"outputPricePerMillion\": 0.3\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.15,\n            \"outputPricePerMillion\": 0.6\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-flash\": {\n    \"modelName\": \"gemini-1.5-flash\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.075,\n            \"outputPricePerMillion\": 0.3\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.15,\n            \"outputPricePerMillion\": 0.6\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-pro-001\": {\n    \"modelName\": \"gemini-1.5-pro-001\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 5\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.5,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-pro-002\": {\n    \"modelName\": \"gemini-1.5-pro-002\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 5\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.5,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-pro-latest\": {\n    \"modelName\": \"gemini-1.5-pro-latest\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 5\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.5,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-1.5-pro\": {\n    \"modelName\": \"gemini-1.5-pro\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 128000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 5\n          }\n        }\n      },\n      {\n        \"minTokens\": 128001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.5,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.0-flash-exp\": {\n    \"modelName\": \"gemini-2.0-flash-exp\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.1,\n            \"outputPricePerMillion\": 0.4\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-flash-preview-04-17\": {\n    \"modelName\": \"gemini-2.5-flash-preview-04-17\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.15,\n            \"outputPricePerMillion\": 0.6\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-pro-preview-03-25\": {\n    \"modelName\": \"gemini-2.5-pro-preview-03-25\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 200000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      },\n      {\n        \"minTokens\": 200001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.5,\n            \"outputPricePerMillion\": 15\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-pro-vision\": {\n    \"modelName\": \"gemini-pro-vision\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-pro\": {\n    \"modelName\": \"gemini-pro\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-pro\": {\n    \"modelName\": \"gemini-2.5-pro\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3-pro-preview\": {\n    \"modelName\": \"gemini-3-pro-preview\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.25,\n            \"outputPricePerMillion\": 10\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3.1-pro-preview\": {\n    \"modelName\": \"gemini-3.1-pro-preview\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 200000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.0,\n            \"outputPricePerMillion\": 12.0\n          }\n        }\n      },\n      {\n        \"minTokens\": 200001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 4.0,\n            \"outputPricePerMillion\": 18.0\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3.1-pro-preview-customtools\": {\n    \"modelName\": \"gemini-3.1-pro-preview-customtools\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": 200000,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 2.0,\n            \"outputPricePerMillion\": 12.0\n          }\n        }\n      },\n      {\n        \"minTokens\": 200001,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 4.0,\n            \"outputPricePerMillion\": 18.0\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-flash\": {\n    \"modelName\": \"gemini-2.5-flash\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.3,\n            \"outputPricePerMillion\": 2.5\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.0-flash\": {\n    \"modelName\": \"gemini-2.0-flash\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.1,\n            \"outputPricePerMillion\": 0.4\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.0-flash-lite\": {\n    \"modelName\": \"gemini-2.0-flash-lite\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.075,\n            \"outputPricePerMillion\": 0.3\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-flash-lite\": {\n    \"modelName\": \"gemini-2.5-flash-lite\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.1,\n            \"outputPricePerMillion\": 0.4\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-2.5-flash-lite-preview-09-2025\": {\n    \"modelName\": \"gemini-2.5-flash-lite-preview-09-2025\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.1,\n            \"outputPricePerMillion\": 0.4\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3-flash-preview\": {\n    \"modelName\": \"gemini-3-flash-preview\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.5,\n            \"outputPricePerMillion\": 3.0\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3.5-flash\": {\n    \"modelName\": \"gemini-3.5-flash\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 1.5,\n            \"outputPricePerMillion\": 9\n          }\n        }\n      }\n    ]\n  },\n  \"gemini-3.1-flash-lite\": {\n    \"modelName\": \"gemini-3.1-flash-lite\",\n    \"currency\": \"USD\",\n    \"tokenRanges\": [\n      {\n        \"minTokens\": 0,\n        \"maxTokens\": null,\n        \"prices\": {\n          \"base\": {\n            \"inputPricePerMillion\": 0.25,\n            \"outputPricePerMillion\": 1.5\n          }\n        }\n      }\n    ]\n  }\n}\n","import { z } from \"zod\";\n\nimport { AssistantRoleLiteral, SystemRoleLiteral, ToolRoleLiteral, UserRoleLiteral } from \"@adaline/types\";\n\nconst GoogleChatModelRoles = z.enum([SystemRoleLiteral, UserRoleLiteral, AssistantRoleLiteral, ToolRoleLiteral]);\n\nconst GoogleChatAssistantRoleLiteral = \"model\";\nconst GoogleChatToolRoleLiteral = \"function\";\n\nconst GoogleChatModelRolesMap = {\n  system: UserRoleLiteral,\n  user: UserRoleLiteral,\n  assistant: GoogleChatAssistantRoleLiteral,\n  tool: GoogleChatToolRoleLiteral,\n} as const;\n\nexport { GoogleChatAssistantRoleLiteral, GoogleChatToolRoleLiteral, GoogleChatModelRoles, GoogleChatModelRolesMap };\n","import { z } from \"zod\";\n\nimport { ChatModelSchemaType } from \"@adaline/provider\";\nimport { ErrorModalityLiteral, ImageModalityLiteral, PdfModalityLiteral, ReasoningModalityLiteral, SearchResultModalityLiteral, TextModalityLiteral, ToolCallModalityLiteral, ToolResponseModalityLiteral } from \"@adaline/types\";\n\nconst GoogleChatModelModalities: ChatModelSchemaType[\"modalities\"] = [\n  TextModalityLiteral,\n  ImageModalityLiteral,\n  PdfModalityLiteral,\n  ToolCallModalityLiteral,\n  ToolResponseModalityLiteral,\n  ReasoningModalityLiteral,\n  SearchResultModalityLiteral,\n  ErrorModalityLiteral,\n];\n\nconst GoogleChatModelModalitiesEnum = z.enum([\n  TextModalityLiteral,\n  ImageModalityLiteral,\n  PdfModalityLiteral,\n  ToolCallModalityLiteral,\n  ToolResponseModalityLiteral,\n  ReasoningModalityLiteral,\n  SearchResultModalityLiteral,\n  ErrorModalityLiteral,\n]);\n\nconst GoogleChatModelTextModalities: ChatModelSchemaType[\"modalities\"] = [TextModalityLiteral];\n\nconst GoogleChatModelTextModalitiesEnum = z.enum([TextModalityLiteral]);\n\nconst GoogleChatModelTextVisionModalities: ChatModelSchemaType[\"modalities\"] = [TextModalityLiteral, ImageModalityLiteral];\n\nconst GoogleChatModelTextVisionModalitiesEnum = z.enum([TextModalityLiteral, ImageModalityLiteral]);\n\nconst GoogleChatModelTextToolModalities: ChatModelSchemaType[\"modalities\"] = [\n  TextModalityLiteral,\n  ToolCallModalityLiteral,\n  ToolResponseModalityLiteral,\n];\n\nconst GoogleChatModelTextToolModalitiesEnum = z.enum([TextModalityLiteral, ToolCallModalityLiteral, ToolResponseModalityLiteral]);\n\nexport {\n  GoogleChatModelModalitiesEnum,\n  GoogleChatModelModalities,\n  GoogleChatModelTextModalitiesEnum,\n  GoogleChatModelTextModalities,\n  GoogleChatModelTextToolModalitiesEnum,\n  GoogleChatModelTextToolModalities,\n  GoogleChatModelTextVisionModalitiesEnum,\n  GoogleChatModelTextVisionModalities,\n};\n","import { z } from \"zod\";\n\nconst GoogleSearchEntryPoint = z.object({\n  renderedContent: z.string().optional(),\n});\ntype GoogleSearchEntryPointType = z.infer<typeof GoogleSearchEntryPoint>;\n\nconst GoogleGroundingChunkWeb = z.object({\n  uri: z.string().optional(),\n  title: z.string().optional(),\n});\ntype GoogleGroundingChunkWebType = z.infer<typeof GoogleGroundingChunkWeb>;\n\nconst GoogleGroundingChunk = z.object({\n  web: GoogleGroundingChunkWeb.optional(),\n});\ntype GoogleGroundingChunkType = z.infer<typeof GoogleGroundingChunk>;\n\nconst GoogleSegment = z.object({\n  startIndex: z.number().optional(),\n  endIndex: z.number().optional(),\n  text: z.string().optional(),\n});\ntype GoogleSegmentType = z.infer<typeof GoogleSegment>;\n\nconst GoogleGroundingSupport = z.object({\n  segment: GoogleSegment.optional(),\n  groundingChunkIndices: z.array(z.number()).optional(),\n  confidenceScores: z.array(z.number()).optional(),\n});\ntype GoogleGroundingSupportType = z.infer<typeof GoogleGroundingSupport>;\n\nconst GoogleGroundingMetadata = z.object({\n  searchEntryPoint: GoogleSearchEntryPoint.optional(),\n  groundingChunks: z.array(GoogleGroundingChunk).optional(),\n  groundingSupports: z.array(GoogleGroundingSupport).optional(),\n  webSearchQueries: z.array(z.string()).optional(),\n});\ntype GoogleGroundingMetadataType = z.infer<typeof GoogleGroundingMetadata>;\n\nconst GoogleCompleteChatTextResponse = z.object({\n  text: z.string(),\n  thought: z.boolean().optional(),\n});\n\nconst GoogleCompleteChatToolResponse = z.object({\n  functionCall: z.object({\n    name: z.string(),\n    args: z.record(z.any()),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\n// Server-side built-in tool invocation (e.g. GOOGLE_SEARCH_WEB) emitted when\n// tool_config.include_server_side_tool_invocations is enabled.\n// Schema mirrors google.golang.org/genai ToolCall / ToolResponse:\n//   toolType: TOOL_TYPE_UNSPECIFIED | GOOGLE_SEARCH_WEB | GOOGLE_SEARCH_IMAGE\n//           | URL_CONTEXT | GOOGLE_MAPS | FILE_SEARCH\n//   args / response: map[string]any keyed by toolType-specific shape\n//   id: correlates toolCall → toolResponse\n// z.string() on toolType (not z.enum) to stay forward-compat with new tools.\nconst GoogleCompleteChatServerSideToolCallResponse = z.object({\n  toolCall: z.object({\n    toolType: z.string(),\n    args: z.record(z.unknown()),\n    id: z.string(),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\nconst GoogleCompleteChatServerSideToolResultResponse = z.object({\n  toolResponse: z.object({\n    toolType: z.string(),\n    response: z.record(z.unknown()),\n    id: z.string(),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\nconst GoogleCompleteChatResponse = z.object({\n  candidates: z.array(\n    z.object({\n      content: z\n        .object({\n          role: z.string(),\n          parts: z.array(\n            z.union([\n              GoogleCompleteChatTextResponse,\n              GoogleCompleteChatToolResponse,\n              GoogleCompleteChatServerSideToolCallResponse,\n              GoogleCompleteChatServerSideToolResultResponse,\n            ])\n          ),\n        })\n        .optional(),\n      finishReason: z.string().optional(),\n      index: z.number().optional(),\n      safetyRatings: z.optional(\n        z.array(\n          z.object({\n            category: z.string(),\n            probability: z.string(),\n            blocked: z.boolean().optional(),\n          })\n        )\n      ),\n      groundingMetadata: GoogleGroundingMetadata.optional(),\n    })\n  ),\n  promptFeedback: z.optional(\n    z.object({\n      safetyRatings: z.optional(\n        z.array(\n          z.object({\n            category: z.string(),\n            probability: z.string(),\n          })\n        )\n      ),\n    })\n  ),\n  usageMetadata: z\n    .object({\n      promptTokenCount: z.number(),\n      cachedContentTokenCount: z.number().optional(),\n      candidatesTokenCount: z.number().optional(),\n      totalTokenCount: z.number(),\n    })\n    .optional(),\n});\ntype GoogleCompleteChatResponseType = z.infer<typeof GoogleCompleteChatResponse>;\n\nconst GoogleStreamChatTextResponse = z.object({\n  text: z.string(),\n  thought: z.boolean().optional(),\n});\n\nconst GoogleStreamChatToolResponse = z.object({\n  functionCall: z.object({\n    name: z.string(),\n    args: z.record(z.any()),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\n// Stream variant of the server-side built-in tool invocation parts. See\n// GoogleCompleteChatServerSideToolCallResponse above for schema rationale.\nconst GoogleStreamChatServerSideToolCallResponse = z.object({\n  toolCall: z.object({\n    toolType: z.string(),\n    args: z.record(z.unknown()),\n    id: z.string(),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\nconst GoogleStreamChatServerSideToolResultResponse = z.object({\n  toolResponse: z.object({\n    toolType: z.string(),\n    response: z.record(z.unknown()),\n    id: z.string(),\n  }),\n  thoughtSignature: z.string().optional(),\n});\n\nconst GoogleStreamChatResponse = z.object({\n  candidates: z.array(\n    z.object({\n      content: z\n        .object({\n          role: z.string(),\n          parts: z.array(\n            z.union([\n              GoogleStreamChatTextResponse,\n              GoogleStreamChatToolResponse,\n              GoogleStreamChatServerSideToolCallResponse,\n              GoogleStreamChatServerSideToolResultResponse,\n            ])\n          ),\n        })\n        .optional(),\n      finishReason: z.string().optional(),\n      index: z.number().optional(),\n      safetyRatings: z.optional(\n        z.array(\n          z.object({\n            category: z.string(),\n            probability: z.string(),\n            blocked: z.boolean().optional(),\n          })\n        )\n      ),\n      groundingMetadata: GoogleGroundingMetadata.optional(),\n    })\n  ),\n  promptFeedback: z.optional(\n    z.object({\n      safetyRatings: z.optional(\n        z.array(\n          z.object({\n            category: z.string(),\n            probability: z.string(),\n          })\n        )\n      ),\n    })\n  ),\n  usageMetadata: z\n    .object({\n      promptTokenCount: z.number().optional(),\n      cachedContentTokenCount: z.number().optional(),\n      candidatesTokenCount: z.number().optional(),\n      totalTokenCount: z.number().optional(),\n    })\n    .optional(),\n});\ntype GoogleStreamChatResponseType = z.infer<typeof GoogleStreamChatResponse>;\n\nexport {\n  GoogleCompleteChatResponse,\n  GoogleCompleteChatServerSideToolCallResponse,\n  GoogleCompleteChatServerSideToolResultResponse,\n  GoogleCompleteChatTextResponse,\n  GoogleCompleteChatToolResponse,\n  GoogleGroundingChunk,\n  GoogleGroundingMetadata,\n  GoogleGroundingSupport,\n  GoogleSearchEntryPoint,\n  GoogleStreamChatResponse,\n  GoogleStreamChatServerSideToolCallResponse,\n  GoogleStreamChatServerSideToolResultResponse,\n  GoogleStreamChatTextResponse,\n  GoogleStreamChatToolResponse,\n  type GoogleCompleteChatResponseType,\n  type GoogleGroundingChunkType,\n  type GoogleGroundingMetadataType,\n  type GoogleGroundingSupportType,\n  type GoogleSearchEntryPointType,\n  type GoogleStreamChatResponseType,\n  type GoogleGroundingChunkWebType,\n  type GoogleSegmentType,\n};\n","import { z } from \"zod\";\n\nconst GoogleChatContentPartText = z.object({\n  text: z.string().min(1),\n});\ntype GoogleChatContentPartTextType = z.infer<typeof GoogleChatContentPartText>;\n\nconst GoogleChatContentPartInlineData = z.object({\n  inline_data: z.object({\n    mime_type: z.string().min(1),\n    data: z.string().base64(),\n  }),\n});\ntype GoogleChatContentPartInlineDataType = z.infer<typeof GoogleChatContentPartInlineData>;\n\nconst GoogleChatContentPartFileData = z.object({\n  file_data: z.object({\n    mime_type: z.string().min(1),\n    file_uri: z.string().min(1),\n  }),\n});\ntype GoogleChatContentPartFileDataType = z.infer<typeof GoogleChatContentPartFileData>;\n\nconst GoogleChatContentPartFunctionCall = z.object({\n  function_call: z.object({\n    name: z.string().min(1),\n    args: z.record(z.string().min(1)),\n  }),\n  thought_signature: z.string().optional(),\n});\ntype GoogleChatContentPartFunctionCallType = z.infer<typeof GoogleChatContentPartFunctionCall>;\n\nconst GoogleChatContentPartFunctionResponse = z.object({\n  function_response: z.object({\n    name: z.string().min(1),\n    response: z.record(z.string().min(1)),\n  }),\n});\ntype GoogleChatContentPartFunctionResponseType = z.infer<typeof GoogleChatContentPartFunctionResponse>;\n\nconst GoogleChatContentPartThinking = z.object({\n  text: z.string(),\n  thought: z.literal(true),\n  thought_signature: z.string().min(1),\n});\ntype GoogleChatContentPartThinkingType = z.infer<typeof GoogleChatContentPartThinking>;\n\nconst GoogleChatContent = z.object({\n  role: z.enum([\"user\", \"model\", \"function\"]),\n  parts: z.array(\n    z.union([\n      GoogleChatContentPartText,\n      GoogleChatContentPartInlineData,\n      GoogleChatContentPartFileData,\n      GoogleChatContentPartFunctionCall,\n      GoogleChatContentPartFunctionResponse,\n      GoogleChatContentPartThinking,\n      GoogleChatContentPartThinking,\n    ])\n  ),\n});\ntype GoogleChatContentType = z.infer<typeof GoogleChatContent>;\n\nconst GoogleChatSystemInstruction = z.object({\n  parts: z.array(GoogleChatContentPartText),\n});\ntype GoogleChatSystemInstructionType = z.infer<typeof GoogleChatSystemInstruction>;\n\nconst GoogleChatTool = z.object({\n  name: z.string().min(1),\n  description: z.string().min(1),\n  parameters: z.any(),\n});\ntype GoogleChatToolType = z.infer<typeof GoogleChatTool>;\n\nconst GoogleChatGoogleSearchTool = z.object({\n  timeRangeFilter: z\n    .object({\n      startTime: z.string().datetime().optional(),\n      endTime: z.string().datetime().optional(),\n    })\n    .optional(),\n});\ntype GoogleChatGoogleSearchToolType = z.infer<typeof GoogleChatGoogleSearchTool>;\n\nconst GoogleChatToolConfig = z.object({\n  function_calling_config: z\n    .object({\n      mode: z.enum([\"ANY\", \"AUTO\", \"NONE\"]),\n      allowed_function_names: z.array(z.string()).optional(),\n    })\n    .optional(),\n  include_server_side_tool_invocations: z.boolean().optional(),\n});\ntype GoogleChatToolConfigType = z.infer<typeof GoogleChatToolConfig>;\n\nconst GoogleChatThinkingConfig = z.object({\n  thinkingBudget: z.number().optional(),\n  includeThoughts: z.boolean().optional(),\n  thinkingLevel: z.enum([\"MINIMAL\", \"LOW\", \"MEDIUM\", \"HIGH\"]).optional(),\n});\ntype GoogleChatThinkingConfigType = z.infer<typeof GoogleChatThinkingConfig>;\n\nconst GoogleChatGenerationConfig = z.object({\n  stopSequences: z.array(z.string()).optional(),\n  maxOutputTokens: z.number().optional(),\n  temperature: z.number().optional(),\n  topP: z.number().optional(),\n  topK: z.number().optional(),\n  presencePenalty: z.number().optional(),\n  frequencyPenalty: z.number().optional(),\n  seed: z.number().optional(),\n  thinkingConfig: GoogleChatThinkingConfig.optional(),\n});\ntype GoogleChatGenerationConfigType = z.infer<typeof GoogleChatGenerationConfig>;\n\nconst GoogleChatSafetySettings = z.object({\n  category: z.enum([\n    \"HARM_CATEGORY_HARASSMENT\",\n    \"HARM_CATEGORY_HATE_SPEECH\",\n    \"HARM_CATEGORY_SEXUALLY_EXPLICIT\",\n    \"HARM_CATEGORY_DANGEROUS_CONTENT\",\n    \"HARM_CATEGORY_CIVIC_INTEGRITY\",\n  ]),\n  threshold: z.enum([\n    \"HARM_BLOCK_THRESHOLD_UNSPECIFIED\",\n    \"BLOCK_LOW_AND_ABOVE\",\n    \"BLOCK_MEDIUM_AND_ABOVE\",\n    \"BLOCK_ONLY_HIGH\",\n    \"BLOCK_NONE\",\n    \"OFF\",\n  ]),\n});\ntype GoogleChatSafetySettingsType = z.infer<typeof GoogleChatSafetySettings>;\n\nconst GoogleChatRequest = z.object({\n  model: z.string().min(1).optional(),\n  contents: z.array(GoogleChatContent),\n  systemInstruction: GoogleChatSystemInstruction.optional(),\n  system_instruction: GoogleChatSystemInstruction.optional(),\n  generationConfig: GoogleChatGenerationConfig.optional(),\n  generation_config: GoogleChatGenerationConfig.optional(),\n  safetySettings: z.array(GoogleChatSafetySettings).optional(),\n  safety_settings: z.array(GoogleChatSafetySettings).optional(),\n  tools: z\n    .object({\n      function_declarations: z.array(GoogleChatTool),\n      google_search: GoogleChatGoogleSearchTool.optional(),\n    })\n    .optional(),\n  toolConfig: GoogleChatToolConfig.optional(),\n  tool_config: GoogleChatToolConfig.optional(),\n});\ntype GoogleChatRequestType = z.infer<typeof GoogleChatRequest>;\n\nexport {\n  GoogleChatContent,\n  GoogleChatContentPartFileData,\n  GoogleChatContentPartFunctionCall,\n  GoogleChatContentPartFunctionResponse,\n  GoogleChatContentPartInlineData,\n  GoogleChatContentPartText,\n  GoogleChatContentPartThinking,\n  GoogleChatGenerationConfig,\n  GoogleChatGoogleSearchTool,\n  GoogleChatRequest,\n  GoogleChatSafetySettings,\n  GoogleChatSystemInstruction,\n  GoogleChatThinkingConfig,\n  GoogleChatTool,\n  GoogleChatToolConfig,\n  type GoogleChatContentPartFileDataType,\n  type GoogleChatContentPartFunctionCallType,\n  type GoogleChatContentPartFunctionResponseType,\n  type GoogleChatContentPartInlineDataType,\n  type GoogleChatContentPartTextType,\n  type GoogleChatContentPartThinkingType,\n  type GoogleChatContentType,\n  type GoogleChatGenerationConfigType,\n  type GoogleChatGoogleSearchToolType,\n  type GoogleChatRequestType,\n  type GoogleChatSafetySettingsType,\n  type GoogleChatSystemInstructionType,\n  type GoogleChatThinkingConfigType,\n  type GoogleChatToolConfigType,\n  type GoogleChatToolType,\n};\n","import { z } from \"zod\";\n\nimport {\n  ChatModelSchemaType,\n  ChatModelV1,\n  convertBase64ToUint8Array,\n  HeadersType,\n  InvalidConfigError,\n  InvalidMessagesError,\n  InvalidModelRequestError,\n  InvalidToolsError,\n  isRunningInBrowser,\n  ModelResponseError,\n  ParamsType,\n  removeUndefinedEntries,\n  SelectStringConfigItemDefType,\n  UrlType,\n  urlWithoutTrailingSlash,\n} from \"@adaline/provider\";\nimport {\n  AssistantRoleLiteral,\n  Base64ImageContentTypeLiteral,\n  Base64ImageContentValueType,\n  ChatModelPriceType,\n  ChatResponseType,\n  Config,\n  ConfigType,\n  ContentType,\n  createPartialReasoningMessage,\n  createPartialSafetyErrorMessage,\n  createPartialSearchResultMessage,\n  createPartialTextMessage,\n  createPartialToolCallMessage,\n  createReasoningContent,\n  createSafetyErrorContent,\n  createSearchResultContent,\n  createTextContent,\n  createToolCallContent,\n  ImageContentType,\n  ImageModalityLiteral,\n  Message,\n  MessageType,\n  PartialChatResponseType,\n  PdfContentType,\n  PdfModalityLiteral,\n  ReasoningModalityLiteral,\n  ResponseSchemaType,\n  SystemRoleLiteral,\n  TextModalityLiteral,\n  Tool,\n  ToolCallModalityLiteral,\n  ToolResponseModalityLiteral,\n  ToolRoleLiteral,\n  ToolType,\n  UserRoleLiteral,\n} from \"@adaline/types\";\n\nimport { Google } from \"../../provider/provider.google\";\nimport pricingData from \"../pricing.json\";\nimport {\n  GoogleChatContentPartFunctionCallType,\n  GoogleChatContentPartFunctionResponseType,\n  GoogleChatContentPartInlineDataType,\n  GoogleChatContentPartTextType,\n  GoogleChatContentType,\n  GoogleChatRequest,\n  GoogleChatRequestType,\n  GoogleChatSystemInstructionType,\n  GoogleChatToolConfigType,\n  GoogleChatToolType,\n  GoogleCompleteChatResponse,\n  GoogleCompleteChatResponseType,\n  GoogleStreamChatResponse,\n  GoogleStreamChatResponseType,\n} from \"./types\";\n\nconst BaseChatModelOptions = z.object({\n  modelName: z.string(),\n  apiKey: z.string(),\n  baseUrl: z.string().url().optional(),\n  completeChatUrl: z.string().url().optional(),\n  streamChatUrl: z.string().url().optional(),\n});\ntype BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;\n\nclass BaseChatModel implements ChatModelV1<ChatModelSchemaType> {\n  readonly version = \"v1\" as const;\n  modelSchema: ChatModelSchemaType;\n  readonly modelName: string;\n\n  private readonly apiKey: string;\n  private readonly baseUrl: string;\n  private readonly streamChatUrl: string;\n  private readonly completeChatUrl: string;\n\n  constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType) {\n    const parsedOptions = BaseChatModelOptions.parse(options);\n    this.modelSchema = modelSchema;\n    this.modelName = parsedOptions.modelName;\n    this.apiKey = parsedOptions.apiKey;\n    this.baseUrl = urlWithoutTrailingSlash(parsedOptions.baseUrl ?? Google.baseUrl);\n    this.completeChatUrl = urlWithoutTrailingSlash(\n      parsedOptions.completeChatUrl || `${this.baseUrl}/models/${this.modelName}:generateContent?key=${this.apiKey}`\n    );\n    this.streamChatUrl = urlWithoutTrailingSlash(\n      parsedOptions.streamChatUrl || `${this.baseUrl}/models/${this.modelName}:streamGenerateContent?key=${this.apiKey}`\n    );\n  }\n\n  getDefaultBaseUrl(): UrlType {\n    return this.baseUrl;\n  }\n\n  getDefaultHeaders(): HeadersType {\n    return {\n      \"Content-Type\": \"application/json\",\n    };\n  }\n\n  getDefaultParams(): ParamsType {\n    return {};\n  }\n\n  // Google returns retry delay information in the response body rather than headers.\n  // The response body contains error.details with a RetryInfo object:\n  // {\"@type\":\"type.googleapis.com/google.rpc.RetryInfo\",\"retryDelay\":\"45s\"}\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  getRetryDelay(_responseHeaders: HeadersType, responseData: unknown): { shouldRetry: boolean; delayMs: number } {\n    const shouldRetry = true;\n    let delayMs = 0;\n\n    // parse duration from retryDelay value of format \"45s\" or \"1.5s\" or \"45.499282066s\"\n    const parseDuration = (duration: string): number => {\n      const match = duration.match(/^(\\d+(?:\\.\\d+)?)s$/);\n      if (match) {\n        return Math.ceil(parseFloat(match[1]) * 1000);\n      }\n      return 0;\n    };\n\n    if (responseData && typeof responseData === \"object\") {\n      const data = responseData as { error?: { details?: Array<{ \"@type\"?: string; retryDelay?: string }> } };\n      if (data.error?.details && Array.isArray(data.error.details)) {\n        const retryInfo = data.error.details.find((detail) => detail[\"@type\"] === \"type.googleapis.com/google.rpc.RetryInfo\");\n        if (retryInfo?.retryDelay) {\n          delayMs = parseDuration(retryInfo.retryDelay);\n        }\n      }\n    }\n\n    return { shouldRetry, delayMs };\n  }\n\n  // TODO: unused method, not tested; should add support for non-text modalities, tools\n  getTokenCount(messages: MessageType[]): number {\n    return messages.reduce((acc, message) => {\n      return acc + message.content.map((content) => (content.modality === \"text\" ? content.value : \"\")).join(\" \").length;\n    }, 0);\n  }\n\n  private async transformPdfMessages(messages: MessageType[]): Promise<MessageType[]> {\n    // Helper method to download a PDF from a URL\n    const downloadPdf = async (url: string): Promise<Uint8Array> => {\n      // TODO: ideally use the isomorphic http client here but it's not available in the provider package, only in the gateway package.\n      // TODO: currently using fetch since it'll work in the browser and node.js (v18+) for this simple use case.\n      const headers: Record<string, string> = {};\n      if (!isRunningInBrowser()) {\n        headers[\"User-Agent\"] = \"Mozilla/5.0 (compatible; GoogleFilesAPI/1.0)\";\n      }\n      const response = await fetch(url, { headers });\n\n      if (!response.ok) {\n        throw new InvalidMessagesError({\n          info: `Failed to download PDF from URL: ${url}`,\n          cause: new Error(`HTTP ${response.status}: ${response.statusText}`),\n        });\n      }\n\n      const arrayBuffer = await response.arrayBuffer();\n      return new Uint8Array(arrayBuffer);\n    };\n\n    // Helper method to check if a file exists in Google Files API\n    const existsInGoogleFiles = async (fileId: string): Promise<string | null> => {\n      try {\n        const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/files?key=${this.apiKey}`, {\n          method: \"GET\",\n          headers: {\n            \"Content-Type\": \"application/json\",\n          },\n        });\n\n        if (!response.ok) {\n          return null;\n        }\n\n        const data = await response.json();\n        const files = data.files || [];\n\n        // Find file by display name (which is our hash)\n        const existingFile = files.find((file: any) => file.displayName === fileId);\n        return existingFile ? existingFile.uri : null;\n      } catch (error) {\n        // If there's an error checking, we'll just upload the file\n        return null;\n      }\n    };\n\n    // Helper method to upload a PDF to Google Files API\n    const uploadPdfToGoogleFiles = async (pdfBuffer: Uint8Array, fileId: string): Promise<string> => {\n      // Start resumable upload\n      const uploadResponse = await fetch(`https://generativelanguage.googleapis.com/upload/v1beta/files?key=${this.apiKey}`, {\n        method: \"POST\",\n        headers: {\n          \"X-Goog-Upload-Protocol\": \"resumable\",\n          \"X-Goog-Upload-Command\": \"start\",\n          \"X-Goog-Upload-Header-Content-Length\": pdfBuffer.length.toString(),\n          \"X-Goog-Upload-Header-Content-Type\": \"application/pdf\",\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify({\n          file: {\n            display_name: fileId,\n          },\n        }),\n      });\n\n      if (!uploadResponse.ok) {\n        throw new InvalidMessagesError({\n          info: \"Failed to start PDF upload to Google Files API\",\n          cause: new Error(`HTTP ${uploadResponse.status}: ${uploadResponse.statusText}`),\n        });\n      }\n\n      // Get upload URL from response headers\n      const uploadUrl = uploadResponse.headers.get(\"x-goog-upload-url\");\n      if (!uploadUrl) {\n        throw new InvalidMessagesError({\n          info: \"No upload URL received from Google Files API\",\n          cause: new Error(\"Missing x-goog-upload-url header\"),\n        });\n      }\n\n      // Upload the actual file content\n      const uploadHeaders: Record<string, string> = {\n        \"X-Goog-Upload-Offset\": \"0\",\n        \"X-Goog-Upload-Command\": \"upload, finalize\",\n      };\n      if (!isRunningInBrowser()) {\n        uploadHeaders[\"Content-Length\"] = pdfBuffer.length.toString();\n      }\n      const fileUploadResponse = await fetch(uploadUrl, {\n        method: \"POST\",\n        headers: uploadHeaders,\n        body: pdfBuffer,\n      });\n\n      if (!fileUploadResponse.ok) {\n        throw new InvalidMessagesError({\n          info: \"Failed to upload PDF content to Google Files API\",\n          cause: new Error(`HTTP ${fileUploadResponse.status}: ${fileUploadResponse.statusText}`),\n        });\n      }\n\n      const fileInfo = await fileUploadResponse.json();\n      return fileInfo.file.uri;\n    };\n\n    // Helper method to get the URL of a PDF from Google Files API\n    const getGoogleFilesUrl = async (content: PdfContentType): Promise<string> => {\n      const existingFileUri = await existsInGoogleFiles(content.file.id);\n      if (existingFileUri) {\n        return existingFileUri;\n      }\n\n      let pdfBuffer: Uint8Array;\n      if (content.value.type === \"url\") {\n        pdfBuffer = await downloadPdf(content.value.url);\n      } else {\n        let base64Data = content.value.base64;\n        const pdfBase64Prefix = \"data:application/pdf;base64,\";\n        base64Data = base64Data.startsWith(pdfBase64Prefix) ? base64Data.substring(pdfBase64Prefix.length) : base64Data;\n        pdfBuffer = convertBase64ToUint8Array(base64Data);\n      }\n      return await uploadPdfToGoogleFiles(pdfBuffer, content.file.id);\n    };\n\n    // Process the messages to add the Google Files API URL to the PDF content\n    const processedMessages: MessageType[] = [];\n    for (const message of messages) {\n      const processedContent = [];\n      for (const content of message.content) {\n        if (content.modality === PdfModalityLiteral) {\n          const fileUri = await getGoogleFilesUrl(content);\n          processedContent.push({\n            ...content,\n            value: {\n              type: \"url\" as const,\n              url: fileUri,\n            },\n          });\n        } else {\n          processedContent.push(content);\n        }\n      }\n\n      processedMessages.push({\n        ...message,\n        content: processedContent,\n      });\n    }\n\n    return processedMessages;\n  }\n\n  transformModelRequest(request: GoogleChatRequestType): {\n    modelName: string | undefined;\n    config: ConfigType;\n    messages: MessageType[];\n    tools: ToolType[] | undefined;\n  } {\n    const safeRequest = GoogleChatRequest.safeParse(request);\n    if (!safeRequest.success) {\n      throw new InvalidModelRequestError({ info: \"Invalid model request\", cause: safeRequest.error });\n    }\n\n    const parsedRequest = safeRequest.data;\n\n    const modelName = parsedRequest.model;\n\n    if (parsedRequest.system_instruction && parsedRequest.systemInstruction) {\n      throw new InvalidModelRequestError({\n        info: `Invalid model request for model : '${this.modelName}'`,\n        cause: new Error(\"'system_instruction' and 'systemInstruction' are not allowed at the same time\"),\n      });\n    }\n\n    if (parsedRequest.generation_config && parsedRequest.generationConfig) {\n      throw new InvalidModelRequestError({\n        info: `Invalid model request for model : '${this.modelName}'`,\n        cause: new Error(\"'generation_config' and 'generationConfig' are not allowed at the same time\"),\n      });\n    }\n\n    if (parsedRequest.tool_config && parsedRequest.toolConfig) {\n      throw new InvalidModelRequestError({\n        info: `Invalid model request for model : '${this.modelName}'`,\n        cause: new Error(\"'tool_config' and 'toolConfig' are not allowed at the same time\"),\n      });\n    }\n\n    const systemInstruction = parsedRequest.system_instruction || parsedRequest.systemInstruction;\n    const generationConfig = parsedRequest.generation_config || parsedRequest.generationConfig;\n    const safetySettings = parsedRequest.safety_settings || parsedRequest.safetySettings;\n    const toolConfig = parsedRequest.tool_config || parsedRequest.toolConfig;\n\n    if (toolConfig?.function_calling_config && (!parsedRequest.tools || parsedRequest.tools.function_declarations.length === 0)) {\n      throw new InvalidModelRequestError({\n        info: `Invalid model request for model : '${this.modelName}'`,\n        cause: new Error(\"'tools' are required when 'tool_choice' is specified\"),\n      });\n    }\n\n    const _config: ConfigType = {};\n\n    if (toolConfig?.function_calling_config) {\n      const functionCallingConfig = toolConfig.function_calling_config;\n      if (functionCallingConfig.mode === \"ANY\") {\n        if (functionCallingConfig.allowed_function_names && functionCallingConfig.allowed_function_names.length === 1) {\n          _config.toolChoice = functionCallingConfig.allowed_function_names[0];\n        } else {\n          _config.toolChoice = functionCallingConfig.mode.toLowerCase();\n        }\n      } else {\n        _config.toolChoice = functionCallingConfig.mode.toLowerCase();\n      }\n    }\n\n    _config.seed = generationConfig?.seed;\n    _config.maxTokens = generationConfig?.maxOutputTokens;\n    _config.temperature = generationConfig?.temperature;\n    _config.topP = generationConfig?.topP;\n    _config.presencePenalty = generationConfig?.presencePenalty;\n    _config.frequencyPenalty = generationConfig?.frequencyPenalty;\n    _config.stop = generationConfig?.stopSequences;\n    _config.safetySettings = safetySettings;\n    const config = Config().parse(removeUndefinedEntries(_config));\n\n    const messages: MessageType[] = [];\n    if (systemInstruction) {\n      systemInstruction.parts.forEach((part) => {\n        messages.push({ role: SystemRoleLiteral, content: [{ modality: TextModalityLiteral, value: part.text }] });\n      });\n    }\n\n    parsedRequest.contents.forEach((message) => {\n      const role = message.role;\n      switch (role) {\n        case \"user\":\n          {\n            const content = message.parts as (GoogleChatContentPartTextType | GoogleChatContentPartInlineDataType)[];\n            const _content = content.map((c) => {\n              if (\"text\" in c) {\n                return { modality: TextModalityLiteral, value: c.text };\n              } else {\n                return {\n                  modality: ImageModalityLiteral,\n                  detail: \"auto\" as ImageContentType[\"detail\"],\n                  value: {\n                    type: Base64ImageContentTypeLiteral,\n                    base64: c.inline_data.data,\n                    mediaType: c.inline_data.mime_type.split(\"/\")[1] as Base64ImageContentValueType[\"mediaType\"],\n                  },\n                };\n              }\n            });\n            messages.push({ role: role, content: _content });\n          }\n          break;\n\n        case \"model\":\n          {\n            const content = message.parts as (GoogleChatContentPartTextType | GoogleChatContentPartFunctionCallType)[];\n            const _content = content.map((c, index) => {\n              if (\"text\" in c) {\n                return { modality: TextModalityLiteral, value: c.text };\n              } else {\n                return {\n                  modality: ToolCallModalityLiteral,\n                  id: index.toString(),\n                  index: index,\n                  name: c.function_call.name,\n                  arguments: JSON.stringify(c.function_call.args),\n                };\n              }\n            });\n            messages.push({ role: AssistantRoleLiteral, content: _content });\n          }\n          break;\n\n        case \"function\":\n          {\n            const content = message.parts as GoogleChatContentPartFunctionResponseType[];\n            const _content = content.map((c, index) => {\n              return {\n                modality: ToolResponseModalityLiteral,\n                id: index.toString(),\n                index: index,\n                name: c.function_response.name,\n                data: JSON.stringify(c.function_response.response),\n              };\n            });\n            messages.push({ role: ToolRoleLiteral, content: _content });\n          }\n          break;\n\n        default: {\n          throw new InvalidMessagesError({\n            info: `Invalid message 'role' for model : ${this.modelName}`,\n            cause: new Error(`role : '${message.role}' is not supported for model : ${this.modelName}`),\n          });\n        }\n      }\n    });\n\n    const tools: ToolType[] = [];\n    if (parsedRequest.tools) {\n      parsedRequest.tools.function_declarations.forEach((tool: GoogleChatToolType) => {\n        tools.push({\n          type: \"function\",\n          definition: {\n            schema: {\n              name: tool.name,\n              description: tool.description,\n              parameters: tool.parameters,\n            },\n          },\n        });\n      });\n    }\n\n    return {\n      modelName,\n      config,\n      messages,\n      tools: tools.length > 0 ? tools : undefined,\n    };\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType {\n    const _toolChoice = config.toolChoice;\n    delete config.toolChoice; // can have a specific tool name that is not in the model schema, validated at transformation\n\n    const _parsedConfig = this.modelSchema.config.schema.safeParse(config);\n    if (!_parsedConfig.success) {\n      throw new InvalidConfigError({\n        info: `Invalid config for model : '${this.modelName}'`,\n        cause: _parsedConfig.error,\n      });\n    }\n\n    const parsedConfig = _parsedConfig.data as ConfigType;\n\n    Object.keys(parsedConfig).forEach((key) => {\n      if (!(key in this.modelSchema.config.def)) {\n        throw new InvalidConfigError({\n          info: `Invalid config for model : '${this.modelName}'`,\n          cause: new Error(`Invalid config key : '${key}', \n            available keys : [${Object.keys(this.modelSchema.config.def).join(\", \")}]`),\n        });\n      }\n    });\n\n    const transformedConfig = Object.keys(parsedConfig).reduce((acc, key) => {\n      const def = this.modelSchema.config.def[key];\n      const paramKey = def.param;\n      const paramValue = (parsedConfig as ConfigType)[key];\n\n      if (key === \"reasoningEnabled\") {\n        // Handle reasoningEnabled specially\n        acc.thinkingConfig =\n          acc.thinkingConfig && typeof acc.thinkingConfig === \"object\"\n            ? { ...acc.thinkingConfig, includeThoughts: paramValue }\n            : { includeThoughts: paramValue };\n      } else if (key === \"maxReasoningTokens\") {\n        acc.thinkingConfig =\n          acc.thinkingConfig && typeof acc.thinkingConfig === \"object\"\n            ? { ...acc.thinkingConfig, thinkingBudget: paramValue }\n            : { thinkingBudget: paramValue };\n      } else if (key === \"reasoningEffort\") {\n        acc.thinkingConfig =\n          acc.thinkingConfig && typeof acc.thinkingConfig === \"object\"\n            ? { ...acc.thinkingConfig, thinkingLevel: paramValue }\n            : { thinkingLevel: paramValue };\n      } else if (paramKey === \"maxOutputTokens\" && def.type === \"range\" && paramValue === 0) {\n        acc[paramKey] = def.max;\n      } else {\n        acc[paramKey] = paramValue;\n      }\n\n      return acc;\n    }, {} as ParamsType);\n\n    // Validate that only one of thinkingBudget or thinkingLevel is set\n    if (\n      transformedConfig.thinkingConfig &&\n      typeof transformedConfig.thinkingConfig === \"object\" &&\n      \"thinkingBudget\" in transformedConfig.thinkingConfig &&\n      \"thinkingLevel\" in transformedConfig.thinkingConfig &&\n      transformedConfig.thinkingConfig.thinkingBudget !== undefined &&\n      transformedConfig.thinkingConfig.thinkingBudget !== 0 &&\n      transformedConfig.thinkingConfig.thinkingLevel !== undefined\n    ) {\n      throw new InvalidConfigError({\n        info: `Invalid config for model : '${this.modelName}'`,\n        cause: new Error(\"Only one of 'thinkingBudget' or 'thinkingLevel' can be set, not both.\"),\n      });\n    }\n\n    const safetySettings = transformedConfig.safetySettings;\n    delete transformedConfig.safetySettings;\n    delete transformedConfig.googleSearch;\n\n    let toolConfig: GoogleChatToolConfigType | undefined;\n    if (_toolChoice !== undefined) {\n      const toolChoice = _toolChoice as string;\n      if (!tools || (tools && tools.length === 0)) {\n        throw new InvalidConfigError({\n          info: `Invalid config for model : '${this.modelName}'`,\n          cause: new Error(\"'tools' are required when 'toolChoice' is specified\"),\n        });\n      } else if (tools && tools.length > 0) {\n        const configToolChoice = this.modelSchema.config.def.toolChoice as SelectStringConfigItemDefType;\n        if (!configToolChoice.choices.includes(toolChoice)) {\n          // toolChoice not in model schema choices\n          if (tools.map((tool) => tool.definition.schema.name).includes(toolChoice)) {\n            // toolChoice is a specific tool name\n            toolConfig = {\n              function_calling_config: {\n                mode: \"ANY\",\n                allowed_function_names: [toolChoice],\n              },\n            };\n          } else {\n            throw new InvalidConfigError({\n              info: `Invalid config for model : '${this.modelName}'`,\n              cause: new Error(`toolChoice : '${toolChoice}' is not part of provided 'tools' names or \n                one of [${configToolChoice.choices.join(\", \")}]`),\n            });\n          }\n        } else {\n          // toolChoice is in model schema choices\n          if (toolChoice === \"any\") {\n            toolConfig = {\n              function_calling_config: {\n                mode: \"ANY\",\n                allowed_function_names: tools.map((tool) => tool.definition.schema.name),\n              },\n            };\n          } else {\n            toolConfig = {\n              function_calling_config: {\n                mode: toolChoice.toUpperCase() as \"ANY\" | \"AUTO\" | \"NONE\", // Google uses uppercase for toolChoice\n              },\n            };\n          }\n        }\n      }\n    }\n\n    if (\"response_format\" in transformedConfig && transformedConfig.response_format !== undefined) {\n      const responseFormat = transformedConfig.response_format as string;\n      if (responseFormat === \"json_schema\") {\n        const responseSchemaConfig = transformedConfig.response_schema as ResponseSchemaType;\n        if (!(\"response_schema\" in transformedConfig) || !transformedConfig.response_schema || !responseSchemaConfig?.schema) {\n          throw new InvalidConfigError({\n            info: `Invalid config for model : '${this.modelName}'`,\n            cause: new Error(\"'responseSchema' is required in config when 'responseFormat' is 'json_schema'\"),\n          });\n        } else {\n          // Keep response-schema normalization aligned with tool schema handling for Google.\n          transformedConfig.responseSchema = this.stripAdditionalProperties(responseSchemaConfig.schema);\n          transformedConfig.responseMimeType = \"application/json\";\n          delete transformedConfig.response_format;\n          delete transformedConfig.response_schema;\n        }\n      } else if (responseFormat === \"json_object\") {\n        transformedConfig.responseSchema = {\n          type: \"object\",\n        };\n        delete transformedConfig.response_format;\n      } else if (responseFormat === \"text\") {\n        delete transformedConfig.response_format;\n      }\n    }\n\n    // Gemini rejects requests that combine the built-in google_search tool with\n    // user-provided function_declarations unless this opt-in flag is set on\n    // tool_config. Without it the API returns a 400 with:\n    // \"Please enable tool_config.include_server_side_tool_invocations to use\n    // Built-in tools with Function calling.\"\n    if (config?.googleSearchTool && tools && tools.length > 0) {\n      toolConfig = { ...(toolConfig ?? {}), include_server_side_tool_invocations: true };\n    }\n\n    return {\n      generation_config: transformedConfig,\n      ...(toolConfig ? { tool_config: toolConfig } : {}),\n      ...(safetySettings ? { safety_settings: safetySettings } : {}),\n    };\n  }\n\n  transformMessages(messages: MessageType[]): ParamsType {\n    if (!messages || (messages && messages.length === 0)) {\n      return { messages: [] };\n    }\n    const stripBase64Prefix = (data: string): string => {\n      const prefixMatch = data.match(/^data:(image\\/[a-zA-Z]+|application\\/pdf);base64,/);\n      if (prefixMatch) {\n        return data.substring(prefixMatch[0].length);\n      }\n      return data;\n    };\n    const parsedMessages = messages.map((message) => {\n      const parsedMessage = Message().safeParse(message);\n      if (!parsedMessage.success) {\n        throw new InvalidMessagesError({ info: \"Invalid messages\", cause: parsedMessage.error });\n      }\n      return parsedMessage.data;\n    });\n\n    parsedMessages.forEach((message) => {\n      message.content.forEach((content) => {\n        if (!this.modelSchema.modalities.includes(content.modality)) {\n          throw new InvalidMessagesError({\n            info: `Invalid message content for model : '${this.modelName}'`,\n            cause: new Error(`model : '${this.modelName}' does not support modality : '${content.modality}', \n              available modalities : [${this.modelSchema.modalities.join(\", \")}]`),\n          });\n        }\n      });\n    });\n\n    parsedMessages.forEach((message) => {\n      if (!Object.keys(this.modelSchema.roles).includes(message.role)) {\n        throw new InvalidMessagesError({\n          info: `Invalid message content for model : '${this.modelName}'`,\n          cause: new Error(`model : '${this.modelName}' does not support role : '${message.role}', \n            available roles : [${Object.keys(this.modelSchema.roles).join(\", \")}]`),\n        });\n      }\n    });\n\n    // Filter out error, search-result modalities from all messages (these are output-only modalities)\n    parsedMessages.forEach((message) => {\n      message.content = message.content.filter((content) => content.modality !== \"error\" && content.modality !== \"search-result\");\n    });\n\n    const normalizedMessages: MessageType[] = [];\n    for (const message of parsedMessages) {\n      const lastMessage = normalizedMessages[normalizedMessages.length - 1];\n\n      // Gemini expects parallel tool responses from one turn to be grouped\n      // into a single function message with multiple function_response parts.\n      if (message.role === ToolRoleLiteral && lastMessage?.role === ToolRoleLiteral) {\n        normalizedMessages[normalizedMessages.length - 1] = {\n          ...lastMessage,\n          content: [...lastMessage.content, ...message.content],\n        };\n        continue;\n      }\n\n      normalizedMessages.push(message);\n    }\n\n    const systemInstruction: GoogleChatSystemInstructionType = { parts: [] };\n    const nonSystemMessages: GoogleChatContentType[] = [];\n\n    normalizedMessages.forEach((message) => {\n      switch (message.role) {\n        case SystemRoleLiteral:\n          {\n            message.content.forEach((content) => {\n              if (content.modality === TextModalityLiteral) {\n                systemInstruction.parts.push({ text: content.value });\n              } else {\n                throw new InvalidMessagesError({\n                  info: `Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,\n                  cause: new Error(`role : '${message.role}' cannot have content with modality : '${content.modality}'`),\n                });\n              }\n            });\n          }\n          break;\n\n        case AssistantRoleLiteral:\n          {\n            const assistantContent: GoogleChatContentType[\"parts\"] = [];\n            message.content.forEach((content) => {\n              if (content.modality === TextModalityLiteral) {\n                assistantContent.push({ text: content.value });\n              } else if (content.modality === ToolCallModalityLiteral) {\n                // Include thought_signature if present (for thinking models)\n                assistantContent.push({\n                  function_call: {\n                    name: content.name,\n                    args: JSON.parse(content.arguments),\n                  },\n                  ...(content.thoughtSignature ? { thought_signature: content.thoughtSignature } : {}),\n                });\n              } else if (content.modality === ReasoningModalityLiteral) {\n                // Only send thinking content back, skip redacted reasoning\n                if (content.value.type === \"thinking\" && content.value.thinking) {\n                  assistantContent.push({\n                    text: content.value.thinking,\n                    thought: true as const,\n                    thought_signature: content.value.signature,\n                  });\n                }\n              } else {\n                throw new InvalidMessagesError({\n                  info: `Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,\n                  cause: new Error(`role : '${message.role}' cannot have content with modality : '${content.modality}'`),\n                });\n              }\n            });\n            nonSystemMessages.push({\n              role: this.modelSchema.roles[message.role] as GoogleChatContentType[\"role\"],\n              parts: assistantContent,\n            });\n          }\n          break;\n\n        case UserRoleLiteral:\n          {\n            const userContent: GoogleChatContentType[\"parts\"] = [];\n            message.content.forEach((content) => {\n              if (content.modality === TextModalityLiteral) {\n                userContent.push({ text: content.value });\n              } else if (content.modality === ImageModalityLiteral) {\n                if (content.value.type === \"base64\") {\n                  let base64Data = content.value.base64;\n                  // Check and strip the data URL prefix if it exists.\n                  base64Data = stripBase64Prefix(base64Data);\n                  userContent.push({\n                    inline_data: {\n                      mime_type: `image/${content.value.mediaType}`,\n                      data: base64Data,\n                    },\n                  });\n                } else if (content.value.type === \"url\") {\n                  throw new InvalidMessagesError({\n                    info: `Invalid message 'modality' for model : ${this.modelName}`,\n                    cause: new Error(`model: '${this.modelName}' does not support image content type: '${content.value.type}'`),\n                  });\n                }\n              } else if (content.modality === PdfModalityLiteral) {\n                if (content.value.type === \"base64\") {\n                  let base64Data = content.value.base64;\n                  // Check and strip the data URL prefix if it exists.\n                  base64Data = stripBase64Prefix(base64Data);\n                  userContent.push({\n                    inline_data: {\n                      mime_type: \"application/pdf\",\n                      data: base64Data,\n                    },\n                  });\n                } else if (content.value.type === \"url\") {\n                  userContent.push({\n                    file_data: {\n                      mime_type: \"application/pdf\",\n                      file_uri: content.value.url,\n                    },\n                  });\n                }\n              } else {\n                throw new InvalidMessagesError({\n                  info: `Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,\n                  cause: new Error(`role : '${message.role}' cannot have content with modality : '${content.modality}'`),\n                });\n              }\n            });\n            nonSystemMessages.push({\n              role: this.modelSchema.roles[message.role] as GoogleChatContentType[\"role\"],\n              parts: userContent,\n            });\n          }\n          break;\n\n        case ToolRoleLiteral:\n          {\n            const toolResponseContent: GoogleChatContentPartFunctionResponseType[] = [];\n            message.content.forEach((content) => {\n              if (content.modality === ToolResponseModalityLiteral) {\n                toolResponseContent.push({\n                  function_response: {\n                    name: content.name,\n                    response: JSON.parse(content.data),\n                  },\n                });\n              } else {\n                throw new InvalidMessagesError({\n                  info: `Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,\n                  cause: new Error(`role : '${message.role}' cannot have content with modality : '${content.modality}'`),\n                });\n              }\n            });\n            nonSystemMessages.push({\n              role: this.modelSchema.roles[message.role] as GoogleChatContentType[\"role\"],\n              parts: toolResponseContent,\n            });\n          }\n          break;\n\n        default: {\n          throw new InvalidMessagesError({\n            info: `Invalid message 'role' for model : ${this.modelName}`,\n            cause: new Error(`role : '${message.role}' is not supported, \n              available roles : [${Object.keys(this.modelSchema.roles).join(\", \")}]`),\n          });\n        }\n      }\n    });\n\n    if (nonSystemMessages[0].role !== this.modelSchema.roles[UserRoleLiteral]) {\n      throw new InvalidMessagesError({\n        info: `Invalid message 'role' for model : ${this.modelName}`,\n        cause: new Error(`model : '${this.modelName}' requires first message to be from user`),\n      });\n    }\n\n    const getNextExpectedRoles = (role: string): string[] => {\n      if (role === this.modelSchema.roles[UserRoleLiteral] || role === this.modelSchema.roles[ToolRoleLiteral]) {\n        return [this.modelSchema.roles[AssistantRoleLiteral] as string];\n      }\n      return [this.modelSchema.roles[UserRoleLiteral] as string, this.modelSchema.roles[ToolRoleLiteral] as string];\n    };\n\n    for (let i = 1; i < nonSystemMessages.length; i++) {\n      if (!getNextExpectedRoles(nonSystemMessages[i - 1].role).includes(nonSystemMessages[i].role)) {\n        throw new InvalidMessagesError({\n          info: `Invalid message format for model : ${this.modelName}`,\n          cause: new Error(\n            `model : '${this.modelName}' cannot have message with role : '${nonSystemMessages[i].role}' after message with role : '${nonSystemMessages[i - 1].role}'`\n          ),\n        });\n      }\n    }\n\n    if (\n      nonSystemMessages[nonSystemMessages.length - 1].role !== this.modelSchema.roles[UserRoleLiteral] &&\n      nonSystemMessages[nonSystemMessages.length - 1].role !== this.modelSchema.roles[ToolRoleLiteral]\n    ) {\n      throw new InvalidMessagesError({\n        info: `Invalid message format for model : ${this.modelName}`,\n        cause: new Error(`model : '${this.modelName}' requires last message to be from user`),\n      });\n    }\n\n    return {\n      contents: nonSystemMessages,\n      ...(systemInstruction.parts.length > 0 ? { system_instruction: systemInstruction } : {}),\n    };\n  }\n\n  /**\n   * Recursively removes 'additionalProperties' from a JSON schema object.\n   * Google's Gemini API does not support this field in function parameters.\n   */\n  private stripAdditionalProperties(obj: unknown): unknown {\n    if (obj === null || typeof obj !== \"object\") {\n      return obj;\n    }\n\n    if (Array.isArray(obj)) {\n      return obj.map((item) => this.stripAdditionalProperties(item));\n    }\n\n    const result: Record<string, unknown> = {};\n    for (const [key, value] of Object.entries(obj as Record<string, unknown>)) {\n      if (key === \"additionalProperties\") {\n        // Skip this field - Google doesn't support it\n        continue;\n      }\n      result[key] = this.stripAdditionalProperties(value);\n    }\n    return result;\n  }\n\n  transformTools(tools: ToolType[], config?: ConfigType): ParamsType {\n    if (!this.modelSchema.modalities.includes(ToolCallModalityLiteral)) {\n      throw new InvalidToolsError({\n        info: `Invalid tool 'modality' for model : ${this.modelName}`,\n        cause: new Error(`model : '${this.modelName}' does not support tool modality : '${ToolCallModalityLiteral}'`),\n      });\n    }\n\n    if ((!tools || tools.length === 0) && !config?.googleSearchTool) {\n      return { tools: [] as ToolType[] };\n    }\n\n    const parsedTools = (tools ?? []).map((tool) => {\n      const parsedTool = Tool().safeParse(tool);\n      if (!parsedTool.success) {\n        throw new InvalidToolsError({ info: \"Invalid tools\", cause: parsedTool.error });\n      }\n      return parsedTool.data;\n    });\n\n    const transformedTools = parsedTools.map((tool) => ({\n      name: tool.definition.schema.name,\n      description: tool.definition.schema.description,\n      // Strip additionalProperties as Google's API doesn't support this field\n      parameters: this.stripAdditionalProperties(tool.definition.schema.parameters),\n    }));\n\n    return {\n      tools: [\n        {\n          ...(transformedTools.length > 0 ? { function_declarations: transformedTools } : {}),\n          ...(config?.googleSearchTool ? { google_search: {} } : {}),\n        },\n      ],\n    };\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType> {\n    return new Promise((resolve) => {\n      resolve(this.completeChatUrl);\n    });\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType> {\n    return new Promise((resolve) => {\n      resolve(this.getDefaultHeaders());\n    });\n  }\n\n  async getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType> {\n    const transformedConfig = this.transformConfig(config, messages, tools);\n\n    // Process PDF content through Google Files API before transforming messages\n    const processedMessages = await this.transformPdfMessages(messages);\n    const transformedMessages = this.transformMessages(processedMessages);\n\n    if (transformedMessages.messages && (transformedMessages.messages as MessageType[]).length === 0) {\n      throw new InvalidMessagesError({\n        info: \"Messages are required\",\n        cause: new Error(\"Messages are required\"),\n      });\n    }\n\n    const transformedTools = this.transformTools(tools || [], config);\n\n    return {\n      ...this.getDefaultParams(),\n      ...transformedConfig,\n      ...transformedMessages,\n      ...transformedTools,\n    };\n  }\n\n  transformCompleteChatResponse(response: any): ChatResponseType {\n    const safe = GoogleCompleteChatResponse.safeParse(response);\n    if (safe.success) {\n      if (safe.data.candidates.length === 0) {\n        throw new ModelResponseError({\n          info: \"Invalid response from model\",\n          cause: new Error(`No choices in response : ${JSON.stringify(safe.data)}`),\n        });\n      }\n\n      const completeChatResponse: ChatResponseType = {\n        messages: [],\n        usage: undefined,\n        logProbs: undefined,\n      };\n\n      const parsedResponse: GoogleCompleteChatResponseType = safe.data;\n\n      if (parsedResponse.usageMetadata) {\n        completeChatResponse.usage = {\n          promptTokens: parsedResponse.usageMetadata.promptTokenCount,\n          totalTokens: parsedResponse.usageMetadata.totalTokenCount,\n          completionTokens: parsedResponse.usageMetadata.candidatesTokenCount || 0,\n        };\n      }\n\n      const candidate = parsedResponse.candidates[0]; // default to first candidate, top choice\n\n      if (candidate.content) {\n        const content = candidate.content.parts.flatMap((contentItem, index): ContentType[] => {\n          if (\"text\" in contentItem && contentItem.text !== undefined) {\n            // Check if this is a thinking/reasoning part\n            if (contentItem.thought === true) {\n              return [createReasoningContent(contentItem.text, \"\")];\n            }\n            return [createTextContent(contentItem.text)];\n          } else if (\"functionCall\" in contentItem && contentItem.functionCall !== undefined) {\n            return [\n              createToolCallContent(\n                index,\n                `${contentItem.functionCall.name}_${index}`,\n                contentItem.functionCall.name,\n                JSON.stringify(contentItem.functionCall.args),\n                undefined, // serverName\n                contentItem.thoughtSignature // thoughtSignature for thinking models\n              ),\n            ];\n          }\n          // Skip server-side built-in tool invocations (toolCall / toolResponse).\n          // These are emitted when tool_config.include_server_side_tool_invocations\n          // is enabled and are internal to Google's tool processing; surfaced\n          // search grounding data comes through candidate.groundingMetadata.\n          return [];\n        });\n\n        completeChatResponse.messages.push({\n          role: AssistantRoleLiteral,\n          content: content,\n        });\n      }\n\n      if (candidate.groundingMetadata) {\n        if (completeChatResponse.messages.length === 0) {\n          completeChatResponse.messages.push({\n            role: AssistantRoleLiteral,\n            content: [\n              createSearchResultContent(\n                \"google\",\n                candidate.groundingMetadata.webSearchQueries?.[0] || \"\",\n                candidate.groundingMetadata.groundingChunks?.map((chunk) => ({\n                  source: chunk.web ? \"web\" : \"\",\n                  url: chunk.web?.uri || \"\",\n                  title: chunk.web?.title || \"\",\n                })) || [],\n                candidate.groundingMetadata.groundingSupports?.map((support) => ({\n                  text: support.segment?.text || \"\",\n                  responseIndices: support.groundingChunkIndices || [],\n                  startIndex: support.segment?.startIndex ?? undefined,\n                  endIndex: support.segment?.endIndex ?? undefined,\n                  confidenceScores: support.confidenceScores || undefined,\n                })) || []\n              ),\n            ],\n          });\n        } else {\n          completeChatResponse.messages[0].content.push(\n            createSearchResultContent(\n              \"google\",\n              candidate.groundingMetadata.webSearchQueries?.[0] || \"\",\n              candidate.groundingMetadata.groundingChunks?.map((chunk) => ({\n                source: chunk.web ? \"web\" : \"\",\n                url: chunk.web?.uri || \"\",\n                title: chunk.web?.title || \"\",\n              })) || [],\n              candidate.groundingMetadata.groundingSupports?.map((support) => ({\n                text: support.segment?.text || \"\",\n                responseIndices: support.groundingChunkIndices || [],\n                startIndex: support.segment?.startIndex ?? undefined,\n                endIndex: support.segment?.endIndex ?? undefined,\n                confidenceScores: support.confidenceScores || undefined,\n              })) || []\n            )\n          );\n        }\n      }\n\n      const safetyRatings = candidate.safetyRatings;\n      if (safetyRatings && safetyRatings.length > 0) {\n        safetyRatings.forEach((rating) => {\n          if (rating.blocked) {\n            if (completeChatResponse.messages.length === 0) {\n              completeChatResponse.messages.push({\n                role: AssistantRoleLiteral,\n                content: [\n                  createSafetyErrorContent(\n                    rating.category,\n                    rating.probability,\n                    rating.blocked,\n                    `Blocked content for category: ${rating.category} with probability: ${rating.probability}`\n                  ),\n                ],\n              });\n            } else {\n              completeChatResponse.messages[0].content.push(\n                createSafetyErrorContent(\n                  rating.category,\n                  rating.probability,\n                  rating.blocked,\n                  `Blocked content for category: ${rating.category} with probability: ${rating.probability}`\n                )\n              );\n            }\n          }\n        });\n      }\n\n      if (completeChatResponse.messages.length > 0) {\n        return completeChatResponse;\n      } else if (completeChatResponse.messages.length === 0 && candidate.finishReason === \"SAFETY\") {\n        throw new ModelResponseError({\n          info: \"Blocked content, model response finished with safety reason\",\n          cause: new Error(\"Blocked content, model response finished with safety reason\"),\n        });\n      }\n    }\n\n    throw new ModelResponseError({ info: \"Invalid response from model\", cause: safe.error });\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType> {\n    return new Promise((resolve) => {\n      resolve(this.streamChatUrl);\n    });\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType> {\n    return new Promise((resolve) => {\n      resolve(this.getDefaultHeaders());\n    });\n  }\n\n  async getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType> {\n    const transformedConfig = this.transformConfig(config, messages, tools);\n\n    // Process PDF content through Google Files API before transforming messages\n    const processedMessages = await this.transformPdfMessages(messages);\n    const transformedMessages = this.transformMessages(processedMessages);\n\n    if (transformedMessages.messages && (transformedMessages.messages as MessageType[]).length === 0) {\n      throw new InvalidMessagesError({\n        info: \"Messages are required\",\n        cause: new Error(\"Messages are required\"),\n      });\n    }\n\n    const transformedTools = this.transformTools(tools || [], config);\n\n    return {\n      ...this.getDefaultParams(),\n      ...transformedConfig,\n      ...transformedMessages,\n      ...transformedTools,\n    };\n  }\n\n  async *transformStreamChatResponseChunk(\n    chunk: string,\n    buffer: string\n  ): AsyncGenerator<{ partialResponse: PartialChatResponseType; buffer: string }> {\n    // merge last buffer message and split into lines\n    const lines = (buffer + chunk).split(\",\\r\").filter((line) => line.trim() !== \"\");\n    for (const line of lines) {\n      let completeLine = line;\n      // remove all '\\n' from string JSON\n      completeLine = completeLine.replace(/\\n/g, \"\");\n      if (completeLine.startsWith(\"[\") || completeLine.startsWith(\",{\")) {\n        // start of stream, remove '['\n        completeLine = completeLine.slice(1);\n      } else if (completeLine.endsWith(\"]\")) {\n        if (completeLine === \"]\") {\n          // strict end of stream\n          return;\n        } else {\n          // remaining message and then end of stream, remove ']'\n          completeLine = completeLine.slice(0, -1);\n        }\n      }\n\n      let structuredLine: any;\n      try {\n        structuredLine = JSON.parse(completeLine);\n      } catch (error) {\n        // malformed JSON error, must be the end of loop\n        if (error instanceof SyntaxError) {\n          buffer = completeLine;\n          continue;\n        } else {\n          // non JSON parse error, re-raise\n          throw error;\n        }\n      }\n\n      // reset buffer\n      buffer = \"\";\n      const safe = GoogleStreamChatResponse.safeParse(structuredLine);\n      if (safe.success) {\n        const partialResponse: PartialChatResponseType = { partialMessages: [] };\n        const parsedResponse: GoogleStreamChatResponseType = safe.data;\n        if (parsedResponse.candidates.length > 0) {\n          const message = parsedResponse.candidates[0].content;\n          if (message && \"parts\" in message && message.parts.length > 0) {\n            message.parts.forEach((messagePart, index) => {\n              if (\"text\" in messagePart && messagePart.text !== undefined) {\n                // Check if this is a thinking/reasoning part\n                if (messagePart.thought === true) {\n                  partialResponse.partialMessages.push(createPartialReasoningMessage(AssistantRoleLiteral, messagePart.text, \"\"));\n                } else {\n                  partialResponse.partialMessages.push(createPartialTextMessage(AssistantRoleLiteral, messagePart.text));\n                }\n              }\n\n              if (\"functionCall\" in messagePart && messagePart.functionCall !== undefined) {\n                const toolCall = messagePart.functionCall;\n                partialResponse.partialMessages.push(\n                  createPartialToolCallMessage(\n                    AssistantRoleLiteral,\n                    index,\n                    `${toolCall.name}_${index}`,\n                    toolCall.name,\n                    JSON.stringify(toolCall.args),\n                    undefined, // serverName\n                    messagePart.thoughtSignature // thoughtSignature for thinking models\n                  )\n                );\n              }\n            });\n          }\n        }\n\n        if (parsedResponse.usageMetadata) {\n          partialResponse.usage = {\n            promptTokens: parsedResponse.usageMetadata.promptTokenCount,\n            completionTokens: parsedResponse.usageMetadata.candidatesTokenCount,\n            totalTokens: parsedResponse.usageMetadata.totalTokenCount,\n          };\n        }\n\n        if (parsedResponse.candidates.length > 0) {\n          const candidate = parsedResponse.candidates[0];\n          if (candidate.groundingMetadata) {\n            partialResponse.partialMessages.push(\n              createPartialSearchResultMessage(\n                AssistantRoleLiteral,\n                \"google\",\n                candidate.groundingMetadata.webSearchQueries?.[0] || \"\",\n                candidate.groundingMetadata.groundingChunks?.map((chunk) => ({\n                  source: chunk.web ? \"web\" : \"\",\n                  url: chunk.web?.uri || \"\",\n                  title: chunk.web?.title || \"\",\n                })) || [],\n                candidate.groundingMetadata.groundingSupports?.map((support) => ({\n                  text: support.segment?.text || \"\",\n                  responseIndices: support.groundingChunkIndices || [],\n                  startIndex: support.segment?.startIndex ?? undefined,\n                  endIndex: support.segment?.endIndex ?? undefined,\n                  confidenceScores: support.confidenceScores || undefined,\n                })) || []\n              )\n            );\n          }\n\n          const safetyRatings = candidate.safetyRatings;\n          if (safetyRatings && safetyRatings.length > 0) {\n            safetyRatings.forEach((rating) => {\n              if (rating.blocked) {\n                partialResponse.partialMessages.push(\n                  createPartialSafetyErrorMessage(\n                    AssistantRoleLiteral,\n                    rating.category,\n                    rating.probability,\n                    rating.blocked,\n                    `Blocked content for category: ${rating.category} with probability: ${rating.probability}`\n                  )\n                );\n              }\n            });\n          }\n        }\n\n        yield { partialResponse: partialResponse, buffer: buffer };\n      } else {\n        throw new ModelResponseError({ info: \"Invalid response from model\", cause: safe.error });\n      }\n    }\n\n    yield { partialResponse: { partialMessages: [] }, buffer: buffer };\n  }\n  async *transformProxyStreamChatResponseChunk(\n    chunk: string,\n    buffer: string,\n    data?: any,\n    headers?: Record<string, string>,\n    query?: Record<string, string>\n  ): AsyncGenerator<{ partialResponse: PartialChatResponseType; buffer: string }> {\n    // If query has alt not equal to 'sse', delegate to streamTransform logic\n    if (query?.alt !== \"sse\") {\n      yield* this.transformStreamChatResponseChunk(chunk, buffer);\n      return;\n    }\n\n    // --- proxyStreamTransform logic starts here ---\n    const newData = buffer + chunk;\n    const lines: string[] = [];\n    let newBuffer = \"\";\n\n    // Split newData into complete lines and new buffer\n    let currentIndex = 0;\n    while (currentIndex < newData.length) {\n      const newlineIndex = newData.indexOf(\"\\n\", currentIndex);\n      if (newlineIndex === -1) {\n        newBuffer = newData.substring(currentIndex);\n        break;\n      } else {\n        const line = newData.substring(currentIndex, newlineIndex).trim();\n        if (line) {\n          lines.push(line);\n        }\n        currentIndex = newlineIndex + 1;\n      }\n    }\n\n    // Process each complete line\n    for (const line of lines) {\n      if (line === \"data: [DONE]\") {\n        return; // End of stream\n      }\n\n      if (line.startsWith(\"data: \")) {\n        const jsonStr = line.substring(\"data: \".length);\n        try {\n          const structuredLine = JSON.parse(jsonStr);\n          const safe = GoogleStreamChatResponse.safeParse(structuredLine);\n          if (safe.success) {\n            const partialResponse: PartialChatResponseType = { partialMessages: [] };\n            const parsedResponse: GoogleStreamChatResponseType = safe.data;\n            if (parsedResponse.candidates.length > 0) {\n              const message = parsedResponse.candidates[0].content;\n              if (message && \"parts\" in message && message.parts.length > 0) {\n                message.parts.forEach((messagePart, index) => {\n                  if (\"text\" in messagePart && messagePart.text !== undefined) {\n                    // Check if this is a thinking/reasoning part\n                    if (messagePart.thought === true) {\n                      partialResponse.partialMessages.push(createPartialReasoningMessage(AssistantRoleLiteral, messagePart.text, \"\"));\n                    } else {\n                      partialResponse.partialMessages.push(createPartialTextMessage(AssistantRoleLiteral, messagePart.text));\n                    }\n                  }\n\n                  if (\"functionCall\" in messagePart && messagePart.functionCall !== undefined) {\n                    const toolCall = messagePart.functionCall;\n                    partialResponse.partialMessages.push(\n                      createPartialToolCallMessage(\n                        AssistantRoleLiteral,\n                        index,\n                        `${toolCall.name}_${index}`,\n                        toolCall.name,\n                        JSON.stringify(toolCall.args),\n                        undefined, // serverName\n                        messagePart.thoughtSignature // thoughtSignature for thinking models\n                      )\n                    );\n                  }\n                });\n              }\n            }\n\n            if (\n              parsedResponse.usageMetadata &&\n              parsedResponse.usageMetadata.totalTokenCount &&\n              parsedResponse.usageMetadata.promptTokenCount &&\n              parsedResponse.usageMetadata.candidatesTokenCount\n            ) {\n              partialResponse.usage = {\n                promptTokens: parsedResponse.usageMetadata.promptTokenCount,\n                completionTokens: parsedResponse.usageMetadata.candidatesTokenCount,\n                totalTokens: parsedResponse.usageMetadata.totalTokenCount,\n              };\n            }\n\n            if (parsedResponse.candidates.length > 0) {\n              const candidate = parsedResponse.candidates[0];\n              if (candidate.groundingMetadata) {\n                partialResponse.partialMessages.push(\n                  createPartialSearchResultMessage(\n                    AssistantRoleLiteral,\n                    \"google\",\n                    candidate.groundingMetadata.webSearchQueries?.[0] || \"\",\n                    candidate.groundingMetadata.groundingChunks?.map((chunk) => ({\n                      source: chunk.web ? \"web\" : \"\",\n                      url: chunk.web?.uri || \"\",\n                      title: chunk.web?.title || \"\",\n                    })) || [],\n                    candidate.groundingMetadata.groundingSupports?.map((support) => ({\n                      text: support.segment?.text || \"\",\n                      responseIndices: support.groundingChunkIndices || [],\n                      startIndex: support.segment?.startIndex ?? undefined,\n                      endIndex: support.segment?.endIndex ?? undefined,\n                      confidenceScores: support.confidenceScores || undefined,\n                    })) || []\n                  )\n                );\n              }\n\n              const safetyRatings = candidate.safetyRatings;\n              if (safetyRatings && safetyRatings.length > 0) {\n                safetyRatings.forEach((rating) => {\n                  if (rating.blocked) {\n                    partialResponse.partialMessages.push(\n                      createPartialSafetyErrorMessage(\n                        AssistantRoleLiteral,\n                        rating.category,\n                        rating.probability,\n                        rating.blocked,\n                        `Blocked content for category: ${rating.category} with probability: ${rating.probability}`\n                      )\n                    );\n                  }\n                });\n              }\n            }\n\n            yield { partialResponse: partialResponse, buffer: buffer };\n          } else {\n            throw new ModelResponseError({ info: \"Invalid response from model\", cause: safe.error });\n          }\n        } catch (error) {\n          throw new ModelResponseError({\n            info: `Malformed JSON received in stream: ${jsonStr}`,\n            cause: error,\n          });\n        }\n      }\n    }\n\n    // Yield the updated buffer after processing all lines\n    yield { partialResponse: { partialMessages: [] }, buffer: newBuffer };\n  }\n\n  async getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType> {\n    return new Promise((resolve) => {\n      resolve(this.completeChatUrl);\n    });\n  }\n\n  async getProxyStreamChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType> {\n    return new Promise((resolve) => {\n      if (!query || Object.keys(query).length === 0) {\n        resolve(this.streamChatUrl);\n        return;\n      }\n\n      const url = new URL(this.streamChatUrl);\n      Object.entries(query).forEach(([key, value]) => {\n        if (value != null) {\n          url.searchParams.set(key, value);\n        }\n      });\n\n      resolve(url.toString() as UrlType);\n    });\n  }\n  async getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType> {\n    if (!headers) {\n      return {};\n    }\n    const sanitizedHeaders: Record<string, string> = { ...headers };\n\n    delete sanitizedHeaders.host;\n    delete sanitizedHeaders[\"content-length\"];\n    return sanitizedHeaders;\n  }\n  async getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType> {\n    // Directly delegate to getProxyCompleteChatHeaders for now\n    return await this.getProxyCompleteChatHeaders(data, headers, query);\n  }\n  getModelPricing(): ChatModelPriceType {\n    // Check if the modelName exists in pricingData before accessing it\n    if (!(this.modelName in pricingData)) {\n      throw new ModelResponseError({\n        info: `Invalid model pricing for model : '${this.modelName}'`,\n        cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n      });\n    }\n\n    const entry = pricingData[this.modelName as keyof typeof pricingData];\n    return entry as ChatModelPriceType;\n  }\n}\n\nexport { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5Flash001Literal = \"gemini-1.5-flash-001\";\nconst Gemini1_5Flash001Description =\n  \"Google's fastest, most cost-efficient multimodal model with great performance for high-frequency tasks. \\\n  Optimized for fast and versatile performance across a diverse variety of tasks\";\n\nconst Gemini1_5Flash001Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5Flash001Literal,\n  description: Gemini1_5Flash001Description,\n  maxInputTokens: 1000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5Flash001Literal],\n});\n\nconst Gemini1_5Flash001Options = BaseChatModelOptions;\ntype Gemini1_5Flash001OptionsType = z.infer<typeof Gemini1_5Flash001Options>;\n\nclass Gemini1_5Flash001 extends BaseChatModel {\n  constructor(options: Gemini1_5Flash001OptionsType) {\n    super(Gemini1_5Flash001Schema, options);\n  }\n}\n\nexport {\n  Gemini1_5Flash001,\n  Gemini1_5Flash001Literal,\n  Gemini1_5Flash001Options,\n  Gemini1_5Flash001Schema,\n  type Gemini1_5Flash001OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5Flash002Literal = \"gemini-1.5-flash-002\";\nconst Gemini1_5Flash002Description =\n  \"Google's fastest, most cost-efficient multimodal model with great performance for high-frequency tasks. \\\n  Optimized for fast and versatile performance across a diverse variety of tasks\";\n\nconst Gemini1_5Flash002Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5Flash002Literal,\n  description: Gemini1_5Flash002Description,\n  maxInputTokens: 1000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5Flash002Literal],\n});\n\nconst Gemini1_5Flash002Options = BaseChatModelOptions;\ntype Gemini1_5Flash002OptionsType = z.infer<typeof Gemini1_5Flash002Options>;\n\nclass Gemini1_5Flash002 extends BaseChatModel {\n  constructor(options: Gemini1_5Flash002OptionsType) {\n    super(Gemini1_5Flash002Schema, options);\n  }\n}\n\nexport {\n  Gemini1_5Flash002,\n  Gemini1_5Flash002Literal,\n  Gemini1_5Flash002Options,\n  Gemini1_5Flash002Schema,\n  type Gemini1_5Flash002OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5FlashLatestLiteral = \"gemini-1.5-flash-latest\";\nconst Gemini1_5FlashLatestDescription =\n  \"Google's latest multimodal model with great performance for high-frequency tasks. \\\n  Optimized for fast and versatile performance across a diverse variety of tasks\";\n\nconst Gemini1_5FlashLatestSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5FlashLatestLiteral,\n  description: Gemini1_5FlashLatestDescription,\n  maxInputTokens: 1000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5FlashLatestLiteral],\n});\n\nconst Gemini1_5FlashLatestOptions = BaseChatModelOptions;\ntype Gemini1_5FlashLatestOptionsType = z.infer<typeof Gemini1_5FlashLatestOptions>;\n\nclass Gemini1_5FlashLatest extends BaseChatModel {\n  constructor(options: Gemini1_5FlashLatestOptionsType) {\n    super(Gemini1_5FlashLatestSchema, options);\n  }\n}\n\nexport {\n  Gemini1_5FlashLatest,\n  Gemini1_5FlashLatestLiteral,\n  Gemini1_5FlashLatestOptions,\n  Gemini1_5FlashLatestSchema,\n  type Gemini1_5FlashLatestOptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5FlashLiteral = \"gemini-1.5-flash\";\nconst Gemini1_5FlashDescription =\n  \"Google's fastest, most cost-efficient multimodal model with great performance for high-frequency tasks. \\\n  Optimized for fast and versatile performance across a diverse variety of tasks\";\n\nconst Gemini1_5FlashSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5FlashLiteral,\n  description: Gemini1_5FlashDescription,\n  maxInputTokens: 1000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5FlashLiteral],\n});\n\nconst Gemini1_5FlashOptions = BaseChatModelOptions;\ntype Gemini1_5FlashOptionsType = z.infer<typeof Gemini1_5FlashOptions>;\n\nclass Gemini1_5Flash extends BaseChatModel {\n  constructor(options: Gemini1_5FlashOptionsType) {\n    super(Gemini1_5FlashSchema, options);\n  }\n}\n\nexport { Gemini1_5Flash, Gemini1_5FlashLiteral, Gemini1_5FlashOptions, Gemini1_5FlashSchema, type Gemini1_5FlashOptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5Pro001Literal = \"gemini-1.5-pro-001\";\nconst Gemini1_5Pro001Description =\n  \"Google's best performing multimodal model with features for a wide variety of reasoning tasks. \\\n  Optimized for complex reasoning tasks requiring more intelligence\";\n\nconst Gemini1_5Pro001Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5Pro001Literal,\n  description: Gemini1_5Pro001Description,\n  maxInputTokens: 2000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5Pro001Literal],\n});\n\nconst Gemini1_5Pro001Options = BaseChatModelOptions;\ntype Gemini1_5Pro001OptionsType = z.infer<typeof Gemini1_5Pro001Options>;\n\nclass Gemini1_5Pro001 extends BaseChatModel {\n  constructor(options: Gemini1_5Pro001OptionsType) {\n    super(Gemini1_5Pro001Schema, options);\n  }\n}\n\nexport { Gemini1_5Pro001, Gemini1_5Pro001Literal, Gemini1_5Pro001Options, Gemini1_5Pro001Schema, type Gemini1_5Pro001OptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5Pro002Literal = \"gemini-1.5-pro-002\";\nconst Gemini1_5Pro002Description =\n  \"Google's best performing multimodal model with features for a wide variety of reasoning tasks. \\\n  Optimized for complex reasoning tasks requiring more intelligence\";\n\nconst Gemini1_5Pro002Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5Pro002Literal,\n  description: Gemini1_5Pro002Description,\n  maxInputTokens: 2000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5Pro002Literal],\n});\n\nconst Gemini1_5Pro002Options = BaseChatModelOptions;\ntype Gemini1_5Pro002OptionsType = z.infer<typeof Gemini1_5Pro002Options>;\n\nclass Gemini1_5Pro002 extends BaseChatModel {\n  constructor(options: Gemini1_5Pro002OptionsType) {\n    super(Gemini1_5Pro002Schema, options);\n  }\n}\n\nexport { Gemini1_5Pro002, Gemini1_5Pro002Literal, Gemini1_5Pro002Options, Gemini1_5Pro002Schema, type Gemini1_5Pro002OptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5ProLatestLiteral = \"gemini-1.5-pro-latest\";\nconst Gemini1_5ProLatestDescription =\n  \"Google's best performing multimodal model with features for a wide variety of reasoning tasks. \\\n  Optimized for complex reasoning tasks requiring more intelligence\";\n\nconst Gemini1_5ProLatestSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5ProLatestLiteral,\n  description: Gemini1_5ProLatestDescription,\n  maxInputTokens: 2000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5ProLatestLiteral],\n});\n\nconst Gemini1_5ProLatestOptions = BaseChatModelOptions;\ntype Gemini1_5ProLatestOptionsType = z.infer<typeof Gemini1_5ProLatestOptions>;\n\nclass Gemini1_5ProLatest extends BaseChatModel {\n  constructor(options: Gemini1_5ProLatestOptionsType) {\n    super(Gemini1_5ProLatestSchema, options);\n  }\n}\n\nexport {\n  Gemini1_5ProLatest,\n  Gemini1_5ProLatestLiteral,\n  Gemini1_5ProLatestOptions,\n  Gemini1_5ProLatestSchema,\n  type Gemini1_5ProLatestOptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini1_5ProLiteral = \"gemini-1.5-pro\";\nconst Gemini1_5ProDescription =\n  \"Google's best performing multimodal model with features for a wide variety of reasoning tasks. \\\n  Optimized for complex reasoning tasks requiring more intelligence\";\n\nconst Gemini1_5ProSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini1_5ProLiteral,\n  description: Gemini1_5ProDescription,\n  maxInputTokens: 2000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini1_5ProLiteral],\n});\n\nconst Gemini1_5ProOptions = BaseChatModelOptions;\ntype Gemini1_5ProOptionsType = z.infer<typeof Gemini1_5ProOptions>;\n\nclass Gemini1_5Pro extends BaseChatModel {\n  constructor(options: Gemini1_5ProOptionsType) {\n    super(Gemini1_5ProSchema, options);\n  }\n}\n\nexport { Gemini1_5Pro, Gemini1_5ProLiteral, Gemini1_5ProOptions, Gemini1_5ProSchema, type Gemini1_5ProOptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_0FlashExpLiteral = \"gemini-2.0-flash-exp\";\nconst Gemini2_0FlashExpDescription =\n  \"Google's experimental multimodal model with enhanced capabilities. \\\n  Designed for cutting-edge performance across complex and high-frequency tasks.\";\n\nconst Gemini2_0FlashExpSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_0FlashExpLiteral,\n  description: Gemini2_0FlashExpDescription,\n  maxInputTokens: 1000000,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini2_0FlashExpLiteral],\n});\n\nconst Gemini2_0FlashExpOptions = BaseChatModelOptions;\ntype Gemini2_0FlashExpOptionsType = z.infer<typeof Gemini2_0FlashExpOptions>;\n\nclass Gemini2_0FlashExp extends BaseChatModel {\n  constructor(options: Gemini2_0FlashExpOptionsType) {\n    super(Gemini2_0FlashExpSchema, options);\n  }\n}\n\nexport {\n  Gemini2_0FlashExp,\n  Gemini2_0FlashExpLiteral,\n  Gemini2_0FlashExpOptions,\n  Gemini2_0FlashExpSchema,\n  type Gemini2_0FlashExpOptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_0FlashLiteral = \"gemini-2.0-flash\";\nconst Gemini2_0FlashDescription =\n  \"Google's Gemini 2.0 Flash model optimized for low-latency, high-performance tasks. \\\n  Supports multimodal inputs including text, images, video, and audio with enhanced speed and efficiency.\";\n\nconst Gemini2_0FlashSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_0FlashLiteral,\n  description: Gemini2_0FlashDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini2_0FlashLiteral],\n});\n\nconst Gemini2_0FlashOptions = BaseChatModelOptions;\ntype Gemini2_0FlashOptionsType = z.infer<typeof Gemini2_0FlashOptions>;\n\nclass Gemini2_0Flash extends BaseChatModel {\n  constructor(options: Gemini2_0FlashOptionsType) {\n    super(Gemini2_0FlashSchema, options);\n  }\n}\n\nexport {\n    Gemini2_0Flash,\n    Gemini2_0FlashLiteral,\n    Gemini2_0FlashOptions,\n    Gemini2_0FlashSchema,\n    type Gemini2_0FlashOptionsType\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_0FlashLiteLiteral = \"gemini-2.0-flash-lite\";\nconst Gemini2_0FlashLiteDescription =\n  \"Google's lightweight Gemini 2.0 Flash Lite model for high-throughput, low-cost text generation and classification workloads.\";\n\nconst Gemini2_0FlashLiteSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_0FlashLiteLiteral,\n  description: Gemini2_0FlashLiteDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 8192,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 8192, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini2_0FlashLiteLiteral],\n});\n\nconst Gemini2_0FlashLiteOptions = BaseChatModelOptions;\ntype Gemini2_0FlashLiteOptionsType = z.infer<typeof Gemini2_0FlashLiteOptions>;\n\nclass Gemini2_0FlashLite extends BaseChatModel {\n  constructor(options: Gemini2_0FlashLiteOptionsType) {\n    super(Gemini2_0FlashLiteSchema, options);\n  }\n}\n\nexport {\n  Gemini2_0FlashLite,\n  Gemini2_0FlashLiteLiteral,\n  Gemini2_0FlashLiteOptions,\n  Gemini2_0FlashLiteSchema,\n  type Gemini2_0FlashLiteOptionsType,\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5FlashLiteLiteral = \"gemini-2.5-flash-lite\";\nconst Gemini2_5FlashLiteDescription =\n  \"Google's most cost-efficient and fastest model in the 2.5 series. \\\n  Optimized for high-volume, latency-sensitive tasks like translation and classification with enhanced reasoning capabilities.\";\n\nconst Gemini2_5FlashLiteSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5FlashLiteLiteral,\n  description: Gemini2_5FlashLiteDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 65536, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 65536, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini2_5FlashLiteLiteral],\n});\n\nconst Gemini2_5FlashLiteOptions = BaseChatModelOptions;\ntype Gemini2_5FlashLiteOptionsType = z.infer<typeof Gemini2_5FlashLiteOptions>;\n\nclass Gemini2_5FlashLite extends BaseChatModel {\n  constructor(options: Gemini2_5FlashLiteOptionsType) {\n    super(Gemini2_5FlashLiteSchema, options);\n  }\n}\n\nexport {\n    Gemini2_5FlashLite,\n    Gemini2_5FlashLiteLiteral,\n    Gemini2_5FlashLiteOptions,\n    Gemini2_5FlashLiteSchema,\n    type Gemini2_5FlashLiteOptionsType\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5FlashLitePreview092025Literal = \"gemini-2.5-flash-lite-preview-09-2025\";\nconst Gemini2_5FlashLitePreview092025Description =\n  \"Google's preview Flash Lite variant in the Gemini 2.5 family, optimized for low-latency, high-volume tasks.\";\n\nconst Gemini2_5FlashLitePreview092025Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5FlashLitePreview092025Literal,\n  description: Gemini2_5FlashLitePreview092025Description,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 65536, 4, 0.95).def,\n    schema: GoogleChatModelConfigs.responseSchema(2.0, 1.0, 65536, 4, 0.95).schema,\n  },\n  price: pricingData[Gemini2_5FlashLitePreview092025Literal],\n});\n\nconst Gemini2_5FlashLitePreview092025Options = BaseChatModelOptions;\ntype Gemini2_5FlashLitePreview092025OptionsType = z.infer<typeof Gemini2_5FlashLitePreview092025Options>;\n\nclass Gemini2_5FlashLitePreview092025 extends BaseChatModel {\n  constructor(options: Gemini2_5FlashLitePreview092025OptionsType) {\n    super(Gemini2_5FlashLitePreview092025Schema, options);\n  }\n}\n\nexport {\n  Gemini2_5FlashLitePreview092025,\n  Gemini2_5FlashLitePreview092025Literal,\n  Gemini2_5FlashLitePreview092025Options,\n  Gemini2_5FlashLitePreview092025Schema,\n  type Gemini2_5FlashLitePreview092025OptionsType,\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5FlashPreview0417Literal = \"gemini-2.5-flash-preview-04-17\";\nconst Gemini2_5FlashPreview0417Description =\n  \"Google's best model in Gemini 2.5 family in terms of price-performance, offering well-rounded capabilities.\";\n\nconst Gemini2_5FlashPreview0417Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5FlashPreview0417Literal,\n  description: Gemini2_5FlashPreview0417Description,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 24576).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 24576).schema,\n  },\n  price: pricingData[Gemini2_5FlashPreview0417Literal],\n});\n\nconst Gemini2_5FlashPreview0417Options = BaseChatModelOptions;\ntype Gemini2_5FlashPreview0417OptionsType = z.infer<typeof Gemini2_5FlashPreview0417Options>;\n\nclass Gemini2_5FlashPreview0417 extends BaseChatModel {\n  constructor(options: Gemini2_5FlashPreview0417OptionsType) {\n    super(Gemini2_5FlashPreview0417Schema, options);\n  }\n}\n\nexport {\n  Gemini2_5FlashPreview0417,\n  Gemini2_5FlashPreview0417Literal,\n  Gemini2_5FlashPreview0417Options,\n  Gemini2_5FlashPreview0417Schema,\n  type Gemini2_5FlashPreview0417OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5FlashLiteral = \"gemini-2.5-flash\";\nconst Gemini2_5FlashDescription =\n  \"Google's Gemini 2.5 Flash model for enhanced thinking, reasoning, multimodal understanding, and advanced coding.\";\n\nconst Gemini2_5FlashSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5FlashLiteral,\n  description: Gemini2_5FlashDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 24576).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 24576).schema,\n  },\n  price: pricingData[Gemini2_5FlashLiteral],\n});\n\nconst Gemini2_5FlashOptions = BaseChatModelOptions;\ntype Gemini2_5FlashOptionsType = z.infer<typeof Gemini2_5FlashOptions>;\n\nclass Gemini2_5Flash extends BaseChatModel {\n  constructor(options: Gemini2_5FlashOptionsType) {\n    super(Gemini2_5FlashSchema, options);\n  }\n}\n\nexport { Gemini2_5Flash, Gemini2_5FlashLiteral, Gemini2_5FlashOptions, Gemini2_5FlashSchema, type Gemini2_5FlashOptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5ProPreview0325Literal = \"gemini-2.5-pro-preview-03-25\";\nconst Gemini2_5ProPreview0325Description =\n  \"Google's preview model in Gemini 2.5 family for enhanced thinking, reasoning, multimodal understanding, and advanced coding.\";\n\nconst Gemini2_5ProPreview0325Schema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5ProPreview0325Literal,\n  description: Gemini2_5ProPreview0325Description,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini2_5ProPreview0325Literal],\n});\n\nconst Gemini2_5ProPreview0325Options = BaseChatModelOptions;\ntype Gemini2_5ProPreview0325OptionsType = z.infer<typeof Gemini2_5ProPreview0325Options>;\n\nclass Gemini2_5ProPreview0325 extends BaseChatModel {\n  constructor(options: Gemini2_5ProPreview0325OptionsType) {\n    super(Gemini2_5ProPreview0325Schema, options);\n  }\n}\n\nexport {\n  Gemini2_5ProPreview0325,\n  Gemini2_5ProPreview0325Literal,\n  Gemini2_5ProPreview0325Options,\n  Gemini2_5ProPreview0325Schema,\n  type Gemini2_5ProPreview0325OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\nconst Gemini2_5ProLiteral = \"gemini-2.5-pro\";\nconst Gemini2_5ProDescription =\n  \"Google's Gemini 2.5 Pro model for enhanced thinking, reasoning, multimodal understanding, and advanced coding.\";\n\nconst Gemini2_5ProSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini2_5ProLiteral,\n  description: Gemini2_5ProDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini2_5ProLiteral],\n});\n\nconst Gemini2_5ProOptions = BaseChatModelOptions;\ntype Gemini2_5ProOptionsType = z.infer<typeof Gemini2_5ProOptions>;\n\nclass Gemini2_5Pro extends BaseChatModel {\n  constructor(options: Gemini2_5ProOptionsType) {\n    super(Gemini2_5ProSchema, options);\n  }\n}\n\nexport {\n  Gemini2_5Pro,\n  Gemini2_5ProLiteral,\n  Gemini2_5ProOptions,\n  Gemini2_5ProSchema,\n  type Gemini2_5ProOptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview (retrieved 2026-02-25)\nconst Gemini3_1ProPreviewCustomtoolsLiteral = \"gemini-3.1-pro-preview-customtools\";\nconst Gemini3_1ProPreviewCustomtoolsDescription =\n  \"Google's Gemini 3.1 Pro Preview variant optimized for the custom tools endpoint in the Gemini API.\";\n\nconst Gemini3_1ProPreviewCustomtoolsSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3_1ProPreviewCustomtoolsLiteral,\n  description: Gemini3_1ProPreviewCustomtoolsDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3_1ProPreviewCustomtoolsLiteral],\n});\n\nconst Gemini3_1ProPreviewCustomtoolsOptions = BaseChatModelOptions;\ntype Gemini3_1ProPreviewCustomtoolsOptionsType = z.infer<typeof Gemini3_1ProPreviewCustomtoolsOptions>;\n\nclass Gemini3_1ProPreviewCustomtools extends BaseChatModel {\n  constructor(options: Gemini3_1ProPreviewCustomtoolsOptionsType) {\n    super(Gemini3_1ProPreviewCustomtoolsSchema, options);\n  }\n}\n\nexport {\n  Gemini3_1ProPreviewCustomtools,\n  Gemini3_1ProPreviewCustomtoolsLiteral,\n  Gemini3_1ProPreviewCustomtoolsOptions,\n  Gemini3_1ProPreviewCustomtoolsSchema,\n  type Gemini3_1ProPreviewCustomtoolsOptionsType,\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview (retrieved 2026-02-25)\nconst Gemini3_1ProPreviewLiteral = \"gemini-3.1-pro-preview\";\nconst Gemini3_1ProPreviewDescription =\n  \"Google's Gemini 3.1 Pro Preview model for improved reliability and nuanced understanding in complex reasoning and multimodal tasks.\";\n\nconst Gemini3_1ProPreviewSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3_1ProPreviewLiteral,\n  description: Gemini3_1ProPreviewDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3_1ProPreviewLiteral],\n});\n\nconst Gemini3_1ProPreviewOptions = BaseChatModelOptions;\ntype Gemini3_1ProPreviewOptionsType = z.infer<typeof Gemini3_1ProPreviewOptions>;\n\nclass Gemini3_1ProPreview extends BaseChatModel {\n  constructor(options: Gemini3_1ProPreviewOptionsType) {\n    super(Gemini3_1ProPreviewSchema, options);\n  }\n}\n\nexport {\n  Gemini3_1ProPreview,\n  Gemini3_1ProPreviewLiteral,\n  Gemini3_1ProPreviewOptions,\n  Gemini3_1ProPreviewSchema,\n  type Gemini3_1ProPreviewOptionsType,\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite (retrieved 2026-06-09)\nconst Gemini3_1FlashLiteLiteral = \"gemini-3.1-flash-lite\";\nconst Gemini3_1FlashLiteDescription =\n  \"Google's most cost-efficient and fastest model in the Gemini 3.1 series. \\\n  A thinking model optimized for high-volume, latency-sensitive tasks like classification and translation. \\\n  Supports Text, Image, Video, Audio, and PDF inputs. Knowledge cutoff: January 2025.\";\n\nconst Gemini3_1FlashLiteSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3_1FlashLiteLiteral,\n  description: Gemini3_1FlashLiteDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3_1FlashLiteLiteral],\n});\n\nconst Gemini3_1FlashLiteOptions = BaseChatModelOptions;\ntype Gemini3_1FlashLiteOptionsType = z.infer<typeof Gemini3_1FlashLiteOptions>;\n\nclass Gemini3_1FlashLite extends BaseChatModel {\n  constructor(options: Gemini3_1FlashLiteOptionsType) {\n    super(Gemini3_1FlashLiteSchema, options);\n  }\n}\n\nexport {\n  Gemini3_1FlashLite,\n  Gemini3_1FlashLiteLiteral,\n  Gemini3_1FlashLiteOptions,\n  Gemini3_1FlashLiteSchema,\n  type Gemini3_1FlashLiteOptionsType,\n};\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/gemini-api/docs/models/gemini-3.5-flash (retrieved 2026-06-09)\nconst Gemini3_5FlashLiteral = \"gemini-3.5-flash\";\nconst Gemini3_5FlashDescription =\n  \"Google's Gemini 3.5 Flash model for sustained frontier performance on agentic and coding tasks at high speed. \\\n  A thinking model with enhanced multimodal understanding, reasoning, and advanced coding capabilities. \\\n  Supports Text, Image, Video, Audio, and PDF inputs. Knowledge cutoff: January 2025.\";\n\nconst Gemini3_5FlashSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3_5FlashLiteral,\n  description: Gemini3_5FlashDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3_5FlashLiteral],\n});\n\nconst Gemini3_5FlashOptions = BaseChatModelOptions;\ntype Gemini3_5FlashOptionsType = z.infer<typeof Gemini3_5FlashOptions>;\n\nclass Gemini3_5Flash extends BaseChatModel {\n  constructor(options: Gemini3_5FlashOptionsType) {\n    super(Gemini3_5FlashSchema, options);\n  }\n}\n\nexport { Gemini3_5Flash, Gemini3_5FlashLiteral, Gemini3_5FlashOptions, Gemini3_5FlashSchema, type Gemini3_5FlashOptionsType };\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/models/gemini (retrieved 2025-12-19)\nconst Gemini3FlashPreviewLiteral = \"gemini-3-flash-preview\";\nconst Gemini3FlashPreviewDescription =\n  \"Google's Gemini 3 Flash Preview model - a lightweight and efficient AI model with enhanced multimodal understanding, \\\n  reasoning, and advanced coding capabilities. Optimized for speed and cost-effectiveness. \\\n  Supports Text, Image, Video, Audio, and PDF inputs. Knowledge cutoff: January 2025.\";\n\nconst Gemini3FlashPreviewSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3FlashPreviewLiteral,\n  description: Gemini3FlashPreviewDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3FlashPreviewLiteral],\n});\n\nconst Gemini3FlashPreviewOptions = BaseChatModelOptions;\ntype Gemini3FlashPreviewOptionsType = z.infer<typeof Gemini3FlashPreviewOptions>;\n\nclass Gemini3FlashPreview extends BaseChatModel {\n  constructor(options: Gemini3FlashPreviewOptionsType) {\n    super(Gemini3FlashPreviewSchema, options);\n  }\n}\n\nexport {\n  Gemini3FlashPreview,\n  Gemini3FlashPreviewLiteral,\n  Gemini3FlashPreviewOptions,\n  Gemini3FlashPreviewSchema,\n  type Gemini3FlashPreviewOptionsType,\n};\n\n","import { z } from \"zod\";\n\nimport { ChatModelSchema } from \"@adaline/provider\";\n\nimport { GoogleChatModelConfigs } from \"../../configs\";\nimport pricingData from \"../pricing.json\";\nimport { BaseChatModel, BaseChatModelOptions } from \"./base-chat-model.google\";\nimport { GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap } from \"./types\";\n\n// Specs reference: https://ai.google.dev/models/gemini (retrieved 2025-11-18)\nconst Gemini3ProPreviewLiteral = \"gemini-3-pro-preview\";\nconst Gemini3ProPreviewDescription =\n  \"Google's latest Gemini 3 Pro Preview model with enhanced multimodal understanding, reasoning, and thinking capabilities. \\\n  Supports Text, Image, Video, Audio, and PDF inputs. Knowledge cutoff: January 2025.\";\n\nconst Gemini3ProPreviewSchema = ChatModelSchema(GoogleChatModelRoles, GoogleChatModelModalitiesEnum).parse({\n  name: Gemini3ProPreviewLiteral,\n  description: Gemini3ProPreviewDescription,\n  maxInputTokens: 1048576,\n  maxOutputTokens: 65536,\n  roles: GoogleChatModelRolesMap,\n  modalities: GoogleChatModelModalities,\n  config: {\n    def: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).def,\n    schema: GoogleChatModelConfigs.reasoning(2.0, 1.0, 65536, 4, 0.95, 1, 65536).schema,\n  },\n  price: pricingData[Gemini3ProPreviewLiteral],\n});\n\nconst Gemini3ProPreviewOptions = BaseChatModelOptions;\ntype Gemini3ProPreviewOptionsType = z.infer<typeof Gemini3ProPreviewOptions>;\n\nclass Gemini3ProPreview extends BaseChatModel {\n  constructor(options: Gemini3ProPreviewOptionsType) {\n    super(Gemini3ProPreviewSchema, options);\n  }\n}\n\nexport {\n  Gemini3ProPreview,\n  Gemini3ProPreviewLiteral,\n  Gemini3ProPreviewOptions,\n  Gemini3ProPreviewSchema,\n  type Gemini3ProPreviewOptionsType,\n};\n\n\n\n","import { z } from \"zod\";\n\nimport { EmbeddingModelSchemaType } from \"@adaline/provider\";\nimport { EmbeddingTextModalityLiteral } from \"@adaline/types\";\n\nconst GoogleEmbeddingModelModalities: EmbeddingModelSchemaType[\"modalities\"] = [EmbeddingTextModalityLiteral];\n\nconst GoogleEmbeddingModelModalitiesEnum = z.enum([EmbeddingTextModalityLiteral]);\n\nexport { GoogleEmbeddingModelModalitiesEnum, GoogleEmbeddingModelModalities };\n","import { z } from \"zod\";\n\nconst GoogleGetEmbeddingsResponse = z.object({\n  embeddings: z.array(\n    z.object({\n      values: z.array(z.number()),\n    })\n  ),\n});\ntype GoogleGetEmbeddingsResponseType = z.infer<typeof GoogleGetEmbeddingsResponse>;\n\nexport { GoogleGetEmbeddingsResponse, type GoogleGetEmbeddingsResponseType };\n","import { z } from \"zod\";\n\nconst GoogleEmbeddingRequestInput = z.object({\n  model: z.string().min(1),\n  content: z.object({\n    parts: z\n      .array(\n        z.object({\n          text: z.string().min(1),\n        })\n      )\n      .min(1),\n  }),\n});\ntype GoogleEmbeddingRequestInputType = z.infer<typeof GoogleEmbeddingRequestInput>;\n\nconst GoogleEmbeddingRequest = z.object({\n  model: z.string().min(1).optional(),\n  requests: z.array(GoogleEmbeddingRequestInput).min(1),\n  outputDimensionality: z.number().int().min(1).optional(),\n});\ntype GoogleEmbeddingRequestType = z.infer<typeof GoogleEmbeddingRequest>;\n\nexport { GoogleEmbeddingRequest, GoogleEmbeddingRequestInput, type GoogleEmbeddingRequestType, type GoogleEmbeddingRequestInputType };\n","{\n  \"text-embedding-001\": {\n    \"modelName\": \"text-embedding-001\",\n    \"currency\": \"USD\",\n    \"inputPricePerMillion\": 0\n  },\n  \"text-embedding-004\": {\n    \"modelName\": \"text-embedding-004\",\n    \"currency\": \"USD\",\n    \"inputPricePerMillion\": 0\n  },\n  \"gemini-embedding-001\": {\n    \"modelName\": \"gemini-embedding-001\",\n    \"currency\": \"USD\",\n    \"inputPricePerMillion\": 0.15\n  },\n  \"gemini-embedding-2\": {\n    \"modelName\": \"gemini-embedding-2\",\n    \"currency\": \"USD\",\n    \"inputPricePerMillion\": 0.15\n  }\n}\n","import { z } from \"zod\";\n\nimport {\n  EmbeddingModelSchemaType,\n  EmbeddingModelV1,\n  HeadersType,\n  InvalidConfigError,\n  InvalidEmbeddingRequestsError,\n  InvalidModelRequestError,\n  ModelResponseError,\n  ParamsType,\n  removeUndefinedEntries,\n  UrlType,\n  urlWithoutTrailingSlash,\n} from \"@adaline/provider\";\nimport {\n  Config,\n  ConfigType,\n  EmbeddingModelPrice,\n  EmbeddingModelPriceType,\n  EmbeddingRequests,\n  EmbeddingRequestsType,\n  EmbeddingResponseType,\n  EmbeddingTextModalityLiteral,\n  FloatEmbeddingLiteral,\n  FloatEmbeddingType,\n} from \"@adaline/types\";\n\nimport { Google } from \"../../provider/provider.google\";\n// text-embedding-001/004 are free on the Gemini API (no per-token charge), so\n// their pricing entries carry inputPricePerMillion: 0.\nimport embeddingPricingData from \"../embedding-pricing.json\";\nimport { GoogleEmbeddingRequest, GoogleEmbeddingRequestInputType, GoogleGetEmbeddingsResponse } from \"./types\";\n\nconst BaseEmbeddingModelOptions = z.object({\n  modelName: z.string(),\n  apiKey: z.string(),\n  baseUrl: z.string().url().optional(),\n  getEmbeddingsUrl: z.string().url().optional(),\n});\ntype BaseEmbeddingModelOptionsType = z.infer<typeof BaseEmbeddingModelOptions>;\n\nclass BaseEmbeddingModel implements EmbeddingModelV1<EmbeddingModelSchemaType> {\n  readonly version = \"v1\" as const;\n  modelSchema: EmbeddingModelSchemaType;\n  readonly modelName: string;\n\n  private readonly apiKey: string;\n  private readonly baseUrl: string;\n  private readonly getEmbeddingsUrl: string;\n\n  constructor(modelSchema: EmbeddingModelSchemaType, options: BaseEmbeddingModelOptionsType) {\n    const parsedOptions = BaseEmbeddingModelOptions.parse(options);\n    this.modelSchema = modelSchema;\n    this.modelName = parsedOptions.modelName;\n    this.apiKey = parsedOptions.apiKey;\n    this.baseUrl = urlWithoutTrailingSlash(parsedOptions.baseUrl || Google.baseUrl);\n    this.getEmbeddingsUrl = urlWithoutTrailingSlash(\n      parsedOptions.getEmbeddingsUrl || `${this.baseUrl}/models/${this.modelName}:batchEmbedContents?key=${this.apiKey}`\n    );\n  }\n\n  getDefaultBaseUrl(): UrlType {\n    return this.baseUrl;\n  }\n\n  getDefaultHeaders(): HeadersType {\n    return {\n      \"Content-Type\": \"application/json\",\n    };\n  }\n\n  getDefaultParams(): ParamsType {\n    return {\n      model: this.modelName,\n    };\n  }\n\n  // Google returns retry delay information in the response body rather than headers.\n  // The response body contains error.details with a RetryInfo object:\n  // {\"@type\":\"type.googleapis.com/google.rpc.RetryInfo\",\"retryDelay\":\"45s\"}\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  getRetryDelay(_responseHeaders: HeadersType, responseData: unknown): { shouldRetry: boolean; delayMs: number } {\n    const shouldRetry = true;\n    let delayMs = 0;\n\n    // parse duration from retryDelay value of format \"45s\" or \"1.5s\" or \"45.499282066s\"\n    const parseDuration = (duration: string): number => {\n      const match = duration.match(/^(\\d+(?:\\.\\d+)?)s$/);\n      if (match) {\n        return Math.ceil(parseFloat(match[1]) * 1000);\n      }\n      return 0;\n    };\n\n    if (responseData && typeof responseData === \"object\") {\n      const data = responseData as { error?: { details?: Array<{ \"@type\"?: string; retryDelay?: string }> } };\n      if (data.error?.details && Array.isArray(data.error.details)) {\n        const retryInfo = data.error.details.find(\n          (detail) => detail[\"@type\"] === \"type.googleapis.com/google.rpc.RetryInfo\"\n        );\n        if (retryInfo?.retryDelay) {\n          delayMs = parseDuration(retryInfo.retryDelay);\n        }\n      }\n    }\n\n    return { shouldRetry, delayMs };\n  }\n\n  // TODO: unused method, not tested\n  getTokenCount(requests: EmbeddingRequestsType): number {\n    return requests.requests.reduce((acc, request) => acc + request.length, 0);\n  }\n\n  transformModelRequest(request: any): {\n    modelName: string | undefined;\n    config: ConfigType;\n    embeddingRequests: EmbeddingRequestsType;\n  } {\n    const safeRequest = GoogleEmbeddingRequest.safeParse(request);\n    if (!safeRequest.success) {\n      throw new InvalidModelRequestError({ info: \"Invalid model request\", cause: safeRequest.error });\n    }\n\n    const parsedRequest = safeRequest.data;\n\n    const modelName = parsedRequest.model;\n\n    const _config = {\n      outputDimensionality: parsedRequest.outputDimensionality,\n    };\n    const config = Config().parse(removeUndefinedEntries(_config));\n\n    const embeddingRequests: EmbeddingRequestsType = {\n      modality: EmbeddingTextModalityLiteral,\n      requests: parsedRequest.requests.reduce((acc, request) => {\n        acc.push(...request.content.parts.map((p) => p.text));\n        return acc;\n      }, [] as string[]),\n    };\n\n    return {\n      modelName,\n      config,\n      embeddingRequests,\n    };\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  transformConfig(config: ConfigType, requests?: EmbeddingRequestsType): ParamsType {\n    const _parsedConfig = this.modelSchema.config.schema.safeParse(config);\n    if (!_parsedConfig.success) {\n      throw new InvalidConfigError({\n        info: `Invalid config for model : '${this.modelName}'`,\n        cause: _parsedConfig.error,\n      });\n    }\n\n    const parsedConfig = _parsedConfig.data as ConfigType;\n    Object.keys(parsedConfig as ConfigType).forEach((key) => {\n      if (!this.modelSchema.config.def[key]) {\n        throw new InvalidConfigError({\n          info: `Invalid config for model : '${this.modelName}'`,\n          cause: new Error(`Invalid config key : '${key}', \n            available keys : [${Object.keys(this.modelSchema.config.def).join(\", \")}]`),\n        });\n      }\n    });\n\n    const transformedConfig = Object.keys(parsedConfig).reduce((acc, key) => {\n      const def = this.modelSchema.config.def[key];\n      const paramKey = def.param;\n      const paramValue = parsedConfig[key];\n      acc[paramKey] = paramValue;\n      return acc;\n    }, {} as ParamsType);\n\n    return transformedConfig;\n  }\n\n  transformEmbeddingRequests(requests: EmbeddingRequestsType): ParamsType {\n    const _parsedRequests = EmbeddingRequests().safeParse(requests);\n    if (!_parsedRequests.success) {\n      throw new InvalidEmbeddingRequestsError({ info: \"Invalid embedding requests\", cause: _parsedRequests.error });\n    }\n\n    if (requests.modality !== EmbeddingTextModalityLiteral) {\n      throw new InvalidEmbeddingRequestsError({\n        info: `Invalid embedding requests for model : '${this.modelName}'`,\n        cause: new Error(`Only '${EmbeddingTextModalityLiteral}' modality is supported for model : '${this.modelName}'`),\n      });\n    }\n\n    const _requests: GoogleEmbeddingRequestInputType[] = _parsedRequests.data.requests.map((request) => {\n      return {\n        model: `models/${this.modelName}`,\n        content: { parts: [{ text: request as string }] },\n      };\n    });\n\n    return {\n      requests: _requests,\n    };\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getGetEmbeddingsUrl(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<UrlType> {\n    return new Promise((resolve) => {\n      resolve(this.getEmbeddingsUrl);\n    });\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  async getGetEmbeddingsHeaders(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<HeadersType> {\n    return new Promise((resolve) => {\n      resolve(this.getDefaultHeaders());\n    });\n  }\n\n  async getGetEmbeddingsData(config: ConfigType, requests: EmbeddingRequestsType): Promise<ParamsType> {\n    return new Promise((resolve) => {\n      const _config = this.transformConfig(config);\n      const _requests = this.transformEmbeddingRequests(requests);\n\n      if (requests.requests.length === 0) {\n        throw new InvalidEmbeddingRequestsError({\n          info: `Invalid embedding requests for model : '${this.modelName}'`,\n          cause: new Error(\"requests cannot be empty\"),\n        });\n      }\n\n      if (_config.outputDimensionality) {\n        (_requests as any).requests.forEach((request: any) => {\n          request.outputDimensionality = _config.outputDimensionality;\n        });\n        delete _config.outputDimensionality;\n      }\n\n      resolve({\n        ...this.getDefaultParams(),\n        ..._config,\n        ..._requests,\n      });\n    });\n  }\n\n  transformGetEmbeddingsResponse(response: any): EmbeddingResponseType {\n    const safe = GoogleGetEmbeddingsResponse.safeParse(response);\n    if (safe.success) {\n      const parsedResponse = safe.data;\n      const embeddings = parsedResponse.embeddings.map((embedding, index) => {\n        return {\n          index,\n          embedding: embedding.values,\n        } as FloatEmbeddingType;\n      });\n\n      return {\n        encodingFormat: FloatEmbeddingLiteral,\n        embeddings: embeddings,\n      } as EmbeddingResponseType;\n    }\n\n    throw new ModelResponseError({ info: \"Invalid response from model\", cause: safe.error });\n  }\n\n  getModelPricing(): EmbeddingModelPriceType {\n    if (!(this.modelName in embeddingPricingData)) {\n      throw new ModelResponseError({\n        info: `Invalid model pricing for model : '${this.modelName}'`,\n        cause: new Error(`No pricing configuration found for model \"${this.modelName}\"`),\n      });\n    }\n    const entry = embeddingPricingData[this.modelName as keyof typeof embeddingPricingData];\n    // Parse (rather than cast) so the JSON is validated against the schema and\n    // the `currency` default is applied.\n    return EmbeddingModelPrice.parse(entry);\n  }\n}\n\nexport { BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType };\n","import { z } from \"zod\";\n\nimport { EmbeddingModelSchema } from \"@adaline/provider\";\n\nimport { GoogleEmbeddingModelConfigs } from \"../../configs\";\nimport embeddingPricingData from \"../embedding-pricing.json\";\nimport { BaseEmbeddingModel, BaseEmbeddingModelOptions } from \"./base-embedding-model.google\";\nimport { GoogleEmbeddingModelModalities, GoogleEmbeddingModelModalitiesEnum } from \"./types\";\n\nconst Text_Embedding_001Literal = \"text-embedding-001\";\nconst Text_Embedding_001_Description = \"text-embedding-001\";\n\nconst Text_Embedding_001Schema = EmbeddingModelSchema(GoogleEmbeddingModelModalitiesEnum).parse({\n  name: Text_Embedding_001Literal,\n  description: Text_Embedding_001_Description,\n  modalities: GoogleEmbeddingModelModalities,\n  maxInputTokens: 2048,\n  maxOutputTokens: 768,\n  config: {\n    def: GoogleEmbeddingModelConfigs.base(768).def,\n    schema: GoogleEmbeddingModelConfigs.base(768).schema,\n  },\n  price: embeddingPricingData[Text_Embedding_001Literal],\n});\n\nconst Text_Embedding_001Options = BaseEmbeddingModelOptions;\ntype Text_Embedding_001OptionsType = z.infer<typeof Text_Embedding_001Options>;\n\nclass Text_Embedding_001 extends BaseEmbeddingModel {\n  constructor(options: Text_Embedding_001OptionsType) {\n    super(Text_Embedding_001Schema, options);\n  }\n}\n\nexport {\n  Text_Embedding_001,\n  Text_Embedding_001Options,\n  Text_Embedding_001Schema,\n  Text_Embedding_001Literal,\n  type Text_Embedding_001OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { EmbeddingModelSchema } from \"@adaline/provider\";\n\nimport { GoogleEmbeddingModelConfigs } from \"../../configs\";\nimport embeddingPricingData from \"../embedding-pricing.json\";\nimport { BaseEmbeddingModel, BaseEmbeddingModelOptions } from \"./base-embedding-model.google\";\nimport { GoogleEmbeddingModelModalities, GoogleEmbeddingModelModalitiesEnum } from \"./types\";\n\nconst Text_Embedding_004Literal = \"text-embedding-004\";\nconst Text_Embedding_004_Description = \"text-embedding-004\";\n\nconst Text_Embedding_004Schema = EmbeddingModelSchema(GoogleEmbeddingModelModalitiesEnum).parse({\n  name: Text_Embedding_004Literal,\n  description: Text_Embedding_004_Description,\n  modalities: GoogleEmbeddingModelModalities,\n  maxInputTokens: 2048,\n  maxOutputTokens: 768,\n  config: {\n    def: GoogleEmbeddingModelConfigs.base(768).def,\n    schema: GoogleEmbeddingModelConfigs.base(768).schema,\n  },\n  price: embeddingPricingData[Text_Embedding_004Literal],\n});\n\nconst Text_Embedding_004Options = BaseEmbeddingModelOptions;\ntype Text_Embedding_004OptionsType = z.infer<typeof Text_Embedding_004Options>;\n\nclass Text_Embedding_004 extends BaseEmbeddingModel {\n  constructor(options: Text_Embedding_004OptionsType) {\n    super(Text_Embedding_004Schema, options);\n  }\n}\n\nexport {\n  Text_Embedding_004,\n  Text_Embedding_004Options,\n  Text_Embedding_004Schema,\n  Text_Embedding_004Literal,\n  type Text_Embedding_004OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { EmbeddingModelSchema } from \"@adaline/provider\";\n\nimport { GoogleEmbeddingModelConfigs } from \"../../configs\";\nimport embeddingPricingData from \"../embedding-pricing.json\";\nimport { BaseEmbeddingModel, BaseEmbeddingModelOptions } from \"./base-embedding-model.google\";\nimport { GoogleEmbeddingModelModalities, GoogleEmbeddingModelModalitiesEnum } from \"./types\";\n\nconst Gemini_Embedding_001Literal = \"gemini-embedding-001\";\nconst Gemini_Embedding_001_Description =\n  \"Gemini embedding model — Matryoshka representation learning. Default 3072 dimensions; \" +\n  \"recommended sizes 768 / 1536 / 3072 via `outputDimensionality`. Max input 2048 tokens.\";\n\nconst Gemini_Embedding_001Schema = EmbeddingModelSchema(GoogleEmbeddingModelModalitiesEnum).parse({\n  name: Gemini_Embedding_001Literal,\n  description: Gemini_Embedding_001_Description,\n  modalities: GoogleEmbeddingModelModalities,\n  maxInputTokens: 2048,\n  maxOutputTokens: 3072,\n  config: {\n    def: GoogleEmbeddingModelConfigs.base(3072).def,\n    schema: GoogleEmbeddingModelConfigs.base(3072).schema,\n  },\n  price: embeddingPricingData[Gemini_Embedding_001Literal],\n});\n\nconst Gemini_Embedding_001Options = BaseEmbeddingModelOptions;\ntype Gemini_Embedding_001OptionsType = z.infer<typeof Gemini_Embedding_001Options>;\n\nclass Gemini_Embedding_001 extends BaseEmbeddingModel {\n  constructor(options: Gemini_Embedding_001OptionsType) {\n    super(Gemini_Embedding_001Schema, options);\n  }\n}\n\nexport {\n  Gemini_Embedding_001,\n  Gemini_Embedding_001Options,\n  Gemini_Embedding_001Schema,\n  Gemini_Embedding_001Literal,\n  type Gemini_Embedding_001OptionsType,\n};\n","import { z } from \"zod\";\n\nimport { EmbeddingModelSchema } from \"@adaline/provider\";\n\nimport { GoogleEmbeddingModelConfigs } from \"../../configs\";\nimport embeddingPricingData from \"../embedding-pricing.json\";\nimport { BaseEmbeddingModel, BaseEmbeddingModelOptions } from \"./base-embedding-model.google\";\nimport { GoogleEmbeddingModelModalities, GoogleEmbeddingModelModalitiesEnum } from \"./types\";\n\nconst Gemini_Embedding_2Literal = \"gemini-embedding-2\";\nconst Gemini_Embedding_2_Description =\n  \"Gemini Embedding 2 — Matryoshka representation learning with extended context. Default 3072 \" +\n  \"dimensions; recommended sizes 768 / 1536 / 3072 via `outputDimensionality`. Max input 8192 \" +\n  \"tokens (4× gemini-embedding-001). Successor to gemini-embedding-001 with multimodal support \" +\n  \"available via the Gemini API (text-only path used here).\";\n\nconst Gemini_Embedding_2Schema = EmbeddingModelSchema(GoogleEmbeddingModelModalitiesEnum).parse({\n  name: Gemini_Embedding_2Literal,\n  description: Gemini_Embedding_2_Description,\n  modalities: GoogleEmbeddingModelModalities,\n  maxInputTokens: 8192,\n  maxOutputTokens: 3072,\n  config: {\n    def: GoogleEmbeddingModelConfigs.base(3072).def,\n    schema: GoogleEmbeddingModelConfigs.base(3072).schema,\n  },\n  price: embeddingPricingData[Gemini_Embedding_2Literal],\n});\n\nconst Gemini_Embedding_2Options = BaseEmbeddingModelOptions;\ntype Gemini_Embedding_2OptionsType = z.infer<typeof Gemini_Embedding_2Options>;\n\nclass Gemini_Embedding_2 extends BaseEmbeddingModel {\n  constructor(options: Gemini_Embedding_2OptionsType) {\n    super(Gemini_Embedding_2Schema, options);\n  }\n}\n\nexport {\n  Gemini_Embedding_2,\n  Gemini_Embedding_2Options,\n  Gemini_Embedding_2Schema,\n  Gemini_Embedding_2Literal,\n  type Gemini_Embedding_2OptionsType,\n};\n"]}