refactor: simplify post-WP-0002 cleanup
- Remove redundant async_execute_prompt overrides from OpenAI/Gemini/OpenRouter adapters (identical to base class default — asyncio import also removed) - Cache prompt.split() result in MockLLMAdapter to avoid double evaluation - Promote deferred LLMBudgetExceededError imports to module level in models.py and adapter.py (no circular dependency) - Auto-populate context dict in LLMBudgetExceededError.__init__ so callers need not pass redundant context= kwarg Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d71f4114d1
commit
f76a58d6e9
6 changed files with 10 additions and 23 deletions
|
|
@ -82,6 +82,8 @@ class LLMBudgetExceededError(LLMError):
|
|||
cause: Optional[Exception] = None,
|
||||
context: Optional[Dict[str, Any]] = None,
|
||||
):
|
||||
if context is None:
|
||||
context = {"total": total, "spent": spent, "requested": requested}
|
||||
super().__init__(message, cause=cause, context=context)
|
||||
self.total = total
|
||||
self.spent = spent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue