Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
d9e3fb9f
Commit
d9e3fb9f
authored
Jul 26, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/silence-httpcore-logging-reentrancy'
parents
39c0481a
1b217f0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
__init__.py
aisbf/__init__.py
+1
-1
startup.py
aisbf/app/startup.py
+19
-0
pyproject.toml
pyproject.toml
+1
-1
setup.py
setup.py
+1
-1
No files found.
aisbf/__init__.py
View file @
d9e3fb9f
...
...
@@ -55,7 +55,7 @@ from .auth.qwen import QwenOAuth2
from
.handlers
import
RequestHandler
,
RotationHandler
,
AutoselectHandler
from
.utils
import
count_messages_tokens
,
split_messages_into_chunks
,
get_max_request_tokens_for_model
,
get_max_completion_tokens_for_model
__version__
=
"0.99.9
3
"
__version__
=
"0.99.9
4
"
__all__
=
[
# Config
"config"
,
...
...
aisbf/app/startup.py
View file @
d9e3fb9f
...
...
@@ -137,6 +137,25 @@ def setup_logging():
):
logging
.
getLogger
(
noisy_logger
)
.
setLevel
(
logging
.
INFO
if
AISBF_DEBUG
else
logging
.
WARNING
)
# HTTP client libraries emit extremely high-volume DEBUG traces (every
# connection open/close/send/receive). Beyond the noise, httpcore logs a
# connection-close trace from the OpenAI client's __del__ finalizer; under
# load that finalizer runs during a garbage-collection pause that can land
# mid-flush of aisbf.log, re-entering the same file handler and raising
# "RuntimeError: reentrant call inside BufferedWriter" — which cascades and
# blocks the asyncio event loop (the server keeps the port bound but stops
# accepting connections). Pin these to WARNING regardless of debug mode so a
# finalizer can never emit a DEBUG/INFO record into the reentrant path.
for
http_logger
in
(
'httpcore'
,
'httpcore.connection'
,
'httpcore.http11'
,
'httpcore.http2'
,
'httpx'
,
'openai'
,
):
logging
.
getLogger
(
http_logger
)
.
setLevel
(
logging
.
WARNING
)
bpf
=
BrokenPipeFilter
()
for
h
in
(
file_handler
,
error_handler
,
console_handler
):
h
.
addFilter
(
bpf
)
...
...
pyproject.toml
View file @
d9e3fb9f
...
...
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name
=
"aisbf"
version
=
"0.99.9
3
"
version
=
"0.99.9
4
"
description
=
"AISBF - AI Service Broker Framework || AI Should Be Free - A modular proxy server for managing multiple AI provider integrations"
readme
=
"README.md"
license
=
"GPL-3.0-or-later"
...
...
setup.py
View file @
d9e3fb9f
...
...
@@ -106,7 +106,7 @@ class InstallCommand(_install):
setup
(
name
=
"aisbf"
,
version
=
"0.99.9
3
"
,
version
=
"0.99.9
4
"
,
author
=
"AISBF Contributors"
,
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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment