File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const __dirname = dirname(__filename)
66
77export const aiConfig = {
88 // Model configuration
9- model : 'gpt-4.1-nano ' ,
9+ model : 'gpt-4o-mini ' ,
1010 temperature : 0.7 ,
1111 maxTokens : 1500 ,
1212
Original file line number Diff line number Diff line change 11export const aiConfig = {
22 // Model configuration
3- model : 'gpt-4.1-nano ' ,
3+ model : 'gpt-4o-mini ' ,
44 temperature : 0.7 ,
55 maxTokens : 1500 ,
66
Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ export class AIModel {
8686 return result . text
8787 } catch ( error ) {
8888 console . error ( 'AI Model Error:' , error )
89+
90+ // Check if it's a rate limit error
91+ if ( error . message ?. includes ( 'Rate limit' ) || error . statusCode === 429 ) {
92+ throw new Error ( 'Rate limit exceeded. Please try again in a moment.' )
93+ }
94+
8995 throw new Error ( `AI model request failed: ${ error . message } ` )
9096 }
9197 }
You can’t perform that action at this time.
0 commit comments