fix: add overlay to remove nullable from pagination offset params (#121)

This commit is contained in:
Matt Apperson
2026-04-14 12:48:15 -04:00
committed by GitHub
parent 2bba049182
commit b2386114cd
440 changed files with 36150 additions and 32168 deletions
+2122 -1593
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.8.1
version: 0.9.1
additionalDependencies:
dev: {}
main: {}
@@ -59,7 +59,7 @@ python:
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: "tagged-only"
forwardCompatibleUnionsByDefault: tagged-only
imports:
option: openapi
paths:
+61 -25
View File
@@ -3511,6 +3511,7 @@ components:
- function
type: object
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
- $ref: '#/components/schemas/ChatWebSearchShorthand'
@@ -3673,20 +3674,7 @@ components:
nullable: true
type: number
image_config:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See
https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
type: object
$ref: '#/components/schemas/ImageConfig'
logit_bias:
additionalProperties:
format: double
@@ -5775,6 +5763,22 @@ components:
example: monthly
nullable: true
type: string
ImageConfig:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See
https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
quality: high
type: object
ImageGenCallCompletedEvent:
allOf:
- $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted'
@@ -5888,6 +5892,46 @@ components:
required:
- type
type: object
ImageGenerationServerTool_OpenRouter:
description: 'OpenRouter built-in server tool: generates images from text prompts using an image generation model'
example:
parameters:
model: openai/gpt-image-1
quality: high
size: 1024x1024
type: openrouter:image_generation
properties:
parameters:
$ref: '#/components/schemas/ImageGenerationServerToolConfig'
type:
enum:
- openrouter:image_generation
type: string
required:
- type
type: object
ImageGenerationServerToolConfig:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio,
quality, size, background, output_format, output_compression, moderation, etc.) plus a model field.
example:
aspect_ratio: '16:9'
model: openai/gpt-image-1
quality: high
properties:
model:
description: Which image generation model to use (e.g. "openai/gpt-image-1"). Defaults to "openai/gpt-image-1".
example: openai/gpt-image-1
type: string
type: object
ImageGenerationStatus:
enum:
- in_progress
@@ -7584,6 +7628,7 @@ components:
- name
type: object
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
type: array
@@ -11316,17 +11361,7 @@ components:
nullable: true
type: number
image_config:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See
https://openrouter.ai/docs/features/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
type: object
$ref: '#/components/schemas/ImageConfig'
include:
items:
$ref: '#/components/schemas/ResponseIncludesEnum'
@@ -11475,6 +11510,7 @@ components:
- $ref: '#/components/schemas/ApplyPatchServerTool'
- $ref: '#/components/schemas/CustomTool'
- $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
type: array
+18015 -17858
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Fix nullable pagination params
version: 0.0.0
actions:
- target: $..parameters[?@.name == "offset" && @.in == "query"].schema
description: Remove nullable from offset query params to fix mypy errors in pagination helpers
update:
nullable: false
+8 -5
View File
@@ -2,8 +2,8 @@ speakeasyVersion: 1.680.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9
sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9
sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22
codeSamplesRevisionDigest: sha256:db86aed74d199f265e2e20442ef652dac0911c8a657ccb3e6614d56a26b8b44e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.680.0
@@ -26,6 +26,9 @@ workflow:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+1
View File
@@ -10,6 +10,7 @@ sources:
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api