mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
search budget: recalibrated caps after the first measured searches [skip ci]
Settled ~$0.003 per model call; worst-case reservations exhausted the $0.05 task allowance after 2-4 calls. Now $0.40 per task, $2 per search (maintainer decision). Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b44fb56d8d
commit
509c6562fe
@@ -6,8 +6,10 @@ from dataclasses import dataclass
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SearchBudget:
|
||||
spend_usd: float = 0.50
|
||||
max_call_usd: float = 0.05
|
||||
# Recalibrated 2026-10-05 on the first three measured searches: settled cost was ~$0.003 per model call,
|
||||
# but worst-case reservations (~$0.027 per call) exhausted the old $0.05 task allowance after 2-4 calls.
|
||||
spend_usd: float = 2.00
|
||||
max_call_usd: float = 0.40
|
||||
reason_rounds: int = 4
|
||||
intents_per_round: int = 3
|
||||
demonstrations: int = 3
|
||||
|
||||
@@ -71,7 +71,7 @@ def test_claim_checkpoint_survives_interrupt_without_free_spend(tmp_path):
|
||||
checkpoint = b.head
|
||||
resumed = Board.resume(b.store, "search-1", checkpoint, coordinator="host")
|
||||
state = Coordinator(resumed, lambda task: {"status": "ok", "cost_usd": 0, "intents": []}).run()
|
||||
assert state["checkpoint"]["spent_usd"] == 0.05
|
||||
assert state["checkpoint"]["spent_usd"] == SearchBudget().max_call_usd
|
||||
assert state["checkpoint"]["tasks"] == 3
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ def test_cleanup_failure_halts_and_charges_unknown_spend(tmp_path):
|
||||
with pytest.raises(RuntimeError, match="cleanup"):
|
||||
Coordinator(b, broken).run()
|
||||
assert len(calls) == 1
|
||||
assert b.state["checkpoint"]["spent_usd"] == 0.05
|
||||
assert b.state["checkpoint"]["spent_usd"] == SearchBudget().max_call_usd
|
||||
assert b.state["checkpoint"]["pending"]["id"] == calls[0].id
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user