feat: claude context editing

This commit is contained in:
Seefs
2025-09-30 09:22:40 +08:00
parent 59e2c884bb
commit a7f6065f42
6 changed files with 16 additions and 6 deletions

View File

@@ -67,6 +67,10 @@ func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Header, info *rel
anthropicVersion = "2023-06-01"
}
req.Set("anthropic-version", anthropicVersion)
anthropicBeta := c.Request.Header.Get("anthropic-beta")
if anthropicBeta != "" {
req.Set("anthropic-beta", anthropicBeta)
}
model_setting.GetClaudeSettings().WriteHeaders(info.OriginModelName, req)
return nil
}