@plumbus/ai-decision-openai 0.2.0 → 0.3.0-beta.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 +5 -0
- package/README.md +12 -12
- package/dist/.tsbuildinfo +1 -1
- package/instructions/framework.md +6 -6
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0-beta.0 — core 0.8 beta family
|
|
4
|
+
|
|
5
|
+
- Carries the stable-line functionality below into the coordinated core 0.8 beta family, published under `plumbus-next`; `latest` stays on the 0.7 family. Install matching beta packages together; the core peer is `>=0.8.0-beta.0 <0.9.0`. See the [0.8 upgrade notes](../../docs/upgrading-core-0.8.md).
|
|
6
|
+
- Depends on `@plumbus/ai-decision` `~0.3.0-beta.1`, including the endpoint-path and rounding support required by the adapter.
|
|
7
|
+
|
|
3
8
|
## 0.2.0 — 2026-10-08
|
|
4
9
|
|
|
5
10
|
- Initial optional OpenAI Decisions API (`POST /v1/decisions`) adapter for typed choices, scores, and probabilities (#72), using `@plumbus/ai-decision` 0.2.3 contracts, validation, and the shared bounded HTTP transport. No OpenAI SDK dependency. OpenAI's Decisions API is in public beta; the adapter follows its documentation as of 2026-10-08 and may need a patch if the API changes at general availability.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@plumbus/ai-decision-openai)
|
|
6
6
|
[](https://github.com/plumbus-framework/plumbus/blob/main/LICENSE)
|
|
7
|
-
[](https://www.npmjs.com/package/@plumbus/core)
|
|
8
8
|
|
|
9
9
|
## What is this?
|
|
10
10
|
|
|
@@ -45,32 +45,32 @@ This package gives apps that already use OpenAI a registered decision provider w
|
|
|
45
45
|
|
|
46
46
|
## Status
|
|
47
47
|
|
|
48
|
-
Optional decision provider, version `0.
|
|
48
|
+
Optional decision provider, version `0.3.0-beta.0` (core 0.8 beta family, npm dist-tag `plumbus-next`); required peer `@plumbus/core` **`>=0.8.0-beta.0 <0.9.0`**; Node.js 20.6+. **Runtime floor:** `ctx.ai.decide()` needs `@plumbus/core` **≥ 0.7.3** and `ctx.ai.classify({ provider })` needs **≥ 0.7.4**; use the matching core **0.8 beta** (see [Install](#install)); agent wiring **v19** in this family links these instructions. Depends on `@plumbus/ai-decision` `~0.3.0-beta.1`. Install alone is not enough until the adapter is registered under `decisions.providers`.
|
|
49
49
|
|
|
50
50
|
OpenAI's Decisions API is in public beta. This adapter follows OpenAI's documentation as of
|
|
51
51
|
2026-10-08 and may need a patch release if the API changes when it becomes generally available.
|
|
52
52
|
|
|
53
53
|
Not included: vendor model catalogs, automatic environment provider discovery, and dedicated decision CLI commands.
|
|
54
54
|
|
|
55
|
-
Release notes: [changelog](./CHANGELOG.md) and [
|
|
55
|
+
Release notes: [changelog](./CHANGELOG.md) and [0.8 upgrade notes](../../docs/upgrading-core-0.8.md), and [classification upgrade guide](../../docs/upgrading-classification.md).
|
|
56
56
|
|
|
57
57
|
## Install
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
pnpm add @plumbus/ai-decision-openai
|
|
60
|
+
pnpm add @plumbus/ai-decision-openai@plumbus-next
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Install explicitly with `pnpm add @plumbus/ai-decision-openai`. Provider packages install
|
|
64
|
-
`@plumbus/ai-decision` (
|
|
63
|
+
Install explicitly with `pnpm add @plumbus/ai-decision-openai@plumbus-next`. Provider packages install
|
|
64
|
+
`@plumbus/ai-decision` (`~0.3.0-beta.1`) transitively. There is no dependency on the OpenAI SDK
|
|
65
65
|
or on the other decision providers.
|
|
66
66
|
|
|
67
67
|
Through `ctx.ai`, core checks every result again with its own copy of
|
|
68
|
-
`@plumbus/ai-decision
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
`@plumbus/ai-decision`. The matching beta family shares `~0.3.0-beta.1`, including
|
|
69
|
+
this adapter's rounding support. Do not mix beta and stable packages. On the stable
|
|
70
|
+
0.7 line, use core 0.7.9 and shared contracts 0.2.3+; older shared contracts reject
|
|
71
|
+
OpenAI's rounded answers as `invalid_response` after the call is billed.
|
|
72
72
|
|
|
73
|
-
Peer (copy literally): `@plumbus/core`
|
|
73
|
+
Peer (copy literally): `@plumbus/core` `>=0.8.0-beta.0 <0.9.0`. See `node_modules/@plumbus/core/instructions/peer-dependencies.md`.
|
|
74
74
|
|
|
75
75
|
If agent wiring predates the decision provider instructions, refresh:
|
|
76
76
|
|
|
@@ -187,7 +187,7 @@ Unknown response models return `cost: null`; they are not free. Core records suc
|
|
|
187
187
|
- **Probabilities are not permissions.** A probability is P(true), not a boolean, and a high confidence value is not authorization or proof of correctness. Validate thresholds on the actual task, model, and language.
|
|
188
188
|
- **Retries can repeat cost.** The transport retries HTTP 429, 500, 502, 503, 504, and 529 (two retries by default, honoring `Retry-After`); repeated requests can still incur cost, with no exactly-once guarantee.
|
|
189
189
|
- **Refusals fail the whole call.** `decide()` and `classify()` throw `invalid_response` with `error.refusedQuestions` (for `classify()`, `label_<index>` by position in `labels`); `refusedQuestions` is set only for refusals. Handle it as a business outcome, such as routing to review, not by retrying in a loop.
|
|
190
|
-
- **Core
|
|
190
|
+
- **Core and the adapter must share rounding-aware contracts.** Install the matching beta family (`@plumbus/ai-decision` `~0.3.0-beta.1`); see [Install](#install) for stable-line compatibility.
|
|
191
191
|
- **Public beta.** OpenAI may change the Decisions API at general availability.
|
|
192
192
|
|
|
193
193
|
## Documentation / Agent recipes
|