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

Commit 085e1d4

Browse files
authored
Merge pull request #131 from docker/hide-backend-flags
Hide --backend flag on list and run for now.
2 parents ede328c + bcb8b46 commit 085e1d4

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
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
}

commands/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func newListCmd() *cobra.Command {
6363
c.Flags().BoolVar(&openai, "openai", false, "List models in an OpenAI format")
6464
c.Flags().BoolVarP(&quiet, "quiet", "q", false, "Only show model IDs")
6565
c.Flags().StringVar(&backend, "backend", "", fmt.Sprintf("Specify the backend to use (%s)", ValidBackendsKeys()))
66+
c.Flags().MarkHidden("backend")
6667
return c
6768
}
6869

commands/run.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ func newRunCmd() *cobra.Command {
187187

188188
c.Flags().BoolVar(&debug, "debug", false, "Enable debug logging")
189189
c.Flags().StringVar(&backend, "backend", "", fmt.Sprintf("Specify the backend to use (%s)", ValidBackendsKeys()))
190+
c.Flags().MarkHidden("backend")
190191

191192
return c
192193
}

docs/reference/docker_model_list.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ options:
1010
value_type: string
1111
description: Specify the backend to use (llama.cpp, openai)
1212
deprecated: false
13-
hidden: false
13+
hidden: true
1414
experimental: false
1515
experimentalcli: false
1616
kubernetes: false

docs/reference/docker_model_run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ options:
1414
value_type: string
1515
description: Specify the backend to use (llama.cpp, openai)
1616
deprecated: false
17-
hidden: false
17+
hidden: true
1818
experimental: false
1919
experimentalcli: false
2020
kubernetes: false

docs/reference/model_list.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ List the models pulled to your local environment
99

1010
### Options
1111

12-
| Name | Type | Default | Description |
13-
|:----------------|:---------|:--------|:-----------------------------------------------|
14-
| `--backend` | `string` | | Specify the backend to use (llama.cpp, openai) |
15-
| `--json` | `bool` | | List models in a JSON format |
16-
| `--openai` | `bool` | | List models in an OpenAI format |
17-
| `-q`, `--quiet` | `bool` | | Only show model IDs |
12+
| Name | Type | Default | Description |
13+
|:----------------|:-------|:--------|:--------------------------------|
14+
| `--json` | `bool` | | List models in a JSON format |
15+
| `--openai` | `bool` | | List models in an OpenAI format |
16+
| `-q`, `--quiet` | `bool` | | Only show model IDs |
1817

1918

2019
<!---MARKER_GEN_END-->

docs/reference/model_run.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ Run a model and interact with it using a submitted prompt or chat mode
55

66
### Options
77

8-
| Name | Type | Default | Description |
9-
|:------------|:---------|:--------|:-----------------------------------------------|
10-
| `--backend` | `string` | | Specify the backend to use (llama.cpp, openai) |
11-
| `--debug` | `bool` | | Enable debug logging |
8+
| Name | Type | Default | Description |
9+
|:----------|:-------|:--------|:---------------------|
10+
| `--debug` | `bool` | | Enable debug logging |
1211

1312

1413
<!---MARKER_GEN_END-->

0 commit comments

Comments
 (0)