feat(claude-executor): add ZSTD decoding support for Claude executor responses

- Integrated ZSTD decompression via `github.com/klauspost/compress` for responses with "zstd" content-encoding.
- Added helper `hasZSTDEcoding` to detect ZSTD-encoded responses.
- Updated response handling logic to initialize and use a ZSTD decoder when necessary.

refactor(api-handlers): split streaming and non-streaming response handling

- Introduced `handleNonStreamingResponse` for processing non-streaming requests in `ClaudeCodeAPIHandler`.
- Improved code clarity by separating streaming and non-streaming logic.

fix(service): remove redundant token refresh interval assignment logic in `cliproxy` service.
This commit is contained in:
Luis Pater
2025-09-23 12:44:44 +08:00
parent 45d382f344
commit 11b0efc38f
5 changed files with 62 additions and 8 deletions

View File

@@ -322,9 +322,6 @@ func (s *Service) Run(ctx context.Context) error {
// Prefer core auth manager auto refresh if available.
if s.coreManager != nil {
interval := 15 * time.Minute
if sec := s.cfg.GeminiWeb.TokenRefreshSeconds; sec > 0 {
interval = time.Duration(sec) * time.Second
}
s.coreManager.StartAutoRefresh(context.Background(), interval)
log.Infof("core auth auto-refresh started (interval=%s)", interval)
}