devel/crush: new port, crush 0.82.0
This commit is contained in:
23
devel/crush/patches/patch-internal_config_config_go
Normal file
23
devel/crush/patches/patch-internal_config_config_go
Normal file
@@ -0,0 +1,23 @@
|
||||
--- internal/config/config.go
|
||||
+++ internal/config/config.go
|
||||
@@ -177,6 +177,22 @@ func (c *ProviderConfig) SetupGitHubCopilot() {
|
||||
maps.Copy(c.ExtraHeaders, copilot.Headers())
|
||||
}
|
||||
|
||||
+func (c *ProviderConfig) SetupClaudeCode() {
|
||||
+ c.FlatRate = true
|
||||
+ c.SystemPromptPrefix = "You are Claude Code, Anthropic's official CLI for Claude."
|
||||
+ if c.ExtraHeaders == nil {
|
||||
+ c.ExtraHeaders = make(map[string]string)
|
||||
+ }
|
||||
+ c.ExtraHeaders["anthropic-version"] = "2023-06-01"
|
||||
+ const want = "oauth-2025-04-20"
|
||||
+ if v := c.ExtraHeaders["anthropic-beta"]; !strings.Contains(v, want) {
|
||||
+ if v != "" {
|
||||
+ v += ","
|
||||
+ }
|
||||
+ c.ExtraHeaders["anthropic-beta"] = v + want
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
type MCPType string
|
||||
Reference in New Issue
Block a user