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
4e2f7315
Commit
4e2f7315
authored
Feb 08, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust error message formatting - remove duplicate line and improve spacing
parent
b636940a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
handlers.py
aisbf/handlers.py
+19
-9
No files found.
aisbf/handlers.py
View file @
4e2f7315
...
@@ -900,11 +900,13 @@ class RotationHandler:
...
@@ -900,11 +900,13 @@ class RotationHandler:
# Build detailed error message with provider status information
# Build detailed error message with provider status information
error_details
=
[]
error_details
=
[]
error_details
.
append
(
f
"**No models available in rotation '{rotation_id}'**"
)
error_details
.
append
(
f
"No models available in rotation '{rotation_id}'. Details:"
)
error_details
.
append
(
""
)
error_details
.
append
(
f
"**Total providers in rotation:** {len(providers)}"
)
error_details
.
append
(
f
"**Total providers in rotation:** {len(providers)}"
)
error_details
.
append
(
f
"**Providers skipped (rate limited):** {len(skipped_providers)}"
)
error_details
.
append
(
f
"**Providers skipped (rate limited):** {len(skipped_providers)}"
)
if
skipped_providers
:
if
skipped_providers
:
error_details
.
append
(
""
)
error_details
.
append
(
"**Skipped providers:**"
)
error_details
.
append
(
"**Skipped providers:**"
)
for
provider_id
in
skipped_providers
:
for
provider_id
in
skipped_providers
:
provider_config
=
self
.
config
.
get_provider
(
provider_id
)
provider_config
=
self
.
config
.
get_provider
(
provider_id
)
...
@@ -1251,8 +1253,11 @@ class RotationHandler:
...
@@ -1251,8 +1253,11 @@ class RotationHandler:
# Build detailed error message
# Build detailed error message
error_details
=
[]
error_details
=
[]
error_details
.
append
(
f
"**All providers in rotation '{rotation_id}' failed after {max_retries} attempts**"
)
error_details
.
append
(
f
"All providers in rotation '{rotation_id}' failed after {max_retries} attempts. Details:"
)
error_details
.
append
(
f
"**Attempted models:** {[m['name'] for m in tried_models]}"
)
error_details
.
append
(
""
)
error_details
.
append
(
f
"**Attempted models:**"
)
error_details
.
append
(
f
"{[m['name'] for m in tried_models]}"
)
error_details
.
append
(
""
)
# Format last error with JSON indentation if it contains JSON
# Format last error with JSON indentation if it contains JSON
try
:
try
:
...
@@ -1271,17 +1276,22 @@ class RotationHandler:
...
@@ -1271,17 +1276,22 @@ class RotationHandler:
formatted_json
=
json
.
dumps
(
parsed_json
,
indent
=
2
)
formatted_json
=
json
.
dumps
(
parsed_json
,
indent
=
2
)
# Replace JSON part with formatted version
# Replace JSON part with formatted version
error_part
=
last_error
[:
json_start
]
error_part
=
last_error
[:
json_start
]
error_details
.
append
(
f
"**Last error:** {error_part}
\n
```json
\n
{formatted_json}
\n
```"
)
error_details
.
append
(
f
"**Last error:** {error_part}"
)
error_details
.
append
(
f
"```json
\n
{formatted_json}
\n
```"
)
except
:
except
:
error_details
.
append
(
f
"**Last error:** {last_error}"
)
error_details
.
append
(
f
"**Last error:**"
)
error_details
.
append
(
f
"{last_error}"
)
else
:
else
:
error_details
.
append
(
f
"**Last error:** {last_error}"
)
error_details
.
append
(
f
"**Last error:**"
)
error_details
.
append
(
f
"{last_error}"
)
else
:
else
:
error_details
.
append
(
f
"**Last error:** {last_error}"
)
error_details
.
append
(
f
"**Last error:**"
)
error_details
.
append
(
f
"{last_error}"
)
except
:
except
:
error_details
.
append
(
f
"**Last error:** {last_error}"
)
error_details
.
append
(
f
"**Last error:**"
)
error_details
.
append
(
f
"{last_error}"
)
# Add provider status information
error_details
.
append
(
""
)
error_details
.
append
(
"**Provider status:**"
)
error_details
.
append
(
"**Provider status:**"
)
for
provider
in
providers
:
for
provider
in
providers
:
provider_id
=
provider
[
'provider_id'
]
provider_id
=
provider
[
'provider_id'
]
...
...
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