mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
Merge branch 'dev' into think
This commit is contained in:
@@ -52,10 +52,14 @@ func applyReasoningEffortMetadata(payload []byte, metadata map[string]any, model
|
||||
if len(metadata) == 0 {
|
||||
return payload
|
||||
}
|
||||
if !util.ModelSupportsThinking(model) {
|
||||
if field == "" {
|
||||
return payload
|
||||
}
|
||||
if field == "" {
|
||||
baseModel := util.ResolveOriginalModel(model, metadata)
|
||||
if baseModel == "" {
|
||||
baseModel = model
|
||||
}
|
||||
if !util.ModelSupportsThinking(baseModel) && !util.IsOpenAICompatibilityModel(baseModel) {
|
||||
return payload
|
||||
}
|
||||
if effort, ok := util.ReasoningEffortFromMetadata(metadata); ok && effort != "" {
|
||||
@@ -239,6 +243,9 @@ func normalizeThinkingConfig(payload []byte, model string) []byte {
|
||||
}
|
||||
|
||||
if !util.ModelSupportsThinking(model) {
|
||||
if util.IsOpenAICompatibilityModel(model) {
|
||||
return payload
|
||||
}
|
||||
return stripThinkingFields(payload, false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user