Skip to content

Add --timeout flag to configure API request timeout #4

@fuleinist

Description

@fuleinist

Problem

The CLI uses a hardcoded 30-second timeout for all API requests (defined in api.py as DEFAULT_TIMEOUT = 30.0). Users on slow connections or processing large documents may need more time.

Solution

Add a global --timeout flag to override the default timeout:

jina read https://large-pdf-url.com --timeout 60
jina search "complex query" --timeout 45

Use Case

Users with slow network connections or when fetching large documents (PDFs, long web pages) that take longer than 30 seconds to process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions