feat: add get models by provider

This commit is contained in:
Acbox
2026-02-02 13:48:22 +08:00
parent c10fbfee23
commit 3f0a0f8499
10 changed files with 330 additions and 38 deletions
+35
View File
@@ -1939,6 +1939,41 @@ paths:
summary: Update provider
tags:
- providers
/providers/{id}/models:
get:
description: Get models for a provider by id, optionally filtered by type
parameters:
- description: Provider ID (UUID)
in: path
name: id
required: true
type: string
- description: Model type (chat, embedding)
in: query
name: type
type: string
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/models.GetResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List provider models
tags:
- providers
/providers/count:
get:
consumes: