Skip to content

fix(evaluator): simplify provider concurrency handling - #27

Merged
laceyp99 merged 4 commits into
mainfrom
t3code/review-provider-rate-limits
Aug 14, 2026
Merged

laceyp99 merged 4 commits into
mainfrom
t3code/review-provider-rate-limits

Conversation

@laceyp99

@laceyp99 laceyp99 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the RPM-derived semaphore calculation with a configurable per-provider cloud concurrency cap that defaults to four
  • preserve typed provider throttling as a distinct rate_limited evaluation outcome in persisted results, summaries, and analysis views
  • centralize legacy outcome fallback logic in a shared compatibility helper
  • document the limits of concurrency control and the operational guidance for lower provider quotas

Decision and reasoning

The previous implementation described its semaphore as RPM-based rate limiting, but a semaphore only bounds simultaneous requests; it cannot enforce requests per minute.

#26 explored a comprehensive Eval-owned scheduler with per-model RPM pacing, separate model and global concurrency caps, a provider-dispatch acknowledgement boundary, typed throttling behavior, and durable task manifests and transition journals. That work demonstrated a viable direction, but it also introduced a large scheduling and recovery subsystem into Eval. We closed that PR as an implementation alternative because its complexity is disproportionate to the current personal-evaluator use case, not because strict quota handling is no longer valuable.

This PR takes the smaller, explicit step: Eval owns provider-scoped concurrency and makes persistent throttling observable. It does not present that control as complete rate limiting.

Current behavior

  • Cloud evaluations allow at most four concurrent requests to each provider by default.
  • Callers can override the cap with max_cloud_concurrency.
  • The cap does not guarantee compliance with provider RPM, TPM, or RPD quotas.
  • Provider SDK retry behavior varies and is not guaranteed by Eval.
  • Persistent typed provider throttling is saved as rate_limited and remains distinct in summaries and analysis views. The overview card names a single exception type, aggregates mixed run exceptions, and reports N/A when no pass-rate-eligible results exist.
  • Callers using lower account limits or expensive workloads should reduce concurrency or split work into smaller evaluations.

Future rate-limiting work

We are still considering the correct long-term design for rate limiting. A robust solution needs to account for RPM and TPM together rather than pacing only request starts, and may also need to consider RPD, account-tier overrides, token estimation and reconciliation, Retry-After behavior, SDK retry ownership, and coordination across concurrent runs.

That likely requires coordinated work in both conductor-core and conductor-eval, with quota ownership placed near Core's provider dispatch boundary while Eval remains a consumer of the public engine. Issue #10 therefore remains open as an enhancement while that design is worked through.

Validation

  • uv sync --locked --all-extras
  • uv run --locked --all-extras ruff format --check .
  • uv run --locked --all-extras ruff check .
  • uv run --locked --all-extras pytest -q — 129 passed
  • uv build

@laceyp99
laceyp99 marked this pull request as ready for review August 13, 2026 05:28

@laceyp99 laceyp99 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed! Everything looks good after the commit I made, as it cleaned up the visual display of the generation failures on the dashboard.

@laceyp99
laceyp99 merged commit 28e3632 into main Aug 14, 2026
2 checks passed
@laceyp99
laceyp99 deleted the t3code/review-provider-rate-limits branch August 14, 2026 03:41
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