Fix Codebuff OAuth: use www.codebuff.com (307 redirect on bare domain)

This commit is contained in:
Roman | RyzenAdvanced
2026-05-25 16:19:39 +04:00
Unverified
parent d28195dc1b
commit 1035c2e1da
2 changed files with 4 additions and 4 deletions

View File

@@ -393,7 +393,7 @@ PROVIDER_PRESETS = {
},
"Codebuff (Free DeepSeek/Kimi)": {
"backend_type": "codebuff",
"base_url": "https://codebuff.com",
"base_url": "https://www.codebuff.com",
"oauth_provider": "codebuff",
"models": [
"deepseek/deepseek-v4-pro", "deepseek/deepseek-v4-flash",
@@ -3685,7 +3685,7 @@ class EditEndpointDialog(Gtk.Dialog):
def _codebuff_auth_thread():
try:
fingerprint_id = str(uuid.uuid4())
auth_url = "https://codebuff.com/api/auth/cli/code"
auth_url = "https://www.codebuff.com/api/auth/cli/code"
body = json.dumps({"fingerprintId": fingerprint_id}).encode()
req = urllib.request.Request(auth_url, data=body,
headers={"Content-Type": "application/json", "User-Agent": "codex-launcher/3.10.5"})
@@ -3707,7 +3707,7 @@ class EditEndpointDialog(Gtk.Dialog):
webbrowser.open(login_url)
poll_url = f"https://codebuff.com/api/auth/cli/status?fingerprintId={urllib.parse.quote(fingerprint_id)}&fingerprintHash={urllib.parse.quote(fingerprint_hash)}&expiresAt={expires_at}"
poll_url = f"https://www.codebuff.com/api/auth/cli/status?fingerprintId={urllib.parse.quote(fingerprint_id)}&fingerprintHash={urllib.parse.quote(fingerprint_hash)}&expiresAt={expires_at}"
deadline = time.time() + 300
while time.time() < deadline:
time.sleep(2)

View File

@@ -294,7 +294,7 @@ _conn_pool = {}
_STREAM_IDLE_TIMEOUT = 300
_CODEBUFF_AUTH_URL = "https://codebuff.com"
_CODEBUFF_AUTH_URL = "https://www.codebuff.com"
_CODEBUFF_API_URL = "https://www.codebuff.com"
_CODEBUFF_AGENT_MAP = {
"deepseek/deepseek-v4-pro": "base2-free-deepseek",