---
changelog:
  category: Release
  version: 1.13.0
date: '2025-12-18T08:31:49Z'
seo:
  description: >-
    Automatically converts input values to match schema types without manually
    defining coercion logic. The RethrowHandlerPlugin allows you to catch and
    rethrow…
title: v1.13.0
type: changelog
---
### Smart Coercion now stable [docs](https://orpc.dev/docs/openapi/plugins/smart-coercion)

Automatically converts input values to match schema types without manually defining coercion logic.

```ts
import { OpenAPIHandler } from '@orpc/openapi/fetch'
import { SmartCoercionPlugin } from '@orpc/json-schema'

const handler = new OpenAPIHandler(router, {
  plugins: [
    new SmartCoercionPlugin({
      schemaConverters: [
        new ZodToJsonSchemaConverter(),
        // Add other schema converters as needed
      ],
    })
  ]
})
```

### Rethrow handler plugin [docs](https://orpc.dev/docs/plugins/rethrow-handler)

The `RethrowHandlerPlugin` allows you to catch and rethrow specific errors that occur during request handling. This is particularly useful when your framework has its own error handling mechanism (e.g., global exception filters in NestJS, error middleware in Express) and you want certain errors to be processed by that mechanism instead of being handled by the oRPC error handling flow.

```ts
import {
  experimental_RethrowHandlerPlugin as RethrowHandlerPlugin,
} from '@orpc/server/plugins'

const handler = new RPCHandler(router, {
  plugins: [
    new RethrowHandlerPlugin({
      // Decide which errors should be rethrown.
      filter: (error) => {
        // Example: Rethrow all non-ORPCError errors
        // This allows unhandled exceptions to bubble up to your framework
        return !(error instanceof ORPCError)
      },
    }),
  ],
})
```

### `.$input` now available in contract builder [docs](https://orpc.dev/docs/procedure#initial-configuration)

Unlike `.input`, the `.$input` method lets you redefine the input schema after its initial configuration. This is useful when you need to enforce a void input when no `.input` is specified.

```ts
const base = os.$input(z.void())
const base = os.$input<Schema<void, unknown>>()
```

### &nbsp;&nbsp;&nbsp;🚀 Features

- **json-schema**: Stable SmartCoercionPlugin &nbsp;-&nbsp; by @dinwwwh in https://github.com/middleapi/orpc/issues/1285 [<samp>(f01f7)</samp>](https://github.com/middleapi/orpc/commit/f01f7b13)
- **server**: Rethrow handler plugin &nbsp;-&nbsp; by @dinwwwh in https://github.com/middleapi/orpc/issues/1286 [<samp>(b2d00)</samp>](https://github.com/middleapi/orpc/commit/b2d00a32)

### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes

- **contract**: Missing `.$input` builder method &nbsp;-&nbsp; by @dinwwwh in https://github.com/middleapi/orpc/issues/1304 [<samp>(b81d4)</samp>](https://github.com/middleapi/orpc/commit/b81d47f8)

##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https://github.com/middleapi/orpc/compare/v1.12.3...v1.13.0)
