refactor(providers): define typed usage contract
This commit is contained in:
@@ -174,7 +174,12 @@ def login_github_copilot(
|
||||
class GitHubCopilotProvider(OpenAICompatProvider):
|
||||
"""Provider that exchanges a stored GitHub OAuth token for Copilot access tokens."""
|
||||
|
||||
def __init__(self, default_model: str = "github-copilot/gpt-4.1"):
|
||||
def __init__(
|
||||
self,
|
||||
default_model: str = "github-copilot/gpt-4.1",
|
||||
*,
|
||||
provider_name: str = "github_copilot",
|
||||
):
|
||||
from nanobot.providers.registry import find_by_name
|
||||
|
||||
self._copilot_access_token: str | None = None
|
||||
@@ -190,6 +195,7 @@ class GitHubCopilotProvider(OpenAICompatProvider):
|
||||
"User-Agent": USER_AGENT,
|
||||
},
|
||||
spec=find_by_name("github_copilot"),
|
||||
provider_name=provider_name,
|
||||
)
|
||||
|
||||
async def _get_copilot_access_token(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user