{"modulePath":"github.com/MAX-API-Next/MAX-API","version":"v1.0.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package model_setting\n\n## Functions\n\n```go\nfunc GetGeminiSafetySetting(key string) string\n```\nGetGeminiSafetySetting 获取安全设置\n\n```go\nfunc GetGeminiVersionSetting(key string) string\n```\nGetGeminiVersionSetting 获取版本设置\n\n```go\nfunc IsGeminiModelSupportImagine(model string) bool\n```\n\n```go\nfunc IsSyncImageModel(model string) bool\n```\nIsSyncImageModel\n\n```go\nfunc ShouldPreserveThinkingSuffix(modelName string) bool\n```\nShouldPreserveThinkingSuffix 判断模型是否配置为保留 thinking/-nothinking/-low/-high/-medium 后缀\n\n## Types\n\n```go\ntype ChatCompletionsToResponsesPolicy struct {\n\tEnabled       bool     `json:\"enabled\"`\n\tAllChannels   bool     `json:\"all_channels\"`\n\tChannelIDs    []int    `json:\"channel_ids,omitempty\"`\n\tChannelTypes  []int    `json:\"channel_types,omitempty\"`\n\tModelPatterns []string `json:\"model_patterns,omitempty\"`\n}\n```\n\n```go\nfunc (p ChatCompletionsToResponsesPolicy) IsChannelEnabled(channelID int, channelType int) bool\n```\n\n```go\ntype ClaudeSettings struct {\n\tHeadersSettings                       map[string]map[string][]string `json:\"model_headers_settings\"`\n\tDefaultMaxTokens                      map[string]int                 `json:\"default_max_tokens\"`\n\tThinkingAdapterEnabled                bool                           `json:\"thinking_adapter_enabled\"`\n\tThinkingAdapterBudgetTokensPercentage float64                        `json:\"thinking_adapter_budget_tokens_percentage\"`\n}\n```\nClaudeSettings 定义Claude模型的配置\n\n```go\nfunc GetClaudeSettings() *ClaudeSettings\n```\nGetClaudeSettings 获取Claude配置\n\n```go\nfunc (c *ClaudeSettings) GetDefaultMaxTokens(model string) int\n```\n\n```go\nfunc (c *ClaudeSettings) WriteHeaders(originModel string, httpHeader *http.Header)\n```\n\n```go\ntype GeminiSettings struct {\n\tSafetySettings                        map[string]string `json:\"safety_settings\"`\n\tVersionSettings                       map[string]string `json:\"version_settings\"`\n\tSupportedImagineModels                []string          `json:\"supported_imagine_models\"`\n\tThinkingAdapterEnabled                bool              `json:\"thinking_adapter_enabled\"`\n\tThinkingAdapterBudgetTokensPercentage float64           `json:\"thinking_adapter_budget_tokens_percentage\"`\n\tFunctionCallThoughtSignatureEnabled   bool              `json:\"function_call_thought_signature_enabled\"`\n\tRemoveFunctionResponseIdEnabled       bool              `json:\"remove_function_response_id_enabled\"`\n}\n```\nGeminiSettings defines Gemini model configuration. 注意bool要以enabled结尾才可以生效编辑\n\n```go\nfunc GetGeminiSettings() *GeminiSettings\n```\nGetGeminiSettings 获取Gemini配置\n\n```go\ntype GlobalSettings struct {\n\tPassThroughRequestEnabled        bool                             `json:\"pass_through_request_enabled\"`\n\tThinkingModelBlacklist           []string                         `json:\"thinking_model_blacklist\"`\n\tChatCompletionsToResponsesPolicy ChatCompletionsToResponsesPolicy `json:\"chat_completions_to_responses_policy\"`\n}\n```\n\n```go\nfunc GetGlobalSettings() *GlobalSettings\n```\n\n```go\ntype GrokSettings struct {\n\tViolationDeductionEnabled bool    `json:\"violation_deduction_enabled\"`\n\tViolationDeductionAmount  float64 `json:\"violation_deduction_amount\"`\n}\n```\nGrokSettings defines Grok model configuration.\n\n```go\nfunc GetGrokSettings() *GrokSettings\n```\n\n```go\ntype QwenSettings struct {\n\tSyncImageModels []string `json:\"sync_image_models\"`\n}\n```\nQwenSettings defines Qwen model configuration. 注意bool要以enabled结尾才可以生效编辑\n\n```go\nfunc GetQwenSettings() *QwenSettings\n```\nGetQwenSettings\n\n","path":"github.com/MAX-API-Next/MAX-API/setting/model_setting","name":"model_setting","synopsis":"","isRedistributable":true}
