@ai-sdk/harness-codex 1.0.175 → 1.0.176
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 +19 -0
- package/dist/bridge/index.mjs +15 -7
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/bridge/index.ts +10 -20
- package/src/codex-harness.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/harness-codex
|
|
2
2
|
|
|
3
|
+
## 1.0.176
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 95c1307: fix(harness-codex): honor caller-provided `codexConfig.model_reasoning_summary` instead of overwriting it with the adapter default
|
|
8
|
+
- Updated dependencies [36802d4]
|
|
9
|
+
- Updated dependencies [e0143b0]
|
|
10
|
+
- Updated dependencies [934100c]
|
|
11
|
+
- Updated dependencies [892af4d]
|
|
12
|
+
- Updated dependencies [3bf70f8]
|
|
13
|
+
- Updated dependencies [89aff56]
|
|
14
|
+
- Updated dependencies [41465fd]
|
|
15
|
+
- Updated dependencies [9754014]
|
|
16
|
+
- Updated dependencies [4bb73b0]
|
|
17
|
+
- Updated dependencies [2e44144]
|
|
18
|
+
- @ai-sdk/provider@4.0.36
|
|
19
|
+
- @ai-sdk/harness@1.0.174
|
|
20
|
+
- @ai-sdk/provider-utils@5.0.75
|
|
21
|
+
|
|
3
22
|
## 1.0.175
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/bridge/index.mjs
CHANGED
|
@@ -221,6 +221,7 @@ async function runBridge(options) {
|
|
|
221
221
|
* between turns. A new `start` fences on this so turns never overlap.
|
|
222
222
|
*/
|
|
223
223
|
let activeTurn;
|
|
224
|
+
let lastStartId;
|
|
224
225
|
let debugConfig;
|
|
225
226
|
let consoleCaptureInstalled = false;
|
|
226
227
|
const envDebugEnabled = ENV_TRUTHY.has((env.HARNESS_DEBUG ?? "").toLowerCase());
|
|
@@ -364,6 +365,11 @@ async function runBridge(options) {
|
|
|
364
365
|
const handleInbound = async (msg, ws) => {
|
|
365
366
|
switch (msg.type) {
|
|
366
367
|
case "start": {
|
|
368
|
+
const startId = msg.startId;
|
|
369
|
+
if (startId != null) {
|
|
370
|
+
if (startId === lastStartId) return;
|
|
371
|
+
lastStartId = startId;
|
|
372
|
+
}
|
|
367
373
|
for (;;) {
|
|
368
374
|
const pendingTurn = activeTurn;
|
|
369
375
|
if (pendingTurn == null) break;
|
|
@@ -581,7 +587,10 @@ async function runBridge(options) {
|
|
|
581
587
|
type: "bridge-hello",
|
|
582
588
|
state: currentTurnState,
|
|
583
589
|
lastSeq: seqCounter,
|
|
584
|
-
capabilities: {
|
|
590
|
+
capabilities: {
|
|
591
|
+
idempotentStart: true,
|
|
592
|
+
experimental_userMessageResponses: true
|
|
593
|
+
}
|
|
585
594
|
});
|
|
586
595
|
ws.on("message", (raw) => {
|
|
587
596
|
let parsed;
|
|
@@ -2172,17 +2181,16 @@ async function runTurn(start, turn) {
|
|
|
2172
2181
|
});
|
|
2173
2182
|
}
|
|
2174
2183
|
function resolveCodexRuntime({ start }) {
|
|
2175
|
-
const codexConfig = {
|
|
2176
|
-
...start.codexConfig,
|
|
2177
|
-
developer_instructions: [start.instructions, "Only respond with your `final` message once you have fully addressed the user request."].filter((instruction) => Boolean(instruction)).join("\n\n"),
|
|
2178
|
-
model_reasoning_summary: "detailed"
|
|
2179
|
-
};
|
|
2180
2184
|
const gatewayBaseUrl = env.AI_GATEWAY_BASE_URL;
|
|
2181
2185
|
const hasGatewayAuth = Boolean(env.AI_GATEWAY_API_KEY || gatewayBaseUrl);
|
|
2182
2186
|
if (hasGatewayAuth && !gatewayBaseUrl) throw new Error("AI Gateway auth was selected but AI_GATEWAY_BASE_URL is missing from the Codex bridge environment.");
|
|
2183
2187
|
const apiBaseUrl = hasGatewayAuth ? gatewayBaseUrl : env.OPENAI_BASE_URL ?? (env.CODEX_API_KEY != null || start.headers != null ? "https://api.openai.com/v1" : void 0);
|
|
2184
2188
|
const codexModel = start.model && hasGatewayAuth && !start.model.includes("/") ? `openai/${start.model}` : start.model;
|
|
2185
|
-
|
|
2189
|
+
const codexConfig = {
|
|
2190
|
+
model_reasoning_summary: "detailed",
|
|
2191
|
+
...start.codexConfig,
|
|
2192
|
+
developer_instructions: [start.instructions, "Only respond with your `final` message once you have fully addressed the user request."].filter((instruction) => Boolean(instruction)).join("\n\n")
|
|
2193
|
+
};
|
|
2186
2194
|
if (apiBaseUrl) {
|
|
2187
2195
|
codexConfig.preferred_auth_method = "apikey";
|
|
2188
2196
|
codexConfig.model_provider = "agent_bridge_openai";
|