Skip to content

feat(runtime): add model context and session thinking controls - #454

Open
GTC2333 wants to merge 5 commits into
mainfrom
codex/stage3-08-model-session-controls
Open

feat(runtime): add model context and session thinking controls#454
GTC2333 wants to merge 5 commits into
mainfrom
codex/stage3-08-model-session-controls

Conversation

@GTC2333

@GTC2333 GTC2333 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stage 3 PR 8/9.

  • configure provider context-window presets through backend and Web settings
  • propagate context-window metadata into provider sessions and compaction policy
  • add a session-wide thinking level shared by principal and subagents
  • allow the thinking level to be changed from the composer
  • persist and expose the effective session control state

Verification

  • root typecheck
  • 163 targeted runtime/backend tests
  • 59 targeted Web tests
  • Web production build
  • diff whitespace validation

Merge notes

Targets main directly and is independent of the plugin PRs.

Comment thread packages/web/src/components/chat/PromptComposer.tsx Fixed
Comment thread packages/web/src/contexts/SessionContext.tsx Fixed
@GTC2333

GTC2333 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed both code-quality comments in 7b7ce89 by removing the unused useCallback and SessionMessageEntry imports. Root typecheck, 59 targeted Web tests, and the Web production build pass.

@Fxde42 Fxde42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes:已有 session 的 Thinking 控件仍由当前全局 activeProvider/selectedModel 判定,而不是该 session 实际绑定的模型。切换全局 provider 后,旧 session 可能显示禁用的 off,或错误开放 Thinking。建议把服务端计算的 reasoningSupported 作为 Session contract 的权威字段;已有 session 读取该字段,只有 draft 使用当前全局 provider。请补跨 provider 切换的回归测试。

@GTC2333

GTC2333 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the requested Session authority change in 44a2147. The runtime now computes, persists, restores, and exposes reasoningSupported for the provider/model bound to the session. Existing sessions use that field exclusively; only drafts consult the current global provider. Added regression coverage for switching the global provider in both directions and for draft behavior. Validation: root typecheck, 86 runtime tests, 62 Web tests, and Web production build.

@GTC2333
GTC2333 requested a review from Fxde42 August 14, 2026 10:36
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