Agent mode fails since version 3.7.5-241.1

Open
#1,201 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
json, kotlin
Domain
api, desktop-dev

Research direction

Start by reproducing agent mode with an OpenAI-compatible endpoint on versions 3.7.5-241.1 and 3.7.4-241.1, using the JSON decoding stack trace in kotlinx.serialization.json to locate the response parsing path. Compare the compatible endpoint response handling between those versions and identify where the decoder receives a non-object JSON token. Done means agent mode starts successfully with the compatible endpoint and the malformed-response case is covered by a regression test.

Written by the indexing model from the issue text.

Description

bug
What happened?

Agent mode fails to start with openai compatible endpoint

Relevant log output or stack trace
kotlinx.serialization.json, internal.JsonDecodingException:
Unexpected JSON token at offset 0: Expected start of the object '{'
, but had 'd' instead at path: $
JSON input data
{"id": "chatcmpl-66de20....
at
kotlinx. serialization, json. internal.JsonExceptionskt.JsonDecodin
gException(JsonExceptions.kt:24)
at
kotlinx.serialization.json. internal.JsonExceptionskt.JsonDecodin
gException(JsonExceptions.kt:32)
at
kotlinx.serialization.json.internal. AbstractJsonLexer.fail(AbstractJsonLexer.kt: 588)
at
kotlinx.serialization. json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt: 586)
at kotlinx.serialization.json.inter
nal.AbstractJsonLexer, unexpected
Token (AbstractJsonLexer.kt:790)
at kotlinx,serialization.json.internal,StringJsonLexer.consumeNextToken (StringJsonLexer.kt: 74)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:102)
Steps to reproduce

Type any prompt in agent mode wth openai compatible model endpoint. Broke with 3.7.5-241.1 march release. 3.7.4-241.1 is fine

CodeGPT version

3.7.5-241

Operating System

Windows

Dominant language
Kotlin
Stars
1.9k
Forks
401
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from carlrobertoh/ProxyAI

All issues in carlrobertoh/ProxyAI

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.