File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,16 @@ export const Model = Schema.Struct({
5353 provider : Schema . optional (
5454 Schema . Struct ( { npm : Schema . optional ( Schema . String ) , api : Schema . optional ( Schema . String ) } ) ,
5555 ) ,
56- options : Schema . optional ( Schema . Record ( Schema . String , Schema . Any ) ) ,
56+ options : Schema . optional (
57+ Schema . StructWithRest (
58+ Schema . Struct ( {
59+ preserveReasoningInContent : Schema . optional ( Schema . Boolean ) . annotate ( {
60+ description : "When true, formats reasoning history as <thinking> tags within the content instead of using reasoning_content (required for Qwen3.6 preserve_thinking)."
61+ } )
62+ } ) ,
63+ [ Schema . Record ( Schema . String , Schema . Any ) ]
64+ )
65+ ) ,
5766 headers : Schema . optional ( Schema . Record ( Schema . String , Schema . String ) ) ,
5867 variants : Schema . optional (
5968 Schema . Record (
Original file line number Diff line number Diff line change @@ -214,12 +214,11 @@ function normalizeMessages(
214214 } )
215215 }
216216
217- const isQwen = model . id . toLowerCase ( ) . includes ( "qwen" ) || model . api . id . toLowerCase ( ) . includes ( "qwen" )
218217 const preserveReasoningInContent =
219218 _options ?. preserveReasoningInContent === true ||
220219 ( model . options as any ) ?. preserveReasoningInContent === true
221220
222- if ( isQwen || preserveReasoningInContent ) {
221+ if ( preserveReasoningInContent ) {
223222 msgs = msgs . map ( ( msg ) => {
224223 if ( msg . role === "assistant" && Array . isArray ( msg . content ) ) {
225224 const reasoningParts = msg . content . filter ( ( part : any ) => part . type === "reasoning" )
You can’t perform that action at this time.
0 commit comments