Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions js/plugins/googleai/src/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,29 @@ export const GeminiConfigSchema = GenerationCommonConfigSchema.extend({
'Retrieve public web data for grounding, powered by Google Search.'
)
.optional(),
thinkingConfig: z
.object({
includeThoughts: z
.boolean()
.describe(
'Indicates whether to include thoughts in the response.' +
'If true, thoughts are returned only when available.'
)
.optional(),
thinkingBudget: z
.number()
.min(0)
.max(24576)
.describe(
'The thinking budget parameter gives the model guidance on the ' +
'number of thinking tokens it can use when generating a response. ' +
'A greater number of tokens is typically associated with more detailed ' +
'thinking, which is needed for solving more complex tasks. ' +
'Setting the thinking budget to 0 disables thinking.'
)
.optional(),
})
.optional(),
}).passthrough();
export type GeminiConfig = z.infer<typeof GeminiConfigSchema>;

Expand Down
23 changes: 23 additions & 0 deletions js/plugins/vertexai/src/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,29 @@ export const GeminiConfigSchema = GenerationCommonConfigSchema.extend({
'With NONE, the model is prohibited from making function calls.'
)
.optional(),
thinkingConfig: z
.object({
includeThoughts: z
.boolean()
.describe(
'Indicates whether to include thoughts in the response.' +
'If true, thoughts are returned only when available.'
)
.optional(),
thinkingBudget: z
.number()
.min(0)
.max(24576)
.describe(
'The thinking budget parameter gives the model guidance on the ' +
'number of thinking tokens it can use when generating a response. ' +
'A greater number of tokens is typically associated with more detailed ' +
'thinking, which is needed for solving more complex tasks. ' +
'Setting the thinking budget to 0 disables thinking.'
)
.optional(),
})
.optional(),
}).passthrough();

/**
Expand Down