MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / init_sync_client

Method init_sync_client

api/openrouter_client.py:45–56  ·  view source on GitHub ↗

Initialize the synchronous OpenRouter client.

(self)

Source from the content-addressed store, hash-verified

43 self.async_client = None # Initialize async client only when needed
44
45 def init_sync_client(self):
46 """Initialize the synchronous OpenRouter client."""
47 from api.config import OPENROUTER_API_KEY
48 api_key = OPENROUTER_API_KEY
49 if not api_key:
50 log.warning("OPENROUTER_API_KEY not configured")
51
52 # OpenRouter doesn't have a dedicated client library, so we'll use requests directly
53 return {
54 "api_key": api_key,
55 "base_url": "https://openrouter.ai/api/v1"
56 }
57
58 def init_async_client(self):
59 """Initialize the asynchronous OpenRouter client."""

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected