diff --git a/src/app/api/chat/route.ts b/src/app/api/chat/route.ts index e2d3af36e..7e1e01253 100644 --- a/src/app/api/chat/route.ts +++ b/src/app/api/chat/route.ts @@ -79,11 +79,15 @@ export async function POST(request: NextRequest) { // Get configured model const model = getConfiguredModel() + // Debug: Log tools being passed to streamText + const toolsToPass = agent.tools || {} + console.log(`[chat] Tools available for agent ${agentId}:`, Object.keys(toolsToPass)) + // Stream response from agent const result = streamText({ model, system: agent.systemPrompt, - tools: agent.tools || {}, + tools: toolsToPass, messages, temperature: agent.temperature, // Note: maxTokens is not used in streamText - it uses maxRetries, retry logic, etc diff --git a/wrangler.jsonc b/wrangler.jsonc index e8524cd2a..e7518e88c 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -16,7 +16,7 @@ "vars": { // LLM Configuration (Vercel AI SDK) "OPENROUTER_API_KEY": "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", - "OPENROUTER_MODEL": "openai/gpt-oss-120b", + "OPENROUTER_MODEL": "anthropic/claude-haiku-4.5", // RAG Configuration (Qdrant) "QDRANT_URL": "", "QDRANT_API_KEY": "",