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
60 changes: 31 additions & 29 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: ba7853a2105392192cf4ed68d71c8e80
docChecksum: 6cc0d48bfdb4976e09baf54df6158694
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.2.32
configChecksum: 23b2eddd5af560ad923684ed9ca3f3e4
releaseVersion: 1.2.33
configChecksum: 58719407cb0c2ba626b2f1d762c70de0
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: a215d5bf-178c-4b98-aa8c-946d60802f7b
pristine_commit_hash: be00b51367960629a2af4693444cb3ca953685de
pristine_tree_hash: 81ce8fef00ef5c43987f296d1fa473960e198165
generation_id: a7ddbbdb-6d06-4927-b244-bccaf9c2e3e6
pristine_commit_hash: 49523f4989d804be9af111c9a6c3bb1108d9ce2c
pristine_tree_hash: 386dbcfb15d5e45f8ab5124f9d7cd7888d4e7544
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -955,8 +955,8 @@ trackedFiles:
pristine_git_object: 3b9150ee761d23f96f2ff4949c1aea29b42f9bce
docs/components/anthropicwebfetchtoolresulterrorerrorcode.mdx:
id: 4a7e2fb63acb
last_write_checksum: sha1:c50db315821815cc2fc1ec311d030630f07babfa
pristine_git_object: 6fe9c5d34660ba486e4bd9ffe646d2e0288048d4
last_write_checksum: sha1:5332bd1b961a1363023176fbe0b4d49c76d13602
pristine_git_object: 5b08555ddd929e6475e7a082bdf65ce2e88f1c17
docs/components/anthropicwebfetchtoolresulterrortype.mdx:
id: 951939fcaedd
last_write_checksum: sha1:4cbe77993e0f18cb30cbc963c5b49667f9cd3fe4
Expand Down Expand Up @@ -4215,8 +4215,8 @@ trackedFiles:
pristine_git_object: f7bb2cc53c8b844fe5f28f7cfa6c864f94994ddd
docs/components/messagesmessageparamerrorcode.mdx:
id: c0bbfb0a5e1c
last_write_checksum: sha1:c8640eefa9eb3ac018129665de90c4009b269003
pristine_git_object: b93c6f8f643808eed719fbeb9aa2df317a58f0e6
last_write_checksum: sha1:7216578e18b584ed0d2811fffa59c07c1f39e3ce
pristine_git_object: e67df8d74af1939a078aa884004ae5789c89b626
docs/components/messagesmessageparamrole.mdx:
id: cb1721b92cd6
last_write_checksum: sha1:3f5c7431c6635c667b17e7b176b7dd4ba6f6777d
Expand Down Expand Up @@ -4505,6 +4505,10 @@ trackedFiles:
id: fb5e85bb77da
last_write_checksum: sha1:50190d6fb52c7d673ef87f34e39c620460cf932b
pristine_git_object: f6803b05fdd0332c58b0d07e2aa819de4a8087c5
docs/components/nativetools.mdx:
id: 15bb54542fc2
last_write_checksum: sha1:0b6d30bcbc44a2914c2d7265e5fb1e8cd05f6c89
pristine_git_object: f578f85cd4f835921c968de53a7bd4ae7524be10
docs/components/never.mdx:
id: 7c0a5248748d
last_write_checksum: sha1:aea21cab9eaa32c13bc278bfd7dbb1ec41127091
Expand Down Expand Up @@ -5811,8 +5815,8 @@ trackedFiles:
pristine_git_object: be1e5af9301ba917704f25fdafed31c152485abf
docs/components/publicendpoint.mdx:
id: ec4843ef5d86
last_write_checksum: sha1:54822f1b82fe3c0d91cf214773a1b52a6e7cf3a3
pristine_git_object: fc7a3507a210a8409cfe9d528972e8d4b68b67a1
last_write_checksum: sha1:1e3b1f96db5774279bd275122d48ef8e89a0dca8
pristine_git_object: 1f6678254e2dc3289a8ca1894869bcc1a36873b1
docs/components/publicpricing.mdx:
id: 61fb18b7ff94
last_write_checksum: sha1:e241420249fcbd1bf515b0f5e84934de0b207948
Expand Down Expand Up @@ -9203,8 +9207,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:b98c651779a93632a712d21b947c9f9e81237767
pristine_git_object: 6f500623ddd6513c9f4fc6544a2a3a125a8f866a
last_write_checksum: sha1:98851babb0a77721eca71165b105e28a5a60e452
pristine_git_object: a21ee9a4834b33cf106bd58cd9308fad1e629710
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -9231,8 +9235,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:317e79a22e2957c906fe5d056b4084687663052c
pristine_git_object: a5e2dbcd3ba20c0c3a782d5273a8847104675fc0
last_write_checksum: sha1:b4baecc43ac609d4e81a60af019da14a3f241775
pristine_git_object: ec10a9e28e5b82f889990168a6a6178d8cd6d0d4
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
Expand Down Expand Up @@ -9279,8 +9283,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:a9859af57f85f48c6176e886483059c26bfb8a3c
pristine_git_object: 531740682a56707b21b173942a4ec7ae010813ee
last_write_checksum: sha1:e1aabbe8578b0aa28b25c1ea380cead2b88c6876
pristine_git_object: d56562d6944eae0809a82e28520c235e9c082ed1
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
Expand Down Expand Up @@ -9699,8 +9703,8 @@ trackedFiles:
pristine_git_object: c26f5546c2cad2080e3b7a87b863f31e8a05cc7b
src/openrouter/components/anthropicwebfetchtoolresulterror.py:
id: 583a2c91fdd4
last_write_checksum: sha1:1a55b12b45f78d1361f92ec1821ab76a0031d024
pristine_git_object: 3bfb959c15cb34dfe1e8c262b8d542281d54f099
last_write_checksum: sha1:bcfe568ae69844a493f3ec6e3b1b76db5ba0e5ea
pristine_git_object: 3e2b78c0f6226f2bbe99fe6ea2de4ecd291306ad
src/openrouter/components/anthropicwebsearchresult.py:
id: 5c8ad6aea18e
last_write_checksum: sha1:64d08e46e4ac5a47cdaf3ebf25361ad7c70727b6
Expand Down Expand Up @@ -11087,8 +11091,8 @@ trackedFiles:
pristine_git_object: 9026664fa77c678a7a5f2b317b511ad93445cff7
src/openrouter/components/messagesmessageparam.py:
id: ed8bbab6720d
last_write_checksum: sha1:7c728a1159e94548cac466ef3469d6a60b2ed503
pristine_git_object: d587cc013b7c9284f320c4649d12ec3378501897
last_write_checksum: sha1:032872dfb96572801f92a78d58986217e831cc20
pristine_git_object: 34eb37a9187824b1f2b767e440ed2b34ca19ecd0
src/openrouter/components/messagesoutputconfig.py:
id: 54d1e297f740
last_write_checksum: sha1:478d9f534254d60225ac89bd21ddc49d18329297
Expand Down Expand Up @@ -11671,8 +11675,8 @@ trackedFiles:
pristine_git_object: 5f4a4186a9c98767217546b6b87d238fbc0155f3
src/openrouter/components/publicendpoint.py:
id: 848aa2ef9129
last_write_checksum: sha1:9df37e60706796b35acd7fd36a2ac1aa082c2904
pristine_git_object: cfa5b51c2a31c34b96413bc44e70f629796f3ad2
last_write_checksum: sha1:4081468f3100ac4b9cbf58acf39a358c2006bd3a
pristine_git_object: 533022aa348a1147bab3c02bf5230a021706c260
src/openrouter/components/publicpricing.py:
id: 96d115d83cc5
last_write_checksum: sha1:fd8c320ac83b282eaf2405045329b55076d4311a
Expand Down Expand Up @@ -13459,7 +13463,7 @@ examples:
slug: "gpt-4"
responses:
"200":
application/json: {"data": {"architecture": {"input_modalities": ["text"], "instruct_type": "chatml", "modality": "text->text", "output_modalities": ["text"], "tokenizer": "GPT"}, "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "endpoints": [{"context_length": 8192, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "model_id": "openai/gpt-4", "model_name": "GPT-4", "name": "OpenAI: GPT-4", "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "supported_parameters": ["temperature", "top_p", "max_tokens"], "supports_image_reference": false, "supports_implicit_caching": true, "supports_multiple_audio_references": false, "supports_tool_choice": {"auto": true, "function": true, "none": true, "required": true}, "supports_voice_cloning": false, "tag": "openai", "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}, "uptime_last_1d": 99.8, "uptime_last_30m": 99.5, "uptime_last_5m": 100}], "id": "openai/gpt-4", "name": "GPT-4"}}
application/json: {"data": {"architecture": {"input_modalities": ["text"], "instruct_type": "chatml", "modality": "text->text", "output_modalities": ["text"], "tokenizer": "GPT"}, "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "endpoints": [{"context_length": 8192, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "model_id": "openai/gpt-4", "model_name": "GPT-4", "name": "OpenAI: GPT-4", "native_tools": {}, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "supported_parameters": ["temperature", "top_p", "max_tokens"], "supports_image_reference": false, "supports_implicit_caching": true, "supports_multiple_audio_references": false, "supports_tool_choice": {"auto": true, "function": true, "none": true, "required": true}, "supports_voice_cloning": false, "tag": "openai", "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}, "uptime_last_1d": 99.8, "uptime_last_30m": 99.5, "uptime_last_5m": 100}], "id": "openai/gpt-4", "name": "GPT-4"}}
"404":
application/json: {"error": {"code": 404, "message": "Resource not found"}}
"500":
Expand All @@ -13470,7 +13474,7 @@ examples:
speakeasy-default-list-endpoints-zdr:
responses:
"200":
application/json: {"data": [{"context_length": 8192, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "model_id": "openai/gpt-4", "model_name": "GPT-4", "name": "OpenAI: GPT-4", "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "supported_parameters": ["temperature", "top_p", "max_tokens"], "supports_image_reference": false, "supports_implicit_caching": true, "supports_multiple_audio_references": false, "supports_tool_choice": {"auto": true, "function": true, "none": true, "required": true}, "supports_voice_cloning": false, "tag": "openai", "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}, "uptime_last_1d": 99.8, "uptime_last_30m": 99.5, "uptime_last_5m": 100}]}
application/json: {"data": [{"context_length": 8192, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "model_id": "openai/gpt-4", "model_name": "GPT-4", "name": "OpenAI: GPT-4", "native_tools": {}, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "provider_name": "OpenAI", "quantization": "fp16", "supported_parameters": ["temperature", "top_p", "max_tokens"], "supports_image_reference": false, "supports_implicit_caching": true, "supports_multiple_audio_references": false, "supports_tool_choice": {"auto": true, "function": true, "none": true, "required": true}, "supports_voice_cloning": false, "tag": "openai", "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}, "uptime_last_1d": 99.8, "uptime_last_30m": 99.5, "uptime_last_5m": 100}]}
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
"403":
Expand Down Expand Up @@ -16534,6 +16538,4 @@ examples:
"500":
application/json: {"error": {"code": 400, "message": "custom_id is required on requests[0]."}}
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.embeddings.generate()`: `error.status[504]` **Added**
releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: `response.results[].response.body.union(class (2)).content[].union(web_fetch_tool_result).content.union(web_fetch_tool_result_error).error_code.enum(url_not_in_prior_context)` **Added**\n* `open_router.batch.get_batches()`: `response.results[].response.body.union(class (2)).content[].union(web_fetch_tool_result).content.union(web_fetch_tool_result_error).error_code.enum(url_not_in_prior_context)` **Added**\n* `open_router.endpoints.list_zdr_endpoints()`: `response.data[].native_tools` **Added**\n* `open_router.endpoints.list()`: `response.data.endpoints[].native_tools` **Added**\n* `open_router.presets.create_presets_messages()`: \n * `request.messages[].content.union(Array<>)[].union(web_search_tool_result).content.union(class (1)).error_code.enum(request_too_large)` **Added**\n"
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.2.32
version: 1.2.33
additionalDependencies:
dev: {}
main: {}
Expand Down
23 changes: 23 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2669,6 +2669,7 @@ components:
- 'invalid_tool_input'
- 'url_too_long'
- 'url_not_allowed'
- 'url_not_in_prior_context'
- 'url_not_accessible'
- 'unsupported_content_type'
- 'too_many_requests'
Expand Down Expand Up @@ -16375,6 +16376,7 @@ components:
- 'max_uses_exceeded'
- 'too_many_requests'
- 'query_too_long'
- 'request_too_large'
type: 'string'
x-speakeasy-unknown-values: allow
type:
Expand Down Expand Up @@ -25449,6 +25451,9 @@ components:
model_id: 'openai/gpt-4'
model_name: 'GPT-4'
name: 'OpenAI: GPT-4'
native_tools:
openrouter:web_search:
type: 'web_search_20260209'
perf_last_30m_by_workload:
text_generation:
latency:
Expand Down Expand Up @@ -25514,6 +25519,20 @@ components:
type: 'string'
name:
type: 'string'
native_tools:
additionalProperties:
properties:
type:
description: 'The provider tool type the request is translated to when this tool runs natively, e.g. `web_search_20260209` on Anthropic or `google_search` on Gemini.'
type: 'string'
required:
- 'type'
type: 'object'
description: 'The server tools this endpoint accepts as the provider''s own built-in tool (`engine: "native"`) instead of an OpenRouter engine, keyed by canonical `openrouter:*` name. Each value names the provider tool type the request is translated to. Where that tool runs (provider-side, or returned to the client as with Anthropic bash) is documented per tool. Empty when the provider has none.'
example:
openrouter:web_search:
type: 'web_search_20260209'
type: 'object'
perf_last_30m_by_workload:
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.'
Expand Down Expand Up @@ -25824,6 +25843,7 @@ components:
- 'uptime_last_5m'
- 'uptime_last_1d'
- 'supports_implicit_caching'
- 'native_tools'
- 'latency_last_30m'
- 'throughput_last_30m'
type: 'object'
Expand Down Expand Up @@ -36237,6 +36257,7 @@ paths:
model_id: 'openai/gpt-4'
model_name: 'GPT-4'
name: 'OpenAI: GPT-4'
native_tools: {}
pricing:
completion: '0.00006'
image: '0'
Expand Down Expand Up @@ -36276,6 +36297,7 @@ paths:
model_id: 'openai/gpt-4'
model_name: 'GPT-4'
name: 'OpenAI: GPT-4'
native_tools: {}
pricing:
completion: '0.00006'
image: '0'
Expand Down Expand Up @@ -42925,6 +42947,7 @@ paths:
model_id: 'openai/gpt-4'
model_name: 'GPT-4'
name: 'OpenAI: GPT-4'
native_tools: {}
pricing:
completion: '0.00006'
image: '0'
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:46dcbe8b06ca180012abff0fc1a1c17d113939fa463e1e93353c0c6f90f89ae7
sourceBlobDigest: sha256:42dd34bc01f2c9df601a05c9e79181cdb70957d17798fa6aa8d826bf156bba42
sourceRevisionDigest: sha256:ac4e63eb072f8b6a5d1e7a1bdbfba032d2f9037573a0d6834c5ce73277610721
sourceBlobDigest: sha256:1ba13db83a2100228294b7f20e85808581164f67a255ed28d6eafe1286ae0f24
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:46dcbe8b06ca180012abff0fc1a1c17d113939fa463e1e93353c0c6f90f89ae7
sourceBlobDigest: sha256:42dd34bc01f2c9df601a05c9e79181cdb70957d17798fa6aa8d826bf156bba42
sourceRevisionDigest: sha256:ac4e63eb072f8b6a5d1e7a1bdbfba032d2f9037573a0d6834c5ce73277610721
sourceBlobDigest: sha256:1ba13db83a2100228294b7f20e85808581164f67a255ed28d6eafe1286ae0f24
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:df1f9882239ac3b97e422e0c106a20af744127b4efb9256a8de95e6c38c32f3b
codeSamplesRevisionDigest: sha256:6d5051603d47f45c00e6540a8954ed797c1b6e32699f84d04b2147ec62dcef44
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 @@ -2729,4 +2729,14 @@ Based on:
### Generated
- [python v1.2.32] .
### Releases
- [PyPI v1.2.32] https://pypi.org/project/openrouter/1.2.32 - .
- [PyPI v1.2.32] https://pypi.org/project/openrouter/1.2.32 - .

## 2026-09-28 18:09:33
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.2.33] .
### Releases
- [PyPI v1.2.33] https://pypi.org/project/openrouter/1.2.33 - .
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This is an open enum. Unrecognized values will not fail type checks.
- `"invalid_tool_input"`
- `"url_too_long"`
- `"url_not_allowed"`
- `"url_not_in_prior_context"`
- `"url_not_accessible"`
- `"unsupported_content_type"`
- `"too_many_requests"`
Expand Down
1 change: 1 addition & 0 deletions docs/components/messagesmessageparamerrorcode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ This is an open enum. Unrecognized values will not fail type checks.
- `"max_uses_exceeded"`
- `"too_many_requests"`
- `"query_too_long"`
- `"request_too_large"`
Loading
Loading