Versions in this module Expand all Collapse all v0 v0.13.1 Apr 24, 2026 GO-2025-4154 +1 more GO-2025-4154: new-api is vulnerable to SSRF Bypass in one-api GO-2026-4813: New API has passkey-based secure step-up verification bypass for root-only channel secret disclosure in github.com/QuantumNous/new-api v0.13.0 Apr 24, 2026 GO-2025-4154 +1 more GO-2025-4154: new-api is vulnerable to SSRF Bypass in one-api GO-2026-4813: New API has passkey-based secure step-up verification bypass for root-only channel secret disclosure in github.com/QuantumNous/new-api Changes in this version + const DefaultExprVersion + func CompileFromCache(exprStr string) (*vm.Program, error) + func CompileFromCacheByHash(exprStr, hash string) (*vm.Program, error) + func ExprHashString(expr string) string + func ExprVersion(exprStr string) int + func InvalidateCache() + func ParseExprVersion(exprStr string) (version int, body string) + func QuotaRound(f float64) int + func UsedVars(exprStr string) map[string]bool + type BillingSnapshot struct + BillingMode string + EstimatedCompletionTokens int + EstimatedPromptTokens int + EstimatedQuotaAfterGroup int + EstimatedQuotaBeforeGroup float64 + EstimatedTier string + ExprHash string + ExprString string + ExprVersion int + GroupRatio float64 + ModelName string + QuotaPerUnit float64 + type RequestInput struct + Body []byte + Headers map[string]string + type TieredResult struct + ActualQuotaAfterGroup int + ActualQuotaBeforeGroup float64 + CrossedTier bool + MatchedTier string + func ComputeTieredQuota(snap *BillingSnapshot, params TokenParams) (TieredResult, error) + func ComputeTieredQuotaWithRequest(snap *BillingSnapshot, params TokenParams, request RequestInput) (TieredResult, error) + type TokenParams struct + AI float64 + AO float64 + C float64 + CC float64 + CC1h float64 + CR float64 + Img float64 + ImgO float64 + P float64 + type TraceResult struct + Cost float64 + MatchedTier string + func RunExpr(exprStr string, params TokenParams) (float64, TraceResult, error) + func RunExprByHash(exprStr, hash string, params TokenParams) (float64, TraceResult, error) + func RunExprByHashWithRequest(exprStr, hash string, params TokenParams, request RequestInput) (float64, TraceResult, error) + func RunExprWithRequest(exprStr string, params TokenParams, request RequestInput) (float64, TraceResult, error)