[Add] OpenRouter: Integrate OpenRouter API for authentication, model management, and translation capabilities.

This commit is contained in:
misyaguziya
2025-12-10 23:48:56 +09:00
parent e59d52815c
commit 8b853f4c20
8 changed files with 324 additions and 0 deletions

View File

@@ -266,6 +266,23 @@ class Model:
self.ensure_initialized()
self.translator.updateGroqClient()
def authenticationTranslatorOpenRouterAuthKey(self, auth_key: str) -> bool:
result = self.translator.authenticationOpenRouterAuthKey(auth_key, root_path=config.PATH_LOCAL)
return result
def getTranslatorOpenRouterModelList(self) -> list[str]:
self.ensure_initialized()
return self.translator.getOpenRouterModelList()
def setTranslatorOpenRouterModel(self, model: str) -> bool:
self.ensure_initialized()
result = self.translator.setOpenRouterModel(model=model)
return result
def updateTranslatorOpenRouterClient(self) -> None:
self.ensure_initialized()
self.translator.updateOpenRouterClient()
def getTranslatorLMStudioConnected(self) -> bool:
self.ensure_initialized()
return self.translator.getLMStudioConnected()