@warlock.js/ai 4.7.0 → 4.8.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
|
@@ -4,6 +4,12 @@ All notable changes to `@warlock.js/ai` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `@warlock.js/*` packages are released in lockstep — every package shares the same version number, so a version below may list only the changes that affected this package.
|
|
6
6
|
|
|
7
|
+
## 4.8.0 - 2026-07-19
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`reasoning: { effort: "none" }`** — a neutral "run without reasoning, explicitly" level on `ReasoningEffort`; OpenAI emits `reasoning_effort: "none"` so gpt-5 / o-series accept function tools, and budget-based adapters (Anthropic / Bedrock / Google / Ollama) disable thinking.
|
|
12
|
+
|
|
7
13
|
## 4.7.0
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -43,12 +43,20 @@ type ModelCallOptions = {
|
|
|
43
43
|
/**
|
|
44
44
|
* Reasoning / thinking-effort control for reasoning-capable models.
|
|
45
45
|
* `effort` maps to OpenAI `reasoning_effort`; `maxTokens` caps the
|
|
46
|
-
* Anthropic extended-thinking budget.
|
|
47
|
-
*
|
|
46
|
+
* Anthropic extended-thinking budget. `effort: "none"` runs the model
|
|
47
|
+
* **without reasoning, explicitly** — distinct from an absent `effort`
|
|
48
|
+
* (which requests the provider default, i.e. the model may still reason
|
|
49
|
+
* server-side). It is the only mode in which OpenAI's gpt-5 / o-series
|
|
50
|
+
* models accept function tools on the Chat Completions API. Adapters
|
|
51
|
+
* whose `capabilities.reasoning` is absent/false ignore this rather than
|
|
48
52
|
* forwarding unsupported params. Absent = provider default.
|
|
49
53
|
*
|
|
50
54
|
* @example
|
|
51
55
|
* await model.complete(messages, { reasoning: { effort: "high" } });
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // gpt-5 / o-series + tools: turn reasoning off so tools are accepted.
|
|
59
|
+
* await model.complete(messages, { reasoning: { effort: "none" }, tools });
|
|
52
60
|
*/
|
|
53
61
|
reasoning?: {
|
|
54
62
|
effort?: ReasoningEffort;
|
|
@@ -74,8 +82,18 @@ type ModelCallOptions = {
|
|
|
74
82
|
* Reasoning/thinking-effort levels for reasoning-capable models. Maps to
|
|
75
83
|
* the provider-native control (OpenAI `reasoning_effort`); adapters
|
|
76
84
|
* without reasoning support ignore it.
|
|
85
|
+
*
|
|
86
|
+
* `"none"` means **run without reasoning, explicitly** — not "provider
|
|
87
|
+
* default" (that is what an absent `effort` requests). It exists because
|
|
88
|
+
* OpenAI's gpt-5 / o-series models reject function tools on Chat
|
|
89
|
+
* Completions while reasoning is active: the endpoint accepts tools only
|
|
90
|
+
* when `reasoning_effort` is sent as `"none"` (the alternative is the
|
|
91
|
+
* Responses API). The OpenAI adapter forwards `"none"` verbatim so
|
|
92
|
+
* tool-using agents work on those models; budget-based adapters
|
|
93
|
+
* (Anthropic / Google `thinking`, Ollama `think`, Bedrock) read `"none"`
|
|
94
|
+
* as "reasoning off" and disable the thinking channel.
|
|
77
95
|
*/
|
|
78
|
-
type ReasoningEffort = "low" | "medium" | "high";
|
|
96
|
+
type ReasoningEffort = "low" | "medium" | "high" | "none";
|
|
79
97
|
/**
|
|
80
98
|
* Declarative feature flags a `ModelContract` may expose so the agent can
|
|
81
99
|
* short-circuit redundant work when the provider already enforces a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.contract.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/model.contract.ts"],"mappings":";;;;;;;;;;AAqBA;;;;;;;;;;;;KAAY,gBAAA;EACV,WAAA;EACA,SAAA,WAkBA;EAhBA,KAAA,GAAQ,UAAA;
|
|
1
|
+
{"version":3,"file":"model.contract.d.mts","names":[],"sources":["../../../../../../../@warlock.js/ai/src/contracts/model.contract.ts"],"mappings":";;;;;;;;;;AAqBA;;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@@ -15,14 +15,14 @@
|
|
|
15
15
|
"@standard-schema/spec": "^1.0.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@warlock.js/cache": "4.
|
|
19
|
-
"@warlock.js/logger": "4.
|
|
18
|
+
"@warlock.js/cache": "4.8.0",
|
|
19
|
+
"@warlock.js/logger": "4.8.0",
|
|
20
20
|
"langfuse": "*",
|
|
21
21
|
"openai": "*",
|
|
22
22
|
"pg": "*",
|
|
23
23
|
"redis": "*"
|
|
24
24
|
},
|
|
25
|
-
"version": "4.
|
|
25
|
+
"version": "4.8.0",
|
|
26
26
|
"main": "./cjs/index.cjs",
|
|
27
27
|
"module": "./esm/index.mjs",
|
|
28
28
|
"types": "./esm/index.d.mts",
|