generated from coulomb/repo-seed
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:
@@ -2,7 +2,6 @@
|
||||
Google Gemini adapter — calls the Generative Language REST API directly.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import time
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
@@ -111,10 +110,6 @@ class GeminiAdapter(LLMAdapter):
|
||||
self._consume_budget(config, response)
|
||||
return response
|
||||
|
||||
async def async_execute_prompt(self, prompt: str, config: RunConfig) -> LLMResponse:
|
||||
"""Async wrapper — runs execute_prompt in a thread executor."""
|
||||
return await asyncio.to_thread(self.execute_prompt, prompt, config)
|
||||
|
||||
def validate_config(self, config: RunConfig) -> bool:
|
||||
if not self._api_key:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user