(scenario: MockScenario)
| 757 | } |
| 758 | |
| 759 | export function getScenarioDescription(scenario: MockScenario): string { |
| 760 | switch (scenario) { |
| 761 | case 'normal': |
| 762 | return 'Normal usage, no limits' |
| 763 | case 'session-limit-reached': |
| 764 | return 'Session rate limit exceeded' |
| 765 | case 'approaching-weekly-limit': |
| 766 | return 'Approaching weekly aggregate limit' |
| 767 | case 'weekly-limit-reached': |
| 768 | return 'Weekly aggregate limit exceeded' |
| 769 | case 'overage-active': |
| 770 | return 'Using extra usage (overage active)' |
| 771 | case 'overage-warning': |
| 772 | return 'Approaching extra usage limit' |
| 773 | case 'overage-exhausted': |
| 774 | return 'Both subscription and extra usage limits exhausted' |
| 775 | case 'out-of-credits': |
| 776 | return 'Out of extra usage credits (wallet empty)' |
| 777 | case 'org-zero-credit-limit': |
| 778 | return 'Org spend cap is zero (no extra usage budget)' |
| 779 | case 'org-spend-cap-hit': |
| 780 | return 'Org spend cap hit for the month' |
| 781 | case 'member-zero-credit-limit': |
| 782 | return 'Member limit is zero (admin can allocate more)' |
| 783 | case 'seat-tier-zero-credit-limit': |
| 784 | return 'Seat tier limit is zero (admin can allocate more)' |
| 785 | case 'opus-limit': |
| 786 | return 'priority model limit reached' |
| 787 | case 'opus-warning': |
| 788 | return 'Approaching priority model limit' |
| 789 | case 'sonnet-limit': |
| 790 | return 'standard model limit reached' |
| 791 | case 'sonnet-warning': |
| 792 | return 'Approaching standard model limit' |
| 793 | case 'fast-mode-limit': |
| 794 | return 'Fast mode rate limit' |
| 795 | case 'fast-mode-short-limit': |
| 796 | return 'Fast mode rate limit (short)' |
| 797 | case 'extra-usage-required': |
| 798 | return 'Headerless 429: Extra usage required for 1M context' |
| 799 | case 'clear': |
| 800 | return 'Clear mock headers (use real limits)' |
| 801 | default: |
| 802 | return 'Unknown scenario' |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | // Mock subscription type management |
| 807 | export function setMockSubscriptionType( |
no outgoing calls
no test coverage detected