CRITICAL FIX: Was creating plain objects instead of using tool() from AI SDK.
The issue:
- Creating { description, inputSchema, execute } plain objects
- OpenAI receives invalid tool format: "type: None"
- AI SDK needs tools created with tool() function
The fix:
- Import tool() and jsonSchema() from 'ai'
- Use tool() to wrap the remote execution
- Use jsonSchema() to wrap the JSON Schema received from Railway
- Matches the format used in packages/tools/hello
Example from hello tool:
```ts
tool({
description: "...",
inputSchema: jsonSchema({ type: 'object', properties: {...} }),
execute: async (params) => {...}
})
```
Now the playground creates tools the same way!
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| playground | ||
| railway-executor | ||
| web | ||