Skip to content

NVIDIA NIM token request should use an explicit timeout #6515

@luochen211

Description

@luochen211

Describe the bug

The NVIDIA NIM token controller posts to NVIDIA's token service without an explicit timeout:

// packages/server/src/controllers/nvidia-nim/index.ts
const response = await axios.post('https://nts.ngc.nvidia.com/v1/token', data, { headers })

If nts.ngc.nvidia.com is slow or unreachable, the API route can wait on the outbound Axios call without a bounded timeout.

To Reproduce

  1. Run Flowise with the NVIDIA NIM routes enabled.
  2. Trigger the token endpoint while network access to https://nts.ngc.nvidia.com/v1/token is slow or blocked.
  3. The request can remain pending longer than expected because no explicit timeout is set.

Expected behavior

The NIM token endpoint should fail within a bounded timeout and pass a clear timeout error to the Express error handler.

Flow

Not applicable; this is a server-side NVIDIA NIM integration endpoint.

Use Method

Docker / npx flowise start / pnpm start

Flowise Version

Current main branch by code inspection.

Operating System

Linux / macOS / Windows

Browser

Not browser-specific.

Additional context

A possible fix is to use axios.post(..., { headers, timeout: ... }), ideally sharing the timeout value with other external service integrations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions