From 678dbb58ef8eaa57b001d3ba4ab1c191e0b5a202 Mon Sep 17 00:00:00 2001 From: Andre Nogueira Date: Tue, 26 May 2026 10:10:45 +0100 Subject: [PATCH 1/2] fix(provider): silence tagliatelle for max_tokens The Anthropic API and other upstream providers require snake_case field names. Restore the json:"max_tokens" tags and add per-line //nolint:tagliatelle directives so the camelCase rule doesn't push us back into a broken rename. Signed-off-by: Andre Nogueira --- internal/provider/anthropic.go | 2 +- internal/provider/provider.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/provider/anthropic.go b/internal/provider/anthropic.go index 514b746..fd89d33 100644 --- a/internal/provider/anthropic.go +++ b/internal/provider/anthropic.go @@ -14,7 +14,7 @@ import ( // AnthropicRequest represents an Anthropic API request. type AnthropicRequest struct { Model string `json:"model"` - MaxTokens int `json:"max_tokens"` + MaxTokens int `json:"max_tokens"` //nolint:tagliatelle // Anthropic API requires snake_case Messages []AnthropicMessage `json:"messages"` } diff --git a/internal/provider/provider.go b/internal/provider/provider.go index fa32459..6720ed3 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -70,7 +70,7 @@ type ProviderInfo struct { type ChatRequest struct { Model string `json:"model"` Messages []Message `json:"messages"` - MaxTokens int `json:"max_tokens"` + MaxTokens int `json:"max_tokens"` //nolint:tagliatelle // upstream APIs require snake_case } // Message represents a chat message. From 1ad477cffc84a4aa4d13ddfa293a0682eefd0323 Mon Sep 17 00:00:00 2001 From: Andre Nogueira Date: Tue, 26 May 2026 10:15:20 +0100 Subject: [PATCH 2/2] ci: drop redundant actions/cache@v5 step actions/setup-go@v6 already caches ~/.cache/go-build and ~/go/pkg/mod keyed on go.sum. The extra actions/cache step raced with setup-go's own save (visible as 'Unable to reserve cache with key ... another job may be creating this cache.' in the Lint job) and blew up the Windows Test job in 0s, which then cancelled the rest of the matrix. Signed-off-by: Andre Nogueira --- .github/workflows/ci.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9bdedc..cbc3e2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,6 @@ jobs: with: go-version: ${{ matrix.go }} - - name: Cache Go modules - uses: actions/cache@v5 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum', '**/go.mod') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Download dependencies run: go mod download