Proposal: auto-suppress THINKING for structured-output (format=) requests

オープン
#1,598 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python

調査の方向性

Read the related issues #1553, #406, and #1587 to understand the parser failure and existing thinking-option behavior. The proposal names generate_from_raw, act, and @generative as entry points, but does not identify files or tests. First get maintainer sign-off on the default-behavior change; done means structured-output requests default thinking off unless explicitly overridden, with coverage for the affected entry points.

索引モデルが issue の本文から書いたものです。

説明

area/backends enhancement needs-design p2

Problem

#1553 documents that structured-output examples using @generative stubs / format= are unreliable on thinking models unless the caller explicitly sets ModelOption.THINKING: False — the output parser otherwise receives the combined think-block-plus-answer text.

#1587 (Granite 4.2 defaults) independently confirmed the underlying mechanism: granite4.2 thinks by default unless reasoning_effort="none" / chat_template_kwargs.enable_thinking=False is sent, and produces a disproportionately long think block even for trivial prompts (observed: a 64-token capped reply was ~45 thinking tokens with thinking on, 2 with it off).

Proposal

When a caller passes format=SomeModel (or otherwise requests constrained/structured output) to generate_from_raw / act / a @generative stub, and the caller has not explicitly set ModelOption.THINKING, default it to False. This fixes the "parser receives combined think+answer text" failure mode structurally, instead of requiring every caller to remember to set the option themselves.

This is a default-behavior change (an explicit ModelOption.THINKING: True would still opt back in), so it needs maintainer sign-off on the direction before implementation — filing as a proposal to discuss, not a ready-to-merge PR.

Related

  • #1553 — states the problem, requests test coverage for ModelOption.THINKING on OllamaModelBackend
  • #406 — cross-backend thinking abstraction (this would be one concrete policy built on top of it)
  • #1587 — Ollama-specific THINKING → reasoning_effort mapping this proposal would build on
主要言語
Python
スター
1.8k
フォーク
161
平均マージ
4日 3時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

generative-computing/mellea のほかの issue

generative-computing/mellea の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。