Closed QingyeSC closed 2 weeks ago
例行检查
问题描述
代码部分记录:
runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:26 +0x5e one-api/router.SetRelayRouter.RelayPanicRecover.func2.1() /build/middleware/recover.go:18 +0xb8 panic({0x1225100?, 0xc00691b878?}) /usr/local/go/src/runtime/panic.go:785 +0x132 one-api/relay/channel/anthropic.Handler(0xc0068ac900, 0xc0047ffa70, 0x12b6e5e?, {0xc00684cae0, 0x1a}) /build/relay/channel/anthropic/main.go:609 +0x4de one-api/relay/channel/gcpclaude.(Adaptor).DoResponse(0x34cdfc8?, 0x12b6e5e?, 0x12bbb7c?, 0xc005a3d000) /build/relay/channel/gcpclaude/adaptor.go:132 +0x24e one-api/relay/controller.RelayTextHelper(0xc0068ac900) /build/relay/controller/text.go:160 +0xc4b one-api/controller.relay(0xc006851085?, 0x14?) /build/controller/relay.go:40 +0x52 one-api/controller.Relay(0xc0068ac900) /build/controller/relay.go:48 +0x85 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.Distribute.func4(0xc0068ac900) /build/middleware/distributor.go:42 +0x177 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.TokenAuth.func3(0xc0068ac900) /build/middleware/auth.go:254 +0xa86 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.RelayPanicRecover.func2(0xc0068ac998?) /build/middleware/recover.go:31 +0x3f github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b main.main.Sessions.func5(0xc0068ac900) /go/pkg/mod/github.com/gin-contrib/sessions@v1.0.1/sessions.go:54 +0x165 github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 +0xe5 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b main.main.RequestId.func4(0xc0068ac900) /build/middleware/request-id.go:16 +0x136 github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 +0x6f github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.(Engine).handleHTTPRequest(0xc0001a6340, 0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 +0x892 github.com/gin-gonic/gin.(Engine).ServeHTTP(0xc0001a6340, {0x34cb840, 0xc003c3cc40}, 0xc006065540) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 +0x1b2 net/http.serverHandler.ServeHTTP({0x34c69c0?}, {0x34cb840?, 0xc003c3cc40?}, 0x6?) /usr/local/go/src/net/http/server.go:3210 +0x8e net/http.(conn).serve(0xc003b73ef0, {0x34cdfc8, 0xc000175830}) /usr/local/go/src/net/http/server.go:2092 +0x5d0 created by net/http.(*Server).Serve in goroutine 1 /usr/local/go/src/net/http/server.go:3360 +0x485
复现步骤
预期结果
相关截图 如果没有的话,请删除此节。
例行检查
问题描述
代码部分记录:
runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:26 +0x5e one-api/router.SetRelayRouter.RelayPanicRecover.func2.1() /build/middleware/recover.go:18 +0xb8 panic({0x1225100?, 0xc00691b878?}) /usr/local/go/src/runtime/panic.go:785 +0x132 one-api/relay/channel/anthropic.Handler(0xc0068ac900, 0xc0047ffa70, 0x12b6e5e?, {0xc00684cae0, 0x1a}) /build/relay/channel/anthropic/main.go:609 +0x4de one-api/relay/channel/gcpclaude.(Adaptor).DoResponse(0x34cdfc8?, 0x12b6e5e?, 0x12bbb7c?, 0xc005a3d000) /build/relay/channel/gcpclaude/adaptor.go:132 +0x24e one-api/relay/controller.RelayTextHelper(0xc0068ac900) /build/relay/controller/text.go:160 +0xc4b one-api/controller.relay(0xc006851085?, 0x14?) /build/controller/relay.go:40 +0x52 one-api/controller.Relay(0xc0068ac900) /build/controller/relay.go:48 +0x85 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.Distribute.func4(0xc0068ac900) /build/middleware/distributor.go:42 +0x177 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.TokenAuth.func3(0xc0068ac900) /build/middleware/auth.go:254 +0xa86 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b one-api/router.SetRelayRouter.RelayPanicRecover.func2(0xc0068ac998?) /build/middleware/recover.go:31 +0x3f github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b main.main.Sessions.func5(0xc0068ac900) /go/pkg/mod/github.com/gin-contrib/sessions@v1.0.1/sessions.go:54 +0x165 github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 +0xe5 github.com/gin-gonic/gin.(Context).Next(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b main.main.RequestId.func4(0xc0068ac900) /build/middleware/request-id.go:16 +0x136 github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 +0x6f github.com/gin-gonic/gin.(Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.(Engine).handleHTTPRequest(0xc0001a6340, 0xc0068ac900) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 +0x892 github.com/gin-gonic/gin.(Engine).ServeHTTP(0xc0001a6340, {0x34cb840, 0xc003c3cc40}, 0xc006065540) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 +0x1b2 net/http.serverHandler.ServeHTTP({0x34c69c0?}, {0x34cb840?, 0xc003c3cc40?}, 0x6?) /usr/local/go/src/net/http/server.go:3210 +0x8e net/http.(conn).serve(0xc003b73ef0, {0x34cdfc8, 0xc000175830}) /usr/local/go/src/net/http/server.go:2092 +0x5d0 created by net/http.(*Server).Serve in goroutine 1 /usr/local/go/src/net/http/server.go:3360 +0x485
复现步骤
预期结果
相关截图 如果没有的话,请删除此节。