@jambonz/llm 0.4.5 → 0.5.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.
@@ -92,6 +92,19 @@ type LlmEvent = {
92
92
  finishReason: FinishReason;
93
93
  usage?: Usage;
94
94
  rawReason?: string;
95
+ /**
96
+ * Optional vendor-specific diagnostic data captured from response
97
+ * headers — request id, rate-limit remaining, routing/region, vendor
98
+ * processing time, cache token counts, etc. Each adapter contributes
99
+ * an allowlisted subset; never present unless the adapter populated it.
100
+ *
101
+ * Shape is `Record<string, string | number>` so consumers can render
102
+ * it as a key/value table without per-vendor knowledge. The webapp
103
+ * surfaces this on the per-turn detail view; feature-server forwards
104
+ * it on the agent verb's `turn_end` eventHook payload as
105
+ * `vendor_metadata`.
106
+ */
107
+ vendorMetadata?: Record<string, string | number>;
95
108
  };
96
109
  /** Convenience alias for the fully-accumulated tool-call event shape. */
97
110
  type ToolCallEvent = Extract<LlmEvent, {
@@ -92,6 +92,19 @@ type LlmEvent = {
92
92
  finishReason: FinishReason;
93
93
  usage?: Usage;
94
94
  rawReason?: string;
95
+ /**
96
+ * Optional vendor-specific diagnostic data captured from response
97
+ * headers — request id, rate-limit remaining, routing/region, vendor
98
+ * processing time, cache token counts, etc. Each adapter contributes
99
+ * an allowlisted subset; never present unless the adapter populated it.
100
+ *
101
+ * Shape is `Record<string, string | number>` so consumers can render
102
+ * it as a key/value table without per-vendor knowledge. The webapp
103
+ * surfaces this on the per-turn detail view; feature-server forwards
104
+ * it on the agent verb's `turn_end` eventHook payload as
105
+ * `vendor_metadata`.
106
+ */
107
+ vendorMetadata?: Record<string, string | number>;
95
108
  };
96
109
  /** Convenience alias for the fully-accumulated tool-call event shape. */
97
110
  type ToolCallEvent = Extract<LlmEvent, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/llm",
3
- "version": "0.4.5",
3
+ "version": "0.5.0",
4
4
  "description": "Voice-oriented LLM adapter library — a uniform interface for streaming chat completions from multiple LLM vendors, with first-class support for tool calls, AbortSignal interruption, and lossless history round-tripping.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",