refactor(iflow): simplify thinking config handling for GLM and MiniMax models

This commit is contained in:
hkfires
2026-01-01 19:31:08 +08:00
parent 2d2f4572a7
commit 4fc3d5e935
3 changed files with 31 additions and 45 deletions

View File

@@ -25,7 +25,7 @@ func SanitizeFunctionName(name string) string {
if name == "" {
return ""
}
// Replace invalid characters with underscore
sanitized := functionNameSanitizer.ReplaceAllString(name, "_")
@@ -36,7 +36,7 @@ func SanitizeFunctionName(name string) string {
if !((first >= 'a' && first <= 'z') || (first >= 'A' && first <= 'Z') || first == '_') {
// If it starts with an allowed character but not allowed at the beginning (digit, dot, colon, dash),
// we must prepend an underscore.
// To stay within the 64-character limit while prepending, we must truncate first.
if len(sanitized) >= 64 {
sanitized = sanitized[:63]