Skip to content

SDK regeneration - #821

Closed
fern-api[bot] wants to merge 2 commits into
mainfrom
fern-bot/2026-10-20_21-30-05_841
Closed

fern-api[bot] wants to merge 2 commits into
mainfrom
fern-bot/2026-10-20_21-30-05_841

Conversation

@fern-api

@fern-api fern-api Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Automated SDK generation by Fern


✅ Customizations automatically preserved, but 4 files need your attention.

Action required: 4 files with unresolved customization conflicts

The new generation changed code you previously customized. Non-conflicting customizations have been applied automatically. The following files need manual resolution:

File Your customization Why it conflicted
pyproject.toml fix(utils): embed(texts=[]) crashes with IndexError on empty input (#778) The new generation changed the same lines you edited
src/cohere/core/client_wrapper.py fix(utils): embed(texts=[]) crashes with IndexError on empty input (#778) The new generation changed the same lines you edited
pyproject.toml Omit Authorization header when api_key is empty (#795) The new generation changed the same lines you edited
src/cohere/core/client_wrapper.py Omit Authorization header when api_key is empty (#795) The new generation changed the same lines you edited

How to resolve

  1. Check out this branch:
    git fetch origin && git checkout -b fern-bot/2026-10-20_21-30-05_841 origin/fern-bot/2026-10-20_21-30-05_841
    Or if you don't have the repo cloned:
    git clone https://github.com/cohere-ai/cohere-python.git && cd cohere-python && git checkout -b fern-bot/2026-10-20_21-30-05_841 origin/fern-bot/2026-10-20_21-30-05_841
  2. Run: fern replay resolve
  3. Open the conflicting files in your editor — you'll see standard merge conflict markers
  4. Resolve using your editor's merge tools (VS Code, IntelliJ, etc.)
  5. Run: fern replay resolve again to finalize
  6. Push your changes

Your resolved customizations will be remembered on future SDK generations.
If you merge this PR without resolving, your unresolved customizations will conflict again on the next generation.


Note

Medium Risk
Changes default HTTP retry behavior for protocol errors and auth header assembly; unresolved customization conflicts in client_wrapper/pyproject may drop prior fixes if merged without fern replay resolve.

Overview
Regenerates the Python SDK to 7.3.0 (Fern generator 5.39.3) with API and transport updates from the latest OpenAPI definition.

Rerank v2 gains optional context compression via relevant_spans (RerankRelevantSpans with mode, threshold, max_spans). Results can include relevant_spans on each V2RerankResponseResultsItem (RerankRelevantSpanResponse). Docs and examples move toward rerank-v5.0-pro and embed-v5.0-fast; embed output_dimension text now points to product docs instead of a fixed enum.

HTTP layer: request headers are merged with case-insensitive overrides (_merge_headers). RemoteProtocolError is no longer retried by default; opt in with request_options["retry_remote_protocol_errors"]. get_headers(include_token=...) lets async clients skip sync Authorization when async_token supplies it later.

Client init resolves token from CO_API_KEY inside __init__ (default None in the signature). Union deserialization keeps the raw payload when no discriminated variant matches. Packaging adds PEP 621 license / license-files in pyproject.toml.

The PR description flags unresolved Fern replay conflicts in pyproject.toml and client_wrapper.py (prior customizations around empty embed input and omitting Authorization when the API key is empty)—those need manual merge before merge.

Reviewed by Cursor Bugbot for commit 02e602f. Bugbot is set up for automated code reviews on this repo. Configure here.

fern-api Bot added 2 commits October 20, 2026 21:30
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-python-sdk: 5.39.3
Patches with unresolved conflicts (3):
  - patch-c81e8a75: fix(utils): embed(texts=[]) crashes with IndexError on empty input (#778)
  - patch-41f344bd: feat(client): forward max_retries through Client/ClientV2 constructors (#779)
  - patch-bc495daa: Omit Authorization header when api_key is empty (#795)
    Run `fern-replay resolve` to apply these customizations.

@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 using default effort 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.

Reviewed by Cursor Bugbot for commit 02e602f. Configure here.

headers["X-Client-Name"] = self._client_name
headers["Authorization"] = f"Bearer {self._get_token()}"
if include_token:
headers["Authorization"] = f"Bearer {self._get_token()}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Async client header construction crashes

High Severity

get_headers now takes include_token, and async_get_headers always passes it. The existing omit_authorization_header_when_api_key_is_empty patch still replaces get_headers with a one-argument wrapper, so every AsyncClient request raises TypeError when building headers.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 02e602f. Configure here.

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