- windsurf_gateway_service: 添加上游延迟/TTFT/错误上下文记录 - endpoint: DeriveUpstreamEndpoint 添加 PlatformWindsurf 分支 - ops_error_logger: guessPlatformFromPath 添加 /windsurf/ 识别
105 lines
4.1 KiB
Go
105 lines
4.1 KiB
Go
package dto
|
|
|
|
type WindsurfLoginRequest struct {
|
|
Name string `json:"name"`
|
|
Email string `json:"email" binding:"required,email"`
|
|
Password string `json:"password" binding:"required"`
|
|
Notes *string `json:"notes,omitempty"`
|
|
ProxyID *int64 `json:"proxy_id,omitempty"`
|
|
GroupIDs []int64 `json:"group_ids,omitempty"`
|
|
Concurrency *int `json:"concurrency,omitempty"`
|
|
Priority *int `json:"priority,omitempty"`
|
|
ProbeAfter *bool `json:"probe_after,omitempty"`
|
|
LSInstanceID string `json:"ls_instance_id,omitempty"`
|
|
}
|
|
|
|
type WindsurfBatchLoginRequest struct {
|
|
Items []string `json:"items" binding:"required,min=1"`
|
|
ProxyID *int64 `json:"proxy_id,omitempty"`
|
|
GroupIDs []int64 `json:"group_ids,omitempty"`
|
|
Concurrency *int `json:"concurrency,omitempty"`
|
|
Priority *int `json:"priority,omitempty"`
|
|
ProbeAfter *bool `json:"probe_after,omitempty"`
|
|
}
|
|
|
|
type WindsurfBatchIDsRequest struct {
|
|
AccountIDs []int64 `json:"account_ids" binding:"required,min=1"`
|
|
}
|
|
|
|
type WindsurfLoginResponse struct {
|
|
AccountID int64 `json:"account_id"`
|
|
Platform string `json:"platform"`
|
|
Type string `json:"type"`
|
|
Email string `json:"email"`
|
|
Tier string `json:"tier"`
|
|
AuthMethod string `json:"auth_method"`
|
|
APIKeyPresent bool `json:"api_key_present"`
|
|
RefreshTokenPresent bool `json:"refresh_token_present"`
|
|
}
|
|
|
|
type WindsurfBatchLoginResponse struct {
|
|
Results []WindsurfBatchLoginResult `json:"results"`
|
|
Total int `json:"total"`
|
|
SuccessCount int `json:"success_count"`
|
|
FailCount int `json:"fail_count"`
|
|
}
|
|
|
|
type WindsurfBatchLoginResult struct {
|
|
Email string `json:"email"`
|
|
Success bool `json:"success"`
|
|
Account *WindsurfLoginResponse `json:"account,omitempty"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
type WindsurfRuntimeResponse struct {
|
|
AccountID int64 `json:"account_id"`
|
|
Tier string `json:"tier"`
|
|
RPMLimit int `json:"rpm_limit"`
|
|
CurrentRPM int `json:"current_rpm"`
|
|
RPMUsagePercent float64 `json:"rpm_usage_percent"`
|
|
CurrentConcurrency int `json:"current_concurrency"`
|
|
MaxConcurrency int `json:"max_concurrency"`
|
|
Capabilities map[string]WindsurfModelCapability `json:"capabilities,omitempty"`
|
|
ModelMatrix map[string]WindsurfModelAvailability `json:"model_matrix,omitempty"`
|
|
LastProbeAt *string `json:"last_probe_at,omitempty"`
|
|
LastStatusRefreshAt *string `json:"last_status_refresh_at,omitempty"`
|
|
}
|
|
|
|
type WindsurfModelCapability struct {
|
|
Available bool `json:"available"`
|
|
Mode string `json:"mode,omitempty"`
|
|
Reason string `json:"reason,omitempty"`
|
|
CheckedAt string `json:"checked_at,omitempty"`
|
|
}
|
|
|
|
type WindsurfModelAvailability struct {
|
|
Visible bool `json:"visible"`
|
|
Available bool `json:"available"`
|
|
Blocked bool `json:"blocked"`
|
|
Mode string `json:"mode,omitempty"`
|
|
Source string `json:"source,omitempty"`
|
|
}
|
|
|
|
type WindsurfRefreshTokenResponse struct {
|
|
Refreshed bool `json:"refreshed"`
|
|
}
|
|
|
|
type WindsurfLSStatusResponse struct {
|
|
Mode string `json:"mode"`
|
|
Healthy bool `json:"healthy"`
|
|
Instances int `json:"instances"`
|
|
Endpoint string `json:"endpoint,omitempty"`
|
|
Details []WindsurfLSInstanceDetail `json:"details,omitempty"`
|
|
}
|
|
|
|
type WindsurfLSInstanceDetail struct {
|
|
ContainerID string `json:"container_id"`
|
|
ContainerName string `json:"container_name"`
|
|
Host string `json:"host"`
|
|
Port int `json:"port"`
|
|
Healthy bool `json:"healthy"`
|
|
DiscoveredAt string `json:"discovered_at"`
|
|
LastProbeAt string `json:"last_probe_at,omitempty"`
|
|
LastProbeErr string `json:"last_probe_err,omitempty"`
|
|
}
|