| 14 | } |
| 15 | |
| 16 | function planHintForUrl(url?: string): string { |
| 17 | if (!url) return ''; |
| 18 | if (url.includes('/t2a')) return '\n\nSpeech models require the Plus plan or above.'; |
| 19 | if (url.includes('/image_generation')) return '\n\nimage-01 requires the Plus plan or above.'; |
| 20 | if (url.includes('/video_generation') || url.includes('/query/video_generation')) |
| 21 | return '\n\nVideo models (Hailuo-2.3 / 2.3-Fast) require the Max plan or above.'; |
| 22 | if (url.includes('/music_generation')) return '\n\nMusic-2.6 requires the Max plan or above.'; |
| 23 | return ''; |
| 24 | } |
| 25 | |
| 26 | function upgradeUrl(url?: string): string { |
| 27 | const host = url?.includes('minimaxi.com') ? 'https://platform.minimaxi.com' : 'https://platform.minimax.io'; |