Skip to content

[Bug] Base Parser should strip trailing / leading whitespace #437

@leonardmq

Description

@leonardmq

Describe the bug
Some reasoning models work without R1 parser, but there is awkward whitespace around either the reasoning / parts of the reasoning, or the output / parts of the output. When using the R1 parser, that whitespace goes away, probably because we do strip the strings in the R1 parser.

Solution likely to be to add stripping for reasoning / output in the base parser, instead of returning the object unchanged in the base parser.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Image

System Information:

  • OS: MacOS Sequoia 15.5
  • Browser: Chrome
  • Kiln app Version: main branch (currently adding new models there)

Additional context
Happened with a few models from siliconflow.cn - such as tencent/Hunyuan-A13B-Instruct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions