feat: Anthropic平台可配置 anthropic-beta 策略

This commit is contained in:
shaw
2026-03-10 11:14:17 +08:00
parent ac6bde7a98
commit 00a0a12138
14 changed files with 588 additions and 29 deletions

View File

@@ -168,6 +168,19 @@ type RectifierSettings struct {
ThinkingBudgetEnabled bool `json:"thinking_budget_enabled"`
}
// BetaPolicyRule Beta 策略规则 DTO
type BetaPolicyRule struct {
BetaToken string `json:"beta_token"`
Action string `json:"action"`
Scope string `json:"scope"`
ErrorMessage string `json:"error_message,omitempty"`
}
// BetaPolicySettings Beta 策略配置 DTO
type BetaPolicySettings struct {
Rules []BetaPolicyRule `json:"rules"`
}
// ParseCustomMenuItems parses a JSON string into a slice of CustomMenuItem.
// Returns empty slice on empty/invalid input.
func ParseCustomMenuItems(raw string) []CustomMenuItem {