ProviderAuthBackend
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| CopilotAuthBackend llmling_models.auth.github_auth GitHub Copilot device-code auth backend. |
||
| OpenAICodexAuthBackend llmling_models.auth.openai_codex_auth OpenAI Codex (ChatGPT Plus/Pro) OAuth backend. |
||
| PoeAuthBackend llmling_models.auth.poe_auth Poe OAuth / API key auth backend. |
||
| ZenAuthBackend llmling_models.auth.zen_auth OpenCode Zen API key auth backend. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ABC abc Helper class that provides a standard way to create an ABC using |
⋔ Inheritance diagram¶
graph TD
1157112198["base.ProviderAuthBackend"]
925645236["abc.ABC"]
2751680898["builtins.object"]
925645236 --> 1157112198
2751680898 --> 925645236
🛈 DocStrings¶
Bases: ABC
Protocol for a provider-specific auth backend.
Source code in src/llmling_models/auth/base.py
authorize
abstractmethod
async
¶
authorize(method: int = 0) -> ProviderAuthAuthorization
callback
abstractmethod
async
¶
callback(
*, code: str | None = None, device_code: str | None = None, verifier: str | None = None
) -> bool
Handle the auth callback / code exchange.
Returns:
| Type | Description |
|---|---|
bool
|
True if auth succeeded. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If required parameters are missing or exchange fails. |
Source code in src/llmling_models/auth/base.py
methods
abstractmethod
¶
methods() -> list[ProviderAuthMethod]