◑docsParity
vercel/ai★ 27,118TypeScript

vs https://ai-sdk.dev/docs/introduction

The documentation page provided is the high-level introduction, and it references an agent harness abstraction via `HarnessAgent`. The code API surface for `packages/ai` does not export any `HarnessAgent`, `Agent`, or harness-related symbol — the `agent` module is exported via `export * from './agent'` but the introduction's `HarnessAgent` reference cannot be verified against the provided exports. More concretely, the docs' example calls `generateText` with `model: "anthropic/claude-sonnet-5.5"` as a bare string, while the code only exports `generateText` via a wildcard re-export and there is no evidence of string-based model IDs being accepted. Beyond these, the introduction page largely matches what exists (generateText exists, providers exist). Because the scraped docs are only the introduction page, most potential mismatches cannot be grounded.

1 high1 medium2 low
Open issue with all findings ↗
12
Files analyzed
116
API symbols
1
Doc pages
21.6s
Analyzed in
32%
API coverage: Poorly documented
37 of 116 exported symbols mentioned in docs
12 source files inspected · deepseek-chat · Oct 4, 2026

4 mismatches found

01

Docs reference `HarnessAgent` which is not exported from `packages/ai`

packages/ai/src/index.ts

high
In the code
export * from './agent'  // L40
In the docs
The AI SDK also includes a harness abstraction for using established agent harnesses such as Claude Code, Codex, and Pi through `HarnessAgent`.

The documentation advertises `HarnessAgent` as the public API for the harness abstraction, but the `packages/ai` index exports its agent surface via `export * from './agent'` with no `HarnessAgent` symbol visible in the provided API surface. A developer following the intro will attempt to `import { HarnessAgent } from 'ai'` and find no such export (or a differently named one), causing an import error or confusion about the correct symbol.

Suggested fix
Either export `HarnessAgent` (or the actual harness class name) from `packages/ai/src/index.ts`/`./agent`, or update the introduction to reference the correct exported symbol (e.g. the real agent class name) and link to its API reference.
02

Example uses bare string model ID `anthropic/claude-sonnet-5.5` for `generateText`

packages/ai/src/index.ts

medium
In the code
export * from './generate-text'  // L48
In the docs
import { generateText } from "ai";

const { text } = await generateText({
  model: "anthropic/claude-sonnet-5.5",
  prompt: "What is love?",
});

The intro example passes a plain string as `model`. In the AI SDK, `generateText`'s `model` parameter historically requires a LanguageModel instance or gateway provider model (e.g. `gateway('anthropic/...')` or `anthropic('...')`), not a raw string. If string model IDs are not accepted by the current `generateText` signature, copying this snippet fails at runtime/type-check. The provided API surface does not show any string-accepting overload.

Suggested fix
Verify whether `generateText` accepts string model IDs; if not, update the example to use `gateway('anthropic/claude-sonnet-5.5')` (with the `gateway` export shown at index.ts L5) or the provider factory, matching the actual `model` parameter type.
03

`toolSearch` export from `./tool-search/tool-search` is undocumented

packages/ai/src/index.ts

low
In the code
export { toolSearch } from './tool-search/tool-search'  // L58
In the docs
(not documented)

`packages/ai` explicitly exports a top-level `toolSearch` API that receives a dedicated line in the index. The introduction page (the only doc provided) never mentions it, and no linked reference is visible in the scraped content, so developers scanning the docs would not know this export exists.

Suggested fix
Add `toolSearch` to the API reference/index of documented exports, or remove it from the public surface if it is not intended to be public.
04

`uploadSkill` export is undocumented

packages/ai/src/index.ts

low
In the code
export * from './upload-skill'  // L65
In the docs
(not documented)

`packages/ai` re-exports an entire `upload-skill` module (plus `upload-file` at L64, `rerank` at L55, `realtime` at L53, etc.), none of which the introduction page covers. The introduction does not enumerate the Core API surface, so these are omissions rather than contradictions, but `uploadSkill` in particular has no visible documentation reference in the provided material.

Suggested fix
Ensure each wildcard-exported module (upload-file, upload-skill, rerank, transcribe, translate, rerank, realtime, tool-search, etc.) has corresponding API reference documentation, or note them as experimental in the docs.