Desktop: per-session mode, thinking/reasoning effort, and model selection — plus auto context-window from OpenAI-compatible /models metadata
- 主要言語
- Rust
- スター
- 54.2k
- フォーク
- 6.2k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 240
説明
### Summary
Desktop app: make chat mode, thinking/reasoning effort, and model selection per-session (not global/shared), and auto-derive each model's context window from the provider's OpenAI-compatible `/models` metadata instead of a hardcoded 128k fallback.
### Background / current behavior (Windows Desktop)
- Changing the context window or reasoning effort in one chat affects other chats — these are stored as shared provider/profile config, not per session.
- Third-party OpenAI-compatible models (my LiteLLM gateway) always show a `0/128k` context window, regardless of the model's real limit.
- There is no per-session way to set mode / reasoning / model from the UI — slash commands like `/model` and `/mode` do not work in the desktop session box.
### Requested behavior
1. **Per-session controls:** each chat has its own mode (Agent / Auto / Plan / Chat), thinking/reasoning effort, and model selection — independent of other chats, similar to the Claude Desktop app.
2. **Automatic context window:** detect the real context limit from the provider. My gateway already returns per-model metadata:
```bash
curl https://litellm.usc1.gcp.kibocommerce.com/v1/models \
-H "Authorization: Bearer $KEY"
```
Each model includes `max_input_tokens`, e.g. `1048576` for `glm-5.2`, `kimi-k3`, `deepseek-v4-pro`, and `262144` for `qwen3.8`. Goose should use that value for the `0/X` counter and for compaction, instead of defaulting to 128k.
3. Context window should be **per model per session**, so a mixed provider (some 1M, one 256k) needs no provider-duplication workaround.
### Environment
- OS & Arch: Windows
- Interface: Desktop (GUI)
- Provider: custom OpenAI-compatible (LiteLLM gateway)
### Related existing issues
- #11558 — live-first provider metadata incl. reasoning (recommend coordinating here)
- #11335 — per-chat backends / per-session scoping
- #11881 — closed: Windows GUI 128k default
- #11729 — stale desktop context counter
- [x] I checked for duplicates — this is the per-session scope + generic OpenAI-compatible `/models` auto-detect delta on top of #11558/#11335.
コントリビューションガイド
調査の方向性
The issue relates to the desktop GUI's session management and provider integration. Start by examining the code for session state storage and the provider metadata fetching logic, likely in the desktop client's source. Look for where the context window is currently hardcoded and where model selection is stored globally. Check related issues #11558 and #11335 for context. 'Done' means each chat session independently stores its mode, reasoning effort, and model, and the context window is dynamically fetched from the provider's /models endpoint.
索引モデルが issue の本文から書いたものです。
評価
- 領域
- ai-infra-agents, desktop
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100