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
ab635c6b
Commit
ab635c6b
authored
Apr 21, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecated get_database() call and dict config access errors
parent
a5210aaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
context.py
aisbf/context.py
+8
-3
kilo.py
aisbf/providers/kilo.py
+2
-2
utils.py
aisbf/utils.py
+8
-2
No files found.
aisbf/context.py
View file @
ab635c6b
...
...
@@ -1004,9 +1004,14 @@ def get_context_config_for_model(
# Step 1: Get provider-level defaults and model-specific config
model_specific_config
=
None
if
provider_config
:
# Try to find model-specific config in provider
if
hasattr
(
provider_config
,
'models'
)
and
provider_config
.
models
:
for
model
in
provider_config
.
models
:
# Handle both dict (user) and object (global) config formats
if
isinstance
(
provider_config
,
dict
):
models
=
provider_config
.
get
(
'models'
,
[])
else
:
models
=
provider_config
.
models
if
hasattr
(
provider_config
,
'models'
)
else
[]
if
models
:
for
model
in
models
:
# Handle both Pydantic objects and dictionaries
model_name_value
=
model
.
name
if
hasattr
(
model
,
'name'
)
else
model
.
get
(
'name'
)
if
model_name_value
==
model_name
:
...
...
aisbf/providers/kilo.py
View file @
ab635c6b
...
...
@@ -124,8 +124,8 @@ class KiloProviderHandler(BaseProviderHandler):
# Regular user: ONLY use database credentials, NO file fallback
try
:
from
..database
import
get_database
db
=
get
_database
()
from
..database
import
DatabaseRegistry
db
=
DatabaseRegistry
.
get_config
_database
()
if
db
:
db_creds
=
db
.
get_user_oauth2_credentials
(
user_id
=
self
.
user_id
,
...
...
aisbf/utils.py
View file @
ab635c6b
...
...
@@ -168,8 +168,14 @@ def get_max_request_tokens_for_model(
return
max_tokens
# Then check provider models config
if
hasattr
(
provider_config
,
'models'
)
and
provider_config
.
models
:
for
model
in
provider_config
.
models
:
# Handle both dict (user) and object (global) config formats
if
isinstance
(
provider_config
,
dict
):
models
=
provider_config
.
get
(
'models'
,
[])
else
:
models
=
provider_config
.
models
if
hasattr
(
provider_config
,
'models'
)
else
[]
if
models
:
for
model
in
models
:
# Handle both Pydantic objects and dictionaries
model_name_value
=
model
.
name
if
hasattr
(
model
,
'name'
)
else
model
.
get
(
'name'
)
if
model_name_value
==
model_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