Skip to content

Commit fa71d97

Browse files
committed
## Python SDK Changes:
* `open_router.stt.create_transcription_multipart()`: **Added** * `open_router.beta.responses.send()`: * `request.plugins[].union(pareto-router).price_source` **Added** * `open_router.chat.send()`: * `request.plugins[].union(pareto-router).price_source` **Added** * `open_router.presets.create_presets_chat_completions()`: * `request.plugins[].union(pareto-router).price_source` **Added** * `open_router.presets.create_presets_messages()`: * `request.plugins[].union(pareto-router).price_source` **Added** * `open_router.presets.create_presets_responses()`: * `request.plugins[].union(pareto-router).price_source` **Added**
1 parent 34403bd commit fa71d97

35 files changed

Lines changed: 1073 additions & 148 deletions

‎.speakeasy/gen.lock‎

Lines changed: 103 additions & 49 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ generation:
3636
documentation: mintlify
3737
preApplyUnionDiscriminators: true
3838
python:
39-
version: 0.11.3
39+
version: 0.11.4
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9434,7 +9434,7 @@ components:
94349434
type: integer
94359435
size:
94369436
description: >-
9437-
Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. Interchangeable with resolution + aspect_ratio; use those directly for enumerated, per-model discoverable values. Conflicting size + resolution/aspect_ratio is rejected.
9437+
Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400.
94389438
example: 2K
94399439
type: string
94409440
stream:
@@ -17356,6 +17356,7 @@ components:
1735617356
enabled: true
1735717357
id: pareto-router
1735817358
min_coding_score: 0.8
17359+
price_source: prompt
1735917360
properties:
1736017361
enabled:
1736117362
description: Set to false to disable the pareto-router plugin for this request. Defaults to true.
@@ -17366,12 +17367,20 @@ components:
1736617367
type: string
1736717368
min_coding_score:
1736817369
description: >-
17369-
Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier.
17370+
Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66).
1737017371
example: 0.8
1737117372
format: double
1737217373
maximum: 1
1737317374
minimum: 0
1737417375
type: number
17376+
price_source:
17377+
description: >-
17378+
Price source for the Pareto frontier cost axis. "prompt" uses catalog list price (endpoint.pricing.prompt). "weighted_avg" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to "prompt".
17379+
enum:
17380+
- prompt
17381+
- weighted_avg
17382+
type: string
17383+
x-speakeasy-unknown-values: allow
1737517384
required:
1737617385
- id
1737717386
type: object
@@ -23705,7 +23714,8 @@ paths:
2370523714
- $ref: "#/components/parameters/AppCategories"
2370623715
/audio/transcriptions:
2370723716
post:
23708-
description: Transcribes audio into text. Accepts base64-encoded audio input and returns the transcribed text.
23717+
description: >-
23718+
Transcribes audio into text. Accepts base64-encoded audio input as JSON or an OpenAI-style multipart/form-data file upload, and returns the transcribed text.
2370923719
operationId: createAudioTranscriptions
2371023720
requestBody:
2371123721
content:
@@ -23718,6 +23728,36 @@ paths:
2371823728
model: openai/whisper-large-v3
2371923729
schema:
2372023730
$ref: '#/components/schemas/STTRequest'
23731+
multipart/form-data:
23732+
example:
23733+
file: audio.wav
23734+
language: en
23735+
model: openai/whisper-large-v3
23736+
schema:
23737+
properties:
23738+
file:
23739+
description: >-
23740+
The audio file to transcribe. The format is derived from the filename extension or the file part content type. Max 25 MB; send larger files as base64 JSON via input_audio.
23741+
format: binary
23742+
type: string
23743+
language:
23744+
description: The language of the input audio (ISO-639-1).
23745+
type: string
23746+
model:
23747+
description: The model to use for transcription.
23748+
type: string
23749+
response_format:
23750+
description: The response format. Only "json" is supported.
23751+
enum:
23752+
- json
23753+
type: string
23754+
temperature:
23755+
description: The sampling temperature.
23756+
type: number
23757+
required:
23758+
- file
23759+
- model
23760+
type: object
2372123761
required: true
2372223762
responses:
2372323763
'200':

‎.speakeasy/workflow.lock‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
6-
sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
5+
sourceRevisionDigest: sha256:d2c2c3e13ad669361c25f68fad9ec7eecb75ce8225fe04163163192c1c7fe1f6
6+
sourceBlobDigest: sha256:22a034c7168faf862dc49ec1eb11cabe3f7b5405fffae3881c02000a4f0ec55b
77
tags:
88
- latest
99
- 1.0.0
1010
targets:
1111
open-router:
1212
source: OpenRouter API
1313
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
15-
sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
14+
sourceRevisionDigest: sha256:d2c2c3e13ad669361c25f68fad9ec7eecb75ce8225fe04163163192c1c7fe1f6
15+
sourceBlobDigest: sha256:22a034c7168faf862dc49ec1eb11cabe3f7b5405fffae3881c02000a4f0ec55b
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:18d6fc594c9338480cbc65842c3f276ad0a58f2ceda311aff3d70ea33dbd6e6d
17+
codeSamplesRevisionDigest: sha256:9b19c83c1b20193106f585b755a4d639540a4884675a9336cdf199776093c4bc
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.787.0

‎README-PYPI.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ with OpenRouter(
221221
api_key=os.getenv("OPENROUTER_API_KEY", ""),
222222
) as open_router:
223223

224-
res = open_router.files.upload(file={
224+
res = open_router.stt.create_transcription_multipart(file={
225225
"file_name": "example.file",
226226
"content": open("example.file", "rb"),
227-
})
227+
}, model="openai/whisper-large-v3", language="en")
228228

229229
# Handle response
230230
print(res)

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ with OpenRouter(
221221
api_key=os.getenv("OPENROUTER_API_KEY", ""),
222222
) as open_router:
223223

224-
res = open_router.files.upload(file={
224+
res = open_router.stt.create_transcription_multipart(file={
225225
"file_name": "example.file",
226226
"content": open("example.file", "rb"),
227-
})
227+
}, model="openai/whisper-large-v3", language="en")
228228

229229
# Handle response
230230
print(res)

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,14 @@ Based on:
138138
### Generated
139139
- [python v0.11.3] .
140140
### Releases
141-
- [PyPI v0.11.3] https://pypi.org/project/openrouter/0.11.3 - .
141+
- [PyPI v0.11.3] https://pypi.org/project/openrouter/0.11.3 - .
142+
143+
## 2026-07-07 14:30:37
144+
### Changes
145+
Based on:
146+
- OpenAPI Doc
147+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
148+
### Generated
149+
- [python v0.11.4] .
150+
### Releases
151+
- [PyPI v0.11.4] https://pypi.org/project/openrouter/0.11.4 - .

0 commit comments

Comments
 (0)