feat: improve model price error UX with role-aware messages and cleaner UI
- Backend: differentiate error messages for admin vs regular users in price.go - Backend: include error_code in channel test response for structured error handling - Frontend: render model_price_error as a styled card in Playground with admin nav button - Frontend: show inline error details and settings link in channel test modal - Frontend: parse error codes from both SSE and non-streaming API responses - i18n: remove redundant "Settings" suffix from setting tab translations (en/fr/ru/ja/vi) - i18n: update "Group & Model Pricing" translations across all locales
This commit is contained in:
@@ -143,7 +143,7 @@ func ResponsesHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *
|
||||
if err != nil {
|
||||
info.OriginModelName = originModelName
|
||||
info.PriceData = originPriceData
|
||||
return types.NewError(err, types.ErrorCodeModelPriceError, types.ErrOptionWithSkipRetry())
|
||||
return types.NewError(err, types.ErrorCodeModelPriceError, types.ErrOptionWithSkipRetry(), types.ErrOptionWithStatusCode(http.StatusBadRequest))
|
||||
}
|
||||
service.PostTextConsumeQuota(c, info, usageDto, nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user