mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): align provider creation with presets/custom/google sdk
This commit is contained in:
@@ -33,3 +33,28 @@ type ProviderCustomCreateDTO struct {
|
||||
Weight int `json:"weight,omitempty"`
|
||||
AutoBan *bool `json:"auto_ban,omitempty"`
|
||||
}
|
||||
|
||||
// ProviderGoogleCreateDTO creates a Google SDK provider (Gemini API or Vertex).
|
||||
// It intentionally does not require base_url.
|
||||
type ProviderGoogleCreateDTO struct {
|
||||
// Type must be a Google-family provider type, e.g.:
|
||||
// - gemini/google/aistudio (Gemini API)
|
||||
// - vertex/vertex-express (Vertex)
|
||||
Type string `json:"type"`
|
||||
|
||||
// Optional fields.
|
||||
Name string `json:"name"`
|
||||
Group string `json:"group"`
|
||||
Models []string `json:"models"`
|
||||
|
||||
// Gemini API
|
||||
APIKey string `json:"api_key,omitempty"`
|
||||
|
||||
// Vertex
|
||||
GoogleProject string `json:"google_project,omitempty"`
|
||||
GoogleLocation string `json:"google_location,omitempty"`
|
||||
|
||||
Status string `json:"status"`
|
||||
Weight int `json:"weight,omitempty"`
|
||||
AutoBan *bool `json:"auto_ban,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user