ai-sdk-ollama 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 514304a: Support two AI SDK v7 provider-spec features that were previously unimplemented:
8
+
9
+ - `includeRawChunks`: `doStream` now emits `{ type: 'raw', rawValue }` parts carrying each unmodified Ollama chunk when the option is set (off by default).
10
+ - `usage.raw`: `doGenerate`/`doStream` now expose Ollama's own counters and timings (`prompt_eval_count`, `eval_count`, `total_duration`, `load_duration`, `prompt_eval_duration`, `eval_duration`) on `usage.raw`.
11
+
12
+ The streaming `finish` part now also carries the same `providerMetadata` that `doGenerate` already returned.
13
+
14
+ Internally, the two files that had grown past 1000 lines were split into focused modules with no behaviour change. `models/chat-language-model.ts` keeps the `LanguageModelV4` implementation and reliability orchestration, with request mapping in `models/chat-request.ts`, result assembly in `models/chat-result.ts`, and the streaming state machine in `models/chat-stream.ts`. `utils/object-generation-reliability.ts` keeps recovery orchestration, with JSON text repair in `utils/json-text-repair.ts` and schema fallback/coercion in `utils/json-schema-coercion.ts`. `enhancedRepairText`, `cascadeRepairText` and the `RepairTextFunction` type are still exported from the package root; only the internal module paths changed.
15
+
3
16
  ## 4.0.0
4
17
 
5
18
  ### Major Changes