laguagu/claude-code-nextjs-skills / skills/ai-sdk-7
ai-sdk-7
VerifiedVercel AI SDK v7 development and migration. Use when building or upgrading AI SDK 7 apps, especially ToolLoopAgent, WorkflowAgent, HarnessAgent, Claude Code/Codex/Pi harnesses, runtimeContext, toolsContext, toolApproval, telemetry, reasoning, file or skill uploads, realtime, video generation, or v6-to-v7 breaking changes. For version discovery, v6 code and general doc lookup use ai-sdk.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.8 KB |
| references/agent-execution.md | markdown | 2.3 KB |
| references/core-functions.md | markdown | 1.6 KB |
| references/examples.md | markdown | 744 B |
| references/harnesses.md | markdown | 2.4 KB |
| references/media-and-files.md | markdown | 2.3 KB |
| references/migration-v6-to-v7.md | markdown | 5.6 KB |
| references/telemetry.md | markdown | 1.7 KB |
| references/tools.md | markdown | 2.0 KB |
| references/ui-hooks.md | markdown | 1.7 KB |
references/core-functions.md
View on GitHub---
title: Core Functions in AI SDK 7
description: generateText, streamText, output, settings, streams, and result shape.
---
# Generation, stream and result contracts
Use text functions with `Output` for validated structured output. Keep system
instructions in top-level `instructions`; v7 rejects system messages in input
history by default. `allowSystemInMessages` is an explicit compatibility option
for trusted history, not browser-controlled instructions.
`streamText` exposes `stream` instead of `fullStream`. Its `onChunk` can
receive boundary, lifecycle and terminal parts as well as text/tool data.
Narrow the part before processing it.
Result response helpers are deprecated. Use
`createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream, originalMessages, onEnd }) })`
for UI messages, or `toTextStream` + `createTextStreamResponse` for plain text.
The server output must match the client transport. Provider-executed tools
and file/reasoning parts need handling beyond text deltas.
Top-level usage/content/tool arrays aggregate all steps. Use `finalStep`
(awaited for a stream) for final-step metadata and usage. Choose intentionally
for accounting, storage and rendering.
Use top-level `reasoning` only when supported; overlapping provider settings
take precedence. Configure timeouts for the actual operation, distinguishing
total, step, chunk and tool deadlines where the installed API supports them.
Find exact options/defaults in installed docs/types and
[AI SDK Core](https://ai-sdk.dev/docs/ai-sdk-core/overview). For renamed fields
or changed semantics read the [migration reference](migration-v6-to-v7.md).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |