Skip to content

Conversation

@uipreliga
Copy link
Collaborator

@uipreliga uipreliga commented Jan 6, 2026

This pull request introduces configurable concurrency control for LLM (Large Language Model) API requests, allowing users to limit the number of simultaneous LLM requests to prevent system overload. The main change is the addition of a throttling mechanism using an asyncio semaphore, which can be configured via a new CLI option. This improves robustness and flexibility for users running evaluations and interacting with LLM services.

LLM Throttling and Concurrency Control:

  • Added a new module llm_throttle.py that provides get_llm_semaphore and set_llm_concurrency functions to manage and configure the concurrency limit for LLM API requests using an asyncio semaphore. The default limit is 20 concurrent requests, and the semaphore is managed per event loop to avoid cross-loop issues.
  • Updated the UiPathLlmChatService and related LLM gateway service methods to use the semaphore, ensuring all LLM API calls are throttled according to the configured concurrency limit. [1] [2] [3] [4]
  • Exposed get_llm_semaphore and set_llm_concurrency in the platform.chat package’s public API for external configurability. [1] [2]

CLI Improvements:

  • Added a new CLI option --max-llm-concurrency (default: 20) to the eval command, allowing users to set the maximum number of concurrent LLM requests when running evaluations. The value is passed to set_llm_concurrency before any LLM calls are made. [1] [2] [3]

Versioning:

  • Bumped the package version from 2.4.3 to 2.4.4 to reflect the new functionality.

@uipreliga uipreliga requested a review from akshaylive January 6, 2026 19:35
@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 6, 2026
@uipreliga uipreliga force-pushed the feat/llm-throttling branch 2 times, most recently from 5526e16 to 56fc2be Compare January 6, 2026 21:11
@akshaylive akshaylive requested a review from cristipufu January 6, 2026 21:26
@uipreliga uipreliga requested a review from andrei-rusu January 7, 2026 16:02
@akshaylive akshaylive removed the request for review from cristipufu January 7, 2026 16:25
@uipreliga uipreliga force-pushed the feat/llm-throttling branch from 56fc2be to 74ad885 Compare January 7, 2026 18:25
@uipreliga uipreliga requested a review from akshaylive January 7, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants