diff --git a/apps/sim/app/api/tools/search/route.ts b/apps/sim/app/api/tools/search/route.ts
index e09f66e5c2..52fffc61b1 100644
--- a/apps/sim/app/api/tools/search/route.ts
+++ b/apps/sim/app/api/tools/search/route.ts
@@ -1,6 +1,5 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
-import { getBYOKKey } from '@/lib/api-key/byok'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { SEARCH_TOOL_COST } from '@/lib/billing/constants'
import { env } from '@/lib/core/config/env'
@@ -11,7 +10,6 @@ const logger = createLogger('search')
const SearchRequestSchema = z.object({
query: z.string().min(1),
- workspaceId: z.string().optional(),
})
export const maxDuration = 60
@@ -41,17 +39,7 @@ export async function POST(request: NextRequest) {
const body = await request.json()
const validated = SearchRequestSchema.parse(body)
- let exaApiKey = env.EXA_API_KEY
- let isBYOK = false
-
- if (validated.workspaceId) {
- const byokResult = await getBYOKKey(validated.workspaceId, 'exa')
- if (byokResult) {
- exaApiKey = byokResult.apiKey
- isBYOK = true
- logger.info(`[${requestId}] Using workspace BYOK key for Exa search`)
- }
- }
+ const exaApiKey = env.EXA_API_KEY
if (!exaApiKey) {
logger.error(`[${requestId}] No Exa API key available`)
@@ -64,7 +52,6 @@ export async function POST(request: NextRequest) {
logger.info(`[${requestId}] Executing search`, {
userId,
query: validated.query,
- isBYOK,
})
const result = await executeTool('exa_search', {
@@ -100,7 +87,7 @@ export async function POST(request: NextRequest) {
const cost = {
input: 0,
output: 0,
- total: isBYOK ? 0 : SEARCH_TOOL_COST,
+ total: SEARCH_TOOL_COST,
tokens: {
input: 0,
output: 0,
@@ -119,7 +106,6 @@ export async function POST(request: NextRequest) {
userId,
resultCount: results.length,
cost: cost.total,
- isBYOK,
})
return NextResponse.json({
diff --git a/apps/sim/app/api/workspaces/[id]/byok-keys/route.ts b/apps/sim/app/api/workspaces/[id]/byok-keys/route.ts
index 424e17d8ec..f2e9a031fe 100644
--- a/apps/sim/app/api/workspaces/[id]/byok-keys/route.ts
+++ b/apps/sim/app/api/workspaces/[id]/byok-keys/route.ts
@@ -12,7 +12,7 @@ import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
const logger = createLogger('WorkspaceBYOKKeysAPI')
-const VALID_PROVIDERS = ['openai', 'anthropic', 'google', 'mistral', 'exa'] as const
+const VALID_PROVIDERS = ['openai', 'anthropic', 'google', 'mistral'] as const
const UpsertKeySchema = z.object({
providerId: z.enum(VALID_PROVIDERS),
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx
index fb7f292697..8b99955a10 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx
@@ -1,6 +1,7 @@
'use client'
import { Component, type ReactNode, useEffect } from 'react'
+import { ReactFlowProvider } from 'reactflow'
import { createLogger } from '@/lib/logs/console/logger'
import { Panel } from '@/app/workspace/[workspaceId]/w/[workflowId]/components'
import { Sidebar } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar'
@@ -47,8 +48,9 @@ export function ErrorUI({
- {/* Panel */}
-
+
+
+
)
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout.ts
index beb110853c..98b338d2a8 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout.ts
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-auto-layout.ts
@@ -9,9 +9,11 @@ export type { AutoLayoutOptions }
const logger = createLogger('useAutoLayout')
/**
- * Hook providing auto-layout functionality for workflows
- * Binds workflowId context and provides memoized callback for React components
- * Includes automatic fitView animation after successful layout
+ * Hook providing auto-layout functionality for workflows.
+ * Binds workflowId context and provides memoized callback for React components.
+ * Includes automatic fitView animation after successful layout.
+ *
+ * Note: This hook requires a ReactFlowProvider ancestor.
*/
export function useAutoLayout(workflowId: string | null) {
const { fitView } = useReactFlow()
diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/byok/byok.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/byok/byok.tsx
index beb6501551..81b6cbf9e4 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/byok/byok.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/byok/byok.tsx
@@ -13,7 +13,7 @@ import {
ModalHeader,
Trash,
} from '@/components/emcn'
-import { AnthropicIcon, ExaAIIcon, GeminiIcon, MistralIcon, OpenAIIcon } from '@/components/icons'
+import { AnthropicIcon, GeminiIcon, MistralIcon, OpenAIIcon } from '@/components/icons'
import { Skeleton } from '@/components/ui'
import { createLogger } from '@/lib/logs/console/logger'
import {
@@ -61,26 +61,19 @@ const PROVIDERS: {
description: 'LLM calls and Knowledge Base OCR',
placeholder: 'Enter your API key',
},
- {
- id: 'exa',
- name: 'Exa',
- icon: ExaAIIcon,
- description: 'Web Search block',
- placeholder: 'Enter your API key',
- },
]
function BYOKKeySkeleton() {
return (
-
+
)
}
@@ -168,11 +161,11 @@ export function BYOK() {
return (
-
-
+
+
{provider.name}
diff --git a/apps/sim/app/workspace/[workspaceId]/w/page.tsx b/apps/sim/app/workspace/[workspaceId]/w/page.tsx
index 93288d1071..5ab1a636f0 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/page.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/page.tsx
@@ -2,6 +2,7 @@
import { useEffect, useState } from 'react'
import { useParams, useRouter } from 'next/navigation'
+import { ReactFlowProvider } from 'reactflow'
import { createLogger } from '@/lib/logs/console/logger'
import { Panel, Terminal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components'
import { useWorkflows } from '@/hooks/queries/workflows'
@@ -69,7 +70,9 @@ export default function WorkflowsPage() {
}}
/>
-
+
+
+
diff --git a/apps/sim/hooks/queries/byok-keys.ts b/apps/sim/hooks/queries/byok-keys.ts
index 42c29b13d3..487b9a28f1 100644
--- a/apps/sim/hooks/queries/byok-keys.ts
+++ b/apps/sim/hooks/queries/byok-keys.ts
@@ -4,7 +4,7 @@ import { API_ENDPOINTS } from '@/stores/constants'
const logger = createLogger('BYOKKeysQueries')
-export type BYOKProviderId = 'openai' | 'anthropic' | 'google' | 'mistral' | 'exa'
+export type BYOKProviderId = 'openai' | 'anthropic' | 'google' | 'mistral'
export interface BYOKKey {
id: string
diff --git a/apps/sim/lib/api-key/byok.ts b/apps/sim/lib/api-key/byok.ts
index 4e8ba3529e..1483b0974e 100644
--- a/apps/sim/lib/api-key/byok.ts
+++ b/apps/sim/lib/api-key/byok.ts
@@ -6,7 +6,7 @@ import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('BYOKKeys')
-export type BYOKProviderId = 'openai' | 'anthropic' | 'google' | 'mistral' | 'exa'
+export type BYOKProviderId = 'openai' | 'anthropic' | 'google' | 'mistral'
export interface BYOKKeyResult {
apiKey: string
diff --git a/apps/sim/tools/search/tool.ts b/apps/sim/tools/search/tool.ts
index 5495e62929..4f6f9e3a54 100644
--- a/apps/sim/tools/search/tool.ts
+++ b/apps/sim/tools/search/tool.ts
@@ -25,7 +25,6 @@ export const searchTool: ToolConfig
= {
}),
body: (params) => ({
query: params.query,
- workspaceId: params._context?.workspaceId,
}),
},
diff --git a/apps/sim/tools/search/types.ts b/apps/sim/tools/search/types.ts
index e23309ee05..73bfe038cf 100644
--- a/apps/sim/tools/search/types.ts
+++ b/apps/sim/tools/search/types.ts
@@ -2,11 +2,6 @@ import type { ToolResponse } from '@/tools/types'
export interface SearchParams {
query: string
- _context?: {
- workflowId?: string
- workspaceId?: string
- executionId?: string
- }
}
export interface SearchResponse extends ToolResponse {