SimiaCryptus/intellij-aicoder

rate limit reach error

Closed this issue · 2 comments

msbel5 commented

There might be way to cap the tokens with in the limit. there should be timer for request tokens so it should not give an error or error should be parsed;

Log Message: Error
Error Message: null
Error Type: java.lang.reflect.UndeclaredThrowableException
API Base: https://api.openai.com/v1
Token Counter: 65301

OS: Mac OS X / 13.5.2 / aarch64
Locale: TR / tr

Error Details:

java.lang.reflect.UndeclaredThrowableException
	at jdk.proxy5/jdk.proxy5.$Proxy287.buildTestFileSpecifications(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$SoftwareProjectAI$buildTestFileSpecifications$4.call(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$_processSelection_closure18.doCall(GenerateProjectAction.groovy:482)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4210)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4117)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4142)
	at org.codehaus.groovy.runtime.dgm$110.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy:481)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:35)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.run(UITools.kt:881)
	at com.github.simiacryptus.aicoder.util.UITools.run$default(UITools.kt:872)
	at com.github.simiacryptus.aicoder.actions.FileContextAction.handle$lambda$1$lambda$0(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.redoableTask$lambda$0(UITools.kt:79)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
	at com.simiacryptus.openai.HttpClientManager.runAsync(HttpClientManager.kt:175)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:122)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:107)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1$1.invoke(HttpClientManager.kt:186)
	at com.simiacryptus.openai.HttpClientManager.withTimeout(HttpClientManager.kt:143)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1.invoke(HttpClientManager.kt:185)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry(HttpClientManager.kt:55)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry$default(HttpClientManager.kt:51)
	at com.simiacryptus.openai.HttpClientManager.withReliability(HttpClientManager.kt:184)
	at com.simiacryptus.openai.HttpClientManager.withReliability$default(HttpClientManager.kt:183)
	at com.simiacryptus.openai.OpenAIClient.chat(OpenAIClient.kt:382)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient.chat(IdeaOpenAIClient.kt:39)
	at com.simiacryptus.openai.proxy.ChatProxy.complete(ChatProxy.kt:94)
	at com.simiacryptus.openai.proxy.GPTProxyBase.create$lambda$5(GPTProxyBase.kt:64)
	... 34 more
Caused by: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.simiacryptus.openai.APIClientBase.checkError(APIClientBase.kt:165)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:403)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.HttpClientManager.withPerformanceLogging(HttpClientManager.kt:193)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:382)
	at com.simiacryptus.openai.HttpClientManager.runAsync$lambda$7(HttpClientManager.kt:165)
	... 6 more

Action History:

  • Action: GenerateProjectAction
  • Chat Response: {
    "prompt_tokens" : 1133,
    "completion_tokens" : 227,
    "total_tokens" : 1360
    }
  • Chat Response: {
    "prompt_tokens" : 1471,
    "completion_tokens" : 408,
    "total_tokens" : 1879
    }
  • Chat Response: {
    "prompt_tokens" : 1308,
    "completion_tokens" : 924,
    "total_tokens" : 2232
    }
  • Chat Response: {
    "prompt_tokens" : 1414,
    "completion_tokens" : 464,
    "total_tokens" : 1878
    }
  • Chat Response: {
    "prompt_tokens" : 1411,
    "completion_tokens" : 883,
    "total_tokens" : 2294
    }
  • Chat Response: {
    "prompt_tokens" : 1408,
    "completion_tokens" : 494,
    "total_tokens" : 1902
    }
  • Chat Response: {
    "prompt_tokens" : 1412,
    "completion_tokens" : 373,
    "total_tokens" : 1785
    }
  • Chat Response: {
    "prompt_tokens" : 1414,
    "completion_tokens" : 223,
    "total_tokens" : 1637
    }
  • Chat Response: {
    "prompt_tokens" : 1416,
    "completion_tokens" : 454,
    "total_tokens" : 1870
    }
  • Chat Response: {
    "prompt_tokens" : 1399,
    "completion_tokens" : 270,
    "total_tokens" : 1669
    }
  • Chat Response: {
    "prompt_tokens" : 1413,
    "completion_tokens" : 215,
    "total_tokens" : 1628
    }
  • Chat Response: {
    "prompt_tokens" : 1450,
    "completion_tokens" : 180,
    "total_tokens" : 1630
    }
  • Action: GenerateProjectAction
  • Chat Response: {
    "prompt_tokens" : 1133,
    "completion_tokens" : 227,
    "total_tokens" : 1360
    }
  • Action: GenerateProjectAction
  • Chat Response: {
    "prompt_tokens" : 1133,
    "completion_tokens" : 211,
    "total_tokens" : 1344
    }
  • Chat Response: {
    "prompt_tokens" : 1455,
    "completion_tokens" : 362,
    "total_tokens" : 1817
    }
  • Action: GenerateProjectAction
  • Chat Response: {
    "prompt_tokens" : 1245,
    "completion_tokens" : 499,
    "total_tokens" : 1744
    }
  • Chat Response: {
    "prompt_tokens" : 1371,
    "completion_tokens" : 493,
    "total_tokens" : 1864
    }
  • Action: GenerateProjectAction
  • Chat Response: {
    "prompt_tokens" : 1348,
    "completion_tokens" : 586,
    "total_tokens" : 1934
    }
  • Chat Response: {
    "prompt_tokens" : 1133,
    "completion_tokens" : 227,
    "total_tokens" : 1360
    }
  • Chat Response: {
    "prompt_tokens" : 1471,
    "completion_tokens" : 485,
    "total_tokens" : 1956
    }
  • Chat Response: {
    "prompt_tokens" : 1385,
    "completion_tokens" : 856,
    "total_tokens" : 2241
    }
  • Chat Response: {
    "prompt_tokens" : 1492,
    "completion_tokens" : 251,
    "total_tokens" : 1743
    }
  • Chat Response: {
    "prompt_tokens" : 1483,
    "completion_tokens" : 363,
    "total_tokens" : 1846
    }
  • Chat Response: {
    "prompt_tokens" : 1500,
    "completion_tokens" : 500,
    "total_tokens" : 2000
    }
  • Chat Response: {
    "prompt_tokens" : 1494,
    "completion_tokens" : 489,
    "total_tokens" : 1983
    }
  • Chat Response: {
    "prompt_tokens" : 1479,
    "completion_tokens" : 463,
    "total_tokens" : 1942
    }
  • Chat Response: {
    "prompt_tokens" : 1485,
    "completion_tokens" : 261,
    "total_tokens" : 1746
    }
  • Chat Response: {
    "prompt_tokens" : 1498,
    "completion_tokens" : 224,
    "total_tokens" : 1722
    }
  • Chat Response: {
    "prompt_tokens" : 1495,
    "completion_tokens" : 180,
    "total_tokens" : 1675
    }

Error History:

Error running task

java.util.concurrent.ExecutionException: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
	at com.simiacryptus.openai.HttpClientManager.runAsync(HttpClientManager.kt:175)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:122)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:107)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1$1.invoke(HttpClientManager.kt:186)
	at com.simiacryptus.openai.HttpClientManager.withTimeout(HttpClientManager.kt:143)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1.invoke(HttpClientManager.kt:185)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry(HttpClientManager.kt:55)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry$default(HttpClientManager.kt:51)
	at com.simiacryptus.openai.HttpClientManager.withReliability(HttpClientManager.kt:184)
	at com.simiacryptus.openai.HttpClientManager.withReliability$default(HttpClientManager.kt:183)
	at com.simiacryptus.openai.OpenAIClient.chat(OpenAIClient.kt:382)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient.access$chat$s-2004043139(IdeaOpenAIClient.kt:18)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient$chat$1$1.invoke(IdeaOpenAIClient.kt:58)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient$chat$1$1.invoke(IdeaOpenAIClient.kt:55)
	at com.github.simiacryptus.aicoder.util.UITools$BgTask.run(UITools.kt:854)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:478)
	at com.intellij.codeWithMe.ClientId$Companion.decorateFunction$lambda$8(ClientId.kt:321)
	at com.intellij.codeWithMe.ClientId$Companion.decorateFunction$lambda$8(ClientId.kt:321)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.simiacryptus.openai.APIClientBase.checkError(APIClientBase.kt:165)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:403)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.HttpClientManager.withPerformanceLogging(HttpClientManager.kt:193)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:382)
	at com.simiacryptus.openai.HttpClientManager.runAsync$lambda$7(HttpClientManager.kt:165)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	... 1 more

Error

java.lang.reflect.UndeclaredThrowableException
	at jdk.proxy5/jdk.proxy5.$Proxy287.getProjectStatements(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$SoftwareProjectAI$getProjectStatements$0.call(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy:461)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:35)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.run(UITools.kt:881)
	at com.github.simiacryptus.aicoder.util.UITools.run$default(UITools.kt:872)
	at com.github.simiacryptus.aicoder.actions.FileContextAction.handle$lambda$1$lambda$0(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.redoableTask$lambda$0(UITools.kt:79)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
	at com.simiacryptus.openai.HttpClientManager.runAsync(HttpClientManager.kt:175)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:122)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:107)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1$1.invoke(HttpClientManager.kt:186)
	at com.simiacryptus.openai.HttpClientManager.withTimeout(HttpClientManager.kt:143)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1.invoke(HttpClientManager.kt:185)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry(HttpClientManager.kt:55)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry$default(HttpClientManager.kt:51)
	at com.simiacryptus.openai.HttpClientManager.withReliability(HttpClientManager.kt:184)
	at com.simiacryptus.openai.HttpClientManager.withReliability$default(HttpClientManager.kt:183)
	at com.simiacryptus.openai.OpenAIClient.chat(OpenAIClient.kt:382)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient.chat(IdeaOpenAIClient.kt:39)
	at com.simiacryptus.openai.proxy.ChatProxy.complete(ChatProxy.kt:94)
	at com.simiacryptus.openai.proxy.GPTProxyBase.create$lambda$5(GPTProxyBase.kt:64)
	... 16 more
Caused by: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.simiacryptus.openai.APIClientBase.checkError(APIClientBase.kt:165)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:403)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.HttpClientManager.withPerformanceLogging(HttpClientManager.kt:193)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:382)
	at com.simiacryptus.openai.HttpClientManager.runAsync$lambda$7(HttpClientManager.kt:165)
	... 6 more

Error

java.lang.reflect.UndeclaredThrowableException
	at jdk.proxy5/jdk.proxy5.$Proxy287.newProject(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$SoftwareProjectAI$newProject.call(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy:460)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:35)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.run(UITools.kt:881)
	at com.github.simiacryptus.aicoder.util.UITools.run$default(UITools.kt:872)
	at com.github.simiacryptus.aicoder.actions.FileContextAction.handle$lambda$1$lambda$0(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.redoableTask$lambda$0(UITools.kt:79)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
	at com.simiacryptus.openai.HttpClientManager.runAsync(HttpClientManager.kt:175)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:122)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:107)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1$1.invoke(HttpClientManager.kt:186)
	at com.simiacryptus.openai.HttpClientManager.withTimeout(HttpClientManager.kt:143)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1.invoke(HttpClientManager.kt:185)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry(HttpClientManager.kt:55)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry$default(HttpClientManager.kt:51)
	at com.simiacryptus.openai.HttpClientManager.withReliability(HttpClientManager.kt:184)
	at com.simiacryptus.openai.HttpClientManager.withReliability$default(HttpClientManager.kt:183)
	at com.simiacryptus.openai.OpenAIClient.chat(OpenAIClient.kt:382)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient.chat(IdeaOpenAIClient.kt:39)
	at com.simiacryptus.openai.proxy.ChatProxy.complete(ChatProxy.kt:94)
	at com.simiacryptus.openai.proxy.GPTProxyBase.create$lambda$5(GPTProxyBase.kt:64)
	... 16 more
Caused by: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.simiacryptus.openai.APIClientBase.checkError(APIClientBase.kt:165)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:403)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.HttpClientManager.withPerformanceLogging(HttpClientManager.kt:193)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:382)
	at com.simiacryptus.openai.HttpClientManager.runAsync$lambda$7(HttpClientManager.kt:165)
	... 6 more

Error

java.lang.reflect.UndeclaredThrowableException
	at jdk.proxy5/jdk.proxy5.$Proxy287.buildComponentFileSpecifications(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$SoftwareProjectAI$buildComponentFileSpecifications$2.call(Unknown Source)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction$_processSelection_closure16.doCall(GenerateProjectAction.groovy:465)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at groovy.lang.Closure.call(Closure.java:412)
	at groovy.lang.Closure.call(Closure.java:428)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4210)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4117)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.collectEntries(DefaultGroovyMethods.java:4142)
	at org.codehaus.groovy.runtime.dgm$110.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy:464)
	at com.github.simiacryptus.aicoder.actions.code.GenerateProjectAction.processSelection(GenerateProjectAction.groovy)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:35)
	at com.github.simiacryptus.aicoder.actions.FileContextAction$handle$1$1$1.invoke(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.run(UITools.kt:881)
	at com.github.simiacryptus.aicoder.util.UITools.run$default(UITools.kt:872)
	at com.github.simiacryptus.aicoder.actions.FileContextAction.handle$lambda$1$lambda$0(FileContextAction.kt:33)
	at com.github.simiacryptus.aicoder.util.UITools.redoableTask$lambda$0(UITools.kt:79)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
	at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:91)
	at com.simiacryptus.openai.HttpClientManager.runAsync(HttpClientManager.kt:175)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:122)
	at com.simiacryptus.openai.HttpClientManager.withCancellationMonitor(HttpClientManager.kt:107)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1$1.invoke(HttpClientManager.kt:186)
	at com.simiacryptus.openai.HttpClientManager.withTimeout(HttpClientManager.kt:143)
	at com.simiacryptus.openai.HttpClientManager$withReliability$1.invoke(HttpClientManager.kt:185)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry(HttpClientManager.kt:55)
	at com.simiacryptus.openai.HttpClientManager.withExpBackoffRetry$default(HttpClientManager.kt:51)
	at com.simiacryptus.openai.HttpClientManager.withReliability(HttpClientManager.kt:184)
	at com.simiacryptus.openai.HttpClientManager.withReliability$default(HttpClientManager.kt:183)
	at com.simiacryptus.openai.OpenAIClient.chat(OpenAIClient.kt:382)
	at com.github.simiacryptus.aicoder.util.IdeaOpenAIClient.chat(IdeaOpenAIClient.kt:39)
	at com.simiacryptus.openai.proxy.ChatProxy.complete(ChatProxy.kt:94)
	at com.simiacryptus.openai.proxy.GPTProxyBase.create$lambda$5(GPTProxyBase.kt:64)
	... 34 more
Caused by: java.io.IOException: Rate limit reached for 10KTPM-200RPM in organization org-RNNpV92K7N1JRnQ4Oe5Nn8qi on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
	at com.simiacryptus.openai.APIClientBase.checkError(APIClientBase.kt:165)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:403)
	at com.simiacryptus.openai.OpenAIClient$chat$1$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.HttpClientManager.withPerformanceLogging(HttpClientManager.kt:193)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:383)
	at com.simiacryptus.openai.OpenAIClient$chat$1.invoke(OpenAIClient.kt:382)
	at com.simiacryptus.openai.HttpClientManager.runAsync$lambda$7(HttpClientManager.kt:165)
	... 6 more

msbel5 commented

Maybe there should be way get around this hick up, if system get this error it could wait told amount of time before retrying request and user should be prompted about wait time like how much left? also maybe you can implement a window shows the flow of the generate project command. Also there should be way to stop process and continue later this way if queries ran into error user can pause it for time being and continue later so all the things have done before not go to waste.

This should be fixed in the next release