1.47.2

(fix): Normalize the architecture label in the structured User-Agent (emitted when includePlatformHeaders is enabled) so the 64-bit x86 aliases (x64, amd64, x86_64) all report as the canonical x86_64, keeping the value consistent across generators.

1.47.1

(fix): Decompress gzip-encoded response bodies when the Accept-Encoding header is set explicitly on the request. Go’s net/http only performs transparent gzip decompression when it adds the Accept-Encoding header itself, so responses to requests with a spec-defined Accept-Encoding: gzip header were previously returned as raw gzip bytes.

1.47.0

(feat): Add opt-in support for a structured User-Agent header on generated SDK clients for better runtime/platform observability. When enabled, the header takes the form {sdkName}/{sdkVersion} ({os}; {arch}) Go/{version}, where the operating system (runtime.GOOS), architecture (runtime.GOARCH), and Go runtime version (runtime.Version()) are all resolved at runtime; unknown components are omitted rather than reported as empty. This behavior is gated behind a new includePlatformHeaders config option and is disabled by default, so existing generated output is unchanged. When enabled it is still subject to omitFernHeaders and is omitted when that is set.

1.46.5

(fix): Honor the OAuth client-credentials token endpoint’s declared request content-type instead of unconditionally forcing application/x-www-form-urlencoded. Token endpoints that consume application/json now send Content-Type: application/json, while form-urlencoded remains the default when the spec does not declare a content-type (per RFC 6749 §4.4.2). Previously a JSON token endpoint received an HTTP 415 that surfaced as a generic 401.

1.46.4

(fix): Align SSE stream auto-reconnection with the reference TypeScript implementation: (1) Do not reconnect when no stream terminator is configured (prevents reconnect storms on clean EOF). (2) Apply a default 1 s minimum backoff between reconnects when the server sends no retry: directive. (3) Only commit Last-Event-ID on dispatched events (blank-line boundary), not on parsed-but-undispatched ids from incomplete events dropped mid-stream — fixes silent event loss on reconnect. (4) Reset the consecutive-reconnect-attempt counter on progress (each yielded event). (5) Gracefully handle failed/nil-body reconnect responses by consuming an attempt and retrying instead of surfacing the error immediately. (6) Do not reconnect when no event ID has been dispatched — reconnecting with an empty Last-Event-ID would replay the entire stream (duplicate events). (7) Guard against nil *http.Response from reconnectFn to prevent nil-pointer panics. (8) Close response body when reconnectFn returns both a response and an error.

1.46.3

(fix): Generated raw_client.go now sets ResponseIsOptional: true in CallParams for endpoints whose success response body is optional — e.g. an operation that returns both a body-bearing 2xx and a 204 No Content. Previously the field was never emitted, so a real 204 (empty body) hit io.EOF in the caller and surfaced as an error instead of a successful, nil-bodied response.

1.46.2

(fix): Fix double-pointer types for nullable $ref alias fields in v2 GoTypeMapper and DynamicTypeMapper, consistent with the v1 fix in model.go.

1.46.1

(fix): Fix double-pointer types generated for nullable date fields that reference shared component schemas via $ref. When a nullable type alias (e.g. type Iso8601DateNullable = *time.Time) was used as a field type, the generator incorrectly produced *Iso8601DateNullable (effectively **time.Time), causing Go compilation errors. The generator now detects aliases that already resolve to pointer types and avoids wrapping them in an additional pointer.

1.46.0

(feat): Add a dedupeUnionBaseProperties config option (default false). When enabled, a discriminated union no longer emits a duplicate top-level field for base properties that every variant already carries (e.g. properties lifted from a shared parent by infer-discriminated-union-base-properties). Without it, such a property appears both on the union and inside each variant struct, and the top-level copy is silently dropped when marshaling samePropertiesAsObject variants. With the flag on, the shared property is exposed through a getter that switches on the discriminant and reads from the active variant — a single source of truth that still allows top-level access without a type switch. The flag is opt-in to preserve the existing generated surface; the default will flip in a future major version with a migration.

1.45.5

(fix): Fix compile errors in generated Go SDKs where the v2/ TypeScript client, its generated tests, and the generated dynamic snippet tests referenced types in their original package after the v1 generator had relocated those leaf types into the shared common package to break an import cycle. The v1 generator now records the relocations in a sidecar that the v2 generator reads, and also writes them to a host-readable file (when the Fern CLI asks for it) so the CLI’s dynamic snippet test generator references the relocated types from the same package too.

1.45.4

(fix): Fix generated Go failing to compile when an undiscriminated union is sent as a request header. Such unions now generate a String() method (fmt.Stringer) and the client serializes the header via that method, instead of passing the union struct where a string is expected.

1.45.3

(fix): Fixed pagination for endpoints whose results property is a named alias to a list or set (e.g. results: $response.data where data is a UserList alias). Previously v1 generation aborted with “unsupported pagination results type”, and once that was resolved the generated pager used the alias itself as the page element type, producing code that did not compile. The results element type is now resolved through alias indirection (and optional/nullable wrappers) in both generators, so the pager’s element type matches the endpoint’s returned page type.

1.45.2

(fix): Skip generating wire test files when all endpoints in a service are skipped (e.g., file download or bytes request body endpoints). Previously this produced a test file with a missing require import.

1.45.1

(fix): Skip file download response endpoints from wire test generation. Autogenerated examples for these endpoints produce error responses rather than binary content, causing wire tests to always fail.

1.45.0

(feat): The Go SDK now accepts space-separated datetime strings (e.g. “2025-02-15 10:30:00+00:00”) in addition to standard RFC3339 format during deserialization. This matches the leniency of the Python and TypeScript SDKs.

1.44.9

(fix): Fixed a compilation error when a discriminated union’s discriminant property name collides with one of its member discriminant values (e.g. a discriminant “event” with a union member also keyed “event”). The discriminant struct field is now disambiguated to keep the generated Go code valid and compilable.

1.44.8

(fix): Fixed a nil-pointer panic when an object or inlined request body extends an alias. The generator now resolves the extended type through alias indirection to its underlying object, so its properties are inherited correctly instead of crashing generation.

1.44.7

(fix): Fix duplicate struct fields and getters generated for a discriminated union when a base property shares a name with a property inherited via extends. The base property is now skipped in favor of the extended property, so the generated Go compiles.

1.44.6

(fix): Fix generated Go failing to compile for APIs that use literals. Undiscriminated union members whose literal value is not a valid Go identifier (e.g. starting with a digit) now produce a valid exported field name, literal query parameters are no longer double-quoted, and literal path parameters are now passed as their concrete value in dynamic snippets instead of nil.

1.44.5

(fix): Support endpoints that use URI- or path-based pagination (next_uri / next_path). The v1 generator no longer aborts with “uri pagination is not supported yet”; these endpoints are generated as regular methods that return the full response.