Commit f884822b authored by Your Name's avatar Your Name

Bump version to 0.99.14

Add detailed request/response logging for Kilo OAuth2:
- Log exact request URL, headers, and body
- Log httpx version being used
- Log complete response status, headers, and body
- This will help diagnose the 500 error difference between local and remote
parent 5b70ef31
...@@ -54,7 +54,7 @@ from .auth.qwen import QwenOAuth2 ...@@ -54,7 +54,7 @@ from .auth.qwen import QwenOAuth2
from .handlers import RequestHandler, RotationHandler, AutoselectHandler from .handlers import RequestHandler, RotationHandler, AutoselectHandler
from .utils import count_messages_tokens, split_messages_into_chunks, get_max_request_tokens_for_model from .utils import count_messages_tokens, split_messages_into_chunks, get_max_request_tokens_for_model
__version__ = "0.99.13" __version__ = "0.99.14"
__all__ = [ __all__ = [
# Config # Config
"config", "config",
......
...@@ -102,17 +102,31 @@ class KiloOAuth2: ...@@ -102,17 +102,31 @@ class KiloOAuth2:
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:
try: try:
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': '0',
'User-Agent': 'AISBF/0.99.13 (httpx)'
}
# Log the exact request details
logger.info(f"KiloOAuth2: Initiating device auth request")
logger.info(f"KiloOAuth2: URL: {url}")
logger.info(f"KiloOAuth2: Headers: {headers}")
logger.info(f"KiloOAuth2: Body: b''")
logger.info(f"KiloOAuth2: httpx version: {httpx.__version__}")
response = await client.post( response = await client.post(
url, url,
content=b'', content=b'',
headers={ headers=headers,
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': '0',
'User-Agent': 'AISBF/0.99.12 (httpx)'
},
timeout=30.0 timeout=30.0
) )
# Log the exact response details
logger.info(f"KiloOAuth2: Response status: {response.status_code}")
logger.info(f"KiloOAuth2: Response headers: {dict(response.headers)}")
logger.info(f"KiloOAuth2: Response body: {response.text}")
if response.status_code == 429: if response.status_code == 429:
raise Exception("Too many pending authorization requests. Please try again later.") raise Exception("Too many pending authorization requests. Please try again later.")
......
...@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" ...@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "aisbf" name = "aisbf"
version = "0.99.13" version = "0.99.14"
description = "AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations" description = "AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations"
readme = "README.md" readme = "README.md"
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
......
...@@ -49,7 +49,7 @@ class InstallCommand(_install): ...@@ -49,7 +49,7 @@ class InstallCommand(_install):
setup( setup(
name="aisbf", name="aisbf",
version="0.99.13", version="0.99.14",
author="AISBF Contributors", author="AISBF Contributors",
author_email="stefy@nexlab.net", author_email="stefy@nexlab.net",
description="AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations", description="AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment