对应的请求里如果有这一条就必现
入站:/v1/responses
上游:/v1/responses/compact
模型是5.6-sol,具体错误日志:
http: panic serving 172.x.0.x:xxxxx: runtime error: invalid memory address or nil pointer dereference goroutine 5181309 [running]: net/http.(*conn).serve.func1() /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:1907 +0xbd panic({0x32cfc00?, 0x69dd690?}) /opt/hostedtoolcache/go/1.26.5/x64/src/runtime/panic.go:860 +0x13a github.com/Wei-Shaw/sub2api/internal/handler.(*opsCaptureWriter).Written(0x330e800?) :1 +0x15 github.com/Wei-Shaw/sub2api/internal/service.(*openAICompactKeepaliveWriter).Written(0x4085cc0?) /home/runner/work/sub2api/sub2api/backend/internal/service/openai_compact_sse_keepalive.go:232 +0x82 github.com/Wei-Shaw/sub2api/internal/server.ProvideRouter.Recovery.func2(0x3a1486562a00, {0x32cfc00?, 0x69dd690}) /home/runner/work/sub2api/sub2api/backend/internal/server/middleware/recovery.go:31 +0x88 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1.1() /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:98 +0x6ff panic({0x32cfc00?, 0x69dd690?}) /opt/hostedtoolcache/go/1.26.5/x64/src/runtime/panic.go:860 +0x13a github.com/Wei-Shaw/sub2api/internal/handler.(*opsCaptureWriter).Status(0x5?) :1 +0x15 github.com/Wei-Shaw/sub2api/internal/service.(*openAICompactKeepaliveWriter).Status(0xc28cde3d63832a1b?) /home/runner/work/sub2api/sub2api/backend/internal/service/openai_compact_sse_keepalive.go:220 +0x89 github.com/Wei-Shaw/sub2api/internal/server.SetupRouter.Logger.func5(0x3a1486562a00) /home/runner/work/sub2api/sub2api/backend/internal/server/middleware/logger.go:34 +0x13a github.com/gin-gonic/gin.(*Context).Next(0x3a1486562a00) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 +0x2b github.com/Wei-Shaw/sub2api/internal/server.SetupRouter.RequestLogger.func4(0x3a1486562a00) /home/runner/work/sub2api/sub2api/backend/internal/server/middleware/request_logger.go:43 +0x65c github.com/gin-gonic/gin.(*Context).Next(...) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0x3a1486562a00) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102 +0x6f github.com/gin-gonic/gin.(*Context).Next(...) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x3a1482b509c0, 0x3a1486562a00) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620 +0x65b github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x3a1482b509c0, {0x40a3a10, 0x3a1483dca690}, 0x3a148284db80) /home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576 +0x1ad github.com/Wei-Shaw/sub2api/internal/server.ProvideHTTPServer.MaxBytesHandler.func1({0x40a3a10, 0x3a1483dca690}, 0x3a148284da40) /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:4071 +0x12a net/http.HandlerFunc.ServeHTTP(0x425de5?, {0x40a3a10?, 0x3a1483dca690?}, 0x3a1483dca601?) /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:2286 +0x29 net/http.serverHandler.ServeHTTP({0x4096878?}, {0x40a3a10?, 0x3a1483dca690?}, 0x6?) /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:3311 +0x8e net/http.(*conn).serve(0x3a1482cd3b00, {0x40a75a8, 0x3a1482cc8810}) /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:2073 +0x650 created by net/http.(*Server).Serve in goroutine 921 /opt/hostedtoolcache/go/1.26.5/x64/src/net/http/server.go:3464 +0x485