Skip to content

fix(chat): honor concurrency.maxConcurrent in the concurrent strategy#419

Merged
dancer merged 1 commit into
mainfrom
fix-max-concurrent-417
Apr 24, 2026
Merged

fix(chat): honor concurrency.maxConcurrent in the concurrent strategy#419
dancer merged 1 commit into
mainfrom
fix-max-concurrent-417

Conversation

@bensabic
Copy link
Copy Markdown
Contributor

Closes #417.

  • handleConcurrent now acquires a per-thread semaphore slot when maxConcurrent is finite; fast path preserved for the default Infinity.
  • Constructor throws on maxConcurrent < 1 (would deadlock) and warns when maxConcurrent is paired with a non-concurrent strategy (was previously ignored silently).

Closes #417.

- handleConcurrent now acquires a per-thread semaphore slot when
  maxConcurrent is finite; fast path preserved for the default Infinity.
- Constructor throws on maxConcurrent < 1 (would deadlock) and warns
  when maxConcurrent is paired with a non-concurrent strategy (was
  previously ignored silently).
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 24, 2026 8:51am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 24, 2026 8:51am

@dancer dancer merged commit d630e6c into main Apr 24, 2026
12 checks passed
@dancer dancer deleted the fix-max-concurrent-417 branch April 24, 2026 18:59
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.

ConcurrencyConfig.maxConcurrent has no effect

2 participants