mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:24:25 +00:00
fix: 优化cache control问题2
This commit is contained in:
@@ -142,8 +142,7 @@ class ClaudeRelayService {
|
|||||||
// 获取有效的访问token
|
// 获取有效的访问token
|
||||||
const accessToken = await claudeAccountService.getValidAccessToken(accountId)
|
const accessToken = await claudeAccountService.getValidAccessToken(accountId)
|
||||||
|
|
||||||
// 处理请求体(传递 clientHeaders 以判断是否需要设置 Claude Code 系统提示词)
|
const processedBody = this._processRequestBody(requestBody, account)
|
||||||
const processedBody = this._processRequestBody(requestBody, clientHeaders, account)
|
|
||||||
|
|
||||||
// 获取代理配置
|
// 获取代理配置
|
||||||
const proxyAgent = await this._getProxyAgent(accountId)
|
const proxyAgent = await this._getProxyAgent(accountId)
|
||||||
@@ -435,7 +434,7 @@ class ClaudeRelayService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 🔄 处理请求体
|
// 🔄 处理请求体
|
||||||
_processRequestBody(body, clientHeaders = {}, account = null) {
|
_processRequestBody(body, account = null) {
|
||||||
if (!body) {
|
if (!body) {
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
@@ -998,8 +997,7 @@ class ClaudeRelayService {
|
|||||||
// 获取有效的访问token
|
// 获取有效的访问token
|
||||||
const accessToken = await claudeAccountService.getValidAccessToken(accountId)
|
const accessToken = await claudeAccountService.getValidAccessToken(accountId)
|
||||||
|
|
||||||
// 处理请求体(传递 clientHeaders 以判断是否需要设置 Claude Code 系统提示词)
|
const processedBody = this._processRequestBody(requestBody, account)
|
||||||
const processedBody = this._processRequestBody(requestBody, clientHeaders, account)
|
|
||||||
|
|
||||||
// 获取代理配置
|
// 获取代理配置
|
||||||
const proxyAgent = await this._getProxyAgent(accountId)
|
const proxyAgent = await this._getProxyAgent(accountId)
|
||||||
|
|||||||
Reference in New Issue
Block a user