Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update tuning.ts

Developers Digest88c1a6902e0a
diff --git a/apps/api/src/services/monitoring/search/tuning.ts b/apps/api/src/services/monitoring/search/tuning.ts
index adf026030..892b4567e 100644
--- a/apps/api/src/services/monitoring/search/tuning.ts
+++ b/apps/api/src/services/monitoring/search/tuning.ts
@@ -1,36 +1,14 @@
import { createGoogleGenerativeAI } from "@ai-sdk/google";
-const THINKING_LEVELS = ["minimal", "low", "medium", "high"] as const;
-
type GoogleThinkingOptions = {
- providerOptions?: {
- google: {
- thinkingConfig:
- | { thinkingLevel: (typeof THINKING_LEVELS)[number] }
- | { thinkingBudget: number };
- };
+ providerOptions: {
+ google: { thinkingConfig: { thinkingLevel: "minimal" } };
};
};
export function googleProviderOptions(): GoogleThinkingOptions {
- const setting = String(process.env.SEARCH_MONITOR_THINKING ?? "minimal")
- .trim()
- .toLowerCase();
- if (setting === "default") {
- return {};
- }
- if (/^\d+$/.test(setting)) {
- return {
- providerOptions: {
- google: { thinkingConfig: { thinkingBudget: Number(setting) } },
- },
- };
- }
- const thinkingLevel = (THINKING_LEVELS as readonly string[]).includes(setting)
- ? (setting as (typeof THINKING_LEVELS)[number])
- : "minimal";
return {
- providerOptions: { google: { thinkingConfig: { thinkingLevel } } },
+ providerOptions: { google: { thinkingConfig: { thinkingLevel: "minimal" } } },
};
}