Skip to content

fix(backend): apply idempotencyWindowMs setting to idempotency layer (#15124) - #15196

Closed
alltomatos wants to merge 2 commits into
cheaper-inference:release/v3.8.52from
alltomatos:fix/15124-idempotency-window-ms
Closed

alltomatos wants to merge 2 commits into
cheaper-inference:release/v3.8.52from
alltomatos:fix/15124-idempotency-window-ms

Conversation

@alltomatos

Copy link
Copy Markdown
Contributor

Closes #15124

Summary

  • Reads \idempotencyWindowMs\ from cached settings in \chatCore.ts\ and forwards it to \saveIdempotency.
  • Adds helper
    esolveIdempotencyWindowMs\ and \saveIdempotencyWithSettings\ to \idempotencyLayer.ts.
  • Adds unit test coverage for resolving custom idempotency windows and timing out accordingly.

chatCore only had cachedSettings on the combo path, so single-model requests
fell back to the 5000ms default. Save through saveIdempotencyWithSettings,
which falls back to getCachedSettings(), and cover the wiring with a
handleChatCore test.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closing in favor of #15127, which now honors idempotencyWindowMs on release/v3.8.52 (0d5e2500). The save site passes saveIdempotencyWithConfiguredWindow and awaits it. This branch stays. Thanks @alltomatos for reporting the same gap in #15124.

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.

fix(backend): idempotencyWindowMs setting is saved but never applied

2 participants