From 465c762f7494435183a2f88cb262d423bb21a1e3 Mon Sep 17 00:00:00 2001 From: Eden Reich Date: Sun, 27 Apr 2025 00:55:23 +0000 Subject: [PATCH] fix: Update FunctionParameters schema to enforce required properties and adjust ListModelsResponse structure Signed-off-by: Eden Reich --- openapi.yaml | 13 +------------ src/types/generated/index.ts | 9 ++------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index f0e3e2f..1867ba0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -674,18 +674,7 @@ components: documentation about the format. Omitting `parameters` defines a function with an empty parameter list. - properties: - type: - type: string - description: The type of the parameters. Currently, only `object` is supported. - properties: - type: object - description: The properties of the parameters. - required: - type: array - items: - type: string - description: The required properties of the parameters. + additionalProperties: true ChatCompletionToolType: type: string description: The type of the tool. Currently, only `function` is supported. diff --git a/src/types/generated/index.ts b/src/types/generated/index.ts index 51ca143..1936db3 100644 --- a/src/types/generated/index.ts +++ b/src/types/generated/index.ts @@ -213,7 +213,7 @@ export interface components { /** @description Response structure for listing models */ ListModelsResponse: { provider?: components['schemas']['Provider']; - object?: string; + object: string; /** @default [] */ data: components['schemas']['Model'][]; }; @@ -236,12 +236,7 @@ export interface components { /** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. * Omitting `parameters` defines a function with an empty parameter list. */ FunctionParameters: { - /** @description The type of the parameters. Currently, only `object` is supported. */ - type?: string; - /** @description The properties of the parameters. */ - properties?: Record; - /** @description The required properties of the parameters. */ - required?: string[]; + [key: string]: unknown; }; /** * @description The type of the tool. Currently, only `function` is supported.