@@ -230,13 +230,14 @@ type ChatCompletionRequest struct {
230
230
}
231
231
232
232
type PostOpenrouterProviderRequest struct {
233
- Sort string `json:"sort"` // Sort providers by price or throughput. (e.g. "price" or "throughput")
234
- Quantizations []string `json:"quantizations"` // List of quantization levels to filter by (e.g. ["int4", "int8"])
235
- Ignore []string `json:"ignore"` // List of provider names to skip for this request.
236
- DataCollection string `json:"data_collection"` // Control whether to use providers that may store data. "deny" or "allow"
237
- RequireParameters bool `json:"require_parameters"` // Only use providers that support all parameters in your request.
238
- AllowFallbacks bool `json:"allow_fallbacks"` // Whether to allow backup providers when the primary is unavailable.
239
- Order []string `json:"order"` // List of provider names to try in order
233
+ Sort string `json:"sort,omitempty"` // Sort providers by price or throughput. (e.g. "price" or "throughput")
234
+ Quantizations []string `json:"quantizations,omitempty"` // List of quantization levels to filter by (e.g. ["int4", "int8"])
235
+ Ignore []string `json:"ignore,omitempty"` // List of provider names to skip for this request.
236
+ DataCollection string `json:"data_collection,omitempty"` // Control whether to use providers that may store data. "deny" or "allow"
237
+ RequireParameters bool `json:"require_parameters,omitempty"` // Only use providers that support all parameters in your request.
238
+ AllowFallbacks bool `json:"allow_fallbacks,omitempty"` // Whether to allow backup providers when the primary is unavailable.
239
+ Order []string `json:"order,omitempty"` // List of provider names to try in order
240
+ Only []string `json:"only,omitempty"` // List of provider slugs to allow for this request.
240
241
}
241
242
242
243
// context : https://openrouter.ai/docs/use-cases/reasoning-tokens
0 commit comments