Skip to content

fix(reasoning): if reasoning has ever been enabled loop back in#249

Open
taciturnaxolotl wants to merge 1 commit into
mainfrom
loop-reasoning-back-in
Open

fix(reasoning): if reasoning has ever been enabled loop back in#249
taciturnaxolotl wants to merge 1 commit into
mainfrom
loop-reasoning-back-in

Conversation

@taciturnaxolotl

@taciturnaxolotl taciturnaxolotl commented May 21, 2026

Copy link
Copy Markdown
Member

should fix charmbracelet/crush#2696; when reasoning is enabled on deepseek or kimi in their openai compat modes if it is then disabled but was ever enabled in the first place, they require reasoning content on all tool calls and messages

Fixes CHARM-1395

@andreynering andreynering left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to test this in Crush with many provider to ensure this doesn't break anything.

If we know which specific providers need this, we can also add a flag here and enable for these specifically.

Comment thread providers/openaicompat/language_model_hooks.go Outdated
@taciturnaxolotl taciturnaxolotl force-pushed the loop-reasoning-back-in branch 2 times, most recently from 9ee4f8a to 32190f2 Compare May 27, 2026 16:32
@taciturnaxolotl

Copy link
Copy Markdown
Member Author

currently it just happens with kimi and deepseek on their openai compat apis

@taciturnaxolotl

Copy link
Copy Markdown
Member Author

i'm not sure the cleanest way to gate this to a provider doing it inline feels like a bad approach and making it another option also kind of feels like a bad approach

@taciturnaxolotl taciturnaxolotl force-pushed the loop-reasoning-back-in branch 2 times, most recently from 18cd420 to 61b0d0a Compare May 27, 2026 16:49
@taciturnaxolotl

Copy link
Copy Markdown
Member Author

what makes this especially complicated is that this wasn't using a catwalk provider but rather a user openai-compat provider which makes the provider id non deterministic

@taciturnaxolotl taciturnaxolotl force-pushed the loop-reasoning-back-in branch from 61b0d0a to 985af22 Compare May 27, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 400 Bad Request with deepseek-v4-pro on tool calls: missing reasoning_content

2 participants