ai-sdk
Installation
SKILL.md
What I Do
- Provide correct patterns for AI SDK 6 with OpenAI
- Ensure consistent model usage across the codebase
- Handle text generation, structured output, and tool calling
Model Selection
| Model | Use Case | Examples |
|---|---|---|
gpt-5.2 |
Complex reasoning, multi-step tasks | Email agents, document analysis, KYB assistance |
gpt-5-mini |
Fast actions, simple extraction | Invoice field extraction, quick classifications |
Default to gpt-5.2 unless speed is critical and the task is simple.
Setup Pattern
Always create the OpenAI provider inline - no abstraction layer needed: