feat: switch to Claude Haiku 4.5 and add tool debug logging
Updated model from gpt-oss-120b (no function calling support) to anthropic/claude-haiku-4.5 which has excellent function calling support for enabling Morgan's agent creation tool. Changes: - Update OPENROUTER_MODEL to anthropic/claude-haiku-4.5 - Add debug logging to show available tools for each agent - Claude Haiku 4.5 provides fast, cost-effective function calling This enables tool calling for Morgan's create_agent_package functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
af781f2c58
commit
d4eb9ae899
@ -79,11 +79,15 @@ export async function POST(request: NextRequest) {
|
|||||||
// Get configured model
|
// Get configured model
|
||||||
const model = getConfiguredModel()
|
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
|
// Stream response from agent
|
||||||
const result = streamText({
|
const result = streamText({
|
||||||
model,
|
model,
|
||||||
system: agent.systemPrompt,
|
system: agent.systemPrompt,
|
||||||
tools: agent.tools || {},
|
tools: toolsToPass,
|
||||||
messages,
|
messages,
|
||||||
temperature: agent.temperature,
|
temperature: agent.temperature,
|
||||||
// Note: maxTokens is not used in streamText - it uses maxRetries, retry logic, etc
|
// Note: maxTokens is not used in streamText - it uses maxRetries, retry logic, etc
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
"vars": {
|
"vars": {
|
||||||
// LLM Configuration (Vercel AI SDK)
|
// LLM Configuration (Vercel AI SDK)
|
||||||
"OPENROUTER_API_KEY": "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",
|
"OPENROUTER_API_KEY": "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",
|
||||||
"OPENROUTER_MODEL": "openai/gpt-oss-120b",
|
"OPENROUTER_MODEL": "anthropic/claude-haiku-4.5",
|
||||||
// RAG Configuration (Qdrant)
|
// RAG Configuration (Qdrant)
|
||||||
"QDRANT_URL": "",
|
"QDRANT_URL": "",
|
||||||
"QDRANT_API_KEY": "",
|
"QDRANT_API_KEY": "",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user