Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Commit bcb8b46

Browse files
committed
Ensure backend key values are sorted
Go map key iteration is (intentionally) random, so we need to sort these to get consistent help messages and (more importantly) consistent docs. Signed-off-by: Jacob Howard <[email protected]>
1 parent 78267b8 commit bcb8b46

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

commands/backend.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ func ensureAPIKey(backend string) (string, error) {
3737
}
3838

3939
func ValidBackendsKeys() string {
40-
return strings.Join(slices.Collect(maps.Keys(ValidBackends)), ", ")
40+
keys := slices.Collect(maps.Keys(ValidBackends))
41+
slices.Sort(keys)
42+
return strings.Join(keys, ", ")
4143
}

docs/reference/docker_model_list.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plink: docker_model.yaml
88
options:
99
- option: backend
1010
value_type: string
11-
description: Specify the backend to use (openai, llama.cpp)
11+
description: Specify the backend to use (llama.cpp, openai)
1212
deprecated: false
1313
hidden: true
1414
experimental: false

0 commit comments

Comments
 (0)