Skip to content

🌿 Fern Regeneration -- November 26, 2025#65

Merged
jackfischer merged 1 commit into
mainfrom
fern-bot/2025-11-26T19-29Z
Nov 26, 2025
Merged

🌿 Fern Regeneration -- November 26, 2025#65
jackfischer merged 1 commit into
mainfrom
fern-bot/2025-11-26T19-29Z

Conversation

@fern-api

@fern-api fern-api Bot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

This PR regenerates code to match the latest API Definition.

@jackfischer jackfischer merged commit 2af946e into main Nov 26, 2025
3 checks passed
@greptile-apps

greptile-apps Bot commented Nov 26, 2025

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Fern SDK regeneration updating generator from 4.37.0 to 4.41.1, which introduces enhanced retry logic with X-RateLimit-Reset header support and improved jitter mechanisms.

  • Updated SDK version to 0.1.13
  • Python version requirement bumped from 3.8 to 3.9 in CI
  • Added parallel test execution using pytest-xdist
  • Enhanced retry logic with:
    • Support for X-RateLimit-Reset header parsing
    • Separate jitter strategies (positive for rate limits, symmetric for backoff)
    • Increased max retry delay from 10s to 60s
    • Increased initial retry delay from 0.5s to 1.0s
  • Critical issue: Type error in _parse_retry_after on line 35 - comparing string with integer

Confidence Score: 1/5

  • This PR contains a critical type error that will cause runtime failures
  • The type error on line 35 of http_client.py will cause the code to fail when the retry-after-ms header is present, as it attempts to compare a string directly with an integer without converting it first
  • Critical attention required for src/credal/core/http_client.py - must fix type error on line 35 before merging

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/ci.yml 5/5 Python version bumped to 3.9, added parallel test execution with -n auto
pyproject.toml 5/5 Version bumped to 0.1.13, added pytest-xdist for parallel testing
src/credal/core/http_client.py 1/5 Enhanced retry logic with X-RateLimit-Reset support and improved jitter; contains type error on line 35

Sequence Diagram

sequenceDiagram
    participant Client
    participant HttpClient
    participant API Server
    
    Client->>HttpClient: Make HTTP Request
    HttpClient->>API Server: Send Request
    
    alt Success Response
        API Server-->>HttpClient: 200 OK
        HttpClient-->>Client: Return Response
    else Rate Limited (429)
        API Server-->>HttpClient: 429 + Headers
        Note over HttpClient: Check Retry-After header
        alt Retry-After present
            HttpClient->>HttpClient: Wait min(retry_after, 60s)
        else X-RateLimit-Reset present
            HttpClient->>HttpClient: Calculate delay from reset time
            HttpClient->>HttpClient: Add positive jitter (0-20%)
        else Exponential Backoff
            HttpClient->>HttpClient: Calculate 1.0 * 2^retries (max 60s)
            HttpClient->>HttpClient: Add symmetric jitter (±10%)
        end
        HttpClient->>API Server: Retry Request
        API Server-->>HttpClient: Response
        HttpClient-->>Client: Return Response
    else Server Error (5xx)
        API Server-->>HttpClient: 5xx Error
        Note over HttpClient: Apply same retry logic
        HttpClient->>HttpClient: Calculate delay with jitter
        HttpClient->>API Server: Retry Request
        API Server-->>HttpClient: Response
        HttpClient-->>Client: Return Response
    end
Loading

@greptile-apps greptile-apps 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.

Additional Comments (1)

  1. src/credal/core/http_client.py, line 35 (link)

    syntax: retry_after_ms is a string, cannot be compared with > 0

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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