Created
October 24, 2025 12:18
-
-
Save Tehnix/d989dda504213ed9e9cada4087e40cda to your computer and use it in GitHub Desktop.
Patch for @posthog/ai to support Vertex AI authentication options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/node_modules/@posthog/ai/.bun-tag-3a4e90bd86b41871 b/.bun-tag-3a4e90bd86b41871 | |
| new file mode 100644 | |
| index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 | |
| diff --git a/dist/gemini/index.d.ts b/dist/gemini/index.d.ts | |
| index a48fbe3bc9b822d6ce432243a1226aa53481e87b..e700180a757342848740be2c435904b61271f0c2 100644 | |
| --- a/dist/gemini/index.d.ts | |
| +++ b/dist/gemini/index.d.ts | |
| @@ -1,4 +1,4 @@ | |
| -import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse } from '@google/genai'; | |
| +import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse, GoogleGenAIOptions } from '@google/genai'; | |
| import { PostHog } from 'posthog-node'; | |
| interface MonitoringEventPropertiesWithDefaults { | |
| @@ -21,7 +21,7 @@ interface CostOverride { | |
| outputCost: number; | |
| } | |
| -interface MonitoringGeminiConfig { | |
| +interface MonitoringGeminiConfig extends GoogleGenAIOptions { | |
| apiKey?: string; | |
| vertexai?: boolean; | |
| project?: string; | |
| diff --git a/dist/index.d.ts b/dist/index.d.ts | |
| index ef2d4b06e0835c496ff1ce70e5845332cb3a3cfd..45e5988caa968a687e80f2bbf586f1c704cdf751 100644 | |
| --- a/dist/index.d.ts | |
| +++ b/dist/index.d.ts | |
| @@ -6,7 +6,7 @@ import { ResponseCreateParamsWithTools, ExtractParsedContentFromParams } from 'o | |
| import { LanguageModelV2 } from '@ai-sdk/provider'; | |
| import AnthropicOriginal, { APIPromise as APIPromise$1 } from '@anthropic-ai/sdk'; | |
| import { Stream as Stream$1 } from '@anthropic-ai/sdk/streaming'; | |
| -import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse } from '@google/genai'; | |
| +import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse, GoogleGenAIOptions } from '@google/genai'; | |
| import { BaseCallbackHandler } from '@langchain/core/callbacks/base'; | |
| import { Serialized } from '@langchain/core/load/serializable'; | |
| import { ChainValues } from '@langchain/core/utils/types'; | |
| @@ -167,7 +167,7 @@ declare class WrappedMessages extends AnthropicOriginal.Messages { | |
| create(body: MessageCreateParamsBase & MonitoringParams, options?: RequestOptions): APIPromise$1<Stream$1<RawMessageStreamEvent> | Message>; | |
| } | |
| -interface MonitoringGeminiConfig { | |
| +interface MonitoringGeminiConfig extends GoogleGenAIOptions { | |
| apiKey?: string; | |
| vertexai?: boolean; | |
| project?: string; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment