mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 16:26:30 +00:00
Allow OpenAI/Composite group mappings to match by exact model name, prefix, or suffix. Empty type and model still apply to every model. The admin form groups multiple request-to-forward pairs under one type+model scope.
21 lines
695 B
Go
21 lines
695 B
Go
package domain
|
|
|
|
const (
|
|
ReasoningEffortMatchExact = "exact"
|
|
ReasoningEffortMatchPrefix = "prefix"
|
|
ReasoningEffortMatchSuffix = "suffix"
|
|
)
|
|
|
|
// ReasoningEffortMapping rewrites one explicit OpenAI/Codex reasoning effort
|
|
// value to another before the group ceiling is applied.
|
|
//
|
|
// Model and MatchType optionally scope the rewrite to a request model:
|
|
// exact matches the full model id, prefix/suffix match a model-id affix.
|
|
// Empty MatchType and empty Model mean the mapping applies to every model.
|
|
type ReasoningEffortMapping struct {
|
|
From string `json:"from"`
|
|
To string `json:"to"`
|
|
MatchType string `json:"match_type,omitempty"`
|
|
Model string `json:"model,omitempty"`
|
|
}
|