Compare commits

..
Author SHA1 Message Date
OpenRouter SDK Bot 374e7a810d chore: update OpenAPI spec [sdk-bot] 2026-04-09 22:33:08 +00:00
Matt AppersonandGitHub 06bea2ae0f chore: set forwardCompatibleUnionsByDefault to tagged-only (#76) 2026-04-08 10:46:15 -04:00
Matt AppersonandGitHub 6b1b7e6a9d fix: add overlay to convert boolean query params to boolean type (#75) 2026-04-08 09:22:13 -04:00
Matt AppersonandGitHub dd8e6bdac2 fix: add generic overlay to remove redundant allOf inline enums (#73) 2026-04-03 18:37:50 -04:00
Matt Apperson e6b0242969 chore: clean up removed docs and update generated SDK files
Remove obsolete component documentation and update speakeasy-generated
files to match the latest OpenAPI spec regeneration.
2026-04-02 10:21:41 -04:00
OpenRouter SDK Bot 5ab44f08f0 feat: regenerate SDK with updated OpenAPI spec
Speakeasy regeneration with latest schema changes including
type renames and new server tool models.
2026-03-27 15:18:14 -04:00
robert-j-yandGitHub e72a84e82d chore: sync from monorepo (#61) 2026-02-23 17:02:29 -06:00
OpenRouter Team c734c52d9c Commits included in this export:
- 56d382078cfce7fa597d1da2bce531af2d060b47
  - 9ef6db7e04c9401536763a321b05d00311cef31a
  - bf855082e30820d466f0f86a6d6e87de2ecfb06f
  - 335b1cbe361214e48b945b987b4e164457aa817b
  - 648485fdc7f9d8ae86fd857eccedcc5e41fb2e69
  - 80c49474a15a2bd549a5f26efad3858aa45b7c7b
  - 70e8ac317f9c4472db3decd024d1819650df4182
  - 9f2a6659ab6dbf111a0c29e4366328c3d2048826
  - a3a28b1fc6ec7d2941232a4ebde8c5f470497876
  - 4b5dc9193480b7c5c9ddb882ccf3ee2128ca0d51
  - bb413e979a46ef67c2f266743f7ebd798af42afb
  - b60e92d5dcec83f31986164f51c010d1728b2b17
  - 45687f423707f5838461585c568a024a19eb2f06
  - 3103d3ca68b6e42ccdb6136588ec2b6edc8dcab0
  - fd9f991606027cd86116317c71f8eb7b4e2aa3eb
  - 0f312019161edd76c1e5923d142c788d22f096d5
  - 5dbab2094bc744db4a90b3097520d897e5d0d634
  - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5

GitOrigin-RevId: 56d382078cfce7fa597d1da2bce531af2d060b47
2026-02-23 21:34:42 +00:00
Shashank GoyalandGitHub b2098ff28e chore: sync from monorepo (#49) 2026-02-05 20:45:13 -05:00
OpenRouter Team 1cad51abb6 Commits included in this export:
- 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
  - 4779741b6ba710b1299612b82e8544516bd9dd6a
  - 22083fcc8f58884d8212d6f3314b231c4ddd21cd
  - a925a620f97196d509e073a163caac053bd82316
  - 5c05d8829784601ffd151acef1a6978c266f913d
  - 6f4fff535fbf4274255c255ae23620b8e00e614f
  - ef358e96cb01e469b77d44683603a602b0813116
  - e6299b4ebfe5c2eed6c598771f0fd99f84555401
  - 24d3f0ee1c2aa19a62f7902836034080b9246813
  - 68922847c2969b773887310eb7aa9a814e199c5a
  - 729ee2338c39df22461526153e7f4ba868fd498e
  - e1074ff86fccf5e48406b7595298873106d3cc5a
  - 123bbdaf841d299162a82ee2573adfbb70a45b8f
  - ac457b8a8dad98fdf5ddcae8dd4711361cea3084
  - ea825199f4c59dd68fec01cf8d18a582963c9f25
  - 4d48e4f6bb936e785787314a965298da6b78fea0
  - 718729a573ee98893a4408d5a52ab4686661fe54
  - b867adcde6b64f3f2a11c4626254b39098e4b0b4
  - 21912c097b4066d109766c6b4492826595cd57c5
  - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f
  - d145c89c941937a312ed1357590d2bfda9a3603d
  - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524
  - dd28f75a19a015809797c7abf3f8758f7c37262e
  - c96e569781e07ab44172d9c69940ec17bafd81f4
  - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7
  - 58b08f87116ceab9076de2fdc0a4c74c919b44c4

GitOrigin-RevId: 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153
2026-02-05 23:15:21 +00:00
robert-j-yandGitHub 0c791b04d1 chore: sync from monorepo (#36) 2026-01-21 17:28:27 -08:00
OpenRouter Team 5f2c0ee2ea Project import generated by Copybara.
GitOrigin-RevId: 2592bdc8b4b7c695a3d689390aedc9a42914acc8
2026-01-22 01:26:28 +00:00
robert-j-yandGitHub 5832c0495b chore: regenerate SDK with version 0.1.2 (#34) 2026-01-21 13:47:48 -08:00
Robert Yeakel f5dfc30997 chore: regenerate SDK with version 0.1.2 2026-01-21 13:45:46 -08:00
Shashank GoyalandGitHub a56ffbf5f3 Update speakeasy gen.yaml (#33) 2026-01-21 16:17:11 -05:00
Shashank Goyal cc2b002c5c Update speakeasy gen.yaml 2026-01-21 16:16:16 -05:00
814 changed files with 60828 additions and 25789 deletions
-5
View File
@@ -1,9 +1,4 @@
<div align="center">
<a href="https://codespaces.new/OpenRouterTeam/python-sdk.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>
> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
+14 -2
View File
@@ -1,13 +1,25 @@
.venv/
venv/
src/*.egg-info/
**/__pycache__/
.pytest_cache/
.python-version
.DS_Store
pyrightconfig.json
**/.speakeasy/temp/
**/.speakeasy/logs/
.speakeasy/reports
# Build artifacts
/dist
__pycache__/
*.py[cod]
*.egg-info/
*.egg
# Speakeasy generation artifacts (generated in OSS repo, not here)
.speakeasy/*.lock
.speakeasy/*.openapi.yaml
/docs
# Environment
.env
.env.local
.env.*.local
.DS_Store
.venv/
+4741 -886
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -25,13 +25,14 @@ generation:
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
persistentEdits: {}
tests:
generateTests: false
generateNewTests: true
skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true
python:
version: 0.0.18
version: 0.8.1
additionalDependencies:
dev: {}
main: {}
@@ -46,6 +47,7 @@ python:
- OpenRouter
baseErrorName: OpenRouterError
clientServerStatusCodesAsErrors: true
constFieldCasing: upper
defaultErrorName: OpenRouterDefaultError
description: Official Python Client SDK for OpenRouter.
enableCustomCodeRegions: false
@@ -57,6 +59,7 @@ python:
flattenGlobalSecurity: true
flattenRequests: true
flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: "tagged-only"
imports:
option: openapi
paths:
@@ -77,6 +80,7 @@ python:
outputModelSuffix: output
packageManager: uv
packageName: openrouter
preApplyUnionDiscriminators: false
pytestFilterWarnings: []
pytestTimeout: 0
responseFormat: flat
+17465 -7901
View File
File diff suppressed because it is too large Load Diff
+12606 -2290
View File
File diff suppressed because it is too large Load Diff
+20 -3
View File
@@ -1,17 +1,18 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Add HTTP-Referer and X-Title as global parameters
title: Add HTTP-Referer and X-OpenRouter-Title as global parameters
version: 0.0.0
actions:
# Add global parameters for app identification
- target: $
description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers
description: Add x-speakeasy-globals for HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers
update:
x-speakeasy-globals:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
# Add component parameters
- target: $.components
@@ -27,9 +28,25 @@ actions:
The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
AppDisplayName:
name: X-Title
name: X-OpenRouter-Title
in: header
schema:
type: string
description: |
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
AppCategories:
name: X-OpenRouter-Categories
in: header
schema:
type: string
description: |
Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
# Add header parameters to all paths so Speakeasy matches them with globals
- target: $.paths[*]
description: Reference app identification headers on all paths so Speakeasy injects them via globals
update:
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
@@ -0,0 +1,11 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Simplify redundant allOf inline schemas
version: 0.0.0
actions:
- target: "$..allOf[?@.enum && !@['$ref']]"
description: >
Remove inline enum definitions that duplicate a $ref enum in the same
allOf. These are artifacts from zod-openapi .extend() serialization.
remove: true
@@ -0,0 +1,10 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Convert boolean query params from string to boolean
version: 0.0.0
actions:
- target: $..parameters[?@.schema["x-openrouter-type"] == "boolean"].schema
description: Convert x-openrouter-type boolean params from string to boolean
update:
type: boolean
+7 -13
View File
@@ -1,15 +1,9 @@
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
-OAS:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
tags:
- latest
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
tags:
- latest
- 1.0.0
@@ -17,13 +11,13 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925
sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:95a78f7dc072063abfd68a880ad1054c27a9a9077449cbf667d07de13a15112a
codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
OpenRouter API:
inputs:
+3 -1
View File
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0
speakeasyVersion: 1.666.0
speakeasyVersion: 1.680.0
sources:
OpenRouter API:
inputs:
@@ -8,6 +8,8 @@ sources:
- location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
output: .speakeasy/out.openapi.yaml
registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
+6
View File
@@ -182,6 +182,9 @@ import os
def main():
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -191,6 +194,9 @@ def main():
async def amain():
async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
+6
View File
@@ -182,6 +182,9 @@ import os
def main():
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
@@ -191,6 +194,9 @@ def main():
async def amain():
async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
# Rest of application here...
+6
View File
@@ -6,6 +6,9 @@ import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
@@ -30,6 +33,9 @@ import os
async def main():
async with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
-13
View File
@@ -1,13 +0,0 @@
# AssistantMessage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `role` | *Literal["assistant"]* | :heavy_check_mark: | N/A |
| `content` | [OptionalNullable[components.AssistantMessageContent]](../components/assistantmessagecontent.md) | :heavy_minus_sign: | N/A |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# AssistantMessageContent
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.ChatMessageContentItem]`
```python
value: List[components.ChatMessageContentItem] = /* values here */
```
@@ -1,4 +1,6 @@
# ProviderSortConfigEnum
# By
The provider sorting strategy (price, throughput, latency)
## Values
@@ -7,4 +9,5 @@
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `LATENCY` | latency |
| `EXACTO` | exacto |
-10
View File
@@ -1,10 +0,0 @@
# ChainID
## Values
| Name | Value |
| --------------------------------------------- | --------------------------------------------- |
| `ONE` | 1 |
| `ONE_HUNDRED_AND_THIRTY_SEVEN` | 137 |
| `EIGHT_THOUSAND_FOUR_HUNDRED_AND_FIFTY_THREE` | 8453 |
@@ -1,12 +0,0 @@
# ChatCompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `TOOL_CALLS` | tool_calls |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
| `ERROR` | error |
-11
View File
@@ -1,11 +0,0 @@
# ChatErrorError
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `code` | [Nullable[components.Code]](../components/code.md) | :heavy_check_mark: | N/A |
| `message` | *str* | :heavy_check_mark: | N/A |
| `param` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-36
View File
@@ -1,36 +0,0 @@
# ChatGenerationParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. |
| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. |
| `route` | [OptionalNullable[components.Route]](../components/route.md) | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. |
| `messages` | List[[components.Message](../components/message.md)] | :heavy_check_mark: | N/A |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
| `response_format` | [Optional[components.ChatGenerationParamsResponseFormatUnion]](../components/chatgenerationparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.ChatGenerationParamsStop]](../components/chatgenerationparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `tool_choice` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `tools` | List[[components.ToolDefinitionJSON](../components/tooldefinitionjson.md)] | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `debug` | [Optional[components.Debug]](../components/debug.md) | :heavy_minus_sign: | N/A |
| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | N/A |
| `modalities` | List[[components.Modality](../components/modality.md)] | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsDataCollection
## Values
| Name | Value |
| ------- | ------- |
| `DENY` | deny |
| `ALLOW` | allow |
@@ -1,9 +0,0 @@
# ChatGenerationParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -1,17 +0,0 @@
# ChatGenerationParamsImageConfig
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
@@ -1,14 +0,0 @@
# ChatGenerationParamsMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `prompt` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `completion` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `image` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `audio` | *Optional[Any]* | :heavy_minus_sign: | N/A |
| `request` | *Optional[Any]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPdf
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPluginAutoRouter
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `id` | *Literal["auto-router"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | N/A |
@@ -1,10 +0,0 @@
# ChatGenerationParamsPluginFileParser
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `id` | *Literal["file-parser"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsPluginModeration
## Fields
| Field | Type | Required | Description |
| ----------------------- | ----------------------- | ----------------------- | ----------------------- |
| `id` | *Literal["moderation"]* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatGenerationParamsPluginResponseHealing
## Fields
| Field | Type | Required | Description |
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| `id` | *Literal["response-healing"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -1,35 +0,0 @@
# ChatGenerationParamsPluginUnion
## Supported Types
### `components.ChatGenerationParamsPluginAutoRouter`
```python
value: components.ChatGenerationParamsPluginAutoRouter = /* values here */
```
### `components.ChatGenerationParamsPluginModeration`
```python
value: components.ChatGenerationParamsPluginModeration = /* values here */
```
### `components.ChatGenerationParamsPluginWeb`
```python
value: components.ChatGenerationParamsPluginWeb = /* values here */
```
### `components.ChatGenerationParamsPluginFileParser`
```python
value: components.ChatGenerationParamsPluginFileParser = /* values here */
```
### `components.ChatGenerationParamsPluginResponseHealing`
```python
value: components.ChatGenerationParamsPluginResponseHealing = /* values here */
```
@@ -1,12 +0,0 @@
# ChatGenerationParamsPluginWeb
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
| `id` | *Literal["web"]* | :heavy_check_mark: | N/A |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[components.Engine]](../components/engine.md) | :heavy_minus_sign: | N/A |
@@ -1,11 +0,0 @@
# ChatGenerationParamsPreferredMaxLatency
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# ChatGenerationParamsPreferredMaxLatencyUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMaxLatency`
```python
value: components.ChatGenerationParamsPreferredMaxLatency = /* values here */
```
@@ -1,11 +0,0 @@
# ChatGenerationParamsPreferredMinThroughput
## Fields
| Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# ChatGenerationParamsPreferredMinThroughputUnion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `components.ChatGenerationParamsPreferredMinThroughput`
```python
value: components.ChatGenerationParamsPreferredMinThroughput = /* values here */
```
@@ -1,20 +0,0 @@
# ChatGenerationParamsProvider
## Fields
| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
| `data_collection` | [OptionalNullable[components.ChatGenerationParamsDataCollection]](../components/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `order` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
| `only` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
| `ignore` | List[[components.Schema0](../components/schema0.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
| `quantizations` | List[[components.Quantizations](../components/quantizations.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
| `sort` | [OptionalNullable[components.ProviderSortUnion]](../components/providersortunion.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
| `max_price` | [Optional[components.ChatGenerationParamsMaxPrice]](../components/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
| `preferred_min_throughput` | [OptionalNullable[components.ChatGenerationParamsPreferredMinThroughputUnion]](../components/chatgenerationparamspreferredminthroughputunion.md) | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. |
| `preferred_max_latency` | [OptionalNullable[components.ChatGenerationParamsPreferredMaxLatencyUnion]](../components/chatgenerationparamspreferredmaxlatencyunion.md) | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# ChatGenerationParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# ChatGenerationParamsResponseFormatUnion
## Supported Types
### `components.ChatGenerationParamsResponseFormatText`
```python
value: components.ChatGenerationParamsResponseFormatText = /* values here */
```
### `components.ChatGenerationParamsResponseFormatJSONObject`
```python
value: components.ChatGenerationParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.ChatGenerationParamsResponseFormatPython`
```python
value: components.ChatGenerationParamsResponseFormatPython = /* values here */
```
@@ -1,9 +0,0 @@
# ChatGenerationParamsRoute
## Values
| Name | Value |
| ---------- | ---------- |
| `FALLBACK` | fallback |
| `SORT` | sort |
@@ -1,17 +0,0 @@
# ChatGenerationParamsStop
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[str]`
```python
value: List[str] = /* values here */
```
@@ -1,12 +0,0 @@
# ChatGenerationTokenUsage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens_details` | [OptionalNullable[components.CompletionTokensDetails]](../components/completiontokensdetails.md) | :heavy_minus_sign: | N/A |
| `prompt_tokens_details` | [OptionalNullable[components.PromptTokensDetails]](../components/prompttokensdetails.md) | :heavy_minus_sign: | N/A |
-35
View File
@@ -1,35 +0,0 @@
# ChatMessageContentItem
## Supported Types
### `components.ChatMessageContentItemText`
```python
value: components.ChatMessageContentItemText = /* values here */
```
### `components.ChatMessageContentItemImage`
```python
value: components.ChatMessageContentItemImage = /* values here */
```
### `components.ChatMessageContentItemAudio`
```python
value: components.ChatMessageContentItemAudio = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
### `components.ChatMessageContentItemVideo`
```python
value: components.ChatMessageContentItemVideo = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudio
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["input_audio"]* | :heavy_check_mark: | N/A |
| `input_audio` | [components.ChatMessageContentItemAudioInputAudio](../components/chatmessagecontentitemaudioinputaudio.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemAudioInputAudio
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `data` | *str* | :heavy_check_mark: | N/A |
| `format_` | *str* | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemCacheControl
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["ephemeral"]* | :heavy_check_mark: | N/A |
| `ttl` | [Optional[components.TTL]](../components/ttl.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemImage
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
| `image_url` | [components.ImageURL](../components/imageurl.md) | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageContentItemImageDetail
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
| `LOW` | low |
| `HIGH` | high |
@@ -1,10 +0,0 @@
# ChatMessageContentItemText
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
| `cache_control` | [Optional[components.ChatMessageContentItemCacheControl]](../components/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A |
@@ -1,17 +0,0 @@
# ChatMessageContentItemVideo
## Supported Types
### `components.ChatMessageContentItemVideoInputVideo`
```python
value: components.ChatMessageContentItemVideoInputVideo = /* values here */
```
### `components.ChatMessageContentItemVideoVideoURL`
```python
value: components.ChatMessageContentItemVideoVideoURL = /* values here */
```
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoInputVideo
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL1](../components/videourl1.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageContentItemVideoVideoURL
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `type` | *Literal["video_url"]* | :heavy_check_mark: | N/A |
| `video_url` | [components.VideoURL2](../components/videourl2.md) | :heavy_check_mark: | N/A |
@@ -1,11 +0,0 @@
# ChatMessageTokenLogprob
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ChatMessageTokenLogprobTopLogprob](../components/chatmessagetokenlogprobtoplogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageTokenLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `content` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
| `refusal` | List[[components.ChatMessageTokenLogprob](../components/chatmessagetokenlogprob.md)] | :heavy_check_mark: | N/A |
@@ -1,10 +0,0 @@
# ChatMessageTokenLogprobTopLogprob
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
-10
View File
@@ -1,10 +0,0 @@
# ChatMessageToolCall
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `type` | *Literal["function"]* | :heavy_check_mark: | N/A |
| `function` | [components.ChatMessageToolCallFunction](../components/chatmessagetoolcallfunction.md) | :heavy_check_mark: | N/A |
@@ -1,9 +0,0 @@
# ChatMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
| `arguments` | *str* | :heavy_check_mark: | N/A |
-14
View File
@@ -1,14 +0,0 @@
# ChatResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatResponseChoice](../components/chatresponsechoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
-12
View File
@@ -1,12 +0,0 @@
# ChatResponseChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# ChatStreamingChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `delta` | [components.ChatStreamingMessageChunk](../components/chatstreamingmessagechunk.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingMessageChunkRole
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
@@ -1,11 +0,0 @@
# ChatStreamingMessageToolCall
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `index` | *float* | :heavy_check_mark: | N/A |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `type` | *Optional[Literal["function"]]* | :heavy_minus_sign: | N/A |
| `function` | [Optional[components.ChatStreamingMessageToolCallFunction]](../components/chatstreamingmessagetoolcallfunction.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `arguments` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# ChatStreamingResponseChunk
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `data` | [components.ChatStreamingResponseChunkData](../components/chatstreamingresponsechunkdata.md) | :heavy_check_mark: | N/A |
@@ -1,15 +0,0 @@
# ChatStreamingResponseChunkData
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[components.ChatStreamingChoice](../components/chatstreamingchoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["chat.completion.chunk"]* | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `error` | [Optional[components.ChatStreamingResponseChunkError]](../components/chatstreamingresponsechunkerror.md) | :heavy_minus_sign: | N/A |
| `usage` | [Optional[components.ChatGenerationTokenUsage]](../components/chatgenerationtokenusage.md) | :heavy_minus_sign: | N/A |
@@ -1,9 +0,0 @@
# ChatStreamingResponseChunkError
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `message` | *str* | :heavy_check_mark: | N/A |
| `code` | *float* | :heavy_check_mark: | N/A |
+5 -3
View File
@@ -1,8 +1,10 @@
# ChatStreamOptions
Streaming configuration options
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `include_usage` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ~~`include_usage`~~ | *Optional[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>Deprecated: This field has no effect. Full usage details are always included. | true |
+21 -13
View File
@@ -1,17 +1,25 @@
# Code
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `float`
```python
value: float = /* values here */
```
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-25
View File
@@ -1,25 +0,0 @@
# CodeEnum
## Values
| Name | Value |
| -------------------------------- | -------------------------------- |
| `SERVER_ERROR` | server_error |
| `RATE_LIMIT_EXCEEDED` | rate_limit_exceeded |
| `INVALID_PROMPT` | invalid_prompt |
| `VECTOR_STORE_TIMEOUT` | vector_store_timeout |
| `INVALID_IMAGE` | invalid_image |
| `INVALID_IMAGE_FORMAT` | invalid_image_format |
| `INVALID_BASE64_IMAGE` | invalid_base64_image |
| `INVALID_IMAGE_URL` | invalid_image_url |
| `IMAGE_TOO_LARGE` | image_too_large |
| `IMAGE_TOO_SMALL` | image_too_small |
| `IMAGE_PARSE_ERROR` | image_parse_error |
| `IMAGE_CONTENT_POLICY_VIOLATION` | image_content_policy_violation |
| `INVALID_IMAGE_MODE` | invalid_image_mode |
| `IMAGE_FILE_TOO_LARGE` | image_file_too_large |
| `UNSUPPORTED_IMAGE_MEDIA_TYPE` | unsupported_image_media_type |
| `EMPTY_IMAGE_FILE` | empty_image_file |
| `FAILED_TO_DOWNLOAD_IMAGE` | failed_to_download_image |
| `IMAGE_FILE_NOT_FOUND` | image_file_not_found |
-13
View File
@@ -1,13 +0,0 @@
# CompletionChoice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
| `native_finish_reason` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
-28
View File
@@ -1,28 +0,0 @@
# CompletionCreateParams
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
| `prompt` | [components.Prompt](../components/prompt.md) | :heavy_check_mark: | N/A |
| `best_of` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `echo` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
| `logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `stop` | [OptionalNullable[components.CompletionCreateParamsStop]](../components/completioncreateparamsstop.md) | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `stream_options` | [OptionalNullable[components.StreamOptions]](../components/streamoptions.md) | :heavy_minus_sign: | N/A |
| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
| `response_format` | [OptionalNullable[components.CompletionCreateParamsResponseFormatUnion]](../components/completioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatJSONObject
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatPython
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
@@ -1,8 +0,0 @@
# CompletionCreateParamsResponseFormatText
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
@@ -1,35 +0,0 @@
# CompletionCreateParamsResponseFormatUnion
## Supported Types
### `components.CompletionCreateParamsResponseFormatText`
```python
value: components.CompletionCreateParamsResponseFormatText = /* values here */
```
### `components.CompletionCreateParamsResponseFormatJSONObject`
```python
value: components.CompletionCreateParamsResponseFormatJSONObject = /* values here */
```
### `components.ResponseFormatJSONSchema`
```python
value: components.ResponseFormatJSONSchema = /* values here */
```
### `components.ResponseFormatTextGrammar`
```python
value: components.ResponseFormatTextGrammar = /* values here */
```
### `components.CompletionCreateParamsResponseFormatPython`
```python
value: components.CompletionCreateParamsResponseFormatPython = /* values here */
```
-10
View File
@@ -1,10 +0,0 @@
# CompletionFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
-11
View File
@@ -1,11 +0,0 @@
# CompletionLogprobs
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `tokens` | List[*str*] | :heavy_check_mark: | N/A |
| `token_logprobs` | List[*float*] | :heavy_check_mark: | N/A |
| `top_logprobs` | List[Dict[str, *float*]] | :heavy_check_mark: | N/A |
| `text_offset` | List[*float*] | :heavy_check_mark: | N/A |
-15
View File
@@ -1,15 +0,0 @@
# CompletionResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `provider` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
+6 -4
View File
@@ -1,11 +1,13 @@
# CompletionTokensDetails
Detailed completion token usage
## Fields
| Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for reasoning |
| `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for audio output |
| `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Accepted prediction tokens |
| `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Rejected prediction tokens |
-10
View File
@@ -1,10 +0,0 @@
# CompletionUsage
## Fields
| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
-12
View File
@@ -1,12 +0,0 @@
# CreateChargeRequest
Create a Coinbase charge for crypto payment
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `amount` | *float* | :heavy_check_mark: | N/A |
| `sender` | *str* | :heavy_check_mark: | N/A |
| `chain_id` | [components.ChainID](../components/chainid.md) | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
# ModelsCountResponseData
# Data
Model count data
-8
View File
@@ -1,8 +0,0 @@
# Debug
## Fields
| Field | Type | Required | Description |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
+4 -1
View File
@@ -9,4 +9,7 @@ Default parameters for this model
| ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+2
View File
@@ -1,5 +1,7 @@
# Effort
Constrains effort on reasoning for reasoning models
## Values
-9
View File
@@ -1,9 +0,0 @@
# Engine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
+11
View File
@@ -0,0 +1,11 @@
# Error
Error information
## Fields
| Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
| `code` | *float* | :heavy_check_mark: | Error code | 429 |
-8
View File
@@ -1,8 +0,0 @@
# IDAutoRouter
## Values
| Name | Value |
| ------------- | ------------- |
| `AUTO_ROUTER` | auto-router |
-8
View File
@@ -1,8 +0,0 @@
# IDFileParser
## Values
| Name | Value |
| ------------- | ------------- |
| `FILE_PARSER` | file-parser |
-8
View File
@@ -1,8 +0,0 @@
# IDModeration
## Values
| Name | Value |
| ------------ | ------------ |
| `MODERATION` | moderation |
-8
View File
@@ -1,8 +0,0 @@
# IDResponseHealing
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_HEALING` | response-healing |
-8
View File
@@ -1,8 +0,0 @@
# IDWeb
## Values
| Name | Value |
| ----- | ----- |
| `WEB` | web |
-17
View File
@@ -1,17 +0,0 @@
# Ignore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
-9
View File
@@ -1,9 +0,0 @@
# ImageURL
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `url` | *str* | :heavy_check_mark: | N/A |
| `detail` | [Optional[components.ChatMessageContentItemImageDetail]](../components/chatmessagecontentitemimagedetail.md) | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# JSONSchemaConfig
## Fields
| Field | Type | Required | Description |
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
| `name` | *str* | :heavy_check_mark: | N/A |
| `description` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `schema_` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
-11
View File
@@ -1,11 +0,0 @@
# Logprob
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | N/A |
| `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A |
| `top_logprobs` | List[[components.ResponseOutputTextTopLogprob](../components/responseoutputtexttoplogprob.md)] | :heavy_check_mark: | N/A |
-35
View File
@@ -1,35 +0,0 @@
# Message
## Supported Types
### `components.SystemMessage`
```python
value: components.SystemMessage = /* values here */
```
### `components.UserMessage`
```python
value: components.UserMessage = /* values here */
```
### `components.MessageDeveloper`
```python
value: components.MessageDeveloper = /* values here */
```
### `components.AssistantMessage`
```python
value: components.AssistantMessage = /* values here */
```
### `components.ToolResponseMessage`
```python
value: components.ToolResponseMessage = /* values here */
```

Some files were not shown because too many files have changed in this diff Show More