@jaypie/llm 1.2.16 → 1.2.18

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.
@@ -26,6 +26,12 @@ export declare class OpenAiAdapter extends BaseProviderAdapter {
26
26
  responseToHistoryItems(response: unknown): LlmHistory;
27
27
  classifyError(error: unknown): ClassifiedError;
28
28
  isComplete(response: unknown): boolean;
29
+ /**
30
+ * Sanitize history items for the OpenAI Responses API.
31
+ * Strips fields not accepted by specific item types (e.g., `name` on
32
+ * function_call_output items) to prevent 400 "Unknown parameter" errors.
33
+ */
34
+ private sanitizeInputItems;
29
35
  private hasToolCalls;
30
36
  private extractContent;
31
37
  }
@@ -16,6 +16,8 @@ export interface LlmStreamChunkToolCall {
16
16
  id: string;
17
17
  name: string;
18
18
  arguments: string;
19
+ /** Provider-specific metadata preserved through tool-call roundtrip */
20
+ metadata?: Record<string, unknown>;
19
21
  };
20
22
  }
21
23
  export interface LlmStreamChunkToolResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/llm",
3
- "version": "1.2.16",
3
+ "version": "1.2.18",
4
4
  "description": "Large language model utilities",
5
5
  "repository": {
6
6
  "type": "git",