Repository navigation
Description
Sub-issue of #909. Design discussed in #1197 Area 4.
Summary
_thinking is documented as private (single underscore) but referenced publicly in docs/docs/integrations/openai.md:
If you intend to use thinking mode, read the reasoning trace from
result._thinkingrather thanresult.value.
Promote to mot.thinking; keep _thinking as a deprecated alias for one minor release.
Design
- Rename the attribute to
mot.thinking(no leading underscore). - Add a
_thinkingproperty that returnsself.thinkingand emitsDeprecationWarningon read. - Backends keep populating through the public name.
- Update
docs/docs/integrations/openai.mdto referenceresult.thinkingin the same PR.
Considered alternatives (rejected)
mot.generation.thinking— matches the "execution metadata" flavor ofusageandfinish_reasons. Rejected: reasoning is content the model produced, semantically closer tovaluethan tousage; longer dotted path for content most users want directly.mot.reasoning.*namespace — would give room for future structured reasoning data. Rejected as speculative: reasoning is currently a flat string across all backends.mot.thinkingdoesn't preclude introducingmot.reasoning.*later.
Deprecation horizon
One minor cycle, then remove (OQ3 resolution). Pre-1.0 + the only published reference is in our own docs (updated in this PR). One minor with DeprecationWarning is sufficient.
Related: #1201
Promoting mot.thinking to public is only half the story — Message has no thinking field and chat.py:_parse ignores _thinking entirely, so reasoning is silently dropped in multi-turn chat. #1201 tracks the Message-level fix. Both should ship together if possible (so a freshly-public mot.thinking actually round-trips through chat history), but #1201 is independent and can ship later if needed.
Appendix items folded in
From #1197's Appendix A:
- Item 9 —
docs/docs/integrations/openai.mdinstructs users to readresult._thinking. Update toresult.thinkingin this PR.
Acceptance
-
mot.thinkingis the public attribute; backends write through the public name -
mot._thinkingis a deprecation-warning shim -
docs/docs/integrations/openai.mdupdated - Existing tests unchanged in behavior
- Release notes / changelog entry calling out the deprecation horizon
- Better handling of reasoning output from thinking models #1201 cross-referenced
Sequencing
Independent of Area 1 (#1215), Area 3 (#1216), Area 5 (#1191) and of #1181. Can ship in any order.
Activity
exequeryphil commentedon Jun 18, 2026
Hi, I can address this one.
ajbozarth commentedon Jun 18, 2026
Thank you for your interest @exequeryphil I've assigned this issue to you, feel free to open a PR when it's ready and tag me for review
ajbozarth commentedon Jun 19, 2026
Small heads-up (2026-06-19)
Two factual updates if helpful while picking this up:
mellea/stdlib/base.py→mellea/core/base.py(codebase reorg since the design was written).result._thinkingline indocs/docs/integrations/openai.md; current state has two — lines 360 and 386.No design changes.