feat: 算力引擎 Go 后端核心(new-api)
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水 - 各领域包:relay 模型网关、model 数据层、controller 管理 API
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package relay
|
||||
|
||||
import (
|
||||
relaycommon "github.com/QuantumNous/new-api/relay/common"
|
||||
"github.com/QuantumNous/new-api/relaykit/types"
|
||||
)
|
||||
|
||||
func newAPIErrorFromParamOverride(err error) *types.NewAPIError {
|
||||
if fixedErr, ok := relaycommon.AsParamOverrideReturnError(err); ok {
|
||||
return relaycommon.NewAPIErrorFromParamOverride(fixedErr)
|
||||
}
|
||||
return types.NewError(err, types.ErrorCodeChannelParamOverrideInvalid, types.ErrOptionWithSkipRetry())
|
||||
}
|
||||
Reference in New Issue
Block a user