Skip to content

fix(integration): add pre-request delay to Z.ai tests to avoid rate limiting#27

Merged
erikhoward merged 1 commit intomainfrom
fix/zai-rate-limiting
Mar 15, 2026
Merged

fix(integration): add pre-request delay to Z.ai tests to avoid rate limiting#27
erikhoward merged 1 commit intomainfrom
fix/zai-rate-limiting

Conversation

@erikhoward
Copy link
Member

Summary

  • Added 2-second pre-request delay to Z.ai integration tests after acquiring the mutex
  • Z.ai API has a concurrency limit of 3; the previous post-request-only delay was insufficient
  • All 9 Z.ai integration tests now pass consistently

Test plan

  • Ran go test -tags=integration -run "TestZai" ./tests/integration/... - all tests pass
  • Verified no rate limiting errors (status 429) occur

🤖 Generated with Claude Code

…imiting

Z.ai API has a concurrency limit of 3. The previous implementation only
had a post-request delay which was insufficient when tests completed
quickly. Added a 2-second pre-request delay after acquiring the mutex
to ensure consistent spacing between all API calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@erikhoward erikhoward merged commit 7405a91 into main Mar 15, 2026
6 checks passed
@erikhoward erikhoward deleted the fix/zai-rate-limiting branch March 15, 2026 03:16
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