Go CLI: list provider instance models, sync and list provider (#16311)

### What problem does this PR solve?

```
RAGFlow(api/default)> list provider 'zhipu-ai' instance 'test' models sync;
+------------+---------------+------------+-------------+------------------+---------------------------------------------+
| dimensions | max_dimension | max_tokens | model_types | name             | thinking                                    |
+------------+---------------+------------+-------------+------------------+---------------------------------------------+
|            |               | 128000     | [chat]      | glm-4.5@z-ai     | map[clear_thinking:true default_value:true] |
|            |               | 128000     | [chat]      | glm-4.5-air@z-ai | map[clear_thinking:true default_value:true] |
|            |               | 202752     | [chat]      | glm-4.6@z-ai     | map[clear_thinking:true default_value:true] |
|            |               | 202752     | [chat]      | glm-4.7@z-ai     | map[clear_thinking:true default_value:true] |
|            |               | 202752     | [chat]      | glm-5@z-ai       | map[clear_thinking:true default_value:true] |
|            |               | 200000     | [chat]      | glm-5-turbo@z-ai | map[clear_thinking:true default_value:true] |
|            |               | 202752     | [chat]      | glm-5.1@z-ai     | map[clear_thinking:true default_value:true] |
|            |               |            | [chat]      | glm-5.2@z-ai     |                                             |
+------------+---------------+------------+-------------+------------------+---------------------------------------------+

RAGFlow(api/default)> list provider 'zhipu-ai' instance 'test' models;

RAGFlow(api/default)> list dataset 'aaa' ingestion tasks;

RAGFlow(api/default)> list dataset '0abe79f9423311f1ad8d38a74640adcc' documents;

```

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-06-25 10:01:21 +08:00
committed by GitHub
parent 5b0b86c276
commit 7ef4a4a06a
4 changed files with 71 additions and 55 deletions

View File

@@ -126,11 +126,9 @@ func (c *CLI) ExecuteAdminCommand(cmd *Command) (ResponseIf, error) {
case "admin_list_provider_models":
return c.CommonListModelsCommand(cmd)
case "admin_list_provider_instance_models":
return c.CommonListInstanceModels(cmd)
return c.CommonListInstanceModelsCommand(cmd)
case "admin_list_provider_instances":
return c.CommonListProviderInstances(cmd)
case "list_supported_models":
return c.ListSupportedModels(cmd)
case "admin_show_model":
return c.CommonShowModel(cmd)
case "admin_list_providers":
@@ -338,10 +336,10 @@ func (c *CLI) ExecuteUserCommand(cmd *Command) (ResponseIf, error) {
return c.CommonShowProviderCommand(cmd)
case "list_provider_models":
return c.CommonListModelsCommand(cmd)
case "list_supported_models":
return c.ListSupportedModels(cmd)
case "api_list_provider_instance_models":
return c.CommonListInstanceModels(cmd)
return c.CommonListInstanceModelsCommand(cmd)
case "api_list_provider_instance_models_sync":
return c.CommonListInstanceModelsSyncCommand(cmd)
case "show_provider_model":
return c.CommonShowProviderModelCommand(cmd)
case "show_model":
@@ -351,8 +349,8 @@ func (c *CLI) ExecuteUserCommand(cmd *Command) (ResponseIf, error) {
// Provider commands
case "add_provider":
return c.AddProvider(cmd)
case "list_providers":
return c.ListProviders(cmd)
case "api_list_providers":
return c.APIListProviders(cmd)
case "delete_provider":
return c.DeleteProvider(cmd)
// Provider instance commands
@@ -411,7 +409,7 @@ func (c *CLI) ExecuteUserCommand(cmd *Command) (ResponseIf, error) {
return c.SetDefaultModel(cmd)
case "reset_default_model":
return c.ResetDefaultModel(cmd)
case "list_user_default_models":
case "api_list_default_models":
return c.ListDefaultModels(cmd)
case "list_tasks_user_command":
return c.ListTasksUserCommand(cmd)
@@ -449,7 +447,7 @@ func (c *CLI) ExecuteUserCommand(cmd *Command) (ResponseIf, error) {
return c.UserStartIngestionCommand(cmd)
case "user_stop_ingestion_command":
return c.UserStopIngestionCommand(cmd)
case "user_list_ingestion_tasks":
case "api_list_ingestion_tasks":
return c.ListUserIngestionTasks(cmd)
case "user_remove_task_command":
return c.UserRemoveTaskCommand(cmd)