carlrobertoh / CodeGPT

The leading open-source AI copilot for JetBrains. Connect to any model in any environment, and customize your coding experience in any way you like.
https://codegpt.ee
Apache License 2.0
1.09k stars 230 forks source link

Unknown API response. Code: 403, Body: detail #603

Open gelougajaed opened 4 months ago

gelougajaed commented 4 months ago

What happened?

Hello, I'm using Intellij IDEA U 2024.1.4 on a PC. Our development team is installing Continue / CodeGPT to help us generate Unit tests and analyse security issues on our code. Several teamates have no worry installing the plugins, but for me I have an issue. We are using an internal custom service.

By the way when I try to go to the Custom OpenAI settings the window stay in "Loading"...

image

2024-07-02 08:13:10,277 [2218644] SEVERE - #c.i.o.a.i.FlushQueue - IntelliJ IDEA 2024.1.4 Build #IU-241.18034.62 2024-07-02 08:13:10,277 [2218644] SEVERE - #c.i.o.a.i.FlushQueue - JDK: 17.0.11; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 2024-07-02 08:13:10,277 [2218644] SEVERE - #c.i.o.a.i.FlushQueue - OS: Windows 11 2024-07-02 08:13:10,278 [2218645] SEVERE - #c.i.o.a.i.FlushQueue - Plugin to blame: CodeGPT version: 2.8.2-241.1 2024-07-02 08:13:10,279 [2218646] SEVERE - #c.i.o.a.i.FlushQueue - Last Action: ShowSettings 2024-07-02 08:13:11,177 [2219544] SEVERE - #c.i.u.c.QueueProcessor - class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') at ee.carlrobert.codegpt.settings.service.custom.CustomServiceFormTabbedPane.lambda$getHeaders$1(CustomServiceFormTabbedPane.java:47) at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180) at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1850) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at ee.carlrobert.codegpt.settings.service.custom.CustomServiceFormTabbedPane.getHeaders(CustomServiceFormTabbedPane.java:47) at ee.carlrobert.codegpt.settings.service.custom.form.CustomServiceChatCompletionForm.getHeaders(CustomServiceChatCompletionForm.kt:43) at ee.carlrobert.codegpt.settings.service.custom.form.CustomServiceForm.isModified(CustomServiceForm.kt:102) at ee.carlrobert.codegpt.settings.service.custom.CustomServiceConfigurable.isModified(CustomServiceConfigurable.kt:27) at com.intellij.openapi.options.ex.ConfigurableWrapper.isModified(ConfigurableWrapper.java:186) at com.intellij.openapi.options.newEditor.SettingsEditor.checkModifiedInternal(SettingsEditor.java:522) at com.intellij.openapi.options.newEditor.SettingsEditor.checkModifiedForItem(SettingsEditor.java:516) at com.intellij.openapi.options.newEditor.SettingsEditor.checkModified(SettingsEditor.java:504) at com.intellij.openapi.options.newEditor.SettingsEditor$5.updateCurrent(SettingsEditor.java:229) at com.intellij.openapi.options.newEditor.ConfigurableEditor.updateIfCurrent(ConfigurableEditor.java:238) at com.intellij.openapi.options.newEditor.ConfigurableEditor$4.run(ConfigurableEditor.java:195) at com.intellij.util.ui.update.ContextAwareUpdate.run$lambda$1$lambda$0(ContextAwareUpdate.kt:49) at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81) at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81) at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86) at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81) at com.intellij.util.ui.update.ContextAwareUpdate.run(ContextAwareUpdate.kt:48) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:354) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:344) at com.intellij.util.ui.update.MergingUpdateQueue.doFlush(MergingUpdateQueue.java:301) at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:280) at com.intellij.util.ui.EdtInvocationManager.invokeAndWaitIfNeeded(EdtInvocationManager.java:79) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:280) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:250) at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81) at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81) at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86) at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81) at com.intellij.util.Alarm$Request.lambda$runSafely$0(Alarm.java:369) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:253) at com.intellij.util.Alarm$Request.runSafely(Alarm.java:369) at com.intellij.util.Alarm$Request.run(Alarm.java:356) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:204) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:419) at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138) at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129) at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1152) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:81) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:123) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:699) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:593) at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:105) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:77) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:362) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:361) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:361) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:356) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1022) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1022) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:356) at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:204) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:398) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121) at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191) at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236) at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234) at java.desktop/java.awt.Dialog.lambda$show$2(Dialog.java:1081) at java.desktop/sun.awt.SunToolkit.performOnMainThreadIfNeeded(SunToolkit.java:2170) at java.desktop/java.awt.Dialog.show(Dialog.java:1041) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:898) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:474) at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1754) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1703) at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.kt:104) at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:61) at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:48) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:304) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks$lambda$4(ActionUtil.kt:275) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1166) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.kt:274) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction$lambda$5(ActionMenuItem.kt:269) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:227) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.kt:260) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.init$lambda$0(ActionMenuItem.kt:71) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed$lambda$4(ActionMenuItem.kt:102) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.kt:101) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:525) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385) at java.desktop/java.awt.Component.processEvent(Component.java:6422) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4969) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4583) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4524) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2809) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:699) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:638) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:584) at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138) at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:584) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:77) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:362) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:361) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:361) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:356) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1022) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1022) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:356) at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:209) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:398) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) 2024-07-02 08:13:11,181 [2219548] SEVERE - #c.i.u.c.QueueProcessor - IntelliJ IDEA 2024.1.4 Build #IU-241.18034.62 2024-07-02 08:13:11,182 [2219549] SEVERE - #c.i.u.c.QueueProcessor - JDK: 17.0.11; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 2024-07-02 08:13:11,183 [2219550] SEVERE - #c.i.u.c.QueueProcessor - OS: Windows 11 2024-07-02 08:13:11,184 [2219551] SEVERE - #c.i.u.c.QueueProcessor - Plugin to blame: CodeGPT version: 2.8.2-241.1 2024-07-02 08:13:11,184 [2219551] SEVERE - #c.i.u.c.QueueProcessor - Last Action: ShowSettings

When I try to analyse the code, CodeGPT return the error : Unknown API response. Code: 403, Body: detail

image

I can see this message on the idea.log : 2024-07-01 09:28:13,105 [ 135370] SEVERE - #ee.carlrobert.codegpt.toolwindow.chat.ToolWindowCompletionResponseEventListener - Unknown API response. Code: 403, Body: detail com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'detail': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 7] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2567) at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2593) at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2601) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:765) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:3018) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2052) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:780) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4992) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4898) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3848) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3816) at ee.carlrobert.llm.client.openai.completion.OpenAIChatCompletionEventSourceListener.getErrorDetails(OpenAIChatCompletionEventSourceListener.java:47) at ee.carlrobert.llm.completion.CompletionEventSourceListener.onFailure(CompletionEventSourceListener.java:110) at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:52) at okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.kt:46) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) 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:840)

I've try to uninstall the plugins and retry from the begining but still the same problem. Do you have an idea?

Relevant log output or stack trace

2024-07-01 09:28:13,105 [ 135370] SEVERE - #ee.carlrobert.codegpt.toolwindow.chat.ToolWindowCompletionResponseEventListener - Unknown API response. Code: 403, Body: detail
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'detail': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 7]
    at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2567)
    at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2593)
    at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2601)
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:765)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:3018)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2052)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:780)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4992)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4898)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3848)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3816)
    at ee.carlrobert.llm.client.openai.completion.OpenAIChatCompletionEventSourceListener.getErrorDetails(OpenAIChatCompletionEventSourceListener.java:47)
    at ee.carlrobert.llm.completion.CompletionEventSourceListener.onFailure(CompletionEventSourceListener.java:110)
    at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:52)
    at okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.kt:46)
    at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
    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:840)

Steps to reproduce

No response

CodeGPT version

2.8.2-241.1

Operating System

Windows

carlrobertoh commented 4 months ago

There seems to be some kind of mix-up with your configuration. Please follow these instructions: https://github.com/carlrobertoh/CodeGPT/issues/484#issuecomment-2069233378.

I will try to handle the error better in upcoming releases.

gelougajaed commented 4 months ago

Hello @carlrobertoh , thanks for you response. Indeed it solves the first problem.

After that I still have the Unknown API response. Code: 403, Body: detail when I try something in CodeGPT :

image

2024-07-02 11:27:45,758 [ 67418] SEVERE - #ee.carlrobert.codegpt.toolwindow.chat.ToolWindowCompletionResponseEventListener - Unknown API response. Code: 403, Body: detail com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'detail': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 7] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2567) at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2593) at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2601) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:765) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:3018) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2052) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:780) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4992) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4898) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3848) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3816) at ee.carlrobert.llm.client.openai.completion.OpenAIChatCompletionEventSourceListener.getErrorDetails(OpenAIChatCompletionEventSourceListener.java:47) at ee.carlrobert.llm.completion.CompletionEventSourceListener.onFailure(CompletionEventSourceListener.java:110) at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:52) at okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.kt:46) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) 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:840)

carlrobertoh commented 4 months ago

It looks like CodeGPT cannot deserialize the response. Please make sure that the completion is streamable - "stream": true.

carlrobertoh commented 4 months ago

Ahh, I missed the 403. Are your request headers set correctly? It seems that the credential isn't passed along correctly.

gelougajaed commented 4 months ago

`

`

This is my configuration...

gelougajaed commented 4 months ago

@carlrobertoh : is there an other way to verify that the credential is correctly passed along?

carlrobertoh commented 4 months ago

Hmm, I can't find anything abnormal in your configuration settings.

@carlrobertoh : is there an other way to verify that the credential is correctly passed along?

Unfortunately, at the moment, we don't log the requests or responses. I suggest you try making a cURL request with the same parameters that you use in the Custom OpenAI provider, and see if anything changes.

gelougajaed commented 4 months ago

Thanks @carlrobertoh for your response I'll try this and keep in touch.