From 72d3fe1db916341aa89088758e0b98b79c022ede Mon Sep 17 00:00:00 2001 From: OpenRouter SDK Bot Date: Tue, 11 Aug 2026 18:22:27 +0000 Subject: [PATCH] chore: update OpenAPI spec [sdk-bot] --- .speakeasy/in.openapi.yaml | 108 +++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 4 deletions(-) diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index a86d6bcb..90aff1d1 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -9073,8 +9073,9 @@ components: - 'title' type: 'object' GenerationContentData: - description: 'Stored prompt and completion content' + description: 'Stored prompt and completion content, plus the failure error when one was stored' example: + error: null input: messages: - content: 'What is the meaning of life?' @@ -9083,6 +9084,8 @@ components: completion: 'The meaning of life is a philosophical question...' reasoning: null properties: + error: + $ref: '#/components/schemas/GenerationContentError' input: anyOf: - properties: @@ -9125,11 +9128,98 @@ components: required: - 'input' - 'output' + - 'error' + type: 'object' + GenerationContentError: + description: 'The stored failure for this generation, or null when it succeeded' + example: + message: 'Timed out waiting for the provider' + previous_errors: + - code: 429 + message: 'Provider returned error' + provider_name: 'Google' + raw: '{"error":{"code":429,"message":"Resource exhausted"}}' + provider_name: 'Vertex' + raw: '{"error":{"code":504,"message":"Deadline exceeded"}}' + status: 504 + properties: + message: + description: 'Error message returned to the client' + example: 'Timed out waiting for the provider' + type: + - 'string' + - 'null' + previous_errors: + description: 'Every upstream attempt that failed before the returned error, in attempt order' + items: + $ref: '#/components/schemas/GenerationContentErrorAttempt' + type: 'array' + provider_name: + description: 'Provider whose error was returned to the client, when known' + example: 'Vertex' + type: + - 'string' + - 'null' + raw: + description: 'Raw error body behind the returned error, when stored' + example: '{"error":{"code":504,"message":"Deadline exceeded"}}' + type: + - 'string' + - 'null' + status: + description: 'HTTP status returned to the client' + example: 504 + type: + - 'integer' + - 'null' + required: + - 'status' + - 'message' + - 'provider_name' + - 'raw' + - 'previous_errors' + type: + - 'object' + - 'null' + GenerationContentErrorAttempt: + description: 'A single failed upstream attempt recorded for the generation' + example: + code: 429 + message: 'Provider returned error' + provider_name: 'Google' + raw: '{"error":{"code":429,"message":"Resource exhausted"}}' + properties: + code: + description: 'HTTP status returned by this attempt' + example: 429 + type: 'integer' + message: + description: 'Error message returned by this attempt' + example: 'Provider returned error' + type: 'string' + provider_name: + description: 'Provider that served this attempt, when known' + example: 'Google' + type: + - 'string' + - 'null' + raw: + description: 'Raw error body returned by the provider, when stored' + example: '{"error":{"code":429,"message":"Resource exhausted"}}' + type: + - 'string' + - 'null' + required: + - 'code' + - 'message' + - 'provider_name' + - 'raw' type: 'object' GenerationContentResponse: description: 'Stored prompt and completion content for a generation' example: data: + error: null input: messages: - content: 'What is the meaning of life?' @@ -30110,16 +30200,26 @@ paths: application/json: example: data: + error: + message: 'Timed out waiting for the provider' + previous_errors: + - code: 429 + message: 'Provider returned error' + provider_name: 'Google' + raw: '{"error":{"code":429,"message":"Resource exhausted"}}' + provider_name: 'Vertex' + raw: '{"error":{"code":504,"message":"Deadline exceeded"}}' + status: 504 input: messages: - content: 'What is the meaning of life?' role: 'user' output: - completion: 'The meaning of life is a philosophical question...' + completion: null reasoning: null schema: $ref: '#/components/schemas/GenerationContentResponse' - description: 'Returns the stored prompt and completion content' + description: 'Returns the stored prompt and completion content, plus the failure error when the generation failed' '401': content: application/json: @@ -30200,7 +30300,7 @@ paths: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' description: 'Provider Overloaded - Provider is temporarily overloaded' - summary: 'Get stored prompt and completion content for a generation' + summary: 'Get stored prompt, completion, and error content for a generation' tags: - 'Generations' /generation/feedback: