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
73 changes: 44 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: 62e79d33460be6f895c8279c5dab694d
docChecksum: 42a7341864f1f9e1b5c719418e673c09
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
releaseVersion: 1.3.221
configChecksum: 919cb7cf8a9fed18e3c5f3d11ebe8d22
releaseVersion: 1.3.222
configChecksum: 346e7c95ab513ac15633e7252ee9b988
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 73dd1646-9619-4ee6-938e-4e5921f05df0
pristine_commit_hash: 5f1afca572e00380e737415a884488637b794750
pristine_tree_hash: 7a5fd61338e2832d33b3e4853944ed6a126fe7cd
generation_id: 00cec704-5439-4433-81e9-3ac6505340ce
pristine_commit_hash: 5c4cff4d7439bcdbae98e1266c015e5fb7dd6e8e
pristine_tree_hash: 84c880143b9ec22f749fba37a24ec96078023bcf
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -3386,6 +3386,18 @@ trackedFiles:
id: 71ed622a2f4d
last_write_checksum: sha1:dd0d3e3a74300f11e36f91ba650e17dfe27036fd
pristine_git_object: 5b155412cf75006c71e148911d0df802c4861c91
docs/components/embeddingsmodel.mdx:
id: f9789baaa109
last_write_checksum: sha1:95ed4b5f9ba1f6d7423a99550984c032e60c8d9b
pristine_git_object: 1488309125cfc0f8c45bcbd10b95f2b93d204909
docs/components/embeddingsmodelslistresponse.mdx:
id: 1cba1ae05759
last_write_checksum: sha1:85bac01fe19036801d0e8cc8759ae19b28472634
pristine_git_object: 40c96d117b657df756cbe4023401f1cd8793c808
docs/components/embeddingsmodelslistresponselinks.mdx:
id: 2211bacaa9fe
last_write_checksum: sha1:a58024d9e35df662d624ce394493d382d919c2ec
pristine_git_object: 7c0c1b6f26c5dcd1b18004122d4f76ff5bcb510e
docs/components/endpoint.mdx:
id: bab712ee633d
last_write_checksum: sha1:37ef09040eb8a66cf924c237189de7778cfcfcb2
Expand Down Expand Up @@ -7776,8 +7788,8 @@ trackedFiles:
pristine_git_object: f1955f5489d6b81cf05df12cb0c18d6ca0a16f6f
docs/components/providerpreferences.mdx:
id: adbdfaa46438
last_write_checksum: sha1:40fb10dd3699ce5d6c8d6ccb257ae63ce9089277
pristine_git_object: 8a0379d9d041acb6f0d8e04965d96f440ea90f15
last_write_checksum: sha1:2303e8cee8a83b27cfda834a742ea5386577608a
pristine_git_object: 8242d6a7e1cc009e85e22ddea32f72e2efadbea0
docs/components/providerpreferencesignore.mdx:
id: e0455b31c87b
last_write_checksum: sha1:823f56c785a5c80949105fc0f4297a5b0ff2c2b2
Expand Down Expand Up @@ -11320,8 +11332,8 @@ trackedFiles:
pristine_git_object: dd273ae5c90fb6a7e2ee5b9c1c72855027d4ff72
docs/operations/listembeddingsmodelsresponse.mdx:
id: d07053bd83fc
last_write_checksum: sha1:d76daf886246d7c49480d52fa6e7634ed4d8b189
pristine_git_object: baa3153745661216be4f6cfa1221783f924f7e80
last_write_checksum: sha1:774e6b8ae3eaf28bc4ee5ff492897a7df9ad7ae2
pristine_git_object: 3a388f99f4082fd76c24ef4a760443414c225544
docs/operations/listendpointsglobals.mdx:
id: 12c08333c32c
last_write_checksum: sha1:cf64976fc16ebfd8ec3f9d6215385d11b5dab8d8
Expand Down Expand Up @@ -12272,8 +12284,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:b2ec25e7294b8c44e097b64662f0e421a3acd309
pristine_git_object: 3091edf7069b052f5c0fdabbf77fdb3825e387b6
last_write_checksum: sha1:9ae391f97e2f8a2db89319d9e8fece71cf2cda18
pristine_git_object: b8d3d18b773d8e19ffcb9788b4459dff15853ed5
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -12300,8 +12312,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:d068ab3156eac011948cfa37e561750d72092d0a
pristine_git_object: 0d900a872ab3d585d6c0dc0a3dba42540b68e4fd
last_write_checksum: sha1:638b7b5eeb839038f7c07920563fb79963d6a12c
pristine_git_object: e255a0a06c83b2331aad2b0a5ab98a04bb6acf0b
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
Expand Down Expand Up @@ -12348,8 +12360,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:558f464706d541484dc6d70b547652f97cad4e4d
pristine_git_object: 5f2f0c2f15c70ad6111e1ebe4685f19381980eb5
last_write_checksum: sha1:84a75702011da25b57f6a15c1ed3a79bf1fb8912
pristine_git_object: 5d32eb5285f4b58e9c8b86254d1e3b65382302b8
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:08125e1d60df82793e11e8aed6e3c9fdb7512ebb
Expand Down Expand Up @@ -13790,6 +13802,14 @@ trackedFiles:
id: 81553b79cc50
last_write_checksum: sha1:f952180280fef71fe3fac4e41ba122af3b931f12
pristine_git_object: ade9cf4cc5e9473f422f8d873b30bb44e0d273b0
src/openrouter/components/embeddingsmodel.py:
id: 56d48d27ed7c
last_write_checksum: sha1:4031aa1a737e06ef8ae227ef0f7e770dc92f19f5
pristine_git_object: 1349d4f684c5a5613aee958b4ba68315564a2554
src/openrouter/components/embeddingsmodelslistresponse.py:
id: 8a70952385cd
last_write_checksum: sha1:d6f04e55b82cbfcdca9eacc565c03f0a216075f8
pristine_git_object: f81874f0d727380767e94f663fb942f9416b9642
src/openrouter/components/endpointinfo.py:
id: ce049670b5ae
last_write_checksum: sha1:914f173c73fe1035e56c9acf4ad9e23555bde95a
Expand Down Expand Up @@ -15392,8 +15412,8 @@ trackedFiles:
pristine_git_object: abe660d025957d61f68148006ca2c6efdc6b13a8
src/openrouter/components/providerpreferences.py:
id: cdd58c8d664d
last_write_checksum: sha1:01517a1df56864c2b6f3845e9e17c1768c59de65
pristine_git_object: 3ca57868fa02b7f5e4cd2c0fb0fbf0c6a92a8bee
last_write_checksum: sha1:93f13e4e046bb1ae224c587073c6f45bb4eadd8e
pristine_git_object: e03e30e1bd6dec0159f2e751ad2e9cb619a168df
src/openrouter/components/providerresponse.py:
id: ad3887be54c5
last_write_checksum: sha1:8a37a635ece4f261e006e9a45a622cd6523b1c5e
Expand Down Expand Up @@ -16336,8 +16356,8 @@ trackedFiles:
pristine_git_object: 86c90d5988c391d0f0d52d29f8f01139eb4d26ae
src/openrouter/embeddings.py:
id: 0374ace39067
last_write_checksum: sha1:76c14bf1233a2e4c06582791a89976bbf2f0f579
pristine_git_object: 2263922e5b202354a7a6979f4b0d6445c5900522
last_write_checksum: sha1:723bcc5b35691800921b052343e16ecdb86c9eda
pristine_git_object: bafd6d09ab23d03b9dc55d876885b35ea75ffbca
src/openrouter/endpoints.py:
id: 465bbf2b7939
last_write_checksum: sha1:0632be9f0f9b0bc8a282a5840a759d7a2833c645
Expand Down Expand Up @@ -16956,8 +16976,8 @@ trackedFiles:
pristine_git_object: 66670139b6cee0fe41d3aeac9ad1be9671f2b501
src/openrouter/operations/listembeddingsmodels.py:
id: bf749a1f23d6
last_write_checksum: sha1:938440c9b9df0c3d8430792f262bffced0207d13
pristine_git_object: 822451956b9434ae27d4195621be0ba3718eb176
last_write_checksum: sha1:e7d73cc16cdb10bf4b6ca61eebd7cc7996605a7a
pristine_git_object: aafcb6752fdd8e6133026dc6e602682280392d65
src/openrouter/operations/listendpoints.py:
id: 62b7a5f21dec
last_write_checksum: sha1:1aa9ca7cc8e0376cc77fe81403e2664ecbd1abb2
Expand Down Expand Up @@ -17546,7 +17566,7 @@ examples:
limit: 500
responses:
"200":
application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->text", "output_modalities": ["text"]}, "canonical_slug": "openai/gpt-4", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/chat/completions", "/api/v1/completions", "/api/v1/messages", "/api/v1/responses"], "id": "openai/gpt-4", "links": {"details": "/api/v1/models/openai/gpt-4/endpoints"}, "name": "GPT-4", "per_request_limits": null, "pricing": {"completion": "0.00006", "prompt": "0.00003"}, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "supported_voices": null, "top_provider": {"is_moderated": true}}], "links": {"next": "/api/v1/models?offset=500&limit=500"}, "total_count": 150}
application/json: {"data": [{"architecture": {"input_modalities": ["text"], "modality": "text->embeddings", "output_modalities": ["embeddings"]}, "canonical_slug": "openai/text-embedding-3-small", "context_length": 8192, "created": 1692901234, "default_parameters": null, "endpoints": ["/api/v1/embeddings"], "id": "openai/text-embedding-3-small", "links": {"details": "/api/v1/models/openai/text-embedding-3-small/endpoints"}, "name": "Text Embedding 3 Small", "per_request_limits": null, "pricing": {"completion": "0", "prompt": "0.00000002"}, "supported_parameters": [], "supported_voices": null, "top_provider": {"is_moderated": false}}], "links": {"next": null}, "total_count": 1}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
"500":
Expand Down Expand Up @@ -22497,9 +22517,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.images.list_models()`: `response.data[]` **Changed**
* `open_router.images.list_model_endpoints()`: `response.endpoints[]` **Changed**
* `open_router.organization.list_members()`: `response.data[].external_id` **Added**
* `open_router.video_generation.list_videos_models()`: `response.data[]` **Changed**
releaseNotes: "## Python SDK Changes:\n* `open_router.alpha.decisions.create()`: \n * `request.provider.tee` **Added**\n* `open_router.alpha.extractions.create()`: \n * `request.provider.tee` **Added**\n* `open_router.embeddings.generate()`: \n * `request.provider.tee` **Added**\n* `open_router.embeddings.list_models()`: `response.data[]` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.provider.tee` **Added**\n* `open_router.presets.create_presets_messages()`: \n * `request.provider.tee` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.provider.tee` **Added**\n* `open_router.rerank.rerank()`: \n * `request.provider.tee` **Added**\n* `open_router.system_one.create()`: \n * `request.provider.tee` **Added**\n"
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.221
version: 1.3.222
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
151 changes: 150 additions & 1 deletion .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13009,6 +13009,135 @@ components:
- 'throughput'
- 'request_count'
type: 'object'
EmbeddingsModel:
allOf:
- $ref: '#/components/schemas/Model'
- properties:
input_modalities:
description: 'Typed inputs the model accepts, following the Models API V2 document. The text input carries the context length.'
items:
$ref: '#/components/schemas/ModelInputModalityV2'
minItems: 1
type: 'array'
output_modalities:
description: 'Typed outputs with the request fields each accepts, following the Models API V2 document. Pricing stays in `pricing`.'
items:
$ref: '#/components/schemas/ModelOutputModalityV2'
minItems: 1
type: 'array'
type: 'object'
description: 'An embeddings model available on OpenRouter'
example:
architecture:
input_modalities:
- 'text'
instruct_type: null
modality: 'text->embeddings'
output_modalities:
- 'embeddings'
tokenizer: 'GPT'
canonical_slug: 'openai/text-embedding-3-small'
context_length: 8192
created: 1692901234
default_parameters: null
description: 'OpenAI text embedding model optimized for performance.'
endpoints:
- '/api/v1/embeddings'
expiration_date: null
id: 'openai/text-embedding-3-small'
input_modalities:
- supported_inputs:
max_context_length:
unit: 'token'
value: 8192
type: 'text'
knowledge_cutoff: null
links:
details: '/api/v1/models/openai/text-embedding-3-small/endpoints'
name: 'Text Embedding 3 Small'
output_modalities:
- supported_parameters:
encoding_format:
type: 'enum'
values:
- 'float'
- 'base64'
type: 'embeddings'
per_request_limits: null
pricing:
completion: '0'
image: '0'
prompt: '0.00000002'
request: '0'
supported_parameters: []
supported_voices: null
top_provider:
context_length: 8192
is_moderated: false
max_completion_tokens: null
EmbeddingsModelsListResponse:
allOf:
- $ref: '#/components/schemas/ModelsListResponse'
- properties:
data:
description: 'List of embeddings models'
items:
$ref: '#/components/schemas/EmbeddingsModel'
type: 'array'
type: 'object'
description: 'List of embeddings models available through the embeddings API'
example:
data:
- architecture:
input_modalities:
- 'text'
instruct_type: null
modality: 'text->embeddings'
output_modalities:
- 'embeddings'
tokenizer: 'GPT'
canonical_slug: 'openai/text-embedding-3-small'
context_length: 8192
created: 1692901234
default_parameters: null
description: 'OpenAI text embedding model optimized for performance.'
endpoints:
- '/api/v1/embeddings'
expiration_date: null
id: 'openai/text-embedding-3-small'
input_modalities:
- supported_inputs:
max_context_length:
unit: 'token'
value: 8192
type: 'text'
knowledge_cutoff: null
links:
details: '/api/v1/models/openai/text-embedding-3-small/endpoints'
name: 'Text Embedding 3 Small'
output_modalities:
- supported_parameters:
encoding_format:
type: 'enum'
values:
- 'float'
- 'base64'
type: 'embeddings'
per_request_limits: null
pricing:
completion: '0'
image: '0'
prompt: '0.00000002'
request: '0'
supported_parameters: []
supported_voices: null
top_provider:
context_length: 8192
is_moderated: false
max_completion_tokens: null
links:
next: null
total_count: 1
EndpointInfo:
example:
model: 'openai/gpt-4o'
Expand Down Expand Up @@ -32827,6 +32956,12 @@ components:
- type: 'null'
description: 'The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.'
example: 'price'
tee:
description: 'Whether to restrict routing to TEE endpoints, where the request is encrypted to a key held inside the provider enclave. When true, only TEE endpoints will be used.'
example: true
type:
- 'boolean'
- 'null'
zdr:
description: 'Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.'
example: true
Expand Down Expand Up @@ -47438,10 +47573,24 @@ paths:
- '/api/v1/embeddings'
expiration_date: null
id: 'openai/text-embedding-3-small'
input_modalities:
- supported_inputs:
max_context_length:
unit: 'token'
value: 8192
type: 'text'
knowledge_cutoff: null
links:
details: '/api/v1/models/openai/text-embedding-3-small/endpoints'
name: 'Text Embedding 3 Small'
output_modalities:
- supported_parameters:
encoding_format:
type: 'enum'
values:
- 'float'
- 'base64'
type: 'embeddings'
per_request_limits: null
pricing:
completion: '0'
Expand All @@ -47455,7 +47604,7 @@ paths:
is_moderated: false
max_completion_tokens: null
schema:
$ref: '#/components/schemas/ModelsListResponse'
$ref: '#/components/schemas/EmbeddingsModelsListResponse'
description: 'Returns a list of embeddings models'
'400':
content:
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:6023b2ffbbb02de7eed5d53a2a69217d5309cbc6fe7c835496d2649e97d68aad
sourceBlobDigest: sha256:c52375a0046e45779007eee6366e39f450a8b059ac7451c0c89e4c467291fe30
sourceRevisionDigest: sha256:f5e30b08e463001f34df8f5b532c086a2038b761418054ca65f9a6d467a85da7
sourceBlobDigest: sha256:5bc50c4d526cc0b5d500c62ef21ad2873f40f9e2c455663973c711d45229f9d7
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6023b2ffbbb02de7eed5d53a2a69217d5309cbc6fe7c835496d2649e97d68aad
sourceBlobDigest: sha256:c52375a0046e45779007eee6366e39f450a8b059ac7451c0c89e4c467291fe30
sourceRevisionDigest: sha256:f5e30b08e463001f34df8f5b532c086a2038b761418054ca65f9a6d467a85da7
sourceBlobDigest: sha256:5bc50c4d526cc0b5d500c62ef21ad2873f40f9e2c455663973c711d45229f9d7
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:80a9645aa2e57ec13de000a342f6762abfa528db38ea003baaf4e371ce57225b
codeSamplesRevisionDigest: sha256:312ff18be74643deb1643b09af308af82e4974687b99493e20d091ead1ed2750
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
Loading