@warlock.js/ai-openai 5.25.0 → 5.27.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 +22 -0
- package/cjs/index.cjs +1043 -272
- package/cjs/index.cjs.map +1 -1
- package/esm/config.type.d.mts +36 -2
- package/esm/config.type.d.mts.map +1 -1
- package/esm/known-reasoning-models.mjs +4 -2
- package/esm/known-reasoning-models.mjs.map +1 -1
- package/esm/known-vision-models.mjs +3 -0
- package/esm/known-vision-models.mjs.map +1 -1
- package/esm/model.mjs +52 -99
- package/esm/model.mjs.map +1 -1
- package/esm/responses-model.mjs +329 -0
- package/esm/responses-model.mjs.map +1 -0
- package/esm/sdk.d.mts +7 -0
- package/esm/sdk.d.mts.map +1 -1
- package/esm/sdk.mjs +21 -1
- package/esm/sdk.mjs.map +1 -1
- package/esm/utils/build-usage.mjs +23 -0
- package/esm/utils/build-usage.mjs.map +1 -0
- package/esm/utils/index.mjs +9 -1
- package/esm/utils/map-responses-status.mjs +54 -0
- package/esm/utils/map-responses-status.mjs.map +1 -0
- package/esm/utils/prompt-cache-params.mjs +17 -0
- package/esm/utils/prompt-cache-params.mjs.map +1 -0
- package/esm/utils/reasoning-effort.mjs +35 -0
- package/esm/utils/reasoning-effort.mjs.map +1 -0
- package/esm/utils/reasoning-replay.mjs +85 -0
- package/esm/utils/reasoning-replay.mjs.map +1 -0
- package/esm/utils/structured-output.mjs +84 -0
- package/esm/utils/structured-output.mjs.map +1 -0
- package/esm/utils/to-openai-messages.mjs +49 -5
- package/esm/utils/to-openai-messages.mjs.map +1 -1
- package/esm/utils/to-openai-tools.mjs +3 -3
- package/esm/utils/to-openai-tools.mjs.map +1 -1
- package/esm/utils/to-responses-input.mjs +112 -0
- package/esm/utils/to-responses-input.mjs.map +1 -0
- package/esm/utils/to-responses-tools.mjs +51 -0
- package/esm/utils/to-responses-tools.mjs.map +1 -0
- package/esm/utils/wrap-openai-error.mjs +7 -2
- package/esm/utils/wrap-openai-error.mjs.map +1 -1
- package/llms-full.txt +43 -4
- package/llms.txt +1 -1
- package/package.json +4 -4
- package/skills/setup-openai/SKILL.md +43 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to `@warlock.js/ai-openai` 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
|
+
## 5.27.0 - 2026-10-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Responses API (opt-in).** `sdk.model({ name, api: "responses" })` routes an OpenAI model through `/v1/responses`, so a reasoning model (gpt-5 family, o-series, gpt-6) can use function tools with reasoning on. Chat Completions stays the default and is unchanged. Under `api: "responses"` reasoning uses the provider default even when tools are attached (more reasoning tokens and latency than the Chat path, which forces reasoning off with tools); the system prompt is sent as `instructions`; requests use `store: false`; `pdf`/`audio` inputs are off. Only the `openai` provider accepts it: the DeepSeek, Groq, xAI and Mistral adapters reject `api: "responses"`.
|
|
12
|
+
- **Responses streaming.** `stream()` works under `api: "responses"` and yields the same chunks as the Chat path: text deltas (refusal text included), then the tool calls, then one `done` with the finish reason and usage. A `response.failed` or `error` event mid-stream throws the same typed error as a failed request.
|
|
13
|
+
- **Reasoning replay across tool turns.** Every Responses request asks for `include: ["reasoning.encrypted_content"]`. The reasoning items of a tool-calling turn are saved on the first tool call (`providerMetadata.openaiResponses = { model, reasoningItems }`) and sent back before that turn's function calls on the next request, so the model keeps its own reasoning while it works through tools, with nothing stored on OpenAI's side. Replay is skipped when the model changed, and turns without a tool call are not replayed. **The encrypted reasoning items are stored with the conversation history** (memory or session store), so expect larger stored messages; there is no size cap. The Chat path and the other adapters ignore the key.
|
|
14
|
+
|
|
15
|
+
## 5.26.0 - 2026-09-30
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `reasoning.effort` now accepts every OpenAI SDK 7.23.0 `reasoning_effort` level: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
|
|
20
|
+
- OpenAI-labelled Chat Completions models now support explicit prompt caching: `promptCacheKey`, `promptCacheRetention`, and `cacheControl.breakpoints` map to the OpenAI SDK's request fields. These fields are deliberately omitted for OpenAI-compatible wrapper providers.
|
|
21
|
+
- Capability inference now recognizes the GPT-6 family as reasoning- and vision-capable, plus GPT-5 and o4 as vision-capable.
|
|
22
|
+
- **Behaviour change:** requests send `max_completion_tokens` and never the legacy `max_tokens`, which current OpenAI models (the gpt-5 family and later) reject with `400 unsupported_parameter`. `maxTokens` in config and call options is unchanged.
|
|
23
|
+
- Reasoning-capable models (o-series, gpt-5 family) no longer receive `temperature`; they accept only the default value and reject any other.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- A provider error now keeps the parameter OpenAI rejected (`context.param`) and the request id (`context.requestId`, read from the SDK's `requestID`), next to the status and code.
|
|
28
|
+
|
|
7
29
|
## 5.25.0 - 2026-09-28
|
|
8
30
|
|
|
9
31
|
### Changed
|