@jaypie/llm 1.2.24 → 1.2.25

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.
@@ -72,6 +72,7 @@ export interface GeminiGenerateContentConfig {
72
72
  };
73
73
  responseMimeType?: string;
74
74
  responseJsonSchema?: JsonObject;
75
+ responseSchema?: JsonObject;
75
76
  temperature?: number;
76
77
  topP?: number;
77
78
  topK?: number;
@@ -2,6 +2,7 @@ export * from "./determineModelProvider.js";
2
2
  export * from "./extractReasoning.js";
3
3
  export * from "./formatOperateInput.js";
4
4
  export * from "./formatOperateMessage.js";
5
+ export * from "./jsonSchemaToOpenApi3.js";
5
6
  export * from "./logger.js";
6
7
  export * from "./maxTurnsFromOptions.js";
7
8
  export * from "./naturalZodSchema.js";
@@ -0,0 +1,10 @@
1
+ import { JsonObject } from "@jaypie/types";
2
+ /**
3
+ * Converts a JSON Schema (Draft 2020-12) object to the OpenAPI 3.0 schema subset
4
+ * that Gemini's `responseSchema` accepts. This constrains generation (not just validation)
5
+ * and avoids the `items`-keyword leakage bug in `responseJsonSchema`.
6
+ *
7
+ * Strips: $schema, additionalProperties, $defs, $ref (inlines where possible), const
8
+ * Preserves: type, properties, required, items, enum, description, nullable
9
+ */
10
+ export declare function jsonSchemaToOpenApi3(schema: JsonObject): JsonObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/llm",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "description": "Large language model utilities",
5
5
  "repository": {
6
6
  "type": "git",