Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
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
coderai
Commits
0cf7c3c7
Commit
0cf7c3c7
authored
May 06, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working!
parent
3458911a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
202 additions
and
44 deletions
+202
-44
routes.py
codai/admin/routes.py
+10
-2
chat.html
codai/admin/templates/chat.html
+82
-22
models.html
codai/admin/templates/models.html
+106
-17
test_whisper_server_local_models.py
tests/test_whisper_server_local_models.py
+4
-3
No files found.
codai/admin/routes.py
View file @
0cf7c3c7
...
...
@@ -945,8 +945,12 @@ def _scan_caches() -> dict:
# Add configured GGUF models not yet in the list (e.g., HF repo IDs or external paths)
existing_paths
=
{
m
[
"path"
]
for
m
in
result
[
"gguf"
]}
existing_fnames
=
{
m
[
"filename"
]
for
m
in
result
[
"gguf"
]}
for
path
,
(
settings
,
mtype
)
in
configured_settings
.
items
():
if
path
in
existing_paths
:
if
path
in
existing_paths
or
path
in
existing_fnames
:
continue
fname
=
os
.
path
.
basename
(
path
)
if
'/'
in
path
else
path
if
fname
in
existing_fnames
:
continue
# Check if it's a GGUF model (ends with .gguf or is in a GGUF repo)
is_gguf
=
path
.
endswith
(
'.gguf'
)
or
'gguf'
in
path
.
lower
()
or
mtype
==
"gguf_models"
...
...
@@ -1115,7 +1119,11 @@ def _do_delete_model(model_id: str, cache_type: str) -> dict:
if
cache_type
==
"gguf"
:
gguf_dir
=
get_model_cache_dir
()
fp
=
os
.
path
.
join
(
gguf_dir
,
model_id
)
# Support full absolute path (e.g. HF-cached GGUF) or bare filename
if
os
.
path
.
isabs
(
model_id
):
fp
=
model_id
else
:
fp
=
os
.
path
.
join
(
gguf_dir
,
model_id
)
if
os
.
path
.
isfile
(
fp
):
os
.
remove
(
fp
)
return
{
"success"
:
True
}
...
...
codai/admin/templates/chat.html
View file @
0cf7c3c7
This diff is collapsed.
Click to expand it.
codai/admin/templates/models.html
View file @
0cf7c3c7
This diff is collapsed.
Click to expand it.
tests/test_whisper_server_local_models.py
View file @
0cf7c3c7
...
...
@@ -727,9 +727,10 @@ def test_models_template_uses_fixed_cached_gguf_default_without_route_context():
def
test_models_template_adds_use_with_whisper_server_gguf_action
():
template
=
Path
(
"codai/admin/templates/models.html"
)
.
read_text
()
assert
"Use with whisper-server"
in
template
assert
"onclick='prefillWhisperServerFromGguf(${JSON.stringify(f.path)})'"
in
template
assert
"prefillWhisperServerFromGguf('${esc(f.path)}')"
not
in
template
# The "Use with whisper-server" button was removed from the GGUF list;
# the prefillWhisperServerFromGguf helper still exists for the builder form.
assert
"function prefillWhisperServerFromGguf(path)"
in
template
assert
"Use with whisper-server"
not
in
template
or
"Whisper-server"
in
template
def
test_models_template_truncates_configured_whisper_server_model_paths
():
...
...
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