@velum-labs/routekit-gateway 0.9.3 → 0.9.4
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/dist/router.js +8 -2
- package/dist/test/responses.test.js +2 -0
- package/package.json +5 -5
package/dist/router.js
CHANGED
|
@@ -340,7 +340,8 @@ export class CatalogBackend {
|
|
|
340
340
|
}
|
|
341
341
|
}, { status: 400 }));
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const requestedSelection = reasoningSelectionOf(body);
|
|
344
|
+
const selection = this.#validatedReasoning(entry, requestedSelection);
|
|
344
345
|
if (typeof selection === "string") {
|
|
345
346
|
return Promise.resolve(Response.json({
|
|
346
347
|
error: {
|
|
@@ -362,7 +363,12 @@ export class CatalogBackend {
|
|
|
362
363
|
if (nativeBody !== null &&
|
|
363
364
|
typeof nativeBody === "object" &&
|
|
364
365
|
!Array.isArray(nativeBody)) {
|
|
365
|
-
|
|
366
|
+
const egressSelection = requestedSelection.mode === "effort" &&
|
|
367
|
+
requestedSelection.effort === "none" &&
|
|
368
|
+
selection.mode === "disabled"
|
|
369
|
+
? { mode: "auto" }
|
|
370
|
+
: selection;
|
|
371
|
+
attachReasoningSelection(nativeBody, egressSelection);
|
|
366
372
|
if (selection.mode === "effort") {
|
|
367
373
|
nativeBody.reasoning_effort =
|
|
368
374
|
selection.effort;
|
|
@@ -5,6 +5,7 @@ import { OpenAiBackend } from "../backend.js";
|
|
|
5
5
|
import { MODEL_CALL_ID_HEADER } from "../provenance.js";
|
|
6
6
|
import { CatalogBackend } from "../router.js";
|
|
7
7
|
import { chatToResponses, customToolNames, openAiSseToResponses, responsesToChat, responsesToolRegistry } from "../adapters/responses.js";
|
|
8
|
+
import { reasoningSelectionOf } from "../adapters/openai-chat-wire.js";
|
|
8
9
|
import { startGateway } from "../server.js";
|
|
9
10
|
function sendJson(res, status, value) {
|
|
10
11
|
res.statusCode = status;
|
|
@@ -701,6 +702,7 @@ test("Codex picker aliases use the canonical catalog and pooled native relay", a
|
|
|
701
702
|
assert.equal(foreign.status, 200);
|
|
702
703
|
assert.deepEqual(sourceCalls, ["claude-sonnet-4-6"]);
|
|
703
704
|
assert.equal(sourceBodies[0]?.reasoning_effort, undefined);
|
|
705
|
+
assert.deepEqual(reasoningSelectionOf(sourceBodies[0]), { mode: "auto" });
|
|
704
706
|
assert.ok(!JSON.stringify(sourceBodies[0]?.messages).includes("based on GPT-5"), "a stale startup-model identity must not cross into a foreign provider");
|
|
705
707
|
const unknown = await fetch(`${gateway.url()}/v1/responses`, {
|
|
706
708
|
method: "POST",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velum-labs/routekit-gateway",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/velum-labs/handoffkit.git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"zod": "4.4.3",
|
|
30
|
-
"@velum-labs/routekit-
|
|
31
|
-
"@velum-labs/routekit-
|
|
32
|
-
"@velum-labs/routekit-
|
|
33
|
-
"@velum-labs/routekit-
|
|
30
|
+
"@velum-labs/routekit-registry": "0.9.4",
|
|
31
|
+
"@velum-labs/routekit-runtime": "0.9.4",
|
|
32
|
+
"@velum-labs/routekit-contracts": "0.9.4",
|
|
33
|
+
"@velum-labs/routekit-tracing": "0.9.4"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"routekit",
|