@llmops/sdk 0.6.0 → 0.6.1-beta.1

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/index.cjs CHANGED
@@ -25,22 +25,22 @@ const createLLMOps = (config) => {
25
25
  const request = new Request(input, init);
26
26
  const url = new URL(request.url);
27
27
  if (basePath && basePath !== "/" && url.pathname.startsWith(basePath)) url.pathname = url.pathname.slice(basePath.length) || "/";
28
+ const headers = new Headers(request.headers);
29
+ headers.set(__llmops_core.LLMOPS_INTERNAL_HEADER, "1");
28
30
  if (getTraceContext) {
29
31
  const ctx = getTraceContext();
30
32
  if (ctx) {
31
- const headers = new Headers(request.headers);
32
33
  if (ctx.traceId) headers.set(__llmops_core.LLMOPS_TRACE_ID_HEADER, ctx.traceId);
33
34
  if (ctx.traceName) headers.set(__llmops_core.LLMOPS_TRACE_NAME_HEADER, ctx.traceName);
34
35
  if (ctx.spanName) headers.set(__llmops_core.LLMOPS_SPAN_NAME_HEADER, ctx.spanName);
35
- return handler(new Request(url.toString(), {
36
- method: request.method,
37
- headers,
38
- body: request.body,
39
- duplex: "half"
40
- }));
41
36
  }
42
37
  }
43
- return handler(new Request(url.toString(), request));
38
+ return handler(new Request(url.toString(), {
39
+ method: request.method,
40
+ headers,
41
+ body: request.body,
42
+ duplex: "half"
43
+ }));
44
44
  };
45
45
  };
46
46
  return {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as createLLMOpsMiddleware } from "./express-ClEIbLM9.mjs";
2
2
  import { t as createLLMOpsAgentsExporter } from "./agents-exporter-BorGCb93.mjs";
3
- import { LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER } from "@llmops/core";
3
+ import { LLMOPS_INTERNAL_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER } from "@llmops/core";
4
4
  import { createApp } from "@llmops/app";
5
5
 
6
6
  //#region src/lib/auth/client.ts
@@ -25,22 +25,22 @@ const createLLMOps = (config) => {
25
25
  const request = new Request(input, init);
26
26
  const url = new URL(request.url);
27
27
  if (basePath && basePath !== "/" && url.pathname.startsWith(basePath)) url.pathname = url.pathname.slice(basePath.length) || "/";
28
+ const headers = new Headers(request.headers);
29
+ headers.set(LLMOPS_INTERNAL_HEADER, "1");
28
30
  if (getTraceContext) {
29
31
  const ctx = getTraceContext();
30
32
  if (ctx) {
31
- const headers = new Headers(request.headers);
32
33
  if (ctx.traceId) headers.set(LLMOPS_TRACE_ID_HEADER, ctx.traceId);
33
34
  if (ctx.traceName) headers.set(LLMOPS_TRACE_NAME_HEADER, ctx.traceName);
34
35
  if (ctx.spanName) headers.set(LLMOPS_SPAN_NAME_HEADER, ctx.spanName);
35
- return handler(new Request(url.toString(), {
36
- method: request.method,
37
- headers,
38
- body: request.body,
39
- duplex: "half"
40
- }));
41
36
  }
42
37
  }
43
- return handler(new Request(url.toString(), request));
38
+ return handler(new Request(url.toString(), {
39
+ method: request.method,
40
+ headers,
41
+ body: request.body,
42
+ duplex: "half"
43
+ }));
44
44
  };
45
45
  };
46
46
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmops/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-beta.1",
4
4
  "description": "An LLMOps toolkit for TypeScript applications",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -84,8 +84,8 @@
84
84
  "access": "public"
85
85
  },
86
86
  "dependencies": {
87
- "@llmops/app": "^0.6.0",
88
- "@llmops/core": "^0.6.0"
87
+ "@llmops/app": "^0.6.1-beta.1",
88
+ "@llmops/core": "^0.6.1-beta.1"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/express": "^5.0.6",