I was very excited to see that in 0.6.3, Koog intr...
# koog-agentic-framework
r
I was very excited to see that in 0.6.3, Koog introduces Reasoning frames for streaming, as this is something we would really like in our product. BUT, testing this functionality (using
prompt("test-agent", params = OpenAIResponsesParams()) {
), it gives me challenges when using streaming + tool calls. I can reproduce this with the provided example, but then using Response API. Below is the error and some debugging validation.
Copy code
ai.koog.http.client.KoogHttpClientException: Error from client: OpenAILLMClient
Message: Expected status code 200 but was 400
Status code: 400

  at ai.koog.http.client.ktor.KtorKoogHttpClient$sse$1.invokeSuspend(KtorKoogHttpClient.kt:170)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith$$$capture(ContinuationImpl.kt:34)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt)
  at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
  at kotlinx.coroutines.debug.internal.DebugProbesImpl$CoroutineOwner.<init>(DebugProbesImpl.kt:531)
  at kotlinx.coroutines.debug.internal.DebugProbesImpl.createOwner(DebugProbesImpl.kt:510)
  at kotlinx.coroutines.debug.internal.DebugProbesImpl.probeCoroutineCreated$kotlinx_coroutines_core(DebugProbesImpl.kt:497)
  at kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineCreated(DebugProbes.kt:7)
  at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt.createCoroutineUnintercepted(IntrinsicsJvm.kt:161)
  at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
  at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:358)
  at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:134)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
  at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
  at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
Caused by: io.ktor.client.plugins.sse.SSEClientException: Expected status code 200 but was 400
  at io.ktor.client.plugins.sse.SSEKt.checkResponse(SSE.kt:195)
  at io.ktor.client.plugins.sse.SSEKt$SSE$2$2.invokeSuspend(SSE.kt:123)
  at io.ktor.client.plugins.sse.SSEKt$SSE$2$2.invoke(SSE.kt)
Caused by: io.ktor.client.plugins.sse.SSEClientException: Expected status code 200 but was 400
Looking at: io/ktor/client/plugins/sse/SSE.kt:185 >> response.rawContent.readRemaining().readText() Result:
Copy code
{
  "error": {
    "message": "Invalid 'input[2].id': 'eddcd62d-c758-46ff-a47a-8184f6437993'. Expected an ID that begins with 'rs'.",
    "type": "invalid_request_error",
    "param": "input[2].id",
    "code": "invalid_value"
  }
}
👀 1
🚀 1
Please let me know if there's anything you need for me to reproduce it
v
Apologies for the delay, our team is preparing a major release at the moment (launching today/tomorrow). We'll come back later on after the release is done. I suppose @Maria Tigina was already looking at the problem
r
Thanks @Vadim Briliantov - let me knowing you need anything from my end
👌 1
m
Hey! I tried to reproduce it on 0.7.2 using the example you mentioned, but I have not succeed to get en exception. What input did you give it? I've changed the example to use the responses api here https://github.com/JetBrains/koog/compare/tigina/fix-reasoning-with-tools
r
Thanks @Maria Tigina I'm now having troubles getting reasoning to work at all. Do you have a code snipit and prompts that would trigger a reasoning delta? That would be helpful
m
Hey! I've reproduced the bug you reported on gpt-5 model, will fix it asap Thank you and sorry for waiting
r
💯
@Maria Tigina - any way I can follow progress on this?
m
HI! I've just finished fixing https://github.com/JetBrains/koog/pull/1779 There was a set of small bugs and todos which resulted in the error you got, will be in the nightly release after the review
r
Appreciate that!