Skip to content

Commit 48d24b4

Browse files
committed
fix(ui): correctly display backend if specified in the model config
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 29c33e6 commit 48d24b4

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

core/http/react-ui/src/pages/Manage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default function Manage() {
226226
)}
227227
</td>
228228
<td>
229-
<span className="badge badge-info">Auto</span>
229+
<span className="badge badge-info">{model.backend || 'Auto'}</span>
230230
</td>
231231
<td>
232232
<div style={{ display: 'flex', gap: '4px', flexWrap: 'wrap' }}>

core/http/routes/ui_api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,15 @@ func RegisterUIAPIRoutes(app *echo.Echo, cl *config.ModelConfigLoader, ml *model
471471
type modelCapability struct {
472472
ID string `json:"id"`
473473
Capabilities []string `json:"capabilities"`
474+
Backend string `json:"backend"`
474475
}
475476

476477
result := make([]modelCapability, 0, len(modelConfigs)+len(modelsWithoutConfig))
477478
for _, cfg := range modelConfigs {
478479
result = append(result, modelCapability{
479480
ID: cfg.Name,
480481
Capabilities: cfg.KnownUsecaseStrings,
482+
Backend: cfg.Backend,
481483
})
482484
}
483485
for _, name := range modelsWithoutConfig {

0 commit comments

Comments
 (0)