@velum-labs/routekit-daemon 1.0.7 → 1.0.9

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.
@@ -167,6 +167,7 @@ export function callInspection(modelCall) {
167
167
  const principalLabel = string(principal?.label);
168
168
  const nativeModel = string(attribution?.native_model);
169
169
  const requestedModel = string(metadata?.requested_model);
170
+ const stopReason = string(metadata?.stop_reason);
170
171
  const compositionalRouting = compositionalRoutingInspection(attribution?.compositional_routing);
171
172
  const evalAttribution = record(attribution?.eval);
172
173
  const evalRole = string(evalAttribution?.role);
@@ -179,6 +180,7 @@ export function callInspection(modelCall) {
179
180
  return {
180
181
  callId: modelCall.call_id,
181
182
  status: modelCall.status,
183
+ ...(stopReason !== undefined ? { stopReason } : {}),
182
184
  ...(requestedModel !== undefined ? { requestedModel } : {}),
183
185
  effectiveModel,
184
186
  ...(nativeModel !== undefined ? { nativeModel } : {}),
@@ -158,6 +158,20 @@ test("call inspection exposes attribution while dropping sensitive metadata", ()
158
158
  assert.doesNotMatch(JSON.stringify(inspection), /secret\/account/);
159
159
  assert.equal("messages" in inspection, false);
160
160
  });
161
+ test("call inspection preserves a truncation stop reason", () => {
162
+ const call = modelCall("model_call_truncated");
163
+ const inspection = callInspection({
164
+ ...call,
165
+ status: "failed",
166
+ error: { kind: "provider_error", retryable: false },
167
+ metadata: {
168
+ ...call.metadata,
169
+ stop_reason: "max_output_tokens"
170
+ }
171
+ });
172
+ assert.equal(inspection?.status, "failed");
173
+ assert.equal(inspection?.stopReason, "max_output_tokens");
174
+ });
161
175
  test("call attribution store evicts by capacity and expiry", () => {
162
176
  let now = 0;
163
177
  const store = new CallAttributionStore({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@velum-labs/routekit-daemon",
3
3
  "private": false,
4
- "version": "1.0.7",
4
+ "version": "1.0.9",
5
5
  "description": "Singleton RouteKit control daemon and stable model gateway.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -44,15 +44,15 @@
44
44
  "effect": "4.0.0-rc.108",
45
45
  "posthog-node": "5.46.1",
46
46
  "yaml": "2.9.0",
47
- "@velum-labs/routekit-accounts": "1.0.7",
48
- "@velum-labs/routekit-config": "1.0.7",
49
- "@velum-labs/routekit-control": "1.0.7",
50
- "@velum-labs/routekit-eval-contracts": "1.0.7",
51
- "@velum-labs/routekit-eval-store": "1.0.7",
52
- "@velum-labs/routekit-gateway": "1.0.7",
53
- "@velum-labs/routekit-registry": "1.0.7",
54
- "@velum-labs/routekit-runtime": "1.0.7",
55
- "@velum-labs/routekit-telemetry-core": "1.0.7"
47
+ "@velum-labs/routekit-accounts": "1.0.9",
48
+ "@velum-labs/routekit-config": "1.0.9",
49
+ "@velum-labs/routekit-control": "1.0.9",
50
+ "@velum-labs/routekit-eval-contracts": "1.0.9",
51
+ "@velum-labs/routekit-eval-store": "1.0.9",
52
+ "@velum-labs/routekit-gateway": "1.0.9",
53
+ "@velum-labs/routekit-registry": "1.0.9",
54
+ "@velum-labs/routekit-runtime": "1.0.9",
55
+ "@velum-labs/routekit-telemetry-core": "1.0.9"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -b",