Skip to content

Commit 7333769

Browse files
authored
Merge pull request #19 from lookfirst-io/manba/addmore_provider_control_only_openrouter
feat: add openrouter provider control : only
2 parents 03c92bf + a5698c8 commit 7333769

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

chat.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,14 @@ type ChatCompletionRequest struct {
230230
}
231231

232232
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.
240241
}
241242

242243
// context : https://openrouter.ai/docs/use-cases/reasoning-tokens

0 commit comments

Comments
 (0)