koog icon indicating copy to clipboard operation
koog copied to clipboard

An error "Field 'object' is required" occurs when using BigModel's glm-4.5v.

Open adamglin0 opened this issue 2 months ago • 3 comments

The detailed error log is

[DefaultDispatcher-worker-5] ERROR ai.koog.agents.core.agent.GraphAIAgent - [agent id: 95b9488b-7dc8-45bf-9ad7-43883f4084c4, run id: 091babe4-825a-46c3-8e0c-66a8bdaac7ea] Reporting problem: Error from OpenAILLMClient API: 200 OK: Field 'object' is required for type with serial name 'ai.koog.prompt.executor.clients.openai.models.OpenAIChatCompletionStreamResponse', but it was missing at path: $
java.lang.IllegalStateException: Error from OpenAILLMClient API: 200 OK: Field 'object' is required for type with serial name 'ai.koog.prompt.executor.clients.openai.models.OpenAIChatCompletionStreamResponse', but it was missing at path: $
	at ai.koog.http.client.ktor.KtorKoogHttpClient$sse$1.invokeSuspend(KtorKoogHttpClient.kt:143)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
[DefaultDispatcher-worker-5] ERROR ai.koog.agents.core.agent.GraphAIAgent - Execution exception reported by server!
java.lang.IllegalStateException: Error from OpenAILLMClient API: 200 OK: Field 'object' is required for type with serial name 'ai.koog.prompt.executor.clients.openai.models.OpenAIChatCompletionStreamResponse', but it was missing at path: $
	at ai.koog.http.client.ktor.KtorKoogHttpClient$sse$1.invokeSuspend(KtorKoogHttpClient.kt:143)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)

adamglin0 avatar Oct 24 '25 01:10 adamglin0

Related #749 #750

adamglin0 avatar Oct 24 '25 01:10 adamglin0

Also happens for OpenAIChatCompletionResponse: Caused by: kotlinx.serialization.MissingFieldException: Field 'object' is required for type with serial name 'ai.koog.prompt.executor.clients.openai.models.OpenAIChatCompletionResponse', but it was missing

Will close #749 as a duplicate of this issue for now.

aozherelyeva avatar Nov 12 '25 11:11 aozherelyeva

Hi @adamglin0, thanks for the report! Please feel free to track the progress of this issue in our YouTrack: KG-540 An error "Field 'object' is required" occurs when using BigModel's glm-4.5v

aozherelyeva avatar Nov 12 '25 11:11 aozherelyeva