🌿 Fern Regeneration -- March 26, 2026 - #150
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| internal "github.com/cohere-ai/cohere-go/v2/internal" | ||
| ) | ||
|
|
||
| var ErrorCodes internal.ErrorCodes = internal.ErrorCodes{} |
There was a problem hiding this comment.
Audio endpoint uses empty ErrorCodes, losing typed errors
Medium Severity
audio.ErrorCodes is initialized as an empty internal.ErrorCodes{} map, while all other sub-clients (batches, connectors, models, etc.) reference the root package's ErrorCodes which maps HTTP status codes (400, 401, 403, 404, 429, 500, etc.) to typed error constructors. The audio transcriptions raw_client.go passes audio.ErrorCodes to internal.NewErrorDecoder, so API error responses from the audio endpoint will never be decoded into typed errors like *BadRequestError or *TooManyRequestsError — only generic *core.APIError is returned. Users performing errors.As checks against typed errors will silently fail to match for audio endpoints.


This PR regenerates code to match the latest API Definition.
Note
Medium Risk
Adds a new
Audiosurface to the top-level client with multipart file upload logic, which could affect request construction and error handling despite being additive. Regeneration also bumps SDK/user-agent versions, which may impact downstream clients that assert on headers or version strings.Overview
Adds a new
client.Audio.Transcriptions.CreateAPI for audio file transcription, including generated request/response types (TranscriptionsCreateRequest,AudioTranscriptionsCreateResponse) and a multipart-upload raw client targetingPOST /v2/audio/transcriptions, plus accompanying wire and serialization tests.Bumps the generated SDK version from
v2.17.0tov2.19.0(metadata +X-Fern-SDK-Version/User-Agentheaders) and updatesreference.mdto document the new Audio Transcriptions endpoint.Written by Cursor Bugbot for commit a47961a. This will update automatically on new commits. Configure here.