mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
- b867adcde6b64f3f2a11c4626254b39098e4b0b4 - 21912c097b4066d109766c6b4492826595cd57c5 - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f - d145c89c941937a312ed1357590d2bfda9a3603d - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524 - dd28f75a19a015809797c7abf3f8758f7c37262e - c96e569781e07ab44172d9c69940ec17bafd81f4 - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7 - 58b08f87116ceab9076de2fdc0a4c74c919b44c4 GitOrigin-RevId: b867adcde6b64f3f2a11c4626254b39098e4b0b4
29 KiB
29 KiB
ChatGenerationParams
Fields
| Field | Type | Required | Description |
|---|---|---|---|
provider |
OptionalNullable[components.ChatGenerationParamsProvider] | ➖ | When multiple model providers are available, optionally indicate your routing preference. |
plugins |
List[components.ChatGenerationParamsPluginUnion] | ➖ | Plugins you want to enable for this request, including their settings. |
route |
OptionalNullable[components.Route] | ➖ | N/A |
user |
Optional[str] | ➖ | N/A |
session_id |
Optional[str] | ➖ | 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] | ✔️ | N/A |
model |
Optional[str] | ➖ | N/A |
models |
List[str] | ➖ | N/A |
frequency_penalty |
OptionalNullable[float] | ➖ | N/A |
logit_bias |
Dict[str, float] | ➖ | N/A |
logprobs |
OptionalNullable[bool] | ➖ | N/A |
top_logprobs |
OptionalNullable[float] | ➖ | N/A |
max_completion_tokens |
OptionalNullable[float] | ➖ | N/A |
max_tokens |
OptionalNullable[float] | ➖ | N/A |
metadata |
Dict[str, str] | ➖ | N/A |
presence_penalty |
OptionalNullable[float] | ➖ | N/A |
reasoning |
Optional[components.Reasoning] | ➖ | N/A |
response_format |
Optional[components.ResponseFormat] | ➖ | N/A |
seed |
OptionalNullable[int] | ➖ | N/A |
stop |
OptionalNullable[components.Stop] | ➖ | N/A |
stream |
Optional[bool] | ➖ | N/A |
stream_options |
OptionalNullable[components.ChatStreamOptions] | ➖ | N/A |
temperature |
OptionalNullable[float] | ➖ | N/A |
tool_choice |
Optional[Any] | ➖ | N/A |
tools |
List[components.ToolDefinitionJSON] | ➖ | N/A |
top_p |
OptionalNullable[float] | ➖ | N/A |
debug |
Optional[components.Debug] | ➖ | N/A |
image_config |
Dict[str, components.ChatGenerationParamsImageConfig] | ➖ | N/A |
modalities |
List[components.Modality] | ➖ | N/A |