PR: #717 PR 标题: feat(admin): 渠道管理 - 模型供应商支持渠道级 SOCKS5/HTTP 代理 校验渠道级代理地址并在历史无效配置下拒绝出站请求,保留空代理回退全局代理的行为,同时补充管理端和出站层回归测试。 Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
70 lines
4.5 KiB
Go
70 lines
4.5 KiB
Go
package service
|
|
|
|
import "yingce/backend/internal/app"
|
|
|
|
var (
|
|
ErrPlaybackNotReady = app.ErrPlaybackNotReady
|
|
ErrNotBuiltinSkill = app.ErrNotBuiltinSkill
|
|
AllowedPrivateUpstreamHost = app.AllowedPrivateUpstreamHost
|
|
AppearanceAssetMaxBytes = app.AppearanceAssetMaxBytes
|
|
ApplyDefaultOutboundHeaders = app.ApplyDefaultOutboundHeaders
|
|
ApplyOutboundHeaders = app.ApplyOutboundHeaders
|
|
BadAuthRequest = app.BadAuthRequest
|
|
CapabilitySpecFromModelCapabilityConfig = app.CapabilitySpecFromModelCapabilityConfig
|
|
ChannelAPIURL = app.ChannelAPIURL
|
|
ChannelAPIURLForProtocol = app.ChannelAPIURLForProtocol
|
|
ChannelSlotFailureDetails = app.ChannelSlotFailureDetails
|
|
ComputePriceConfigured = app.ComputePriceConfigured
|
|
ComputeTierPriceConfigured = app.ComputeTierPriceConfigured
|
|
CustomRelayHTTPClient = app.CustomRelayHTTPClient
|
|
DecodeCapabilitySpec = app.DecodeCapabilitySpec
|
|
DecodeModelCapabilityConfig = app.DecodeModelCapabilityConfig
|
|
DecodeRelayOutboundHeaders = app.DecodeRelayOutboundHeaders
|
|
DefaultImageCapabilityConfig = app.DefaultImageCapabilityConfig
|
|
DefaultModelCapabilityConfig = app.DefaultModelCapabilityConfig
|
|
DefaultModelCapabilityConfigForModel = app.DefaultModelCapabilityConfigForModel
|
|
EncodeOutboundHeadersJSON = app.EncodeOutboundHeadersJSON
|
|
EnsureChatCompletionStreamUsageRequest = app.EnsureChatCompletionStreamUsageRequest
|
|
Forbidden = app.Forbidden
|
|
FormatModelError = app.FormatModelError
|
|
GetModelErrorCode = app.GetModelErrorCode
|
|
HasValidPrice = app.HasValidPrice
|
|
InvalidModelSelection = app.InvalidModelSelection
|
|
IsModelError = app.IsModelError
|
|
IsProjectNotFound = app.IsProjectNotFound
|
|
MatchCapability = app.MatchCapability
|
|
ModelCapabilityNotSupported = app.ModelCapabilityNotSupported
|
|
ModelCatalogMismatch = app.ModelCatalogMismatch
|
|
ModelPriceNotConfigured = app.ModelPriceNotConfigured
|
|
ModelRequestIntentFromTaskInput = app.ModelRequestIntentFromTaskInput
|
|
ModelRouteUnavailable = app.ModelRouteUnavailable
|
|
New = app.New
|
|
NewAppError = app.NewAppError
|
|
NewModelError = app.NewModelError
|
|
NormalizeCapabilitySpec = app.NormalizeCapabilitySpec
|
|
NormalizeModelCapabilityConfig = app.NormalizeModelCapabilityConfig
|
|
NormalizeModelCapabilityConfigForModel = app.NormalizeModelCapabilityConfigForModel
|
|
NormalizeOutboundHeaders = app.NormalizeOutboundHeaders
|
|
NotFound = app.NotFound
|
|
OutboundHTTPClient = app.OutboundHTTPClient
|
|
OutboundHTTPClientWithProxy = app.OutboundHTTPClientWithProxy
|
|
ParseOutboundHeadersJSON = app.ParseOutboundHeadersJSON
|
|
PaymentNotificationResponseFor = app.PaymentNotificationResponseFor
|
|
PaymentNotificationResponseForWithRegistry = app.PaymentNotificationResponseForWithRegistry
|
|
ProviderRequestFailed = app.ProviderRequestFailed
|
|
QuotaExceeded = app.QuotaExceeded
|
|
RateLimited = app.RateLimited
|
|
ReasonForStatus = app.ReasonForStatus
|
|
SanitizeAPICallPayload = app.SanitizeAPICallPayload
|
|
Unauthorized = app.Unauthorized
|
|
ValidateCapabilitySpec = app.ValidateCapabilitySpec
|
|
ValidateChannelModelPrice = app.ValidateChannelModelPrice
|
|
ValidateCustomRelayURL = app.ValidateCustomRelayURL
|
|
ValidateProxyURL = app.ValidateProxyURL
|
|
ValidateLogicalModelPrice = app.ValidateLogicalModelPrice
|
|
ValidateOutboundHost = app.ValidateOutboundHost
|
|
ValidateOutboundURL = app.ValidateOutboundURL
|
|
ValidatePriceTierPrice = app.ValidatePriceTierPrice
|
|
WrapAppError = app.WrapAppError
|
|
)
|