Skip to content

Change default overage policy from REJECT to ALLOW_IF_AVAILABLE#28

Merged
amavashev merged 1 commit intomainfrom
claude/review-protocol-updates-TBGQh
Mar 24, 2026
Merged

Change default overage policy from REJECT to ALLOW_IF_AVAILABLE#28
amavashev merged 1 commit intomainfrom
claude/review-protocol-updates-TBGQh

Conversation

@amavashev
Copy link
Contributor

Summary

Updates the default overage policy for budget reservations from "REJECT" to "ALLOW_IF_AVAILABLE" across the codebase.

Key Changes

  • README.md: Updated documentation to reflect "ALLOW_IF_AVAILABLE" as the new default overage policy, reordering the policy options list
  • src/lifecycle.ts: Changed the default fallback value in buildReservationBody() from "REJECT" to "ALLOW_IF_AVAILABLE"
  • src/streaming.ts: Updated the default parameter value in reserveForStream() function signature
  • tests/lifecycle.test.ts: Updated test assertion to expect the new default policy value

Implementation Details

This change makes the SDK more permissive by default, allowing reservations to proceed when budget is available rather than rejecting them. Users can still explicitly set overagePolicy: "REJECT" if they prefer the stricter behavior. The change is applied consistently across all entry points (lifecycle and streaming APIs) and their corresponding tests.

https://claude.ai/code/session_01Vzg6nWZUwXaLWEHd2i59mT

@amavashev amavashev merged commit bcc5ded into main Mar 24, 2026
4 checks passed
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.

2 participants