diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0689fd9..7793034 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: - docChecksum: f377d4ed11037a871b8c253c1d75f132 + docChecksum: 9660e86ea28560265285c6e3773bd061 docVersion: 1.0.0 - speakeasyVersion: 1.653.1 - generationVersion: 2.748.0 - releaseVersion: 0.1.9 - configChecksum: 7a9a57baedc1855f3964d13bf5247b93 + speakeasyVersion: 1.653.2 + generationVersion: 2.748.4 + releaseVersion: 0.1.10 + configChecksum: 0b94228b2cc806ed198c6d48069286d9 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 7c58d6a..0bd7d02 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 0.1.9 + version: 0.1.10 acceptHeaderEnum: false additionalDependencies: dependencies: {} diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 9b4f784..fe757f1 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -223,7 +223,7 @@ components: example: type: summary_text text: Analyzed the problem using first principles - ResponsesOutputItemReasoning: + OutputItemReasoning: type: object properties: type: @@ -256,8 +256,19 @@ components: - in_progress required: - type + - id - summary - description: An output item containing reasoning + example: + type: reasoning + id: reasoning-abc123 + summary: + - type: summary_text + text: Analyzed the problem using first principles + ResponsesOutputItemReasoning: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - type: object + properties: {} example: id: reasoning-123 type: reasoning @@ -268,6 +279,7 @@ components: content: - type: reasoning_text text: First, we analyze the problem... + description: An output item containing reasoning OutputItemFunctionCall: type: object properties: @@ -655,6 +667,7 @@ components: format: mp3 ToolCallStatus: type: string + nullable: true enum: - in_progress - completed @@ -752,6 +765,7 @@ components: - function_call_output id: type: string + nullable: true call_id: type: string output: @@ -760,7 +774,6 @@ components: $ref: '#/components/schemas/ToolCallStatus' required: - type - - id - call_id - output - type: object @@ -1159,47 +1172,6 @@ components: format: type: text verbosity: medium - OutputItemReasoning: - type: object - properties: - type: - type: string - enum: - - reasoning - id: - type: string - content: - type: array - items: - $ref: '#/components/schemas/ReasoningTextContent' - summary: - type: array - items: - $ref: '#/components/schemas/ReasoningSummaryText' - encrypted_content: - type: string - nullable: true - status: - anyOf: - - type: string - enum: - - completed - - type: string - enum: - - incomplete - - type: string - enum: - - in_progress - required: - - type - - id - - summary - example: - type: reasoning - id: reasoning-abc123 - summary: - - type: summary_text - text: Analyzed the problem using first principles OpenAIResponsesNonStreamingResponse: type: object properties: @@ -3378,6 +3350,7 @@ components: - function_call_output id: type: string + nullable: true call_id: type: string output: @@ -3386,7 +3359,6 @@ components: $ref: '#/components/schemas/ToolCallStatus' required: - type - - id - call_id - output description: The output from a function call execution diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 04e9b08..eff5ca3 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -224,7 +224,7 @@ components: example: type: summary_text text: Analyzed the problem using first principles - ResponsesOutputItemReasoning: + OutputItemReasoning: type: object properties: type: @@ -257,8 +257,19 @@ components: - in_progress required: - type + - id - summary - description: An output item containing reasoning + example: + type: reasoning + id: reasoning-abc123 + summary: + - type: summary_text + text: Analyzed the problem using first principles + ResponsesOutputItemReasoning: + allOf: + - $ref: '#/components/schemas/OutputItemReasoning' + - type: object + properties: {} example: id: reasoning-123 type: reasoning @@ -269,6 +280,7 @@ components: content: - type: reasoning_text text: First, we analyze the problem... + description: An output item containing reasoning OutputItemFunctionCall: type: object properties: @@ -662,6 +674,7 @@ components: format: mp3 ToolCallStatus: type: string + nullable: true enum: - in_progress - completed @@ -760,6 +773,7 @@ components: - function_call_output id: type: string + nullable: true call_id: type: string output: @@ -768,7 +782,6 @@ components: $ref: '#/components/schemas/ToolCallStatus' required: - type - - id - call_id - output - type: object @@ -1173,47 +1186,6 @@ components: format: type: text verbosity: medium - OutputItemReasoning: - type: object - properties: - type: - type: string - enum: - - reasoning - id: - type: string - content: - type: array - items: - $ref: '#/components/schemas/ReasoningTextContent' - summary: - type: array - items: - $ref: '#/components/schemas/ReasoningSummaryText' - encrypted_content: - type: string - nullable: true - status: - anyOf: - - type: string - enum: - - completed - - type: string - enum: - - incomplete - - type: string - enum: - - in_progress - required: - - type - - id - - summary - example: - type: reasoning - id: reasoning-abc123 - summary: - - type: summary_text - text: Analyzed the problem using first principles OpenAIResponsesNonStreamingResponse: type: object properties: @@ -3394,6 +3366,7 @@ components: - function_call_output id: type: string + nullable: true call_id: type: string output: @@ -3402,7 +3375,6 @@ components: $ref: '#/components/schemas/ToolCallStatus' required: - type - - id - call_id - output description: The output from a function call execution diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f504a5b..ac0404b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.653.1 +speakeasyVersion: 1.653.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:505db4e808f899250c7fa8a9021fef1356f2e50b85cdd1bb0c9c8fb0c18ee70a - sourceBlobDigest: sha256:e9dacfcb19b3a3b855457d17b2fd129d604190b556d6510d103bcacd1da7010c + sourceRevisionDigest: sha256:41a987c6a80cdcf2865e59e7a511706f801f6b5abc2713de2b75558aa812b0b1 + sourceBlobDigest: sha256:f732c29c7257afac986bc8f9076fbe3d190da15d1d8674ee191e7b83e611ecf3 tags: - latest - staging @@ -12,10 +12,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:505db4e808f899250c7fa8a9021fef1356f2e50b85cdd1bb0c9c8fb0c18ee70a - sourceBlobDigest: sha256:e9dacfcb19b3a3b855457d17b2fd129d604190b556d6510d103bcacd1da7010c + sourceRevisionDigest: sha256:41a987c6a80cdcf2865e59e7a511706f801f6b5abc2713de2b75558aa812b0b1 + sourceBlobDigest: sha256:f732c29c7257afac986bc8f9076fbe3d190da15d1d8674ee191e7b83e611ecf3 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:a742a45e54f5e7d04f4128327c7558221fc95b7e012710a526ed8ec76b45f5ef + codeSamplesRevisionDigest: sha256:0f9c73bf63e810bfa351faeb47ca62dbc21680abe1d4d1d1342d59738cccbb53 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/models/openairesponsesinputfunctioncalloutput.md b/docs/models/openairesponsesinputfunctioncalloutput.md index dfe990f..1e95ba5 100644 --- a/docs/models/openairesponsesinputfunctioncalloutput.md +++ b/docs/models/openairesponsesinputfunctioncalloutput.md @@ -7,7 +7,6 @@ import { OpenAIResponsesInputFunctionCallOutput } from "@openrouter/sdk/models"; let value: OpenAIResponsesInputFunctionCallOutput = { type: "function_call_output", - id: "", callId: "", output: "", }; @@ -18,7 +17,7 @@ let value: OpenAIResponsesInputFunctionCallOutput = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `type` | [models.OpenAIResponsesInputTypeFunctionCallOutput](../models/openairesponsesinputtypefunctioncalloutput.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | | `callId` | *string* | :heavy_check_mark: | N/A | | | `output` | *string* | :heavy_check_mark: | N/A | | | `status` | [models.ToolCallStatus](../models/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/models/openairesponsesinputunion1.md b/docs/models/openairesponsesinputunion1.md index 08e2be4..a47c9db 100644 --- a/docs/models/openairesponsesinputunion1.md +++ b/docs/models/openairesponsesinputunion1.md @@ -32,7 +32,6 @@ const value: models.OpenAIResponsesInputMessage2 = { ```typescript const value: models.OpenAIResponsesInputFunctionCallOutput = { type: "function_call_output", - id: "", callId: "", output: "", }; diff --git a/docs/models/openresponsesfunctioncalloutput.md b/docs/models/openresponsesfunctioncalloutput.md index 64e8c63..a4ce7a7 100644 --- a/docs/models/openresponsesfunctioncalloutput.md +++ b/docs/models/openresponsesfunctioncalloutput.md @@ -9,7 +9,6 @@ import { OpenResponsesFunctionCallOutput } from "@openrouter/sdk/models"; let value: OpenResponsesFunctionCallOutput = { type: "function_call_output", - id: "output-abc123", callId: "call-abc123", output: "{\"temperature\":72,\"conditions\":\"sunny\"}", }; @@ -20,7 +19,7 @@ let value: OpenResponsesFunctionCallOutput = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `type` | [models.OpenResponsesFunctionCallOutputType](../models/openresponsesfunctioncalloutputtype.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | | `callId` | *string* | :heavy_check_mark: | N/A | | | `output` | *string* | :heavy_check_mark: | N/A | | | `status` | [models.ToolCallStatus](../models/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/models/openresponsesinput1.md b/docs/models/openresponsesinput1.md index 7ec6d5f..69c3aef 100644 --- a/docs/models/openresponsesinput1.md +++ b/docs/models/openresponsesinput1.md @@ -58,7 +58,6 @@ const value: models.OpenResponsesFunctionToolCall = { ```typescript const value: models.OpenResponsesFunctionCallOutput = { type: "function_call_output", - id: "output-abc123", callId: "call-abc123", output: "{\"temperature\":72,\"conditions\":\"sunny\"}", }; @@ -85,10 +84,11 @@ const value: models.ResponsesOutputMessage = { ```typescript const value: models.ResponsesOutputItemReasoning = { type: "reasoning", + id: "reasoning-abc123", summary: [ { type: "summary_text", - text: "Analyzed the problem and found the optimal solution.", + text: "Analyzed the problem using first principles", }, ], }; diff --git a/docs/models/responsesoutputitem.md b/docs/models/responsesoutputitem.md index 933bd1a..56976cb 100644 --- a/docs/models/responsesoutputitem.md +++ b/docs/models/responsesoutputitem.md @@ -26,10 +26,11 @@ const value: models.ResponsesOutputMessage = { ```typescript const value: models.ResponsesOutputItemReasoning = { type: "reasoning", + id: "reasoning-abc123", summary: [ { type: "summary_text", - text: "Analyzed the problem and found the optimal solution.", + text: "Analyzed the problem using first principles", }, ], }; diff --git a/docs/models/responsesoutputitemreasoning.md b/docs/models/responsesoutputitemreasoning.md index ebc7a2f..21f77c8 100644 --- a/docs/models/responsesoutputitemreasoning.md +++ b/docs/models/responsesoutputitemreasoning.md @@ -9,10 +9,11 @@ import { ResponsesOutputItemReasoning } from "@openrouter/sdk/models"; let value: ResponsesOutputItemReasoning = { type: "reasoning", + id: "reasoning-abc123", summary: [ { type: "summary_text", - text: "Analyzed the problem and found the optimal solution.", + text: "Analyzed the problem using first principles", }, ], }; @@ -23,7 +24,7 @@ let value: ResponsesOutputItemReasoning = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `type` | [models.ResponsesOutputItemReasoningType](../models/responsesoutputitemreasoningtype.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | | `content` | [models.ReasoningTextContent](../models/reasoningtextcontent.md)[] | :heavy_minus_sign: | N/A | | `summary` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md)[] | :heavy_check_mark: | N/A | | `encryptedContent` | *string* | :heavy_minus_sign: | N/A | diff --git a/examples/nextjs-example/package-lock.json b/examples/nextjs-example/package-lock.json index 496c447..3d475a8 100644 --- a/examples/nextjs-example/package-lock.json +++ b/examples/nextjs-example/package-lock.json @@ -36,7 +36,7 @@ }, "../..": { "name": "@openrouter/sdk", - "version": "0.1.9", + "version": "0.1.10", "license": "Apache-2.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" diff --git a/jsr.json b/jsr.json index 4392f76..8ce3987 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.1.9", + "version": "0.1.10", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 75004de..39aee2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openrouter/sdk", - "version": "0.1.9", + "version": "0.1.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@openrouter/sdk", - "version": "0.1.9", + "version": "0.1.10", "license": "Apache-2.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" diff --git a/package.json b/package.json index 7ad3ada..360bfe4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.1.9", + "version": "0.1.10", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ diff --git a/src/lib/config.ts b/src/lib/config.ts index 036a192..67ba46f 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.1.9", - genVersion: "2.748.0", - userAgent: "speakeasy-sdk/typescript 0.1.9 2.748.0 1.0.0 @openrouter/sdk", + sdkVersion: "0.1.10", + genVersion: "2.748.4", + userAgent: "speakeasy-sdk/typescript 0.1.10 2.748.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/openairesponsesinputunion.ts b/src/models/openairesponsesinputunion.ts index 2969b23..388f13d 100644 --- a/src/models/openairesponsesinputunion.ts +++ b/src/models/openairesponsesinputunion.ts @@ -47,7 +47,7 @@ export type OpenAIResponsesInputFunctionCall = { name: string; arguments: string; id?: string | undefined; - status?: ToolCallStatus | undefined; + status?: ToolCallStatus | null | undefined; }; export const OpenAIResponsesInputTypeFunctionCallOutput = { @@ -59,10 +59,10 @@ export type OpenAIResponsesInputTypeFunctionCallOutput = ClosedEnum< export type OpenAIResponsesInputFunctionCallOutput = { type: OpenAIResponsesInputTypeFunctionCallOutput; - id: string; + id?: string | null | undefined; callId: string; output: string; - status?: ToolCallStatus | undefined; + status?: ToolCallStatus | null | undefined; }; export const OpenAIResponsesInputTypeMessage2 = { @@ -193,20 +193,20 @@ export type OpenAIResponsesInputMessage1 = { }; export type OpenAIResponsesInputUnion1 = - | OpenAIResponsesInputFunctionCallOutput | OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 + | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1; export type OpenAIResponsesInputUnion = | string | Array< - | OpenAIResponsesInputFunctionCallOutput | OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 + | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1 > @@ -227,7 +227,7 @@ export const OpenAIResponsesInputFunctionCall$inboundSchema: z.ZodType< name: z.string(), arguments: z.string(), id: z.string().optional(), - status: ToolCallStatus$inboundSchema.optional(), + status: z.nullable(ToolCallStatus$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "call_id": "callId", @@ -256,10 +256,10 @@ export const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType< unknown > = z.object({ type: OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema, - id: z.string(), + id: z.nullable(z.string()).optional(), call_id: z.string(), output: z.string(), - status: ToolCallStatus$inboundSchema.optional(), + status: z.nullable(ToolCallStatus$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "call_id": "callId", @@ -543,10 +543,10 @@ export const OpenAIResponsesInputUnion1$inboundSchema: z.ZodType< OpenAIResponsesInputUnion1, unknown > = z.union([ - z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema), z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema), OutputMessage$inboundSchema, z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema), + z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema), OutputItemImageGenerationCall$inboundSchema, z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema), ]); @@ -568,10 +568,10 @@ export const OpenAIResponsesInputUnion$inboundSchema: z.ZodType< > = z.union([ z.string(), z.array(z.union([ - z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema), z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema), OutputMessage$inboundSchema, z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema), + z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema), OutputItemImageGenerationCall$inboundSchema, z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema), ])), diff --git a/src/models/openresponsesfunctioncalloutput.ts b/src/models/openresponsesfunctioncalloutput.ts index 60a6cda..58f5bb1 100644 --- a/src/models/openresponsesfunctioncalloutput.ts +++ b/src/models/openresponsesfunctioncalloutput.ts @@ -22,10 +22,10 @@ export type OpenResponsesFunctionCallOutputType = ClosedEnum< */ export type OpenResponsesFunctionCallOutput = { type: OpenResponsesFunctionCallOutputType; - id: string; + id?: string | null | undefined; callId: string; output: string; - status?: ToolCallStatus | undefined; + status?: ToolCallStatus | null | undefined; }; /** @internal */ @@ -36,10 +36,10 @@ export const OpenResponsesFunctionCallOutputType$outboundSchema: z.ZodEnum< /** @internal */ export type OpenResponsesFunctionCallOutput$Outbound = { type: string; - id: string; + id?: string | null | undefined; call_id: string; output: string; - status?: string | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -48,10 +48,10 @@ export const OpenResponsesFunctionCallOutput$outboundSchema: z.ZodType< OpenResponsesFunctionCallOutput > = z.object({ type: OpenResponsesFunctionCallOutputType$outboundSchema, - id: z.string(), + id: z.nullable(z.string()).optional(), callId: z.string(), output: z.string(), - status: ToolCallStatus$outboundSchema.optional(), + status: z.nullable(ToolCallStatus$outboundSchema).optional(), }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/openresponsesfunctiontoolcall.ts b/src/models/openresponsesfunctiontoolcall.ts index 9a09fb1..e397883 100644 --- a/src/models/openresponsesfunctiontoolcall.ts +++ b/src/models/openresponsesfunctiontoolcall.ts @@ -26,7 +26,7 @@ export type OpenResponsesFunctionToolCall = { name: string; arguments: string; id: string; - status?: ToolCallStatus | undefined; + status?: ToolCallStatus | null | undefined; }; /** @internal */ @@ -41,7 +41,7 @@ export type OpenResponsesFunctionToolCall$Outbound = { name: string; arguments: string; id: string; - status?: string | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -54,7 +54,7 @@ export const OpenResponsesFunctionToolCall$outboundSchema: z.ZodType< name: z.string(), arguments: z.string(), id: z.string(), - status: ToolCallStatus$outboundSchema.optional(), + status: z.nullable(ToolCallStatus$outboundSchema).optional(), }).transform((v) => { return remap$(v, { callId: "call_id", diff --git a/src/models/openresponsesinput.ts b/src/models/openresponsesinput.ts index 6c8c55e..ce9a239 100644 --- a/src/models/openresponsesinput.ts +++ b/src/models/openresponsesinput.ts @@ -61,16 +61,16 @@ import { export type OpenResponsesInput1 = | OpenResponsesFunctionToolCall - | OpenResponsesFunctionCallOutput | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning + | OpenResponsesFunctionCallOutput + | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage - | OpenResponsesInputMessageItem - | ResponsesOutputItemReasoning; + | OpenResponsesInputMessageItem; /** * Input for a response request - can be a string or array of items @@ -79,31 +79,31 @@ export type OpenResponsesInput = | string | Array< | OpenResponsesFunctionToolCall - | OpenResponsesFunctionCallOutput | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning + | OpenResponsesFunctionCallOutput + | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem - | ResponsesOutputItemReasoning >; /** @internal */ export type OpenResponsesInput1$Outbound = | OpenResponsesFunctionToolCall$Outbound - | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound + | OpenResponsesFunctionCallOutput$Outbound + | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound - | OpenResponsesInputMessageItem$Outbound - | ResponsesOutputItemReasoning$Outbound; + | OpenResponsesInputMessageItem$Outbound; /** @internal */ export const OpenResponsesInput1$outboundSchema: z.ZodType< @@ -111,16 +111,16 @@ export const OpenResponsesInput1$outboundSchema: z.ZodType< OpenResponsesInput1 > = z.union([ OpenResponsesFunctionToolCall$outboundSchema, - OpenResponsesFunctionCallOutput$outboundSchema, ResponsesOutputMessage$outboundSchema, ResponsesOutputItemFunctionCall$outboundSchema, ResponsesOutputItemFileSearchCall$outboundSchema, OpenResponsesReasoning$outboundSchema, + OpenResponsesFunctionCallOutput$outboundSchema, + ResponsesOutputItemReasoning$outboundSchema, ResponsesWebSearchCallOutput$outboundSchema, ResponsesImageGenerationCall$outboundSchema, OpenResponsesEasyInputMessage$outboundSchema, OpenResponsesInputMessageItem$outboundSchema, - ResponsesOutputItemReasoning$outboundSchema, ]); export function openResponsesInput1ToJSON( @@ -136,16 +136,16 @@ export type OpenResponsesInput$Outbound = | string | Array< | OpenResponsesFunctionToolCall$Outbound - | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound + | OpenResponsesFunctionCallOutput$Outbound + | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound - | ResponsesOutputItemReasoning$Outbound >; /** @internal */ @@ -157,16 +157,16 @@ export const OpenResponsesInput$outboundSchema: z.ZodType< z.array( z.union([ OpenResponsesFunctionToolCall$outboundSchema, - OpenResponsesFunctionCallOutput$outboundSchema, ResponsesOutputMessage$outboundSchema, ResponsesOutputItemFunctionCall$outboundSchema, ResponsesOutputItemFileSearchCall$outboundSchema, OpenResponsesReasoning$outboundSchema, + OpenResponsesFunctionCallOutput$outboundSchema, + ResponsesOutputItemReasoning$outboundSchema, ResponsesWebSearchCallOutput$outboundSchema, ResponsesImageGenerationCall$outboundSchema, OpenResponsesEasyInputMessage$outboundSchema, OpenResponsesInputMessageItem$outboundSchema, - ResponsesOutputItemReasoning$outboundSchema, ]), ), ]); diff --git a/src/models/responsesoutputitem.ts b/src/models/responsesoutputitem.ts index d711842..cd83fb3 100644 --- a/src/models/responsesoutputitem.ts +++ b/src/models/responsesoutputitem.ts @@ -38,9 +38,9 @@ export type ResponsesOutputItem = | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall + | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput - | ResponsesImageGenerationCall - | ResponsesOutputItemReasoning; + | ResponsesImageGenerationCall; /** @internal */ export const ResponsesOutputItem$inboundSchema: z.ZodType< @@ -50,9 +50,9 @@ export const ResponsesOutputItem$inboundSchema: z.ZodType< ResponsesOutputMessage$inboundSchema, ResponsesOutputItemFunctionCall$inboundSchema, ResponsesOutputItemFileSearchCall$inboundSchema, + ResponsesOutputItemReasoning$inboundSchema, ResponsesWebSearchCallOutput$inboundSchema, ResponsesImageGenerationCall$inboundSchema, - ResponsesOutputItemReasoning$inboundSchema, ]); export function responsesOutputItemFromJSON( diff --git a/src/models/responsesoutputitemreasoning.ts b/src/models/responsesoutputitemreasoning.ts index bc327b5..4a04678 100644 --- a/src/models/responsesoutputitemreasoning.ts +++ b/src/models/responsesoutputitemreasoning.ts @@ -59,7 +59,7 @@ export type ResponsesOutputItemReasoningStatusUnion = */ export type ResponsesOutputItemReasoning = { type: ResponsesOutputItemReasoningType; - id?: string | undefined; + id: string; content?: Array | undefined; summary: Array; encryptedContent?: string | null | undefined; @@ -166,7 +166,7 @@ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< unknown > = z.object({ type: ResponsesOutputItemReasoningType$inboundSchema, - id: z.string().optional(), + id: z.string(), content: z.array(ReasoningTextContent$inboundSchema).optional(), summary: z.array(ReasoningSummaryText$inboundSchema), encrypted_content: z.nullable(z.string()).optional(), @@ -183,7 +183,7 @@ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< /** @internal */ export type ResponsesOutputItemReasoning$Outbound = { type: string; - id?: string | undefined; + id: string; content?: Array | undefined; summary: Array; encrypted_content?: string | null | undefined; @@ -196,7 +196,7 @@ export const ResponsesOutputItemReasoning$outboundSchema: z.ZodType< ResponsesOutputItemReasoning > = z.object({ type: ResponsesOutputItemReasoningType$outboundSchema, - id: z.string().optional(), + id: z.string(), content: z.array(ReasoningTextContent$outboundSchema).optional(), summary: z.array(ReasoningSummaryText$outboundSchema), encryptedContent: z.nullable(z.string()).optional(),