🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(llm-connections): allow Vertex / Google AI Studio provider options and add Gemini 2.5 preview, fix #10257 (#10263)
rar2731991e992769f9c90
diff --git a/packages/shared/src/server/llm/fetchLLMCompletion.ts b/packages/shared/src/server/llm/fetchLLMCompletion.tsindex 3d0565a4da..73c79a2712 100644--- a/packages/shared/src/server/llm/fetchLLMCompletion.ts+++ b/packages/shared/src/server/llm/fetchLLMCompletion.ts@@ -333,6 +333,9 @@ export async function fetchLLMCompletion(projectId: credentials.project_id,credentials,},+ ...(modelParams.providerOptions && {+ additionalModelRequestFields: modelParams.providerOptions,+ }),});} else if (modelParams.adapter === LLMAdapter.GoogleAIStudio) {chatModel = new ChatGoogleGenerativeAI({@@ -343,6 +346,9 @@ export async function fetchLLMCompletion(callbacks: finalCallbacks,maxRetries,apiKey,+ ...(modelParams.providerOptions && {+ additionalModelRequestFields: modelParams.providerOptions,+ }),});} else {// eslint-disable-next-line no-unused-varsdiff --git a/packages/shared/src/server/llm/types.ts b/packages/shared/src/server/llm/types.tsindex 23d55bc6dd..d70d9105d7 100644--- a/packages/shared/src/server/llm/types.ts+++ b/packages/shared/src/server/llm/types.ts@@ -422,7 +422,9 @@ export const anthropicModels = [export const vertexAIModels = ["gemini-2.5-pro","gemini-2.5-flash",+ "gemini-2.5-flash-preview-09-2025","gemini-2.5-flash-lite",+ "gemini-2.5-flash-lite-preview-09-2025","gemini-2.0-flash","gemini-2.0-pro-exp-02-05","gemini-2.0-flash-001",@@ -437,6 +439,7 @@ export const googleAIStudioModels = ["gemini-2.5-flash","gemini-2.5-pro","gemini-2.5-flash-lite",+ "gemini-2.5-flash-lite-preview-09-2025","gemini-2.0-flash","gemini-2.0-flash-thinking-exp-01-21","gemini-1.5-pro",diff --git a/web/src/components/ModelParameters/index.tsx b/web/src/components/ModelParameters/index.tsxindex e8a563c8a7..58011da6f0 100644--- a/web/src/components/ModelParameters/index.tsx+++ b/web/src/components/ModelParameters/index.tsx@@ -17,7 +17,7 @@ import { cn } from "@/src/utils/tailwind";import {type JSONObject,JSONObjectSchema,- LLMAdapter,+ type LLMAdapter,type supportedModels,type UIModelParams,} from "@langfuse/shared";@@ -109,11 +109,6 @@ export const ModelParameters: React.FC<ModelParamsContext> = ({);}- const isProviderOptionsSupported = ![- LLMAdapter.GoogleAIStudio,- LLMAdapter.VertexAI,- ].includes(modelParams.adapter.value);-// Settings button component for reuseconst SettingsButton = (<Popover open={modelSettingsOpen} onOpenChange={setModelSettingsOpen}>@@ -181,15 +176,13 @@ export const ModelParameters: React.FC<ModelParamsContext> = ({tooltip="An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."updateModelParam={updateModelParamValue}/>- {isProviderOptionsSupported ? (- <ProviderOptionsInput- value={modelParams.providerOptions.value}- formDisabled={formDisabled}- enabled={modelParams.providerOptions.enabled}- setModelParamEnabled={setModelParamEnabled}- updateModelParam={updateModelParamValue}- />- ) : null}+ <ProviderOptionsInput+ value={modelParams.providerOptions.value}+ formDisabled={formDisabled}+ enabled={modelParams.providerOptions.enabled}+ setModelParamEnabled={setModelParamEnabled}+ updateModelParam={updateModelParamValue}+ /><LLMApiKeyComponent {...{ projectId, modelParams }} /></div></PopoverContent>