vercel/ai 2be4fb5e..f3787486
base and head as given
- Experimental language-model middleware is now available from Core
- Middleware authors can use Core’s re-exported provider language-model types
- files changed
- 23
- in a component
- 5
- lines in components
- 128
- components
- 3
- public routes changed
- 0
- schema statements
- 0
- new dependencies
- 0
- excluded by role
- 18
Where to focus your review
Language-model middleware
Added- Before
- did not exist
- After
- Models can be wrapped with middleware
Developers can transform parameters and intercept generation or streaming when invoking language models. The wrapper preserves model capabilities and lets callers override provider and model identifiers.
In favour
- In favour: One wrapper applies consistently to generation and streaming calls
- In favour: Transformed parameters reach optional operation wrappers
The model found nothing to weigh against this.
1 new dependency between components — Core → Core Middleware
What else could behave differently
5 components · 7 filesThese components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.
Reached 2
| Component | Symbol | Cited at | Files | Reached by |
|---|---|---|---|---|
| Corepackages/ai/core/ | Added Experimental_LanguageModelV1Middleware1 of 2 changed symbols reaching it | packages/ai/core/middleware/language-model-v1-middleware.ts:8-50 | 1 | none direct · 1 at two stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| Core Middlewarepackages/ai/core/middleware/ | Added Experimental_LanguageModelV1Middleware1 of 2 changed symbols reaching it | packages/ai/core/middleware/language-model-v1-middleware.ts:8-50 | 2 | 2 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
Held back 3
| Component | Files | Reached by | Resolution |
|---|---|---|---|
| packages/ai/streams/ | 1 | none direct · 1 at three steps | precise |
| packages/ai/core/generate-text/ | 2 | none direct · 2 at four steps | precise |
| packages/ai/rsc/stream-ui/ | 1 | none direct · 1 at four steps | precise |
Statements 2
Experimental_LanguageModelV1Middleware was added and reached 1 file in Core. 1Experimental_LanguageModelV1Middleware was added and reached 2 files in Core Middleware. 217 reached files belong to no component — tests, docs and config.
Routes, schema, dependencies
No public URL, no migration and no new package.
Not stated
- 91 routes were found on files whose role excludes them, so no route is claimed for them.
Inspect components, files and symbols
Component
File
Function
imports what changeddownstream of it, one mark per step
Diff
Analysis scope
1370 → 3- files at head1,370
- components47
- changed by this change3
Where the new files landed
3 new files| New file | Belongs to | Used by | Calls | Serves |
|---|---|---|---|---|
| packages/ai/core/middleware/3 new files | Core Middlewarenew territory | Core | nothing outside its own component | — |
15 added files carry no component — 10 example, 4 docs, 1 test.
23 files changed, 10 claims stated. 5 components reached in total.