Skip to content

fix: avoid disabling reasoning for reasoning-capable summarizers#371

Merged
jalehman merged 1 commit into
Martian-Engineering:mainfrom
holgergruenhagen:fix/lcm-reasoning-defaults
Apr 10, 2026
Merged

fix: avoid disabling reasoning for reasoning-capable summarizers#371
jalehman merged 1 commit into
Martian-Engineering:mainfrom
holgergruenhagen:fix/lcm-reasoning-defaults

Conversation

@holgergruenhagen

Copy link
Copy Markdown
Contributor

Summary

Hi! This PR fixes an LCM summarizer edge case for reasoning-capable models.

If the initial summarizer request omits a reasoning setting, some provider compatibility layers can normalize that into a reasoning-disabled request. Some models do not support turning reasoning off, so the first request fails and only the retry succeeds.

I first noticed this with openrouter/minimax/minimax-m2.7, but the issue is more general than one specific model.

What changed

  • add a small reasoningIfSupported option to the completion bridge
  • keep explicit reasoning values unchanged and give them priority
  • apply the fallback only when the resolved model advertises reasoning support
  • update the LCM summarizer to send reasoningIfSupported: "low" on the initial request
  • keep the existing explicit retry behavior unchanged
  • add focused tests and a patch changeset

Why this approach

This keeps the fix narrow and model-aware.

It avoids a model-specific special case, preserves explicit caller intent, and does not force reasoning on models that do not support it.

Testing

  • npx vitest run test/index-complete-model-auth.test.ts test/summarize.test.ts test/lcm-summarizer-reasoning.test.ts

Thanks very much for taking a look.

@jalehman jalehman self-assigned this Apr 10, 2026
@jalehman jalehman merged commit 597ec70 into Martian-Engineering:main Apr 10, 2026
1 check passed
@jalehman

Copy link
Copy Markdown
Contributor

Thank yoU!

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.

2 participants