Fix Qwen session tool calls and expose thinking compatibility
Publish documentation / publish (push) Successful in 30s
Publish documentation / publish (push) Successful in 30s
This commit is contained in:
@@ -90,6 +90,7 @@ type ModelCompatibility struct {
|
||||
SupportsReasoningEffort bool `yaml:"supportsReasoningEffort" json:"supportsReasoningEffort"`
|
||||
SupportsStore bool `yaml:"supportsStore" json:"supportsStore"`
|
||||
MaxTokensField string `yaml:"maxTokensField" json:"maxTokensField,omitempty"`
|
||||
ThinkingFormat string `yaml:"thinkingFormat,omitempty" json:"thinkingFormat,omitempty"`
|
||||
}
|
||||
|
||||
type SessionModel struct {
|
||||
@@ -270,6 +271,15 @@ func validateCatalogProvider(id string, provider ModelProvider, hasSession, hasM
|
||||
if model.Session != nil && (model.Session.ContextWindow <= 0 || model.Session.MaxTokens <= 0) {
|
||||
return fmt.Errorf("modelCatalog model %q/%q requires contextWindow and maxTokens", id, modelID)
|
||||
}
|
||||
if model.Session != nil && model.Session.Compatibility != nil {
|
||||
format := model.Session.Compatibility.ThinkingFormat
|
||||
if format != "" && format != "qwen" && format != "qwen-chat-template" {
|
||||
return fmt.Errorf("modelCatalog model %q/%q compatibility.thinkingFormat is invalid", id, modelID)
|
||||
}
|
||||
if format != "" && !model.Session.Reasoning {
|
||||
return fmt.Errorf("modelCatalog model %q/%q compatibility.thinkingFormat requires reasoning: true", id, modelID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if provider.Session != nil {
|
||||
|
||||
Reference in New Issue
Block a user