chore: 🐝 Update SDK - Generate (spec change merged) 0.11.24 (#436)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-07-13 17:59:18 +00:00
committed by GitHub
co-authored by speakeasybot speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent cb1b9c5ac6
commit 7010ca5c2e
107 changed files with 2135 additions and 961 deletions
@@ -124,10 +124,10 @@ value: components.FusionServerToolOpenRouter = /* values here */
value: components.ImageGenerationServerToolOpenRouter = /* values here */
```
### `components.ChatSearchModelsServerTool`
### `components.SearchModelsServerToolOpenRouter`
```python
value: components.ChatSearchModelsServerTool = /* values here */
value: components.SearchModelsServerToolOpenRouter = /* values here */
```
### `components.WebFetchServerTool`
@@ -1,15 +0,0 @@
---
title: "AnthropicCitationSearchResultLocation"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `search_result_index` | *int* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationSearchResultLocationType](../components/anthropiccitationsearchresultlocationtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `search_result_index` | *int* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationSearchResultLocationParamType](../components/anthropiccitationsearchresultlocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationSearchResultLocationParamType
value: AnthropicCitationSearchResultLocationParamType = "search_result_location"
```
## Values
- `"search_result_location"`
@@ -1,15 +0,0 @@
---
title: "AnthropicCitationSearchResultLocationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationSearchResultLocationType
value: AnthropicCitationSearchResultLocationType = "search_result_location"
```
## Values
- `"search_result_location"`
@@ -1,13 +0,0 @@
---
title: "AnthropicCitationWebSearchResultLocation"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `encrypted_index` | *str* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationWebSearchResultLocationType](../components/anthropiccitationwebsearchresultlocationtype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,13 @@
---
title: "AnthropicCitationWebSearchResultLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `encrypted_index` | *str* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationWebSearchResultLocationParamType](../components/anthropiccitationwebsearchresultlocationparamtype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationWebSearchResultLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationWebSearchResultLocationParamType
value: AnthropicCitationWebSearchResultLocationParamType = "web_search_result_location"
```
## Values
- `"web_search_result_location"`
@@ -1,15 +0,0 @@
---
title: "AnthropicCitationWebSearchResultLocationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationWebSearchResultLocationType
value: AnthropicCitationWebSearchResultLocationType = "web_search_result_location"
```
## Values
- `"web_search_result_location"`
@@ -0,0 +1,12 @@
---
title: "ChatFormatJSONObjectConfig"
---
JSON object response format
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `type` | [components.ChatFormatJSONObjectConfigType](../components/chatformatjsonobjectconfigtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "ChatFormatJSONObjectConfigType"
---
## Example Usage
```python
from openrouter.components import ChatFormatJSONObjectConfigType
value: ChatFormatJSONObjectConfigType = "json_object"
```
## Values
- `"json_object"`
+4 -4
View File
@@ -22,15 +22,15 @@ value: components.AnthropicCitationContentBlockLocationParam = /* values here */
value: components.AnthropicCitationPageLocationParam = /* values here */
```
### `components.AnthropicCitationSearchResultLocation`
### `components.AnthropicCitationSearchResultLocationParam`
```python
value: components.AnthropicCitationSearchResultLocation = /* values here */
value: components.AnthropicCitationSearchResultLocationParam = /* values here */
```
### `components.AnthropicCitationWebSearchResultLocation`
### `components.AnthropicCitationWebSearchResultLocationParam`
```python
value: components.AnthropicCitationWebSearchResultLocation = /* values here */
value: components.AnthropicCitationWebSearchResultLocationParam = /* values here */
```
@@ -9,7 +9,7 @@ title: "CreateObservabilityDestinationRequest"
| `api_key_hashes` | List[*str*] | :heavy_minus_sign: | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. | null |
| `config` | Dict[str, *Nullable[Any]*] | :heavy_check_mark: | Provider-specific configuration. The shape depends on `type` and is validated server-side. | \{<br/>"baseUrl": "https://us.cloud.langfuse.com",<br/>"publicKey": "pk-l...EfGh",<br/>"secretKey": "sk-l...AbCd"<br/>} |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether this destination should be enabled immediately. | true |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfig]](../components/observabilityfilterrulesconfig.mdx) | :heavy_minus_sign: | Optional structured filter rules controlling which events are forwarded. | null |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | :heavy_minus_sign: | Optional structured filter rules controlling which events are forwarded. | null |
| `name` | *str* | :heavy_check_mark: | Human-readable name for the destination. | Production Langfuse |
| `privacy_mode` | *Optional[bool]* | :heavy_minus_sign: | When true, request/response bodies are not forwarded — only metadata. | false |
| `sampling_rate` | *Optional[float]* | :heavy_minus_sign: | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
+23
View File
@@ -0,0 +1,23 @@
---
title: "ImageInputModality"
---
## Example Usage
```python
from openrouter.components import ImageInputModality
# Open enum: unrecognized values are captured as UnrecognizedStr
value: ImageInputModality = "text"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"text"`
- `"image"`
- `"file"`
- `"audio"`
- `"video"`
+1 -1
View File
@@ -6,5 +6,5 @@ title: "ImageModelArchitecture"
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.mdx)] | :heavy_check_mark: | Supported input modalities |
| `input_modalities` | List[[components.ImageInputModality](../components/imageinputmodality.mdx)] | :heavy_check_mark: | Supported input modalities |
| `output_modalities` | List[[components.ImageOutputModality](../components/imageoutputmodality.mdx)] | :heavy_check_mark: | Supported output modalities |
+4 -4
View File
@@ -9,7 +9,7 @@ Video input content part (legacy format - deprecated)
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | [components.LegacyChatContentVideoType](../components/legacychatcontentvideotype.mdx) | :heavy_check_mark: | N/A | |
| `video_url` | [components.ChatContentVideoInput](../components/chatcontentvideoinput.mdx) | :heavy_check_mark: | Video input object | \{<br/>"url": "https://example.com/video.mp4"<br/>} |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `type` | [components.LegacyChatContentVideoType](../components/legacychatcontentvideotype.mdx) | :heavy_check_mark: | N/A | |
| `video_url` | [components.LegacyChatContentVideoInput](../components/legacychatcontentvideoinput.mdx) | :heavy_check_mark: | Video input object | \{<br/>"url": "https://example.com/video.mp4"<br/>} |
@@ -0,0 +1,12 @@
---
title: "LegacyChatContentVideoInput"
---
Video input object
## Fields
| Field | Type | Required | Description |
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
| `url` | *str* | :heavy_check_mark: | URL of the video (data: URLs supported) |
+12
View File
@@ -0,0 +1,12 @@
---
title: "Links"
---
Pagination links
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `next` | *Nullable[str]* | :heavy_check_mark: | URL for the next page of results, or null if this is the last page | /api/v1/models?offset=500&limit=500 |
+2 -2
View File
@@ -58,10 +58,10 @@ value: components.DatetimeServerTool = /* values here */
value: components.ImageGenerationServerToolOpenRouter = /* values here */
```
### `components.ChatSearchModelsServerTool`
### `components.MessagesSearchModelsServerTool`
```python
value: components.ChatSearchModelsServerTool = /* values here */
value: components.MessagesSearchModelsServerTool = /* values here */
```
### `components.WebFetchServerTool`
@@ -0,0 +1,13 @@
---
title: "MessagesSearchModelsServerTool"
---
OpenRouter built-in server tool: searches and filters AI models available on OpenRouter
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `parameters` | [Optional[components.SearchModelsServerToolConfig]](../components/searchmodelsservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for the openrouter:experimental__search_models server tool | \{<br/>"max_results": 5<br/>} |
| `type` | [components.MessagesSearchModelsServerToolType](../components/messagessearchmodelsservertooltype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "MessagesSearchModelsServerToolType"
---
## Example Usage
```python
from openrouter.components import MessagesSearchModelsServerToolType
value: MessagesSearchModelsServerToolType = "openrouter:experimental__search_models"
```
## Values
- `"openrouter:experimental__search_models"`
+7 -7
View File
@@ -7,10 +7,10 @@ Model architecture information
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.mdx)] | :heavy_check_mark: | Supported input modalities | |
| `instruct_type` | [OptionalNullable[components.ModelArchitectureInstructType]](../components/modelarchitectureinstructtype.mdx) | :heavy_minus_sign: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.mdx)] | :heavy_check_mark: | Supported output modalities | |
| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.mdx) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.mdx)] | :heavy_check_mark: | Supported input modalities | |
| `instruct_type` | [OptionalNullable[components.InstructType]](../components/instructtype.mdx) | :heavy_minus_sign: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.mdx)] | :heavy_check_mark: | Supported output modalities | |
| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.mdx) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
@@ -1,42 +0,0 @@
---
title: "ModelArchitectureInstructType"
---
Instruction format type
## Example Usage
```python
from openrouter.components import ModelArchitectureInstructType
# Open enum: unrecognized values are captured as UnrecognizedStr
value: ModelArchitectureInstructType = "none"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"none"`
- `"airoboros"`
- `"alpaca"`
- `"alpaca-modif"`
- `"chatml"`
- `"claude"`
- `"code-llama"`
- `"gemma"`
- `"llama2"`
- `"llama3"`
- `"mistral"`
- `"nemotron"`
- `"neural"`
- `"openchat"`
- `"phi3"`
- `"rwkv"`
- `"vicuna"`
- `"zephyr"`
- `"deepseek-r1"`
- `"deepseek-v3.1"`
- `"qwq"`
- `"qwen3"`
+5 -3
View File
@@ -7,6 +7,8 @@ List of available models
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data` | List[[components.Model](../components/model.mdx)] | :heavy_check_mark: | List of available models | [<br/>\{<br/>"architecture": \{<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>},<br/>"canonical_slug": "openai/gpt-4",<br/>"context_length": 8192,<br/>"created": 1692901234,<br/>"default_parameters": null,<br/>"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",<br/>"expiration_date": null,<br/>"id": "openai/gpt-4",<br/>"knowledge_cutoff": null,<br/>"links": \{<br/>"details": "/api/v1/models/openai/gpt-5.4/endpoints"<br/>},<br/>"name": "GPT-4",<br/>"per_request_limits": null,<br/>"pricing": \{<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>},<br/>"supported_parameters": [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>],<br/>"supported_voices": null,<br/>"top_provider": \{<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>}<br/>}<br/>] |
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | List[[components.Model](../components/model.mdx)] | :heavy_check_mark: | List of available models | [<br/>\{<br/>"architecture": \{<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>},<br/>"canonical_slug": "openai/gpt-4",<br/>"context_length": 8192,<br/>"created": 1692901234,<br/>"default_parameters": null,<br/>"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",<br/>"expiration_date": null,<br/>"id": "openai/gpt-4",<br/>"knowledge_cutoff": null,<br/>"links": \{<br/>"details": "/api/v1/models/openai/gpt-4/endpoints"<br/>},<br/>"name": "GPT-4",<br/>"per_request_limits": null,<br/>"pricing": \{<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>},<br/>"supported_parameters": [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>],<br/>"supported_voices": null,<br/>"top_provider": \{<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>}<br/>}<br/>] |
| `links` | [components.Links](../components/links.mdx) | :heavy_check_mark: | Pagination links | |
| `total_count` | *int* | :heavy_check_mark: | Total number of models matching the query | 150 |
@@ -1,5 +1,5 @@
---
title: "Group"
title: "ObservabilityFilterRuleGroup"
---
## Fields
@@ -1,5 +1,5 @@
---
title: "ObservabilityFilterRulesConfigValue"
title: "ObservabilityFilterRuleGroupValue"
---
## Supported Types
@@ -7,7 +7,7 @@ Optional structured filter rules controlling which events are forwarded.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `groups` | List[[components.Group](../components/group.mdx)] | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `groups` | List[[components.ObservabilityFilterRuleGroup](../components/observabilityfilterrulegroup.mdx)] | :heavy_check_mark: | N/A |
@@ -0,0 +1,13 @@
---
title: "ObservabilityFilterRulesConfigNullable"
---
Optional structured filter rules controlling which events are forwarded.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `groups` | List[[components.ObservabilityFilterRuleGroup](../components/observabilityfilterrulegroup.mdx)] | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -13,10 +13,10 @@ Response format configuration
value: components.ChatFormatGrammarConfig = /* values here */
```
### `components.FormatJSONObjectConfig`
### `components.ChatFormatJSONObjectConfig`
```python
value: components.FormatJSONObjectConfig = /* values here */
value: components.ChatFormatJSONObjectConfig = /* values here */
```
### `components.ChatFormatJSONSchemaConfig`
@@ -124,10 +124,10 @@ value: components.FusionServerToolOpenRouter = /* values here */
value: components.ImageGenerationServerToolOpenRouter = /* values here */
```
### `components.ChatSearchModelsServerTool`
### `components.SearchModelsServerToolOpenRouter`
```python
value: components.ChatSearchModelsServerTool = /* values here */
value: components.SearchModelsServerToolOpenRouter = /* values here */
```
### `components.WebFetchServerTool`
+5 -5
View File
@@ -4,8 +4,8 @@ title: "Rule"
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `field` | [components.FieldT](../components/fieldt.mdx) | :heavy_check_mark: | N/A |
| `operator` | [components.Operator](../components/operator.mdx) | :heavy_check_mark: | N/A |
| `value` | [Optional[components.ObservabilityFilterRulesConfigValue]](../components/observabilityfilterrulesconfigvalue.mdx) | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `field` | [components.FieldT](../components/fieldt.mdx) | :heavy_check_mark: | N/A |
| `operator` | [components.Operator](../components/operator.mdx) | :heavy_check_mark: | N/A |
| `value` | [Optional[components.ObservabilityFilterRuleGroupValue]](../components/observabilityfilterrulegroupvalue.mdx) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,13 @@
---
title: "SearchModelsServerToolOpenRouter"
---
OpenRouter built-in server tool: searches and filters AI models available on OpenRouter
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `parameters` | [Optional[components.SearchModelsServerToolConfig]](../components/searchmodelsservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for the openrouter:experimental__search_models server tool | \{<br/>"max_results": 5<br/>} |
| `type` | [components.SearchModelsServerToolOpenRouterType](../components/searchmodelsservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "SearchModelsServerToolOpenRouterType"
---
## Example Usage
```python
from openrouter.components import SearchModelsServerToolOpenRouterType
value: SearchModelsServerToolOpenRouterType = "openrouter:experimental__search_models"
```
## Values
- `"openrouter:experimental__search_models"`
@@ -9,7 +9,7 @@ title: "UpdateObservabilityDestinationRequest"
| `api_key_hashes` | List[*str*] | :heavy_minus_sign: | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. | null |
| `config` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{<br/>"baseUrl": "https://us.cloud.langfuse.com",<br/>"publicKey": "pk-l...EfGh",<br/>"secretKey": "sk-l...AbCd"<br/>} |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether the destination is enabled. | true |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfig]](../components/observabilityfilterrulesconfig.mdx) | :heavy_minus_sign: | N/A | null |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../components/observabilityfilterrulesconfignullable.mdx) | :heavy_minus_sign: | N/A | null |
| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name for the destination. | Production Langfuse |
| `privacy_mode` | *Optional[bool]* | :heavy_minus_sign: | When true, request/response bodies are not forwarded — only metadata. | false |
| `sampling_rate` | *Optional[float]* | :heavy_minus_sign: | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
-14
View File
@@ -1,14 +0,0 @@
---
title: "CostDetails"
---
Breakdown of upstream inference costs
## Fields
| Field | Type | Required | Description |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `upstream_inference_completions_cost` | *float* | :heavy_check_mark: | N/A |
| `upstream_inference_cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `upstream_inference_prompt_cost` | *float* | :heavy_check_mark: | N/A |
+1 -1
View File
@@ -10,7 +10,7 @@ Token usage statistics
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cost` | *Optional[float]* | :heavy_minus_sign: | Cost of the request in credits | 0.0001 |
| `cost_details` | [OptionalNullable[operations.CostDetails]](../operations/costdetails.mdx) | :heavy_minus_sign: | Breakdown of upstream inference costs | \{<br/>"upstream_inference_completions_cost": 0.0004,<br/>"upstream_inference_cost": null,<br/>"upstream_inference_prompt_cost": 0.0008<br/>} |
| `cost_details` | [OptionalNullable[components.CostDetails]](../components/costdetails.mdx) | :heavy_minus_sign: | Breakdown of upstream inference costs | \{<br/>"upstream_inference_completions_cost": 0.0004,<br/>"upstream_inference_cost": null,<br/>"upstream_inference_prompt_cost": 0.0008<br/>} |
| `is_byok` | *Optional[bool]* | :heavy_minus_sign: | Whether a request was made using a Bring Your Own Key configuration | |
| `prompt_tokens` | *int* | :heavy_check_mark: | Number of tokens in the input | 8 |
| `prompt_tokens_details` | [Optional[operations.PromptTokensDetails]](../operations/prompttokensdetails.mdx) | :heavy_minus_sign: | Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. | |
+2
View File
@@ -9,6 +9,8 @@ title: "GetModelsRequest"
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
| `category` | [Optional[operations.GetModelsCategory]](../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
File diff suppressed because one or more lines are too long
@@ -4,8 +4,10 @@ title: "ListEmbeddingsModelsRequest"
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
File diff suppressed because one or more lines are too long
+7 -5
View File
@@ -4,8 +4,10 @@ title: "ListModelsUserRequest"
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -33,7 +33,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.byok.list()
res = open_router.byok.list(offset=0, limit=50)
while res is not None:
# Handle items
+14 -10
View File
@@ -91,25 +91,29 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.embeddings.list_models()
res = open_router.embeddings.list_models(offset=0, limit=500)
# Handle response
print(res)
while res is not None:
# Handle items
res = res.next()
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
**[components.ModelsListResponse](../../components/modelslistresponse.mdx)**
**[operations.ListEmbeddingsModelsResponse](../../operations/listembeddingsmodelsresponse.mdx)**
### Errors
+5 -5
View File
@@ -41,7 +41,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list()
res = open_router.guardrails.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -320,7 +320,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list_guardrail_key_assignments(id="550e8400-e29b-41d4-a716-446655440000")
res = open_router.guardrails.list_guardrail_key_assignments(id="550e8400-e29b-41d4-a716-446655440000", offset=0, limit=50)
while res is not None:
# Handle items
@@ -476,7 +476,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list_guardrail_member_assignments(id="550e8400-e29b-41d4-a716-446655440000")
res = open_router.guardrails.list_guardrail_member_assignments(id="550e8400-e29b-41d4-a716-446655440000", offset=0, limit=50)
while res is not None:
# Handle items
@@ -634,7 +634,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list_key_assignments()
res = open_router.guardrails.list_key_assignments(offset=0, limit=50)
while res is not None:
# Handle items
@@ -684,7 +684,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list_member_assignments()
res = open_router.guardrails.list_member_assignments(offset=0, limit=50)
while res is not None:
# Handle items
+23 -15
View File
@@ -80,10 +80,12 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.models.list()
res = open_router.models.list(offset=0, limit=500)
# Handle response
print(res)
while res is not None:
# Handle items
res = res.next()
```
@@ -94,6 +96,8 @@ with OpenRouter(
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
| `category` | [Optional[operations.GetModelsCategory]](../../operations/getmodelscategory.mdx) | :heavy_minus_sign: | Filter models by use case category | programming |
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | Filter models by supported parameter (comma-separated) | temperature |
| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text |
@@ -125,7 +129,7 @@ with OpenRouter(
### Response
**[components.ModelsListResponse](../../components/modelslistresponse.mdx)**
**[operations.GetModelsResponse](../../operations/getmodelsresponse.mdx)**
### Errors
@@ -201,26 +205,30 @@ with OpenRouter(
res = open_router.models.list_for_user(security=operations.ListModelsUserSecurity(
bearer=os.getenv("OPENROUTER_BEARER", ""),
))
), offset=0, limit=500)
# Handle response
print(res)
while res is not None:
# Handle items
res = res.next()
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.mdx) | :heavy_check_mark: | N/A |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.mdx) | :heavy_check_mark: | N/A | |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `offset` | *Optional[int]* | :heavy_minus_sign: | Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned | 0 |
| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned | 500 |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | |
### Response
**[components.ModelsListResponse](../../components/modelslistresponse.mdx)**
**[operations.ListModelsUserResponse](../../operations/listmodelsuserresponse.mdx)**
### Errors
+3 -3
View File
@@ -33,7 +33,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.observability.list()
res = open_router.observability.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -107,7 +107,7 @@ with OpenRouter(
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `api_key_hashes` | List[*str*] | :heavy_minus_sign: | Optional allowlist of OpenRouter API key hashes whose traffic is forwarded. `null` or omitted means all keys. Must contain at least one hash if provided. | null |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether this destination should be enabled immediately. | true |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfig]](../../components/observabilityfilterrulesconfig.mdx) | :heavy_minus_sign: | Optional structured filter rules controlling which events are forwarded. | null |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | :heavy_minus_sign: | Optional structured filter rules controlling which events are forwarded. | null |
| `privacy_mode` | *Optional[bool]* | :heavy_minus_sign: | When true, request/response bodies are not forwarded — only metadata. | false |
| `sampling_rate` | *Optional[float]* | :heavy_minus_sign: | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
| `workspace_id` | *Optional[str]* | :heavy_minus_sign: | Optional workspace ID. Defaults to the authenticated entity's default workspace. | 550e8400-e29b-41d4-a716-446655440000 |
@@ -260,7 +260,7 @@ with OpenRouter(
| `api_key_hashes` | List[*str*] | :heavy_minus_sign: | Optional allowlist of OpenRouter API key hashes. `null` clears the filter (all keys). Omitting leaves the current value. Must contain at least one hash if provided. | null |
| `config` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | Provider-specific configuration fields to update. Masked values are ignored; unset fields keep their current value. | \{<br/>"baseUrl": "https://us.cloud.langfuse.com",<br/>"publicKey": "pk-l...EfGh",<br/>"secretKey": "sk-l...AbCd"<br/>} |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether the destination is enabled. | true |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfig]](../../components/observabilityfilterrulesconfig.mdx) | :heavy_minus_sign: | N/A | null |
| `filter_rules` | [OptionalNullable[components.ObservabilityFilterRulesConfigNullable]](../../components/observabilityfilterrulesconfignullable.mdx) | :heavy_minus_sign: | N/A | null |
| `name` | *Optional[str]* | :heavy_minus_sign: | Human-readable name for the destination. | Production Langfuse |
| `privacy_mode` | *Optional[bool]* | :heavy_minus_sign: | When true, request/response bodies are not forwarded — only metadata. | false |
| `sampling_rate` | *Optional[float]* | :heavy_minus_sign: | Sampling rate between 0.0001 and 1 (1 = 100%). | 1 |
+1 -1
View File
@@ -29,7 +29,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.organization.list_members()
res = open_router.organization.list_members(offset=0, limit=50)
while res is not None:
# Handle items
+2 -2
View File
@@ -35,7 +35,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.presets.list()
res = open_router.presets.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -404,7 +404,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.presets.list_versions(slug="my-preset")
res = open_router.presets.list_versions(slug="my-preset", offset=0, limit=50)
while res is not None:
# Handle items
+2 -2
View File
@@ -39,7 +39,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.workspaces.list()
res = open_router.workspaces.list(offset=0, limit=50)
while res is not None:
# Handle items
@@ -455,7 +455,7 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.workspaces.list_members(id="production")
res = open_router.workspaces.list_members(id="production", offset=0, limit=50)
while res is not None:
# Handle items