Skip to content

🌿 Fern Regeneration -- March 26, 2026 - #150

Open
fern-api[bot] wants to merge 1 commit into
mainfrom
fern-bot/2026-03-26T14-22Z
Open

🌿 Fern Regeneration -- March 26, 2026#150
fern-api[bot] wants to merge 1 commit into
mainfrom
fern-bot/2026-03-26T14-22Z

Conversation

@fern-api

@fern-api fern-api Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

This PR regenerates code to match the latest API Definition.


Note

Medium Risk
Adds a new Audio surface 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.Create API for audio file transcription, including generated request/response types (TranscriptionsCreateRequest, AudioTranscriptionsCreateResponse) and a multipart-upload raw client targeting POST /v2/audio/transcriptions, plus accompanying wire and serialization tests.

Bumps the generated SDK version from v2.17.0 to v2.19.0 (metadata + X-Fern-SDK-Version/User-Agent headers) and updates reference.md to document the new Audio Transcriptions endpoint.

Written by Cursor Bugbot for commit a47961a. This will update automatically on new commits. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread audio/error_codes.go
internal "github.com/cohere-ai/cohere-go/v2/internal"
)

var ErrorCodes internal.ErrorCodes = internal.ErrorCodes{}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants