fix(providers): complete OAuth model discovery

This commit is contained in:
Xubin Ren committed 2026-08-29 21:22:20 +08:00
1 parent bc4de246a4
commit 97fb9aaf72
7 files changed
+691 -96

No files matched your search

+2
View File
@@ -1534,6 +1534,7 @@ def login_oauth_provider(
token = login_github_copilot(print_fn=lambda _message: None)
if not (token and token.access):
raise WebUISettingsError("OAuth login failed", status=401)
invalidate_oauth_model_catalog(spec.name)
return settings_payload(config_path=config_path)
if spec.name == "xai_grok":
@@ -1666,6 +1667,7 @@ def logout_oauth_provider(
for path in (token_path, token_path.with_suffix(".lock")):
with suppress(FileNotFoundError):
path.unlink()
invalidate_oauth_model_catalog(spec.name)
return settings_payload(config_path=config_path)