diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d262fc2..ba4152a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,7 +1,7 @@ lockVersion: 2.0.0 id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d management: - docChecksum: 772a7ec8092cfd6437e71806e7b19e28 + docChecksum: b8b957bd96c3c9aad725db9b7f3be39d docVersion: 1.0.0 speakeasyVersion: 1.666.0 generationVersion: 2.768.0 diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 88a1282..0e33dd0 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -4699,7 +4699,9 @@ components: - p75 - p90 - p99 - description: Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token. + description: >- + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible + when authenticated with an API key or cookie; returns null for unauthenticated requests. PublicEndpoint: type: object properties: @@ -4774,7 +4776,8 @@ components: - $ref: '#/components/schemas/PercentileStats' - description: >- Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token - generation speed. + generation speed. Only visible when authenticated with an API key or cookie; returns null for + unauthenticated requests. required: - name - model_name diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index c19e2c2..7f81f28 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -4701,7 +4701,8 @@ components: - p75 - p90 - p99 - description: Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token. + description: >- + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. PublicEndpoint: type: object properties: @@ -4775,7 +4776,7 @@ components: allOf: - $ref: '#/components/schemas/PercentileStats' - description: >- - Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. + Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. required: - name - model_name diff --git a/docs/components/percentilestats.md b/docs/components/percentilestats.md index db0cccb..6f47431 100644 --- a/docs/components/percentilestats.md +++ b/docs/components/percentilestats.md @@ -1,6 +1,6 @@ # PercentileStats -Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token. +Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. ## Fields diff --git a/docs/components/publicendpoint.md b/docs/components/publicendpoint.md index bff4d4e..dac1698 100644 --- a/docs/components/publicendpoint.md +++ b/docs/components/publicendpoint.md @@ -5,20 +5,20 @@ Information about a specific model endpoint ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | | -| `model_name` | *str* | :heavy_check_mark: | N/A | | -| `context_length` | *float* | :heavy_check_mark: | N/A | | -| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | | -| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI | -| `tag` | *str* | :heavy_check_mark: | N/A | | -| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 | -| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | | -| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | -| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | | -| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | | -| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token. | | -| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | | +| `model_name` | *str* | :heavy_check_mark: | N/A | | +| `context_length` | *float* | :heavy_check_mark: | N/A | | +| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | | +| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI | +| `tag` | *str* | :heavy_check_mark: | N/A | | +| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 | +| `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | | +| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | | +| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | | +| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | +| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | | +| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | | +| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | | +| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/src/openrouter/components/percentilestats.py b/src/openrouter/components/percentilestats.py index 78f7e0b..e979e11 100644 --- a/src/openrouter/components/percentilestats.py +++ b/src/openrouter/components/percentilestats.py @@ -6,7 +6,7 @@ from typing_extensions import TypedDict class PercentileStatsTypedDict(TypedDict): - r"""Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.""" + r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.""" p50: float r"""Median (50th percentile)""" @@ -19,7 +19,7 @@ class PercentileStatsTypedDict(TypedDict): class PercentileStats(BaseModel): - r"""Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.""" + r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.""" p50: float r"""Median (50th percentile)""" diff --git a/src/openrouter/components/publicendpoint.py b/src/openrouter/components/publicendpoint.py index bcf541e..22a4645 100644 --- a/src/openrouter/components/publicendpoint.py +++ b/src/openrouter/components/publicendpoint.py @@ -113,7 +113,7 @@ class PublicEndpointTypedDict(TypedDict): uptime_last_30m: Nullable[float] supports_implicit_caching: bool latency_last_30m: Nullable[PercentileStatsTypedDict] - r"""Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.""" + r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.""" throughput_last_30m: Nullable[PercentileStatsTypedDict] status: NotRequired[EndpointStatus] @@ -150,7 +150,7 @@ class PublicEndpoint(BaseModel): supports_implicit_caching: bool latency_last_30m: Nullable[PercentileStats] - r"""Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.""" + r"""Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.""" throughput_last_30m: Nullable[PercentileStats]