The AnthropicOAuthProvider always includes hardcoded beta flags (claude-code-20250219, oauth-2025-04-20, context-management-2025-06-27). Tool-specific beta flags are then merged with these and sorted alphabetically. Tests were only checking for tool flags, not the combined result.
Changes
✅ Updated test_oauth_utils.py to expect all hardcoded flags
✅ Updated test_beta_flags_collected_from_tools to expect combined flags
✅ Updated test_multiple_beta_flags_joined to expect combined flags
How Beta Flags Work
OAuth headers start with hardcoded flags: claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27
Tool-specific flags (e.g., computer-use-2025-11-24) are collected
Flags are merged (deduplicated) and sorted alphabetically
Result is a comma-separated string in the anthropic-beta header
Test Results
✅ All 3 beta flags tests now pass
Type
Test fixes (beta flag expectations)
🤖 Generated with Claude Code
## Summary
The `AnthropicOAuthProvider` always includes hardcoded beta flags (`claude-code-20250219`, `oauth-2025-04-20`, `context-management-2025-06-27`). Tool-specific beta flags are then merged with these and sorted alphabetically. Tests were only checking for tool flags, not the combined result.
## Changes
- ✅ Updated `test_oauth_utils.py` to expect all hardcoded flags
- ✅ Updated `test_beta_flags_collected_from_tools` to expect combined flags
- ✅ Updated `test_multiple_beta_flags_joined` to expect combined flags
## How Beta Flags Work
1. OAuth headers start with hardcoded flags: `claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27`
2. Tool-specific flags (e.g., `computer-use-2025-11-24`) are collected
3. Flags are merged (deduplicated) and sorted alphabetically
4. Result is a comma-separated string in the `anthropic-beta` header
## Test Results
✅ All 3 beta flags tests now pass
## Type
- [x] Test fixes (beta flag expectations)
🤖 Generated with Claude Code
The AnthropicOAuthProvider always includes hardcoded beta flags:
- claude-code-20250219
- oauth-2025-04-20
- context-management-2025-06-27
Tool-specific beta flags are then merged with these and sorted
alphabetically. Tests were only checking for tool flags, not the
combined result.
Changes:
- ✅ Updated test_oauth_utils.py to expect all hardcoded flags
- ✅ Updated test_beta_flags_collected_from_tools to expect combined flags
- ✅ Updated test_multiple_beta_flags_joined to expect combined flags
All 3 beta flags tests now pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The
AnthropicOAuthProvideralways includes hardcoded beta flags (claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27). Tool-specific beta flags are then merged with these and sorted alphabetically. Tests were only checking for tool flags, not the combined result.Changes
test_oauth_utils.pyto expect all hardcoded flagstest_beta_flags_collected_from_toolsto expect combined flagstest_multiple_beta_flags_joinedto expect combined flagsHow Beta Flags Work
claude-code-20250219,oauth-2025-04-20,context-management-2025-06-27computer-use-2025-11-24) are collectedanthropic-betaheaderTest Results
✅ All 3 beta flags tests now pass
Type
🤖 Generated with Claude Code