fix(backend): reduce ultrathink value from 65536 to 60000 for Opus 4.5 compatibility (#1173)
The hardcoded ultrathink value of 65536 exceeded Claude Opus 4.5's max_output_tokens limit of 64000, causing all Ultra+Opus tasks to fail with API Error 400. Changes: - apps/backend/phase_config.py: Reduced ultrathink from 65536 to 60000 - apps/frontend/src/shared/constants/models.ts: Mirrored backend change - tests/test_thinking_level_validation.py: Updated test assertions The new value of 60000 provides a 4k buffer under Opus 4.5's limit, allowing the SDK to add its overhead token without exceeding the max. Refs: ACS-295 Co-authored-by: StillKnotKnown <stillknotknown@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ THINKING_BUDGET_MAP: dict[str, int | None] = {
|
||||
"low": 1024,
|
||||
"medium": 4096, # Moderate analysis
|
||||
"high": 16384, # Deep thinking for QA review
|
||||
"ultrathink": 65536, # Maximum reasoning depth
|
||||
"ultrathink": 60000, # Maximum reasoning depth (must be < Opus 4.5's 64000 limit)
|
||||
}
|
||||
|
||||
# Spec runner phase-specific thinking levels
|
||||
|
||||
@@ -28,7 +28,7 @@ export const THINKING_BUDGET_MAP: Record<string, number | null> = {
|
||||
low: 1024,
|
||||
medium: 4096,
|
||||
high: 16384,
|
||||
ultrathink: 65536
|
||||
ultrathink: 60000 // Maximum reasoning depth (must be < Opus 4.5's 64000 limit)
|
||||
} as const;
|
||||
|
||||
// ============================================
|
||||
|
||||
@@ -35,7 +35,7 @@ class TestThinkingLevelValidation:
|
||||
|
||||
def test_ultrathink_max_budget(self):
|
||||
"""Test that 'ultrathink' returns maximum budget."""
|
||||
assert get_thinking_budget("ultrathink") == 65536
|
||||
assert get_thinking_budget("ultrathink") == 60000
|
||||
|
||||
def test_invalid_level_logs_warning(self, caplog):
|
||||
"""Test that invalid thinking level logs a warning."""
|
||||
@@ -91,4 +91,4 @@ class TestThinkingLevelValidation:
|
||||
assert get_thinking_budget("low") == 1024
|
||||
assert get_thinking_budget("medium") == 4096
|
||||
assert get_thinking_budget("high") == 16384
|
||||
assert get_thinking_budget("ultrathink") == 65536
|
||||
assert get_thinking_budget("ultrathink") == 60000
|
||||
|
||||
Reference in New Issue
Block a user