aaif-goose / aaif-goose/goose

Desktop: per-session mode, thinking/reasoning effort, and model selection — plus auto context-window from OpenAI-compatible /models metadata

Đang mở
#11,990 0 bình luận 0 reaction 1 người được giao Được @filipkujawa nhận Xem trên GitHub
Ngôn ngữ chính
Rust
Star
54.2k
Fork
6.2k
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
262

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.