OpenRouterParams
OpenRouter chat-completions parameters layered on top of LLMParams.
Constructors
Properties
Number in -2.0, 2.0—penalizes frequent tokens to reduce repetition.
Number in -2.0, 2.0—encourages introduction of new tokens/topics.
Model provider preferences.
Number in (0.0, 2.0] — penalizes token repetition.
Number of top alternatives per position (0–20). Requires logprobs = true.
Nucleus sampling in (0.0, 1.0]; use instead of temperature.
List of context transforms. Defines how context is transformed when it exceeds the model's token limit. Default is "middle-out" which truncates from the middle of the prompt. Use empty list [] for no transformations.
Functions
Subclasses that declare additional fields must override this method to preserve those fields.
Creates a copy of this instance with the ability to modify any of its properties.