mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
22
Commits
temp-6c5dfcfb2
...
0.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9193488c2b | ||
|
|
0c791b04d1 | ||
|
|
5f2c0ee2ea | ||
|
|
5832c0495b | ||
|
|
f5dfc30997 | ||
|
|
a56ffbf5f3 | ||
|
|
cc2b002c5c | ||
|
|
9774c726fd | ||
|
|
3a40848aab | ||
|
|
f190e3f950 | ||
|
|
d433ce35e8 | ||
|
|
61e5216764 | ||
|
|
67ef52b03e | ||
|
|
d4474da1b8 | ||
|
|
aed8199b2b | ||
|
|
06b2ccc54a | ||
|
|
6cd0d2a76d | ||
|
|
a1dae775cb | ||
|
|
10a76ba502 | ||
|
|
f4ffd51f40 | ||
|
|
20c63f6f13 | ||
|
|
0f9cb9787a |
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(python3:*)"
|
||||
"Bash(python3:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(gh pr create:*)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Notify Monorepo of Changes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
notify-monorepo:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send repository dispatch to monorepo
|
||||
run: |
|
||||
# Determine which event type to send based on repository name
|
||||
REPO_NAME="${GITHUB_REPOSITORY#*/}" # Gets 'python-sdk' from 'OpenRouterTeam/python-sdk'
|
||||
|
||||
case "$REPO_NAME" in
|
||||
"typescript-sdk")
|
||||
EVENT_TYPE="sync-typescript-sdk"
|
||||
;;
|
||||
"python-sdk")
|
||||
EVENT_TYPE="sync-python-sdk"
|
||||
;;
|
||||
"ai-sdk-provider")
|
||||
EVENT_TYPE="sync-ai-sdk-provider"
|
||||
;;
|
||||
"cli")
|
||||
EVENT_TYPE="sync-cli"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown repository: $REPO_NAME"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Sending repository_dispatch event: $EVENT_TYPE"
|
||||
|
||||
curl -L \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.MONOREPO_SYNC_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/OpenRouterTeam/openrouter-web/dispatches \
|
||||
-d "{\"event_type\":\"$EVENT_TYPE\",\"client_payload\":{\"repository\":\"$GITHUB_REPOSITORY\",\"ref\":\"$GITHUB_REF\",\"sha\":\"$GITHUB_SHA\"}}"
|
||||
|
||||
echo "✅ Notification sent to monorepo"
|
||||
+463
-89
File diff suppressed because it is too large
Load Diff
+12
-6
@@ -6,7 +6,7 @@ generation:
|
||||
sdkClassName: OpenRouter
|
||||
maintainOpenAPIOrder: true
|
||||
usageSnippets:
|
||||
optionalPropertyRendering: withExample
|
||||
optionalPropertyRendering: never
|
||||
sdkInitStyle: constructor
|
||||
useClassNamesForArrayFields: true
|
||||
fixes:
|
||||
@@ -24,13 +24,14 @@ generation:
|
||||
sdkHooksConfigAccess: true
|
||||
schemas:
|
||||
allOfMergeStrategy: shallowMerge
|
||||
requestBodyFieldName: body
|
||||
requestBodyFieldName: ""
|
||||
tests:
|
||||
generateTests: false
|
||||
generateNewTests: true
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.0.16
|
||||
version: 0.5.1
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
@@ -38,6 +39,8 @@ python:
|
||||
- id
|
||||
- object
|
||||
- input
|
||||
- models
|
||||
- hash
|
||||
asyncMode: both
|
||||
authors:
|
||||
- OpenRouter
|
||||
@@ -57,17 +60,20 @@ python:
|
||||
imports:
|
||||
option: openapi
|
||||
paths:
|
||||
callbacks: ""
|
||||
callbacks: callbacks
|
||||
errors: errors
|
||||
operations: operations
|
||||
shared: components
|
||||
webhooks: ""
|
||||
webhooks: webhooks
|
||||
inferSSEOverload: true
|
||||
inferUnionDiscriminators: true
|
||||
inputModelSuffix: input
|
||||
legacyPyright: false
|
||||
license: ""
|
||||
license: Apache-2.0
|
||||
maxMethodParams: 999
|
||||
methodArguments: infer-optional-args
|
||||
moduleName: ""
|
||||
multipartArrayFormat: legacy
|
||||
outputModelSuffix: output
|
||||
packageManager: uv
|
||||
packageName: openrouter
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
lintVersion: 1.0.0
|
||||
defaultRuleset: openrouter
|
||||
rulesets:
|
||||
openrouter:
|
||||
rulesets:
|
||||
- speakeasy-recommended
|
||||
- speakeasy-generation
|
||||
rules:
|
||||
oas3-missing-example:
|
||||
severity: "off"
|
||||
+13841
-8276
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Add HTTP-Referer and X-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
|
||||
update:
|
||||
x-speakeasy-globals:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
|
||||
# Add component parameters
|
||||
- target: $.components
|
||||
description: Add parameters for app identification headers
|
||||
update:
|
||||
parameters:
|
||||
AppIdentifier:
|
||||
name: HTTP-Referer
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
description: |
|
||||
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
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
description: |
|
||||
The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||||
|
||||
# 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"
|
||||
@@ -0,0 +1,10 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Add open enums
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..[?length(@.enum) > 1]
|
||||
description: Automatically open all enums that have length > 1
|
||||
update:
|
||||
x-speakeasy-unknown-values: allow
|
||||
@@ -0,0 +1,15 @@
|
||||
overlay: 1.0.0
|
||||
x-speakeasy-jsonpath: rfc9535
|
||||
info:
|
||||
title: Remove RSS+XML response schemas and related parameters
|
||||
version: 0.0.0
|
||||
actions:
|
||||
- target: $..responses.*.content["application/rss+xml"]
|
||||
description: Remove application/rss+xml response schemas
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss"]
|
||||
description: Remove use_rss parameter
|
||||
remove: true
|
||||
- target: $..parameters[?@.name == "use_rss_chat_links"]
|
||||
description: Remove use_rss_chat_links parameter
|
||||
remove: true
|
||||
+26
-13
@@ -1,38 +1,51 @@
|
||||
speakeasyVersion: 1.658.1
|
||||
speakeasyVersion: 1.666.0
|
||||
sources:
|
||||
-OAS:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:08647b466c00989914e3a2436175152270f771f0a57d055f5bab14cc2d4be89e
|
||||
sourceBlobDigest: sha256:53027ec57392d9617cc001ece83c2fe1aa6e5dbfd52d170381c34c33c6042c23
|
||||
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
|
||||
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1763230596
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: -OAS
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:08647b466c00989914e3a2436175152270f771f0a57d055f5bab14cc2d4be89e
|
||||
sourceBlobDigest: sha256:53027ec57392d9617cc001ece83c2fe1aa6e5dbfd52d170381c34c33c6042c23
|
||||
sourceRevisionDigest: sha256:9d0580abfbe319bbd1e3d51fa921b5c97134ae4ef84ee4b1254beb0e92bf4fd9
|
||||
sourceBlobDigest: sha256:8555ff45ab0e3c22ae07af40cc4581ef14107b4d62c38bde3c25512fd4aae199
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:e44fdec134bc5f249b3e785da067ea31d1bba8f9891bca0f6c19d7ace670ab11
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
speakeasyVersion: 1.666.0
|
||||
sources:
|
||||
-OAS:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
- location: .speakeasy/in.openapi.yaml
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
- location: .speakeasy/overlays/add-headers.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
|
||||
targets:
|
||||
open-router:
|
||||
target: python
|
||||
source: -OAS
|
||||
source: OpenRouter API
|
||||
publish:
|
||||
pypi:
|
||||
token: $pypi_token
|
||||
codeSamples:
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
|
||||
labelOverride:
|
||||
fixedValue: Python (SDK)
|
||||
blocking: false
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
speakeasyVersion: 1.666.0
|
||||
sources:
|
||||
-OAS:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
- location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api:main
|
||||
- location: .speakeasy/in.openapi.yaml
|
||||
overlays:
|
||||
- location: .speakeasy/overlays/open-enums.overlay.yaml
|
||||
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
|
||||
- location: .speakeasy/overlays/add-headers.overlay.yaml
|
||||
output: .speakeasy/out.openapi.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
|
||||
targets:
|
||||
open-router:
|
||||
target: python
|
||||
source: -OAS
|
||||
source: OpenRouter API
|
||||
publish:
|
||||
pypi:
|
||||
token: $pypi_token
|
||||
codeSamples:
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/-oas-python-code-samples
|
||||
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-python-code-samples
|
||||
labelOverride:
|
||||
fixedValue: Python (SDK)
|
||||
blocking: false
|
||||
|
||||
@@ -182,6 +182,8 @@ import os
|
||||
def main():
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
# Rest of application here...
|
||||
@@ -191,6 +193,8 @@ def main():
|
||||
async def amain():
|
||||
|
||||
async with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
# Rest of application here...
|
||||
|
||||
@@ -6,64 +6,12 @@ import os
|
||||
|
||||
|
||||
with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
res = open_router.beta.responses.send(input=[
|
||||
{
|
||||
"type": "message",
|
||||
"role": "user",
|
||||
"content": "Hello, how are you?",
|
||||
},
|
||||
], metadata={
|
||||
"user_id": "123",
|
||||
"session_id": "abc-def-ghi",
|
||||
}, tools=[
|
||||
{
|
||||
"type": "function",
|
||||
"name": "get_current_weather",
|
||||
"description": "Get the current weather in a given location",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
], model="anthropic/claude-4.5-sonnet-20250929", text={
|
||||
"format_": {
|
||||
"type": "text",
|
||||
},
|
||||
"verbosity": "medium",
|
||||
}, reasoning={
|
||||
"summary": "auto",
|
||||
"enabled": True,
|
||||
}, temperature=0.7, top_p=0.9, prompt={
|
||||
"id": "<id>",
|
||||
"variables": {
|
||||
"key": {
|
||||
"type": "input_text",
|
||||
"text": "Hello, how can I help you?",
|
||||
},
|
||||
},
|
||||
}, service_tier="auto", truncation="auto", stream=False, provider={
|
||||
"data_collection": "deny",
|
||||
"zdr": True,
|
||||
"enforce_distillable_text": True,
|
||||
"order": [
|
||||
"OpenAI",
|
||||
],
|
||||
"only": [
|
||||
"OpenAI",
|
||||
],
|
||||
"ignore": [
|
||||
"OpenAI",
|
||||
],
|
||||
"quantizations": None,
|
||||
"sort": "price",
|
||||
})
|
||||
res = open_router.beta.responses.send(service_tier="auto", stream=False)
|
||||
|
||||
with res as event_stream:
|
||||
for event in event_stream:
|
||||
@@ -84,64 +32,12 @@ import os
|
||||
async def main():
|
||||
|
||||
async with OpenRouter(
|
||||
http_referer="<value>",
|
||||
x_title="<value>",
|
||||
api_key=os.getenv("OPENROUTER_API_KEY", ""),
|
||||
) as open_router:
|
||||
|
||||
res = await open_router.beta.responses.send_async(input=[
|
||||
{
|
||||
"type": "message",
|
||||
"role": "user",
|
||||
"content": "Hello, how are you?",
|
||||
},
|
||||
], metadata={
|
||||
"user_id": "123",
|
||||
"session_id": "abc-def-ghi",
|
||||
}, tools=[
|
||||
{
|
||||
"type": "function",
|
||||
"name": "get_current_weather",
|
||||
"description": "Get the current weather in a given location",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
], model="anthropic/claude-4.5-sonnet-20250929", text={
|
||||
"format_": {
|
||||
"type": "text",
|
||||
},
|
||||
"verbosity": "medium",
|
||||
}, reasoning={
|
||||
"summary": "auto",
|
||||
"enabled": True,
|
||||
}, temperature=0.7, top_p=0.9, prompt={
|
||||
"id": "<id>",
|
||||
"variables": {
|
||||
"key": {
|
||||
"type": "input_text",
|
||||
"text": "Hello, how can I help you?",
|
||||
},
|
||||
},
|
||||
}, service_tier="auto", truncation="auto", stream=False, provider={
|
||||
"data_collection": "deny",
|
||||
"zdr": True,
|
||||
"enforce_distillable_text": True,
|
||||
"order": [
|
||||
"OpenAI",
|
||||
],
|
||||
"only": [
|
||||
"OpenAI",
|
||||
],
|
||||
"ignore": [
|
||||
"OpenAI",
|
||||
],
|
||||
"quantizations": None,
|
||||
"sort": "price",
|
||||
})
|
||||
res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
|
||||
|
||||
async with res as event_stream:
|
||||
async for event in event_stream:
|
||||
|
||||
@@ -10,4 +10,6 @@
|
||||
| `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 |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
|
||||
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# CompletionCreateParamsResponseFormatText
|
||||
# AssistantMessageImageURL
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -3,27 +3,34 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `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 |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `provider` | [OptionalNullable[components.Schema0]](../components/schema0.md) | :heavy_minus_sign: | N/A |
|
||||
| `plugins` | List[[components.Schema17](../components/schema17.md)] | :heavy_minus_sign: | N/A |
|
||||
| `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: | N/A |
|
||||
| `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.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.Stop]](../components/stop.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 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ChatGenerationParamsEngine
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| -------- | -------- |
|
||||
| `NATIVE` | native |
|
||||
| `EXA` | exa |
|
||||
@@ -0,0 +1,23 @@
|
||||
# ChatGenerationParamsImageConfig
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `float`
|
||||
|
||||
```python
|
||||
value: float = /* values here */
|
||||
```
|
||||
|
||||
### `List[Any]`
|
||||
|
||||
```python
|
||||
value: List[Any] = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# ChatGenerationParamsPdf
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `engine` | [Optional[components.ChatGenerationParamsPdfEngine]](../components/chatgenerationparamspdfengine.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,10 @@
|
||||
# ChatGenerationParamsPdfEngine
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `MISTRAL_OCR` | mistral-ocr |
|
||||
| `PDF_TEXT` | pdf-text |
|
||||
| `NATIVE` | native |
|
||||
@@ -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 */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# ChatGenerationParamsRoute
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `FALLBACK` | fallback |
|
||||
| `SORT` | sort |
|
||||
@@ -27,3 +27,9 @@ value: components.ChatMessageContentItemAudio = /* values here */
|
||||
value: components.ChatMessageContentItemVideo = /* values here */
|
||||
```
|
||||
|
||||
### `components.ChatMessageContentItemVideo`
|
||||
|
||||
```python
|
||||
value: components.ChatMessageContentItemVideo = /* values here */
|
||||
```
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# ChatMessageContentItemAudioFormat
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `WAV` | wav |
|
||||
| `MP3` | mp3 |
|
||||
| `FLAC` | flac |
|
||||
| `M4A` | m4a |
|
||||
| `OGG` | ogg |
|
||||
| `PCM16` | pcm16 |
|
||||
| `PCM24` | pcm24 |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `format_` | [components.ChatMessageContentItemAudioFormat](../components/chatmessagecontentitemaudioformat.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `format_` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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 |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## 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 |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
|
||||
| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A |
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# ImageURL
|
||||
# ChatMessageContentItemImageImageURL
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
|
||||
| `text` | *str* | :heavy_check_mark: | N/A |
|
||||
| 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,9 +1,17 @@
|
||||
# ChatMessageContentItemVideo
|
||||
|
||||
|
||||
## Fields
|
||||
## Supported Types
|
||||
|
||||
### `components.ChatMessageContentItemVideoInputVideo`
|
||||
|
||||
```python
|
||||
value: components.ChatMessageContentItemVideoInputVideo = /* values here */
|
||||
```
|
||||
|
||||
### `components.ChatMessageContentItemVideoVideoURL`
|
||||
|
||||
```python
|
||||
value: components.ChatMessageContentItemVideoVideoURL = /* values here */
|
||||
```
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `type` | *Literal["input_video"]* | :heavy_check_mark: | N/A |
|
||||
| `video_url` | [components.VideoURL](../components/videourl.md) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# 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 |
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
## 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.TopLogprob](../components/toplogprob.md)] | :heavy_check_mark: | N/A |
|
||||
| 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 |
|
||||
@@ -0,0 +1,10 @@
|
||||
# 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 |
|
||||
@@ -9,4 +9,5 @@
|
||||
| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema19](../components/schema19.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,23 @@
|
||||
# Completion
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `float`
|
||||
|
||||
```python
|
||||
value: float = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `Any`
|
||||
|
||||
```python
|
||||
value: Any = /* values here */
|
||||
```
|
||||
|
||||
@@ -1,11 +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 |
|
||||
@@ -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,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 */
|
||||
```
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# CompletionFinishReason
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| `STOP` | stop |
|
||||
| `LENGTH` | length |
|
||||
| `CONTENT_FILTER` | content_filter |
|
||||
@@ -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 |
|
||||
@@ -1,14 +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 |
|
||||
| `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 |
|
||||
@@ -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 |
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
||||
- allow: (default) allow providers which store user data non-transiently and may train on it
|
||||
- deny: use only providers which do not collect user data.
|
||||
|
||||
- deny: use only providers which do not collect user data.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Debug
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | -------------------- | -------------------- | -------------------- |
|
||||
| `echo_upstream_body` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,10 @@
|
||||
# DeveloperMessage
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `role` | *Literal["developer"]* | :heavy_check_mark: | N/A |
|
||||
| `content` | [components.DeveloperMessageContent](../components/developermessagecontent.md) | :heavy_check_mark: | N/A |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# MessageContent
|
||||
# DeveloperMessageContent
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `MINIMAL` | minimal |
|
||||
| `LOW` | low |
|
||||
| `XHIGH` | xhigh |
|
||||
| `HIGH` | high |
|
||||
| `MEDIUM` | medium |
|
||||
| `HIGH` | high |
|
||||
| `LOW` | low |
|
||||
| `MINIMAL` | minimal |
|
||||
| `NONE` | none |
|
||||
@@ -0,0 +1,8 @@
|
||||
# IDAutoRouter
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `AUTO_ROUTER` | auto-router |
|
||||
@@ -0,0 +1,8 @@
|
||||
# IDResponseHealing
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------------ | ------------------ |
|
||||
| `RESPONSE_HEALING` | response-healing |
|
||||
@@ -0,0 +1,8 @@
|
||||
# Image
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,11 @@
|
||||
# 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 |
|
||||
@@ -1,14 +0,0 @@
|
||||
# MaxPrice
|
||||
|
||||
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: | A value in string or number format that is a large number |
|
||||
| `completion` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
||||
| `image` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
||||
| `audio` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
||||
| `request` | *Optional[Any]* | :heavy_minus_sign: | A value in string or number format that is a large number |
|
||||
@@ -15,10 +15,10 @@ value: components.SystemMessage = /* values here */
|
||||
value: components.UserMessage = /* values here */
|
||||
```
|
||||
|
||||
### `components.MessageDeveloper`
|
||||
### `components.DeveloperMessage`
|
||||
|
||||
```python
|
||||
value: components.MessageDeveloper = /* values here */
|
||||
value: components.DeveloperMessage = /* values here */
|
||||
```
|
||||
|
||||
### `components.AssistantMessage`
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# MessageDeveloper
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `role` | *Literal["developer"]* | :heavy_check_mark: | N/A |
|
||||
| `content` | [components.MessageContent](../components/messagecontent.md) | :heavy_check_mark: | N/A |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# Modality
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `TEXT` | text |
|
||||
| `IMAGE` | image |
|
||||
@@ -19,4 +19,5 @@ Information about an AI model available on OpenRouter
|
||||
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"max_completion_tokens": 4096,<br/>"is_moderated": true<br/>} |
|
||||
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"prompt_tokens": 1000,<br/>"completion_tokens": 1000<br/>} |
|
||||
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
|
||||
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
|
||||
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
|
||||
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `XHIGH` | xhigh |
|
||||
| `HIGH` | high |
|
||||
| `MEDIUM` | medium |
|
||||
| `LOW` | low |
|
||||
| `MINIMAL` | minimal |
|
||||
| `MINIMAL` | minimal |
|
||||
| `NONE` | none |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `type` | [Optional[components.OpenResponsesEasyInputMessageType]](../components/openresponseseasyinputmessagetype.md) | :heavy_minus_sign: | N/A |
|
||||
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
|
||||
| `content` | [components.OpenResponsesEasyInputMessageContent2](../components/openresponseseasyinputmessagecontent2.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | [Optional[components.OpenResponsesEasyInputMessageTypeMessage]](../components/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A |
|
||||
| `role` | [components.OpenResponsesEasyInputMessageRoleUnion](../components/openresponseseasyinputmessageroleunion.md) | :heavy_check_mark: | N/A |
|
||||
| `content` | [components.OpenResponsesEasyInputMessageContentUnion2](../components/openresponseseasyinputmessagecontentunion2.md) | :heavy_check_mark: | N/A |
|
||||
@@ -1,17 +0,0 @@
|
||||
# OpenResponsesEasyInputMessageContent2
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `List[components.OpenResponsesEasyInputMessageContent1]`
|
||||
|
||||
```python
|
||||
value: List[components.OpenResponsesEasyInputMessageContent1] = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenResponsesEasyInputMessageContentInputImage
|
||||
|
||||
Image input content item
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.OpenResponsesEasyInputMessageContentType](../components/openresponseseasyinputmessagecontenttype.md) | :heavy_check_mark: | N/A |
|
||||
| `detail` | [components.OpenResponsesEasyInputMessageDetail](../components/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A |
|
||||
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenResponsesEasyInputMessageContentType
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `INPUT_IMAGE` | input_image |
|
||||
+9
-3
@@ -1,4 +1,4 @@
|
||||
# OpenResponsesInputMessageItemContent
|
||||
# OpenResponsesEasyInputMessageContentUnion1
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -9,10 +9,10 @@
|
||||
value: components.ResponseInputText = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputImage`
|
||||
### `components.OpenResponsesEasyInputMessageContentInputImage`
|
||||
|
||||
```python
|
||||
value: components.ResponseInputImage = /* values here */
|
||||
value: components.OpenResponsesEasyInputMessageContentInputImage = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputFile`
|
||||
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
|
||||
value: components.ResponseInputAudio = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputVideo`
|
||||
|
||||
```python
|
||||
value: components.ResponseInputVideo = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# OpenResponsesEasyInputMessageContentUnion2
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `List[components.OpenResponsesEasyInputMessageContentUnion1]`
|
||||
|
||||
```python
|
||||
value: List[components.OpenResponsesEasyInputMessageContentUnion1] = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenResponsesEasyInputMessageDetail
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `AUTO` | auto |
|
||||
| `HIGH` | high |
|
||||
| `LOW` | low |
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# OpenResponsesInputMessageItemType
|
||||
# OpenResponsesEasyInputMessageTypeMessage
|
||||
|
||||
|
||||
## Values
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `type` | [Optional[components.OpenResponsesInputMessageItemType]](../components/openresponsesinputmessageitemtype.md) | :heavy_minus_sign: | N/A |
|
||||
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
|
||||
| `content` | List[[components.OpenResponsesInputMessageItemContent](../components/openresponsesinputmessageitemcontent.md)] | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `type` | [Optional[components.OpenResponsesInputMessageItemTypeMessage]](../components/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A |
|
||||
| `role` | [components.OpenResponsesInputMessageItemRoleUnion](../components/openresponsesinputmessageitemroleunion.md) | :heavy_check_mark: | N/A |
|
||||
| `content` | List[[components.OpenResponsesInputMessageItemContentUnion](../components/openresponsesinputmessageitemcontentunion.md)] | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,12 @@
|
||||
# OpenResponsesInputMessageItemContentInputImage
|
||||
|
||||
Image input content item
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | [components.OpenResponsesInputMessageItemContentType](../components/openresponsesinputmessageitemcontenttype.md) | :heavy_check_mark: | N/A |
|
||||
| `detail` | [components.OpenResponsesInputMessageItemDetail](../components/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A |
|
||||
| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenResponsesInputMessageItemContentType
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `INPUT_IMAGE` | input_image |
|
||||
+9
-3
@@ -1,4 +1,4 @@
|
||||
# OpenResponsesEasyInputMessageContent1
|
||||
# OpenResponsesInputMessageItemContentUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -9,10 +9,10 @@
|
||||
value: components.ResponseInputText = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputImage`
|
||||
### `components.OpenResponsesInputMessageItemContentInputImage`
|
||||
|
||||
```python
|
||||
value: components.ResponseInputImage = /* values here */
|
||||
value: components.OpenResponsesInputMessageItemContentInputImage = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputFile`
|
||||
@@ -27,3 +27,9 @@ value: components.ResponseInputFile = /* values here */
|
||||
value: components.ResponseInputAudio = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseInputVideo`
|
||||
|
||||
```python
|
||||
value: components.ResponseInputVideo = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenResponsesInputMessageItemDetail
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------ | ------ |
|
||||
| `AUTO` | auto |
|
||||
| `HIGH` | high |
|
||||
| `LOW` | low |
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# OpenResponsesEasyInputMessageType
|
||||
# OpenResponsesInputMessageItemTypeMessage
|
||||
|
||||
|
||||
## Values
|
||||
@@ -11,7 +11,8 @@ Complete non-streaming response from the Responses API
|
||||
| `object` | [components.Object](../components/object.md) | :heavy_check_mark: | N/A | |
|
||||
| `created_at` | *float* | :heavy_check_mark: | N/A | |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `status` | [Optional[components.OpenAIResponsesResponseStatus]](../components/openairesponsesresponsestatus.md) | :heavy_minus_sign: | N/A | |
|
||||
| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | |
|
||||
| `completed_at` | *Nullable[float]* | :heavy_check_mark: | N/A | |
|
||||
| `output` | List[[components.ResponsesOutputItem](../components/responsesoutputitem.md)] | :heavy_check_mark: | N/A | |
|
||||
| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -19,12 +20,14 @@ Complete non-streaming response from the Responses API
|
||||
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.md) | :heavy_check_mark: | Error information returned from the API | {<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} |
|
||||
| `incomplete_details` | [Nullable[components.OpenAIResponsesIncompleteDetails]](../components/openairesponsesincompletedetails.md) | :heavy_check_mark: | N/A | |
|
||||
| `usage` | [Optional[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
|
||||
| `usage` | [OptionalNullable[components.OpenResponsesUsage]](../components/openresponsesusage.md) | :heavy_minus_sign: | Token usage information for the response | {<br/>"input_tokens": 10,<br/>"output_tokens": 25,<br/>"total_tokens": 35,<br/>"input_tokens_details": {<br/>"cached_tokens": 0<br/>},<br/>"output_tokens_details": {<br/>"reasoning_tokens": 0<br/>},<br/>"cost": 0.0012,<br/>"cost_details": {<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>}<br/>} |
|
||||
| `max_tool_calls` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `top_logprobs` | *Optional[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | |
|
||||
| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | |
|
||||
| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
|
||||
| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
|
||||
| `instructions` | [Nullable[components.OpenAIResponsesInputUnion]](../components/openairesponsesinputunion.md) | :heavy_check_mark: | N/A | |
|
||||
| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {<br/>"user_id": "123",<br/>"session_id": "abc-def-ghi"<br/>} |
|
||||
| `tools` | List[[components.OpenResponsesNonStreamingResponseToolUnion](../components/openresponsesnonstreamingresponsetoolunion.md)] | :heavy_check_mark: | N/A | |
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------------- | --------------------- |
|
||||
| `UNKNOWN` | unknown |
|
||||
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
|
||||
| `XAI_RESPONSES_V1` | xai-responses-v1 |
|
||||
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
|
||||
| Name | Value |
|
||||
| --------------------------- | --------------------------- |
|
||||
| `UNKNOWN` | unknown |
|
||||
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
|
||||
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
|
||||
| `XAI_RESPONSES_V1` | xai-responses-v1 |
|
||||
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
|
||||
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
|
||||
@@ -20,17 +20,24 @@ Request schema for Responses endpoint
|
||||
| `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
|
||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | |
|
||||
| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../components/openresponsesrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {<br/>"aspect_ratio": "16:9"<br/>} |
|
||||
| `modalities` | List[[components.ResponsesOutputModality](../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [<br/>"text",<br/>"image"<br/>] |
|
||||
| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | |
|
||||
| `include` | List[[components.OpenAIResponsesIncludable](../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
|
||||
| `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `service_tier` | [OptionalNullable[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `store` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | |
|
||||
| `service_tier` | [Optional[components.ServiceTier]](../components/servicetier.md) | :heavy_minus_sign: | N/A | |
|
||||
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.md) | :heavy_minus_sign: | N/A | auto |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
|
||||
| `provider` | [OptionalNullable[components.Provider]](../components/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
|
||||
| `plugins` | List[[components.Plugin](../components/plugin.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | |
|
||||
| `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. | |
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenResponsesRequestEngine
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| -------- | -------- |
|
||||
| `NATIVE` | native |
|
||||
| `EXA` | exa |
|
||||
@@ -0,0 +1,17 @@
|
||||
# OpenResponsesRequestIgnore
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ProviderName`
|
||||
|
||||
```python
|
||||
value: components.ProviderName = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
# CompletionCreateParamsStop
|
||||
# OpenResponsesRequestImageConfig
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -9,9 +9,9 @@
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `List[str]`
|
||||
### `float`
|
||||
|
||||
```python
|
||||
value: List[str] = /* values here */
|
||||
value: float = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# OpenResponsesRequestMaxPrice
|
||||
|
||||
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 | Example |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 |
|
||||
| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
|
||||
@@ -0,0 +1,17 @@
|
||||
# OpenResponsesRequestOnly
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ProviderName`
|
||||
|
||||
```python
|
||||
value: components.ProviderName = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# OpenResponsesRequestOrder
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ProviderName`
|
||||
|
||||
```python
|
||||
value: components.ProviderName = /* values here */
|
||||
```
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenResponsesRequestPdf
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `engine` | [Optional[components.OpenResponsesRequestPdfEngine]](../components/openresponsesrequestpdfengine.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,10 @@
|
||||
# OpenResponsesRequestPdfEngine
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `MISTRAL_OCR` | mistral-ocr |
|
||||
| `PDF_TEXT` | pdf-text |
|
||||
| `NATIVE` | native |
|
||||
@@ -0,0 +1,11 @@
|
||||
# OpenResponsesRequestRoute
|
||||
|
||||
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------- | ---------- |
|
||||
| `FALLBACK` | fallback |
|
||||
| `SORT` | sort |
|
||||
@@ -0,0 +1,25 @@
|
||||
# OpenResponsesRequestSort
|
||||
|
||||
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ProviderSort`
|
||||
|
||||
```python
|
||||
value: components.ProviderSort = /* values here */
|
||||
```
|
||||
|
||||
### `components.ProviderSortConfig`
|
||||
|
||||
```python
|
||||
value: components.ProviderSortConfig = /* values here */
|
||||
```
|
||||
|
||||
### `Any`
|
||||
|
||||
```python
|
||||
value: Any = /* values here */
|
||||
```
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
| ------------ | ------------ |
|
||||
| `TEXT` | text |
|
||||
| `IMAGE` | image |
|
||||
| `EMBEDDINGS` | embeddings |
|
||||
| `EMBEDDINGS` | embeddings |
|
||||
| `AUDIO` | audio |
|
||||
@@ -26,5 +26,6 @@
|
||||
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
||||
| `INCLUDE_REASONING` | include_reasoning |
|
||||
| `REASONING` | reasoning |
|
||||
| `REASONING_EFFORT` | reasoning_effort |
|
||||
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
||||
| `VERBOSITY` | verbosity |
|
||||
@@ -0,0 +1,9 @@
|
||||
# Partition
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------- | ------- |
|
||||
| `MODEL` | model |
|
||||
| `NONE` | none |
|
||||
@@ -0,0 +1,12 @@
|
||||
# PDFParserEngine
|
||||
|
||||
The engine to use for parsing PDF files.
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------- | ------------- |
|
||||
| `MISTRAL_OCR` | mistral-ocr |
|
||||
| `PDF_TEXT` | pdf-text |
|
||||
| `NATIVE` | native |
|
||||
@@ -0,0 +1,10 @@
|
||||
# PDFParserOptions
|
||||
|
||||
Options for PDF parsing.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. |
|
||||
@@ -0,0 +1,13 @@
|
||||
# PercentileLatencyCutoffs
|
||||
|
||||
Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
|
||||
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p50 latency (seconds) |
|
||||
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p75 latency (seconds) |
|
||||
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p90 latency (seconds) |
|
||||
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum p99 latency (seconds) |
|
||||
@@ -0,0 +1,13 @@
|
||||
# PercentileStats
|
||||
|
||||
Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `p50` | *float* | :heavy_check_mark: | Median (50th percentile) | 25.5 |
|
||||
| `p75` | *float* | :heavy_check_mark: | 75th percentile | 35.2 |
|
||||
| `p90` | *float* | :heavy_check_mark: | 90th percentile | 48.7 |
|
||||
| `p99` | *float* | :heavy_check_mark: | 99th percentile | 85.3 |
|
||||
@@ -0,0 +1,13 @@
|
||||
# PercentileThroughputCutoffs
|
||||
|
||||
Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
||||
| `p50` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) |
|
||||
| `p75` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) |
|
||||
| `p90` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) |
|
||||
| `p99` | *OptionalNullable[float]* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) |
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.PluginAutoRouter`
|
||||
|
||||
```python
|
||||
value: components.PluginAutoRouter = /* values here */
|
||||
```
|
||||
|
||||
### `components.PluginModeration`
|
||||
|
||||
```python
|
||||
@@ -21,3 +27,9 @@ value: components.PluginWeb = /* values here */
|
||||
value: components.PluginFileParser = /* values here */
|
||||
```
|
||||
|
||||
### `components.PluginResponseHealing`
|
||||
|
||||
```python
|
||||
value: components.PluginResponseHealing = /* values here */
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# PluginAutoRouter
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | [components.IDAutoRouter](../components/idautorouter.md) | :heavy_check_mark: | N/A | |
|
||||
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [<br/>"anthropic/*",<br/>"openai/gpt-4o",<br/>"google/*"<br/>] |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
|
||||
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
|
||||
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
| `pdf` | [Optional[components.Pdf]](../components/pdf.md) | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `id` | [components.IDFileParser](../components/idfileparser.md) | :heavy_check_mark: | N/A |
|
||||
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the file-parser plugin for this request. Defaults to true. |
|
||||
| `pdf` | [Optional[components.PDFParserOptions]](../components/pdfparseroptions.md) | :heavy_minus_sign: | Options for PDF parsing. |
|
||||
@@ -0,0 +1,9 @@
|
||||
# PluginResponseHealing
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `id` | [components.IDResponseHealing](../components/idresponsehealing.md) | :heavy_check_mark: | N/A |
|
||||
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the response-healing plugin for this request. Defaults to true. |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user