devel/crush: new port, crush 0.82.0

This commit is contained in:
c0dev0id
2026-07-08 11:07:34 +02:00
parent bdaeed24db
commit 6d238cb67e
13 changed files with 4098 additions and 0 deletions

View 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