Skip to content

feat: add configurable max_retries to Junction and AsyncJunction clients#6

Merged
ItachiEU merged 1 commit into
mainfrom
fern-bot/2026-05-07T14-40-08Z
May 7, 2026
Merged

feat: add configurable max_retries to Junction and AsyncJunction clients#6
ItachiEU merged 1 commit into
mainfrom
fern-bot/2026-05-07T14-40-08Z

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented May 7, 2026

1.0.0 → 1.1.0

Added

  • max_retries — new optional constructor parameter on Junction and AsyncJunction that sets the client-level default retry count (defaults to 2); per-request max_retries in request_options still takes precedence.

Changed

  • pydantic-core dependency upper bound widened from <2.44.0 to <3.0.0, allowing compatibility with newer pydantic-core releases.
  • SSE streaming (iter_sse / aiter_sse) now uses incremental codec decoding and normalizes \r\n and bare \r line endings per the SSE specification, improving reliability with chunked streams.

See full changelog

Expose a new optional `max_retries` parameter on both the sync `Junction`
and async `AsyncJunction` client constructors, allowing callers to control
the default number of HTTP retries at the client level. The default value
is 2. Per-request `max_retries` in `request_options` continues to take
precedence over this client-level default.

Also includes internal improvements to SSE stream handling (proper
incremental decoding and `\r\n`/`\r` line-ending normalization) and
widens the `pydantic-core` version constraint from `<2.44.0` to `<3.0.0`.

Key changes:
- Add optional `max_retries` parameter to `Junction.__init__` and `AsyncJunction.__init__` (defaults to 2)
- Add `get_max_retries()` method to `BaseClientWrapper` and thread `max_retries` through `SyncClientWrapper` and `AsyncClientWrapper`
- Refactor SSE `iter_sse` / `aiter_sse` to use incremental codec decoding and normalize `\r\n`/`\r` line endings per the SSE spec
- Widen `pydantic-core` dependency upper bound to `<3.0.0`

🌿 Generated with Fern
@ItachiEU ItachiEU merged commit 7c73529 into main May 7, 2026
3 checks passed
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.

1 participant