File tree Expand file tree Collapse file tree
packages/console/app/src/routes/zen/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export async function handler(
132132 retry ,
133133 stickyProvider ,
134134 )
135- validateModelSettings ( authInfo )
135+ validateModelSettings ( billingSource , authInfo )
136136 updateProviderKey ( authInfo , providerInfo )
137137 logger . metric ( { provider : providerInfo . id } )
138138
@@ -768,9 +768,10 @@ export async function handler(
768768 return "balance"
769769 }
770770
771- function validateModelSettings ( authInfo : AuthInfo ) {
772- if ( ! authInfo ) return
773- if ( authInfo . isDisabled ) throw new ModelError ( t ( "zen.api.error.modelDisabled" ) )
771+ function validateModelSettings ( billingSource : BillingSource , authInfo : AuthInfo ) {
772+ if ( billingSource === "lite" ) return
773+ if ( billingSource === "anonymous" ) return
774+ if ( authInfo ! . isDisabled ) throw new ModelError ( t ( "zen.api.error.modelDisabled" ) )
774775 }
775776
776777 function updateProviderKey ( authInfo : AuthInfo , providerInfo : ProviderInfo ) {
You can’t perform that action at this time.
0 commit comments