mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AABenchmarkEntry"
|
||||
---
|
||||
|
||||
Artificial Analysis benchmark index scores.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
| `agentic_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Agentic Index score | 55.8 |
|
||||
| `coding_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Coding Index score | 63.2 |
|
||||
| `intelligence_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Intelligence Index score | 71.4 |
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "Action"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.OutputWebSearchCallItemActionSearch`
|
||||
|
||||
```python
|
||||
value: components.OutputWebSearchCallItemActionSearch = /* values here */
|
||||
```
|
||||
|
||||
### `components.ActionOpenPage`
|
||||
|
||||
```python
|
||||
value: components.ActionOpenPage = /* values here */
|
||||
```
|
||||
|
||||
### `components.ActionFindInPage`
|
||||
|
||||
```python
|
||||
value: components.ActionFindInPage = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: "ActionEnum"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ActionEnum
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: ActionEnum = "read"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"read"`
|
||||
- `"write"`
|
||||
- `"delete"`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "ActionFindInPage"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `pattern` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.TypeFindInPage](../components/typefindinpage.mdx) | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "ActionOpenPage"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `type` | [components.TypeOpenPage](../components/typeopenpage.mdx) | :heavy_check_mark: | N/A |
|
||||
| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "ActionTypeSearch"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ActionTypeSearch
|
||||
value: ActionTypeSearch = "search"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"search"`
|
||||
@@ -1,5 +1,6 @@
|
||||
# ActivityItem
|
||||
|
||||
---
|
||||
title: "ActivityItem"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "ActivityResponse"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||
| `data` | List[[components.ActivityItem](../components/activityitem.mdx)] | :heavy_check_mark: | List of activity items |
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AdvisorNestedTool"
|
||||
---
|
||||
|
||||
A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
|
||||
| `type` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{<br/>"type": "openrouter:web_search"<br/>} |
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "AdvisorReasoning"
|
||||
---
|
||||
|
||||
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `effort` | [Optional[components.AdvisorReasoningEffort]](../components/advisorreasoningeffort.mdx) | :heavy_minus_sign: | Reasoning effort level for the advisor call. |
|
||||
| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of reasoning tokens the advisor may use. |
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "AdvisorReasoningEffort"
|
||||
---
|
||||
|
||||
Reasoning effort level for the advisor call.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AdvisorReasoningEffort
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AdvisorReasoningEffort = "max"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"max"`
|
||||
- `"xhigh"`
|
||||
- `"high"`
|
||||
- `"medium"`
|
||||
- `"low"`
|
||||
- `"minimal"`
|
||||
- `"none"`
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: "AdvisorServerToolConfig"
|
||||
---
|
||||
|
||||
Configuration for one openrouter:advisor server tool entry.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `forward_transcript` | *Optional[bool]* | :heavy_minus_sign: | When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call. | false |
|
||||
| `instructions` | *Optional[str]* | :heavy_minus_sign: | System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own. | You are a senior staff engineer. Give a focused, decisive plan. |
|
||||
| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies. | 2048 |
|
||||
| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools. | 5 |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model. | ~anthropic/claude-opus-latest |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars. | reviewer |
|
||||
| `reasoning` | [Optional[components.AdvisorReasoning]](../components/advisorreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. | \{<br/>"effort": "high"<br/>} |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result. | false |
|
||||
| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. | 0.7 |
|
||||
| `tools` | List[[components.AdvisorNestedTool](../components/advisornestedtool.mdx)] | :heavy_minus_sign: | Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself. | |
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "AdvisorServerToolOpenRouter"
|
||||
---
|
||||
|
||||
OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `parameters` | [Optional[components.AdvisorServerToolConfig]](../components/advisorservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for one openrouter:advisor server tool entry. | \{<br/>"model": "~anthropic/claude-opus-latest",<br/>"name": "reviewer"<br/>} |
|
||||
| `type` | [components.AdvisorServerToolOpenRouterType](../components/advisorservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AdvisorServerToolOpenRouterType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AdvisorServerToolOpenRouterType
|
||||
value: AdvisorServerToolOpenRouterType = "openrouter:advisor"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"openrouter:advisor"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AllowedTools"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `read_only` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "AllowedToolsUnion"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `List[str]`
|
||||
|
||||
```python
|
||||
value: List[str] = /* values here */
|
||||
```
|
||||
|
||||
### `components.AllowedTools`
|
||||
|
||||
```python
|
||||
value: components.AllowedTools = /* values here */
|
||||
```
|
||||
|
||||
### `Any`
|
||||
|
||||
```python
|
||||
value: Any = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "Always"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "AnnotationAddedEvent"
|
||||
---
|
||||
|
||||
Event emitted when a text annotation is added to output
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `annotation` | [components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.mdx) | :heavy_check_mark: | N/A | \{<br/>"file_id": "file-abc123",<br/>"filename": "research_paper.pdf",<br/>"index": 0,<br/>"type": "file_citation"<br/>} |
|
||||
| `annotation_index` | *int* | :heavy_check_mark: | N/A | |
|
||||
| `content_index` | *int* | :heavy_check_mark: | N/A | |
|
||||
| `item_id` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `output_index` | *int* | :heavy_check_mark: | N/A | |
|
||||
| `sequence_number` | *int* | :heavy_check_mark: | N/A | |
|
||||
| `type` | [components.AnnotationAddedEventType](../components/annotationaddedeventtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnnotationAddedEventType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnnotationAddedEventType
|
||||
value: AnnotationAddedEventType = "response.output_text.annotation.added"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"response.output_text.annotation.added"`
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicAdvisorMessageUsageIteration"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
|
||||
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `type` | [components.AnthropicAdvisorMessageUsageIterationType](../components/anthropicadvisormessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicAdvisorMessageUsageIterationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicAdvisorMessageUsageIterationType
|
||||
value: AnthropicAdvisorMessageUsageIterationType = "advisor_message"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"advisor_message"`
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: "AnthropicAllowedCallers"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicAllowedCallers
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AnthropicAllowedCallers = "direct"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"direct"`
|
||||
- `"code_execution_20250825"`
|
||||
- `"code_execution_20260120"`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "AnthropicBase64ImageSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `media_type` | [components.AnthropicImageMimeType](../components/anthropicimagemimetype.mdx) | :heavy_check_mark: | N/A | image/jpeg |
|
||||
| `type` | [components.AnthropicBase64ImageSourceType](../components/anthropicbase64imagesourcetype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicBase64ImageSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicBase64ImageSourceType
|
||||
value: AnthropicBase64ImageSourceType = "base64"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"base64"`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "AnthropicBase64PdfSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `media_type` | [components.AnthropicBase64PdfSourceMediaType](../components/anthropicbase64pdfsourcemediatype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicBase64PdfSourceType](../components/anthropicbase64pdfsourcetype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicBase64PdfSourceMediaType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicBase64PdfSourceMediaType
|
||||
value: AnthropicBase64PdfSourceMediaType = "application/pdf"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"application/pdf"`
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicBase64PdfSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicBase64PdfSourceType
|
||||
value: AnthropicBase64PdfSourceType = "base64"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"base64"`
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "AnthropicCacheControlDirective"
|
||||
---
|
||||
|
||||
Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `ttl` | [Optional[components.AnthropicCacheControlTTL]](../components/anthropiccachecontrolttl.mdx) | :heavy_minus_sign: | N/A | 5m |
|
||||
| `type` | [components.AnthropicCacheControlDirectiveType](../components/anthropiccachecontroldirectivetype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicCacheControlDirectiveType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCacheControlDirectiveType
|
||||
value: AnthropicCacheControlDirectiveType = "ephemeral"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"ephemeral"`
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "AnthropicCacheControlTTL"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCacheControlTTL
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AnthropicCacheControlTTL = "5m"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"5m"`
|
||||
- `"1h"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicCitationCharLocationParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `cited_text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `document_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `end_char_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `start_char_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicCitationCharLocationParamType](../components/anthropiccitationcharlocationparamtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicCitationCharLocationParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCitationCharLocationParamType
|
||||
value: AnthropicCitationCharLocationParamType = "char_location"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"char_location"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicCitationContentBlockLocationParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cited_text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `document_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicCitationContentBlockLocationParamType](../components/anthropiccitationcontentblocklocationparamtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicCitationContentBlockLocationParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCitationContentBlockLocationParamType
|
||||
value: AnthropicCitationContentBlockLocationParamType = "content_block_location"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"content_block_location"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicCitationPageLocationParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `cited_text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `document_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
|
||||
| `end_page_number` | *int* | :heavy_check_mark: | N/A |
|
||||
| `start_page_number` | *int* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicCitationPageLocationParamType](../components/anthropiccitationpagelocationparamtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicCitationPageLocationParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCitationPageLocationParamType
|
||||
value: AnthropicCitationPageLocationParamType = "page_location"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"page_location"`
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
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: "AnthropicCitationSearchResultLocationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCitationSearchResultLocationType
|
||||
value: AnthropicCitationSearchResultLocationType = "search_result_location"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"search_result_location"`
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
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,15 @@
|
||||
---
|
||||
title: "AnthropicCitationWebSearchResultLocationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCitationWebSearchResultLocationType
|
||||
value: AnthropicCitationWebSearchResultLocationType = "web_search_result_location"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"web_search_result_location"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicCompactionUsageIteration"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
|
||||
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `type` | [components.AnthropicCompactionUsageIterationType](../components/anthropiccompactionusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicCompactionUsageIterationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicCompactionUsageIterationType
|
||||
value: AnthropicCompactionUsageIterationType = "compaction"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"compaction"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicDocumentBlockParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
|
||||
| `citations` | [OptionalNullable[components.AnthropicDocumentBlockParamCitations]](../components/anthropicdocumentblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
|
||||
| `context` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `source` | [components.AnthropicDocumentBlockParamSourceUnion](../components/anthropicdocumentblockparamsourceunion.mdx) | :heavy_check_mark: | N/A | |
|
||||
| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `type` | [components.TypeDocument](../components/typedocument.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "AnthropicDocumentBlockParamCitations"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "AnthropicDocumentBlockParamContent1"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.AnthropicImageBlockParam`
|
||||
|
||||
```python
|
||||
value: components.AnthropicImageBlockParam = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicTextBlockParam`
|
||||
|
||||
```python
|
||||
value: components.AnthropicTextBlockParam = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "AnthropicDocumentBlockParamContent2"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `List[components.AnthropicDocumentBlockParamContent1]`
|
||||
|
||||
```python
|
||||
value: List[components.AnthropicDocumentBlockParamContent1] = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "AnthropicDocumentBlockParamSourceUnion"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.AnthropicBase64PdfSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicBase64PdfSource = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicPlainTextSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicPlainTextSource = /* values here */
|
||||
```
|
||||
|
||||
### `components.SourceContent`
|
||||
|
||||
```python
|
||||
value: components.SourceContent = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicURLPdfSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicURLPdfSource = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicFileDocumentSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicFileDocumentSource = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicFileDocumentSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `file_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicFileDocumentSourceType](../components/anthropicfiledocumentsourcetype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicFileDocumentSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicFileDocumentSourceType
|
||||
value: AnthropicFileDocumentSourceType = "file"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"file"`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "AnthropicImageBlockParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
|
||||
| `source` | [components.AnthropicImageBlockParamSource](../components/anthropicimageblockparamsource.mdx) | :heavy_check_mark: | N/A | |
|
||||
| `type` | [components.AnthropicImageBlockParamType](../components/anthropicimageblockparamtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: "AnthropicImageBlockParamSource"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.AnthropicBase64ImageSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicBase64ImageSource = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicURLImageSource`
|
||||
|
||||
```python
|
||||
value: components.AnthropicURLImageSource = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicImageBlockParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicImageBlockParamType
|
||||
value: AnthropicImageBlockParamType = "image"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"image"`
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "AnthropicImageMimeType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicImageMimeType
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AnthropicImageMimeType = "image/jpeg"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"image/jpeg"`
|
||||
- `"image/png"`
|
||||
- `"image/gif"`
|
||||
- `"image/webp"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicInputTokensClearAtLeast"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicInputTokensClearAtLeastType](../components/anthropicinputtokensclearatleasttype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `value` | *int* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicInputTokensClearAtLeastType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicInputTokensClearAtLeastType
|
||||
value: AnthropicInputTokensClearAtLeastType = "input_tokens"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"input_tokens"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicInputTokensTrigger"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicInputTokensTriggerType](../components/anthropicinputtokenstriggertype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `value` | *int* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicInputTokensTriggerType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicInputTokensTriggerType
|
||||
value: AnthropicInputTokensTriggerType = "input_tokens"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"input_tokens"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicIterationCacheCreation"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------- | --------------------------- | --------------------------- | --------------------------- |
|
||||
| `ephemeral_1h_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||
| `ephemeral_5m_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicMessageUsageIteration"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
|
||||
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `type` | [components.AnthropicMessageUsageIterationType](../components/anthropicmessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicMessageUsageIterationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicMessageUsageIterationType
|
||||
value: AnthropicMessageUsageIterationType = "message"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"message"`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "AnthropicPlainTextSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `media_type` | [components.AnthropicPlainTextSourceMediaType](../components/anthropicplaintextsourcemediatype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicPlainTextSourceType](../components/anthropicplaintextsourcetype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicPlainTextSourceMediaType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicPlainTextSourceMediaType
|
||||
value: AnthropicPlainTextSourceMediaType = "text/plain"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"text/plain"`
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicPlainTextSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicPlainTextSourceType
|
||||
value: AnthropicPlainTextSourceType = "text"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"text"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicSearchResultBlockParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
|
||||
| `citations` | [Optional[components.AnthropicSearchResultBlockParamCitations]](../components/anthropicsearchresultblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
|
||||
| `content` | List[[components.AnthropicTextBlockParam](../components/anthropictextblockparam.mdx)] | :heavy_check_mark: | N/A | |
|
||||
| `source` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `title` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `type` | [components.AnthropicSearchResultBlockParamType](../components/anthropicsearchresultblockparamtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "AnthropicSearchResultBlockParamCitations"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicSearchResultBlockParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicSearchResultBlockParamType
|
||||
value: AnthropicSearchResultBlockParamType = "search_result"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"search_result"`
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "AnthropicSpeed"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicSpeed
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AnthropicSpeed = "fast"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"fast"`
|
||||
- `"standard"`
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: "AnthropicTextBlockParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
|
||||
| `citations` | List[[components.Citation](../components/citation.mdx)] | :heavy_minus_sign: | N/A | |
|
||||
| `text` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `type` | [components.AnthropicTextBlockParamType](../components/anthropictextblockparamtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicTextBlockParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicTextBlockParamType
|
||||
value: AnthropicTextBlockParamType = "text"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"text"`
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "AnthropicThinkingDisplay"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicThinkingDisplay
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: AnthropicThinkingDisplay = "summarized"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"summarized"`
|
||||
- `"omitted"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicThinkingTurns"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `type` | [components.AnthropicThinkingTurnsType](../components/anthropicthinkingturnstype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `value` | *int* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicThinkingTurnsType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicThinkingTurnsType
|
||||
value: AnthropicThinkingTurnsType = "thinking_turns"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"thinking_turns"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicToolUsesKeep"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicToolUsesKeepType](../components/anthropictooluseskeeptype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `value` | *int* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicToolUsesKeepType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicToolUsesKeepType
|
||||
value: AnthropicToolUsesKeepType = "tool_uses"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"tool_uses"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicToolUsesTrigger"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicToolUsesTriggerType](../components/anthropictoolusestriggertype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `value` | *int* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicToolUsesTriggerType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicToolUsesTriggerType
|
||||
value: AnthropicToolUsesTriggerType = "tool_uses"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"tool_uses"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "AnthropicUnknownUsageIteration"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
|
||||
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `type` | *str* | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicURLImageSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicURLImageSourceType](../components/anthropicurlimagesourcetype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicURLImageSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicURLImageSourceType
|
||||
value: AnthropicURLImageSourceType = "url"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"url"`
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: "AnthropicURLPdfSource"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `type` | [components.AnthropicURLPdfSourceType](../components/anthropicurlpdfsourcetype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicURLPdfSourceType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicURLPdfSourceType
|
||||
value: AnthropicURLPdfSourceType = "url"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"url"`
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: "AnthropicUsageIteration"
|
||||
---
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.AnthropicCompactionUsageIteration`
|
||||
|
||||
```python
|
||||
value: components.AnthropicCompactionUsageIteration = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicMessageUsageIteration`
|
||||
|
||||
```python
|
||||
value: components.AnthropicMessageUsageIteration = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicAdvisorMessageUsageIteration`
|
||||
|
||||
```python
|
||||
value: components.AnthropicAdvisorMessageUsageIteration = /* values here */
|
||||
```
|
||||
|
||||
### `components.AnthropicUnknownUsageIteration`
|
||||
|
||||
```python
|
||||
value: components.AnthropicUnknownUsageIteration = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "AnthropicWebSearchResultBlockParam"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `encrypted_content` | *str* | :heavy_check_mark: | N/A |
|
||||
| `page_age` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `title` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.AnthropicWebSearchResultBlockParamType](../components/anthropicwebsearchresultblockparamtype.mdx) | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicWebSearchResultBlockParamType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicWebSearchResultBlockParamType
|
||||
value: AnthropicWebSearchResultBlockParamType = "web_search_result"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"web_search_result"`
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: "AnthropicWebSearchToolUserLocation"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `region` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `type` | [components.AnthropicWebSearchToolUserLocationType](../components/anthropicwebsearchtooluserlocationtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "AnthropicWebSearchToolUserLocationType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import AnthropicWebSearchToolUserLocationType
|
||||
value: AnthropicWebSearchToolUserLocationType = "approximate"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"approximate"`
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: "APIErrorType"
|
||||
---
|
||||
|
||||
Canonical OpenRouter error type, stable across all API formats
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import APIErrorType
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: APIErrorType = "context_length_exceeded"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"context_length_exceeded"`
|
||||
- `"max_tokens_exceeded"`
|
||||
- `"token_limit_exceeded"`
|
||||
- `"string_too_long"`
|
||||
- `"authentication"`
|
||||
- `"permission_denied"`
|
||||
- `"payment_required"`
|
||||
- `"rate_limit_exceeded"`
|
||||
- `"provider_overloaded"`
|
||||
- `"provider_unavailable"`
|
||||
- `"invalid_request"`
|
||||
- `"invalid_prompt"`
|
||||
- `"not_found"`
|
||||
- `"precondition_failed"`
|
||||
- `"payload_too_large"`
|
||||
- `"unprocessable"`
|
||||
- `"content_policy_violation"`
|
||||
- `"refusal"`
|
||||
- `"invalid_image"`
|
||||
- `"image_too_large"`
|
||||
- `"image_too_small"`
|
||||
- `"unsupported_image_format"`
|
||||
- `"image_not_found"`
|
||||
- `"image_download_failed"`
|
||||
- `"server"`
|
||||
- `"timeout"`
|
||||
- `"unmapped"`
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "APIType"
|
||||
---
|
||||
|
||||
Type of API used for the generation
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import APIType
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: APIType = "completions"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"completions"`
|
||||
- `"embeddings"`
|
||||
- `"rerank"`
|
||||
- `"tts"`
|
||||
- `"stt"`
|
||||
- `"video"`
|
||||
- `"image"`
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "ApplyPatchCallItem"
|
||||
---
|
||||
|
||||
A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `call_id` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `operation` | [components.ApplyPatchCallOperation](../components/applypatchcalloperation.mdx) | :heavy_check_mark: | The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. | \{<br/>"diff": "@@ function main() \{\n+ console.log(\"hi\");\n }",<br/>"path": "/src/main.ts",<br/>"type": "update_file"<br/>} |
|
||||
| `status` | [components.ApplyPatchCallStatus](../components/applypatchcallstatus.mdx) | :heavy_check_mark: | Lifecycle state of an `apply_patch_call` output item. | completed |
|
||||
| `type` | [components.ApplyPatchCallItemType](../components/applypatchcallitemtype.mdx) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "ApplyPatchCallItemType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallItemType
|
||||
value: ApplyPatchCallItemType = "apply_patch_call"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"apply_patch_call"`
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "ApplyPatchCallOperation"
|
||||
---
|
||||
|
||||
The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ApplyPatchCreateFileOperation`
|
||||
|
||||
```python
|
||||
value: components.ApplyPatchCreateFileOperation = /* values here */
|
||||
```
|
||||
|
||||
### `components.ApplyPatchDeleteFileOperation`
|
||||
|
||||
```python
|
||||
value: components.ApplyPatchDeleteFileOperation = /* values here */
|
||||
```
|
||||
|
||||
### `components.ApplyPatchUpdateFileOperation`
|
||||
|
||||
```python
|
||||
value: components.ApplyPatchUpdateFileOperation = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "ApplyPatchCallOperationDiffDeltaEvent"
|
||||
---
|
||||
|
||||
Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| `delta` | *str* | :heavy_check_mark: | N/A |
|
||||
| `item_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `output_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `sequence_number` | *int* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.ApplyPatchCallOperationDiffDeltaEventType](../components/applypatchcalloperationdiffdeltaeventtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "ApplyPatchCallOperationDiffDeltaEventType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallOperationDiffDeltaEventType
|
||||
value: ApplyPatchCallOperationDiffDeltaEventType = "response.apply_patch_call_operation_diff.delta"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"response.apply_patch_call_operation_diff.delta"`
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "ApplyPatchCallOperationDiffDoneEvent"
|
||||
---
|
||||
|
||||
Emitted when `operation.diff` streaming completes for an `apply_patch_call`.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `diff` | *str* | :heavy_check_mark: | N/A |
|
||||
| `item_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `output_index` | *int* | :heavy_check_mark: | N/A |
|
||||
| `sequence_number` | *int* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.ApplyPatchCallOperationDiffDoneEventType](../components/applypatchcalloperationdiffdoneeventtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "ApplyPatchCallOperationDiffDoneEventType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallOperationDiffDoneEventType
|
||||
value: ApplyPatchCallOperationDiffDoneEventType = "response.apply_patch_call_operation_diff.done"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"response.apply_patch_call_operation_diff.done"`
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "ApplyPatchCallOutputItem"
|
||||
---
|
||||
|
||||
The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| `call_id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `output` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `status` | [components.ApplyPatchCallOutputItemStatus](../components/applypatchcalloutputitemstatus.mdx) | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.ApplyPatchCallOutputItemType](../components/applypatchcalloutputitemtype.mdx) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: "ApplyPatchCallOutputItemStatus"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallOutputItemStatus
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: ApplyPatchCallOutputItemStatus = "completed"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"completed"`
|
||||
- `"failed"`
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "ApplyPatchCallOutputItemType"
|
||||
---
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallOutputItemType
|
||||
value: ApplyPatchCallOutputItemType = "apply_patch_call_output"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
- `"apply_patch_call_output"`
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "ApplyPatchCallStatus"
|
||||
---
|
||||
|
||||
Lifecycle state of an `apply_patch_call` output item.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from openrouter.components import ApplyPatchCallStatus
|
||||
|
||||
# Open enum: unrecognized values are captured as UnrecognizedStr
|
||||
value: ApplyPatchCallStatus = "in_progress"
|
||||
```
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
This is an open enum. Unrecognized values will not fail type checks.
|
||||
|
||||
- `"in_progress"`
|
||||
- `"completed"`
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "ApplyPatchCreateFileOperation"
|
||||
---
|
||||
|
||||
The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `diff` | *str* | :heavy_check_mark: | N/A |
|
||||
| `path` | *str* | :heavy_check_mark: | N/A |
|
||||
| `type` | [components.ApplyPatchCreateFileOperationType](../components/applypatchcreatefileoperationtype.mdx) | :heavy_check_mark: | N/A |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user