Skip to content
Merged
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
40 changes: 24 additions & 16 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: 6b4a8542e991f840a99e609a9c92b16a
docChecksum: 03debdc8d24d4dddc93cea8075931d77
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.1.158
configChecksum: 149aa2689e4957309bb4c1b977ccd927
releaseVersion: 1.1.159
configChecksum: fd98805ff1b03acfa034ef646f6b33b6
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 09e2bccd-885d-413a-a5cb-fc35ac545c1a
pristine_commit_hash: 277d07755a439c31266aec30277ca519ba6e39dc
pristine_tree_hash: 80913373c42f4ea1636b8ec24826ba9608671274
generation_id: 16700c4e-c46e-4247-b019-436fcf69246f
pristine_commit_hash: 330eef4f60b8f72d1510a40d7092208a9a240a90
pristine_tree_hash: f734119a88cf2398cccd3f7bd147f08a030f9b34
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -1808,6 +1808,10 @@ trackedFiles:
id: 8b6b222a5da7
last_write_checksum: sha1:e37576941ec9e2cb4fe176277bb02b9cc86f6f48
pristine_git_object: 5d2d4dc2ddfc8d88c4869242498affc0b46f969e
docs/components/decisions.mdx:
id: 2cbde2112b18
last_write_checksum: sha1:90f7268b80fdabbdf4f5c78aac765d6442539348
pristine_git_object: d68a93a6e4f6d372e9be4554174339d4dbd86f67
docs/components/decisionschoiceanswer.mdx:
id: 8453afbdc1aa
last_write_checksum: sha1:6c917d892506ab1257cf46468e58a0fb6f130f8b
Expand Down Expand Up @@ -4686,8 +4690,8 @@ trackedFiles:
pristine_git_object: 86ea312944a50501fd307f41c471b2462adeeb5e
docs/components/perflast30mbyworkload.mdx:
id: bdcf1999b086
last_write_checksum: sha1:1390768d24471859dc830f0dbd892085aceab9c5
pristine_git_object: a75ac7be6f20c9b564a2fc7bc23d8efc4057bac1
last_write_checksum: sha1:0d6efbd8fc766892de7dcf9565d7457448b4e6fd
pristine_git_object: 193447130fc6f38685f2b762681c8ea46c347e43
docs/components/perrequestlimits.mdx:
id: a503880c4645
last_write_checksum: sha1:a971ac638f0c8885577b1165909c8d5ef6b77e1f
Expand Down Expand Up @@ -8154,8 +8158,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:58ed3a2d2fa0db47040241f3a4d1c9a24e1a2fcf
pristine_git_object: 942f29aeae46ffbae048748c32bb4f9413d35662
last_write_checksum: sha1:270325a9d1b6cc9957b80685361a74e4c1eda8d3
pristine_git_object: 7bac6b6178904740ab981df0378ec88883996ac0
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -8182,8 +8186,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:cfd0e41c1049fd8a411f75f715891767592d58cc
pristine_git_object: 13c50d4098317244793f918499ecba0ba133fb85
last_write_checksum: sha1:fc59ea125c8202c0d65f68a459e310521e2899e4
pristine_git_object: ca93db7bc4c211da0f565f1627787c63a81cbf03
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:0c25a52ed5fb688ec1e923e4e82bcfc9cae49465
Expand Down Expand Up @@ -8226,8 +8230,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:d21e29eb27b9db4d1f75ea2d4c2a98ad18099e11
pristine_git_object: 48647085cc6fe2b73d22ba0cf28de9aa8c35699d
last_write_checksum: sha1:4688e864f8d90268569ae28857855ab932974184
pristine_git_object: 87f19fea2c07bf561e2f0c547ce439e545979c07
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
Expand Down Expand Up @@ -10294,8 +10298,8 @@ trackedFiles:
pristine_git_object: 5f4a4186a9c98767217546b6b87d238fbc0155f3
src/openrouter/components/publicendpoint.py:
id: 848aa2ef9129
last_write_checksum: sha1:859e0d6fb0db27400d0ce70949dfb1b08ac47bed
pristine_git_object: 2b6ad0a0dbfebf6be9e7c4eaff03b99da5e2f890
last_write_checksum: sha1:42707d2210be0e29267c85b4454676dfd56164b9
pristine_git_object: 7830ec36d3bd2bcd575007c61910165ebe0f2952
src/openrouter/components/publicpricing.py:
id: 96d115d83cc5
last_write_checksum: sha1:fd8c320ac83b282eaf2405045329b55076d4311a
Expand Down Expand Up @@ -14936,3 +14940,7 @@ examples:
"502":
application/json: {"error": {"code": 409, "message": "That question is no longer waiting for an answer."}}
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.endpoints.list_zdr_endpoints()`: `response.data[].perf_last_30m_by_workload.decisions` **Added**
* `open_router.endpoints.list()`: `response.data.endpoints[].perf_last_30m_by_workload.decisions` **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.1.158
version: 1.1.159
additionalDependencies:
dev: {}
main: {}
Expand Down
20 changes: 20 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23693,6 +23693,26 @@ components:
additionalProperties: false
description: 'Endpoint performance over the last 30 minutes, keyed by the kind of request served (e.g. `text_generation`, `image_generation`). Additive to the legacy singular latency and throughput fields; image and video generation report end-to-end latency. Only visible when authenticated with an API key or cookie.'
properties:
decisions:
properties:
latency:
allOf:
- $ref: '#/components/schemas/PercentileStats'
- description: 'Latency percentiles in milliseconds for this workload. Image and video generation report full end-to-end generation time, because their raw latency only measures request acknowledgement; every other workload reports time to first token or result.'
request_count:
description: 'Total requests admitted for this workload in the window.'
type:
- 'integer'
- 'null'
throughput:
allOf:
- $ref: '#/components/schemas/PercentileStats'
- description: 'Throughput percentiles in tokens per second. Only meaningful for text generation; null for workloads without token throughput.'
required:
- 'latency'
- 'throughput'
- 'request_count'
type: 'object'
embeddings:
properties:
latency:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:218cfb491888dd01bb0b91626a578a8dcf476ca9bcbb60ae34999e54c236c72a
sourceBlobDigest: sha256:09cb6f35097e73250969974686759a2896ee29de88182fc04bcd06a279a3df75
sourceRevisionDigest: sha256:ffba8dbb7f72bdaa2a0e39560adc9786831528f410788b71ca1393a296fb7b3b
sourceBlobDigest: sha256:7c9f591b9cf36f87b8ad27e579cb431262eb2327719f6b725a723ecc890b8958
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:218cfb491888dd01bb0b91626a578a8dcf476ca9bcbb60ae34999e54c236c72a
sourceBlobDigest: sha256:09cb6f35097e73250969974686759a2896ee29de88182fc04bcd06a279a3df75
sourceRevisionDigest: sha256:ffba8dbb7f72bdaa2a0e39560adc9786831528f410788b71ca1393a296fb7b3b
sourceBlobDigest: sha256:7c9f591b9cf36f87b8ad27e579cb431262eb2327719f6b725a723ecc890b8958
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:bc39f80dec774fbaf8d57e1515c9ac07feff2a94dc4ba105cd376f819adf36bf
codeSamplesRevisionDigest: sha256:453d0302f23792a529f3eb3d82fe14ed78fd4fea0f9bf733a16ec56616358024
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2369,4 +2369,14 @@ Based on:
### Generated
- [python v1.1.158] .
### Releases
- [PyPI v1.1.158] https://pypi.org/project/openrouter/1.1.158 - .
- [PyPI v1.1.158] https://pypi.org/project/openrouter/1.1.158 - .

## 2026-09-18 20:09:17
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.1.159] .
### Releases
- [PyPI v1.1.159] https://pypi.org/project/openrouter/1.1.159 - .
11 changes: 11 additions & 0 deletions docs/components/decisions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Decisions"
---

## Fields

| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `latency` | [Nullable[components.PercentileStats]](../components/percentilestats.mdx) | :heavy_check_mark: | N/A | \{<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} |
| `request_count` | *Nullable[int]* | :heavy_check_mark: | Total requests admitted for this workload in the window. | |
| `throughput` | [Nullable[components.PercentileStats]](../components/percentilestats.mdx) | :heavy_check_mark: | N/A | \{<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} |
1 change: 1 addition & 0 deletions docs/components/perflast30mbyworkload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Endpoint performance over the last 30 minutes, keyed by the kind of request serv

| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `decisions` | [Optional[components.Decisions]](../components/decisions.mdx) | :heavy_minus_sign: | N/A |
| `embeddings` | [Optional[components.Embeddings]](../components/embeddings.mdx) | :heavy_minus_sign: | N/A |
| `image_generation` | [Optional[components.ImageGeneration]](../components/imagegeneration.mdx) | :heavy_minus_sign: | N/A |
| `rerank` | [Optional[components.Rerank]](../components/rerank.mdx) | :heavy_minus_sign: | N/A |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
version = "1.1.158"
version = "1.1.159"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
Expand Down
4 changes: 2 additions & 2 deletions src/openrouter/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "openrouter"
__version__: str = "1.1.158"
__version__: str = "1.1.159"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.1.158 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.1.159 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
6 changes: 6 additions & 0 deletions src/openrouter/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2780,6 +2780,8 @@
ProvisionInternResponseTypedDict,
)
from .publicendpoint import (
Decisions,
DecisionsTypedDict,
Embeddings,
EmbeddingsTypedDict,
ImageGeneration,
Expand Down Expand Up @@ -4180,6 +4182,7 @@
"DebugEventType",
"DebugEventTypedDict",
"DebugTypedDict",
"Decisions",
"DecisionsChoiceAnswer",
"DecisionsChoiceAnswerType",
"DecisionsChoiceAnswerTypedDict",
Expand Down Expand Up @@ -4212,6 +4215,7 @@
"DecisionsScoreQuestionInstructionsTypedDict",
"DecisionsScoreQuestionType",
"DecisionsScoreQuestionTypedDict",
"DecisionsTypedDict",
"DefaultEffort",
"DefaultParameters",
"DefaultParametersTypedDict",
Expand Down Expand Up @@ -8058,6 +8062,8 @@
"ProviderSortConfigTypedDict": ".providersortconfig",
"ProvisionInternResponse": ".provisioninternresponse",
"ProvisionInternResponseTypedDict": ".provisioninternresponse",
"Decisions": ".publicendpoint",
"DecisionsTypedDict": ".publicendpoint",
"Embeddings": ".publicendpoint",
"EmbeddingsTypedDict": ".publicendpoint",
"ImageGeneration": ".publicendpoint",
Expand Down
34 changes: 34 additions & 0 deletions src/openrouter/components/publicendpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,36 @@
from typing_extensions import NotRequired, TypedDict


class DecisionsTypedDict(TypedDict):
latency: Nullable[PercentileStatsTypedDict]
request_count: Nullable[int]
r"""Total requests admitted for this workload in the window."""
throughput: Nullable[PercentileStatsTypedDict]


class Decisions(BaseModel):
latency: Nullable[PercentileStats]

request_count: Nullable[int]
r"""Total requests admitted for this workload in the window."""

throughput: Nullable[PercentileStats]

@model_serializer(mode="wrap")
def serialize_model(self, handler):
serialized = handler(self)
m = {}

for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))

if val != UNSET_SENTINEL:
m[k] = val

return m


class EmbeddingsTypedDict(TypedDict):
latency: Nullable[PercentileStatsTypedDict]
request_count: Nullable[int]
Expand Down Expand Up @@ -257,6 +287,7 @@ def serialize_model(self, handler):
class PerfLast30mByWorkloadTypedDict(TypedDict):
r"""Endpoint performance over the last 30 minutes, keyed by the kind of request served (e.g. `text_generation`, `image_generation`). Additive to the legacy singular latency and throughput fields; image and video generation report end-to-end latency. Only visible when authenticated with an API key or cookie."""

decisions: NotRequired[DecisionsTypedDict]
embeddings: NotRequired[EmbeddingsTypedDict]
image_generation: NotRequired[ImageGenerationTypedDict]
rerank: NotRequired[RerankTypedDict]
Expand All @@ -270,6 +301,8 @@ class PerfLast30mByWorkloadTypedDict(TypedDict):
class PerfLast30mByWorkload(BaseModel):
r"""Endpoint performance over the last 30 minutes, keyed by the kind of request served (e.g. `text_generation`, `image_generation`). Additive to the legacy singular latency and throughput fields; image and video generation report end-to-end latency. Only visible when authenticated with an API key or cookie."""

decisions: Optional[Decisions] = None

embeddings: Optional[Embeddings] = None

image_generation: Optional[ImageGeneration] = None
Expand All @@ -290,6 +323,7 @@ class PerfLast30mByWorkload(BaseModel):
def serialize_model(self, handler):
optional_fields = set(
[
"decisions",
"embeddings",
"image_generation",
"rerank",
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading