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
174 changes: 93 additions & 81 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.101
version: 1.3.102
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
73 changes: 62 additions & 11 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11799,6 +11799,32 @@ components:
required:
- 'data'
type: 'object'
ExtractionAsset:
additionalProperties: false
description: 'An image or PDF sent once and referenced by its key in the `assets` map. `data_base64` is the file in standard base64 with no `data:` prefix. PDF is read by document models only.'
properties:
data_base64:
minLength: 1
pattern: '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$'
type: 'string'
format:
enum:
- 'png'
- 'jpg'
- 'jpeg'
- 'pdf'
type: 'string'
x-speakeasy-unknown-values: allow
type:
enum:
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
required:
- 'format'
- 'data_base64'
type: 'object'
ExtractionDateAnswer:
properties:
confidence:
Expand All @@ -11812,10 +11838,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -11842,6 +11869,7 @@ components:
- 'value'
type: 'object'
ExtractionDateField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -11872,10 +11900,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -11902,6 +11931,7 @@ components:
- 'value'
type: 'object'
ExtractionDatetimeField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -11933,10 +11963,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand Down Expand Up @@ -11967,6 +11998,7 @@ components:
- 'value'
type: 'object'
ExtractionDurationField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12046,10 +12078,11 @@ components:
- type: 'string'
type: 'array'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spell_confidence:
Expand All @@ -12071,6 +12104,7 @@ components:
- 'value'
type: 'object'
ExtractionEstimateField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -12165,10 +12199,11 @@ components:
- type: 'string'
type: 'array'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spell_confidence:
Expand Down Expand Up @@ -12197,6 +12232,7 @@ components:
- 'value'
type: 'object'
ExtractionForecastField:
additionalProperties: false
properties:
horizon:
description: 'Number of forecast steps.'
Expand Down Expand Up @@ -12316,6 +12352,12 @@ components:
confidence:
format: 'double'
type: 'number'
confidences:
description: 'One confidence per item of `value`, in the same order.'
items:
format: 'double'
type: 'number'
type: 'array'
guess:
description: 'The most likely value even when `value` is null because `p_null` crossed the threshold.'
items:
Expand All @@ -12329,10 +12371,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
spans:
Expand Down Expand Up @@ -12366,6 +12409,7 @@ components:
- 'value'
type: 'object'
ExtractionListField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12410,10 +12454,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand Down Expand Up @@ -12441,6 +12486,7 @@ components:
- 'value'
type: 'object'
ExtractionNumberField:
additionalProperties: false
properties:
decimals:
description: 'Decimal places kept in `value`.'
Expand Down Expand Up @@ -12468,11 +12514,12 @@ components:
- 'type'
type: 'object'
ExtractionsRequest:
additionalProperties: false
properties:
assets:
additionalProperties:
$ref: '#/components/schemas/DecisionsImageAsset'
description: 'Images keyed by reference string, as in TypeSafe''s API. Write a reference wherever the image belongs in `state`, `instructions`, or `criteria`; every asset must be referenced at least once. Jev reads a reference as a whole string value or inside longer text. Other Decisions models read a whole-string reference wherever they read an `image_url` part and reject a reference inside longer text.'
$ref: '#/components/schemas/ExtractionAsset'
description: 'Assets keyed by reference string. Write a reference wherever the asset belongs in `state` or a field `instructions`; every asset must be referenced at least once. A `state` that is exactly the sole asset''s key carries no text of its own and is read as file-only. A model that reads either text or a document per request, not both (ScaleDown Extract with a PDF), needs that form: any other text around the key is state text and is rejected with 400.'
type: 'object'
fields:
additionalProperties:
Expand Down Expand Up @@ -12613,10 +12660,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -12643,6 +12691,7 @@ components:
- 'value'
type: 'object'
ExtractionTextField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
Expand Down Expand Up @@ -12673,10 +12722,11 @@ components:
format: 'double'
type: 'number'
source:
description: 'Set to `image` when the answer was read from an image rather than the state text.'
description: 'Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.'
enum:
- 'state'
- 'image'
- 'document'
type: 'string'
x-speakeasy-unknown-values: allow
span:
Expand All @@ -12703,6 +12753,7 @@ components:
- 'value'
type: 'object'
ExtractionTimeField:
additionalProperties: false
properties:
instructions:
description: 'What the field should contain.'
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.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:ccc96c5353fb2491ea1283b289e1862413351f3483ae6a03636fafc98144a5f8
sourceBlobDigest: sha256:0f96ca3b3857d32836394a87ae1612c437ac45a5cb70745f5fc7340e176f8a22
sourceRevisionDigest: sha256:df8d73d8a3c2e994074904c6b7b282a13f37b1708231f60fc8240715b564ab6a
sourceBlobDigest: sha256:fb00a0483bd11ce79fc75982e9498865e02050a6eac2defef0a64b918fe96069
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:ccc96c5353fb2491ea1283b289e1862413351f3483ae6a03636fafc98144a5f8
sourceBlobDigest: sha256:0f96ca3b3857d32836394a87ae1612c437ac45a5cb70745f5fc7340e176f8a22
sourceRevisionDigest: sha256:df8d73d8a3c2e994074904c6b7b282a13f37b1708231f60fc8240715b564ab6a
sourceBlobDigest: sha256:fb00a0483bd11ce79fc75982e9498865e02050a6eac2defef0a64b918fe96069
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:7902840af4493cd0ab8bd1ae9f0524227e09edaa1c245681123e55d922e51f8b
codeSamplesRevisionDigest: sha256:78857678d6d27488340eeea14da0733a475a85b89313700bb1c75812a393e597
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3779,4 +3779,14 @@ Based on:
### Generated
- [python v1.3.101] .
### Releases
- [PyPI v1.3.101] https://pypi.org/project/openrouter/1.3.101 - .
- [PyPI v1.3.101] https://pypi.org/project/openrouter/1.3.101 - .

## 2026-10-30 16:22:10
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.102] .
### Releases
- [PyPI v1.3.102] https://pypi.org/project/openrouter/1.3.102 - .
14 changes: 14 additions & 0 deletions docs/components/extractionasset.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "ExtractionAsset"
---

An image or PDF sent once and referenced by its key in the `assets` map. `data_base64` is the file in standard base64 with no `data:` prefix. PDF is read by document models only.


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `data_base64` | *str* | ✔️ | N/A |
| `format_` | [components.ExtractionAssetFormat](../components/extractionassetformat.mdx) | ✔️ | N/A |
| `type` | [Optional[components.ExtractionAssetType]](../components/extractionassettype.mdx) | ➖ | N/A |
22 changes: 22 additions & 0 deletions docs/components/extractionassetformat.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "ExtractionAssetFormat"
---

## Example Usage

```python
from openrouter.components import ExtractionAssetFormat

# Open enum: unrecognized values are captured as UnrecognizedStr
value: ExtractionAssetFormat = "png"
```


## Values

This is an open enum. Unrecognized values will not fail type checks.

- `"png"`
- `"jpg"`
- `"jpeg"`
- `"pdf"`
20 changes: 20 additions & 0 deletions docs/components/extractionassettype.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "ExtractionAssetType"
---

## Example Usage

```python
from openrouter.components import ExtractionAssetType

# Open enum: unrecognized values are captured as UnrecognizedStr
value: ExtractionAssetType = "image"
```


## Values

This is an open enum. Unrecognized values will not fail type checks.

- `"image"`
- `"document"`
2 changes: 1 addition & 1 deletion docs/components/extractiondateanswer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: "ExtractionDateAnswer"
| `confidence` | *Optional[float]* | ➖ | N/A |
| `guess` | *Optional[str]* | ➖ | The most likely value even when `value` is null because `p_null` crossed the threshold. |
| `p_null` | *Optional[float]* | ➖ | Probability that the state contains nothing for this field. |
| `source` | [Optional[components.ExtractionDateAnswerSource]](../components/extractiondateanswersource.mdx) | ➖ | Set to `image` when the answer was read from an image rather than the state text. |
| `source` | [Optional[components.ExtractionDateAnswerSource]](../components/extractiondateanswersource.mdx) | ➖ | Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text. |
| `span` | List[*int*] | ➖ | Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once. |
| `spell_confidence` | *Optional[float]* | ➖ | Confidence in the spelling of text read from an image. |
| `type` | [components.ExtractionDateAnswerType](../components/extractiondateanswertype.mdx) | ✔️ | N/A |
Expand Down
3 changes: 2 additions & 1 deletion docs/components/extractiondateanswersource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "ExtractionDateAnswerSource"
---

Set to `image` when the answer was read from an image rather than the state text.
Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.

## Example Usage

Expand All @@ -20,3 +20,4 @@ This is an open enum. Unrecognized values will not fail type checks.

- `"state"`
- `"image"`
- `"document"`
Loading
Loading