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
3b527c5a
Commit
3b527c5a
authored
Mar 14, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix /v1/models API to show cached file paths instead of URLs for image models
parent
f2d4e4c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
coderai
coderai
+10
-3
No files found.
coderai
View file @
3b527c5a
...
@@ -2339,10 +2339,17 @@ class MultiModelManager:
...
@@ -2339,10 +2339,17 @@ class MultiModelManager:
if self.image_models:
if self.image_models:
models.append(ModelInfo(id="vision")) # Alias for first image model
models.append(ModelInfo(id="vision")) # Alias for first image model
models.append(ModelInfo(id="image")) # Alias for first image model
models.append(ModelInfo(id="image")) # Alias for first image model
# Add all image models
# Add all image models
- convert URLs to cached paths for display
for image_id in self.image_models:
for image_id in self.image_models:
models.append(ModelInfo(id=f"image:{image_id}"))
# Check if image_id is a URL and try to get cached path
models.append(ModelInfo(id=f"vision:{image_id}"))
display_id = image_id
if image_id.startswith('
http
://
') or image_id.startswith('
https
://
'):
cached_path = get_cached_model_path(image_id)
if cached_path:
# Use the filename from cached path for display
display_id = os.path.basename(cached_path)
models.append(ModelInfo(id=f"image:{display_id}"))
models.append(ModelInfo(id=f"vision:{display_id}"))
# Add loaded models that aren'
t
in
the
above
categories
# Add loaded models that aren'
t
in
the
above
categories
for
key
in
self
.
models
:
for
key
in
self
.
models
:
...
...
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