<think> block delimiters are not detected correctly
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with src/main/kotlin/ee/carlrobert/codegpt/util/ThinkingOutputParser.kt and src/main/kotlin/ee/carlrobert/codegpt/toolwindow/chat/parser/CompleteMessageParser.kt, where the newline requirement is enforced. Run the existing parser tests, then adjust the delimiter handling so a <think> block can end with `` followed by a single newline. Done means reasoning and answer content are parsed correctly regardless of one or two trailing newlines.
Written by the indexing model from the issue text.
Description
What happened?
I am running Codestral locally (LM Studio -> Custom OpenAI config.)
There is an issue with ProxyAI not properly detecting the end of a <think>-block.
Inspecting the model's output, it properly does <think>{reasoning}</think>{answer}.
A little scouring through the code revealed the culprit:
The parsing expects (at least) 2 newlines after a </think>-tag. The model outputs a single newline after the think block. I have tried to instruct the model to output 2 newlines, but it sometimes will and sometimes won't, which makes this flaky.
I don´t know the reasoning (by the developer) behind this specific, but I think it should not assert 2 newlines, just look for <think>, and then </think>.
Neither the commit message, nor the issue linked to that commit state anything about this formatting.
The places that I found:
ThinkingOutputParser.kt#L7
CompleteMessageParser.kt#L17
Relevant log output or stack trace
Steps to reproduce
- Run Codestral 22B v0.1 in LM Studio.
- Register LM Studio as a Custom OpenAi-Like config
- Use the Default Persona.
- Try to generate something that requires reasoning.
CodeGPT version
3.4.3-241.1
Operating System
Linux
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from carlrobertoh/ProxyAI
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
carlrobertoh/ProxyAI#1250 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
carlrobertoh/ProxyAI#1233 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
carlrobertoh/ProxyAI#1203 · 1 reaction ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
carlrobertoh/ProxyAI#1160 · 2 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
carlrobertoh/ProxyAI#1062 ·
All issues in carlrobertoh/ProxyAI
Similar issues
-
Location search keeps showing stale "Open-Meteo can't find ..." message after clearing search queryOpenBug Needs review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
breezy-weather/breezy-weather#3082 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
wangzan101/Mika#1033 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
commons-app/apps-android-commons#7486 ·
Maintainers usually reply within 1 day
-
area: ci area: local-media area: startup area: ui platform: bilibili platform: netease platform: youtube status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cwuom/NeriPlayer#794 ·
Maintainers usually reply within 1 day
-
area:android area:ui bug priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
meraxes89/streamify-apk#449 ·
Maintainers usually reply within 1 day