Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25278,10 +25278,6 @@ components:
description: 'API key as bearer token in Authorization header'
scheme: 'bearer'
type: 'http'
bearer:
description: 'API key as bearer token in Authorization header'
scheme: 'bearer'
type: 'http'
externalDocs:
description: 'OpenRouter Documentation'
url: 'https://openrouter.ai/docs'
Expand Down Expand Up @@ -33526,8 +33522,6 @@ paths:
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: 'Internal Server Error - Unexpected server error'
security:
- bearer: []
summary: 'List models filtered by user provider preferences, privacy settings, and guardrails'
tags:
- 'Models'
Expand Down
21 changes: 21 additions & 0 deletions .speakeasy/overlays/fix-models-user-security.overlay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Use the global apiKey scheme for GET /models/user
version: 0.0.0
actions:
# `bearer` and `apiKey` are byte-identical schemes (http/bearer, same description),
# but only `apiKey` is the document-level default. Because listModelsUser named the
# other one, global security could not be hoisted and the generator emitted a
# required per-operation `security=` argument on models.list_for_user() — the only
# method in the SDK that ignores the client-level api_key. Dropping the override
# lets the operation inherit `security: [apiKey]` like the other 94 operations.
- target: $.paths["/models/user"].get.security
description: Drop the per-operation bearer override so /models/user inherits global apiKey security
remove: true
# With that override gone, `bearer` has zero references left in the document.
# Removing it means a future monorepo sync that points an operation at `bearer`
# fails generation loudly instead of silently shipping a second required credential.
- target: $.components.securitySchemes.bearer
description: Remove the now-unreferenced duplicate of the apiKey security scheme
remove: true
1 change: 1 addition & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sources:
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
- location: .speakeasy/overlays/deprecated-beta-responses-alias.overlay.yaml
- location: .speakeasy/overlays/fix-models-user-security.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
Expand Down