fix(executor): drop obsolete context-1m-2025-08-07 beta header
Unified · Split
| @@ -11,7 +11,6 @@ import ( · 10 unmodified lines | ||
| 11 | 11 | "fmt" |
| 12 | 12 | "io" |
| 13 | 13 | "net/http" |
| 14 | − "net/textproto" | |
| 15 | 14 | "strings" |
| 16 | 15 | "time" |
| 17 | 16 | |
| @@ -911,15 +910,8 @@ func applyClaudeHeaders(r *http.Request, auth *cliproxyauth.Auth, apiKey string, · 893 unmodified lines | ||
| 911 | 910 | baseBetas += ",interleaved-thinking-2025-05-14" |
| 912 | 911 | } |
| 913 | 912 | |
| 914 | − hasClaude1MHeader := false | |
| 915 | − if ginHeaders != nil { | |
| 916 | − if _, ok := ginHeaders[textproto.CanonicalMIMEHeaderKey("X-CPA-CLAUDE-1M")]; ok { | |
| 917 | − hasClaude1MHeader = true | |
| 918 | − } | |
| 919 | − } | |
| 920 | − | |
| 921 | 913 | // Merge extra betas from request body and request flags. |
| 922 | − if len(extraBetas) > 0 || hasClaude1MHeader { | |
| 914 | + if len(extraBetas) > 0 { | |
| 923 | 915 | existingSet := make(map[string]bool) |
| 924 | 916 | for _, b := range strings.Split(baseBetas, ",") { |
| 925 | 917 | betaName := strings.TrimSpace(b) |
| @@ -934,9 +926,6 @@ func applyClaudeHeaders(r *http.Request, auth *cliproxyauth.Auth, apiKey string, · 8 unmodified lines | ||
| 934 | 926 | existingSet[beta] = true |
| 935 | 927 | } |
| 936 | 928 | } |
| 937 | − if hasClaude1MHeader && !existingSet["context-1m-2025-08-07"] { | |
| 938 | − baseBetas += ",context-1m-2025-08-07" | |
| 939 | − } | |
| 940 | 929 | } |
| 941 | 930 | r.Header.Set("Anthropic-Beta", baseBetas) |
| 942 | 931 | |