Replace the prior release tree with the current plugin, frontend, tests, and documentation. Document retired node IDs and the public Gitea update source.
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
"""API clients exposed through lazy imports.
|
|
|
|
Importing one client submodule no longer imports every provider client. This
|
|
keeps plugin startup lightweight and isolates optional provider dependencies.
|
|
"""
|
|
|
|
from importlib import import_module
|
|
|
|
|
|
_EXPORTS = {
|
|
"BaseAPIClient": ("base_client", "BaseAPIClient"),
|
|
"GeminiAPIClient": ("gemini_client", "GeminiAPIClient"),
|
|
"GeminiFlashClient": ("gemini_flash_client", "GeminiFlashClient"),
|
|
"SoraClient": ("sora_client", "SoraClient"),
|
|
"VeoClient": ("veo_client", "VeoClient"),
|
|
"NewAPIVeoClient": ("newapi_veo_client", "NewAPIVeoClient"),
|
|
"MiniMaxH3Client": ("minimax_h3_client", "MiniMaxH3Client"),
|
|
"GrokVideoClient": ("grok_video_client", "GrokVideoClient"),
|
|
"OmniFlashClient": ("omni_flash_client", "OmniFlashClient"),
|
|
"SeedreamImageClient": ("seedream_image_client", "SeedreamImageClient"),
|
|
}
|
|
|
|
__all__ = list(_EXPORTS)
|
|
|
|
|
|
def __getattr__(name):
|
|
try:
|
|
module_name, attribute_name = _EXPORTS[name]
|
|
except KeyError as exc:
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from exc
|
|
|
|
value = getattr(import_module(f".{module_name}", __name__), attribute_name)
|
|
globals()[name] = value
|
|
return value
|