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
160e0766
Commit
160e0766
authored
Apr 21, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix user provider dict vs object config access in QwenProviderHandler
parent
6b127cb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
base.py
aisbf/providers/base.py
+1
-0
qwen.py
aisbf/providers/qwen.py
+10
-2
No files found.
aisbf/providers/base.py
View file @
160e0766
...
@@ -745,6 +745,7 @@ class BaseProviderHandler:
...
@@ -745,6 +745,7 @@ class BaseProviderHandler:
self
.
provider_id
=
provider_id
self
.
provider_id
=
provider_id
self
.
api_key
=
api_key
self
.
api_key
=
api_key
self
.
user_id
=
user_id
self
.
user_id
=
user_id
self
.
user_provider_config
=
None
# Get error tracking config - use user-specific or default to global
# Get error tracking config - use user-specific or default to global
if
user_id
is
not
None
and
provider_id
in
config
.
error_tracking
:
if
user_id
is
not
None
and
provider_id
in
config
.
error_tracking
:
...
...
aisbf/providers/qwen.py
View file @
160e0766
...
@@ -572,11 +572,19 @@ class QwenProviderHandler(BaseProviderHandler):
...
@@ -572,11 +572,19 @@ class QwenProviderHandler(BaseProviderHandler):
logger
.
info
(
"QwenProviderHandler: Using API token authentication, fetching from models endpoint"
)
logger
.
info
(
"QwenProviderHandler: Using API token authentication, fetching from models endpoint"
)
# Check if models are already defined in provider configuration
# Check if models are already defined in provider configuration
if
self
.
provider_config
.
models
and
len
(
self
.
provider_config
.
models
)
>
0
:
# Handle both dict (user) and object (global) config formats
if
hasattr
(
self
,
'user_provider_config'
)
and
self
.
user_provider_config
is
not
None
:
# User provider config (dict)
models
=
self
.
user_provider_config
.
get
(
'models'
,
[])
else
:
# Global provider config (object)
models
=
self
.
provider_config
.
models
if
hasattr
(
self
.
provider_config
,
'models'
)
else
[]
if
models
and
len
(
models
)
>
0
:
# Models are defined in configuration, use those instead of fetching
# Models are defined in configuration, use those instead of fetching
logger
.
info
(
"QwenProviderHandler: Models defined in configuration, using configured models"
)
logger
.
info
(
"QwenProviderHandler: Models defined in configuration, using configured models"
)
models
=
[]
models
=
[]
for
model_config
in
self
.
provider_config
.
models
:
for
model_config
in
models
:
models
.
append
(
Model
(
models
.
append
(
Model
(
id
=
model_config
.
get
(
'name'
,
''
),
id
=
model_config
.
get
(
'name'
,
''
),
name
=
model_config
.
get
(
'name'
,
''
),
name
=
model_config
.
get
(
'name'
,
''
),
...
...
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