Skip to content

fix(memory): route Qwen thinking through chat template kwargs - #312

Open
LeslieWylie wants to merge 1 commit into
MemTensor:mainfrom
LeslieWylie:codex/qwen-chat-template-thinking
Open

fix(memory): route Qwen thinking through chat template kwargs#312
LeslieWylie wants to merge 1 commit into
MemTensor:mainfrom
LeslieWylie:codex/qwen-chat-template-thinking

Conversation

@LeslieWylie

Copy link
Copy Markdown

Summary

  • route Qwen enable_thinking through chat_template_kwargs when an OpenAI-compatible endpoint opts into that transport
  • preserve other endpoint-specific chat-template kwargs
  • retain existing top-level behavior for DashScope and other endpoints

Validation

  • npx vitest run Memory/tests/llm-thinking.test.ts (19 tests passed)
  • live SGLang replay verified top-level enable_thinking=false was ignored while chat_template_kwargs.enable_thinking=false produced zero reasoning tokens and valid JSON

@Wang-Daoji

Copy link
Copy Markdown
Collaborator

Thanks for working on this! I suggest adding chat_template_kwargs later as part of dedicated SGLang/vLLM providers. Adding it to the generic OpenAI-compatible path now could affect existing cloud-provider calls and introduce unnecessary risk.

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