Class OpenRouterOptions.ProviderOptions
Inherited Members
Namespace: Glitch9.AIDevKit.OpenRouter
Assembly: Glitch9.AIDevKit.Provider.OpenRouter.dll
Syntax
public class OpenRouterOptions.ProviderOptions
Properties
| Edit this page View SourceAllowFallbacks
Whether to allow backup providers to serve requests. Optional.
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
Declaration
[JsonProperty("allow_fallbacks")]
public bool? AllowFallbacks { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
DataCollection
Data collection setting. Optional. 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
Declaration
[JsonProperty("data_collection")]
public string DataCollection { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
EnforceDistillableText
Whether to enforce distillable text format. Optional.
Declaration
[JsonProperty("enforce_distillable_text")]
public bool? EnforceDistillableText { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Ignore
List of provider slugs to ignore. Optional. If provided, this list is merged with your account-wide ignored provider settings for this request. See OpenRouter documentation for the full list of supported providers.
Declaration
[JsonProperty("ignore")]
public string[] Ignore { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
MaxLatency
Maximum latency requirement for the provider. Optional.
Declaration
[JsonProperty("max_latency")]
public double? MaxLatency { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
MaxPrice
The object specifying the maximum price you want to pay for this request. Optional. USD price per million tokens, for prompt and completion.
Declaration
[JsonProperty("max_price")]
public OpenRouterOptions.MaxPrice MaxPrice { get; set; }
Property Value
| Type | Description |
|---|---|
| OpenRouterOptions.MaxPrice |
MinThroughput
Minimum throughput requirement for the provider. Optional.
Declaration
[JsonProperty("min_throughput")]
public double? MinThroughput { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
Only
List of provider slugs to allow. Optional. If provided, this list is merged with your account-wide allowed provider settings for this request. See OpenRouter documentation for the full list of supported providers.
Declaration
[JsonProperty("only")]
public string[] Only { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Order
An ordered list of provider slugs. Optional. 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.
Declaration
[JsonProperty("order")]
public string[] Order { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
PreferredMaxLatency
Preferred maximum latency for the provider. Optional.
Declaration
[JsonProperty("preferred_max_latency")]
public double? PreferredMaxLatency { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
PreferredMinThroughput
Preferred minimum throughput for the provider. Optional.
Declaration
[JsonProperty("preferred_min_throughput")]
public double? PreferredMinThroughput { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
Quantizations
A list of quantization levels to filter the provider by. Optional. Allowed values: "int4", "int8", "fp4", "fp6", "fp8", "fp16", "bf16", "fp32", "unknown"
Declaration
[JsonProperty("quantizations")]
public string[] Quantizations { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
RequireParameters
Whether to filter providers to only those that support the parameters you've provided. Optional. If this setting is omitted or set to false, providers will receive only the parameters they support and ignore the rest.
Declaration
[JsonProperty("require_parameters")]
public bool? RequireParameters { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Sort
The sorting strategy to use for this request, if "order" is not specified. Optional. When set, no load balancing is performed.
Declaration
[JsonProperty("sort")]
public OpenRouterOptions.Sort Sort { get; set; }
Property Value
| Type | Description |
|---|---|
| OpenRouterOptions.Sort |
Zdr
Zero data retention flag. Optional.
Declaration
[JsonProperty("zdr")]
public bool? Zdr { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |