aaif-goose / aaif-goose/goose

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

Open
#11,990 0 comments 0 reactions 1 assignee Claimed by @filipkujawa View on GitHub
Dominant language
Rust
Stars
54.2k
Forks
6.2k
Avg merge
3d 4h
Merged PRs (30d)
240

Description

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

Contributor guide

Open the contributing guide

Research direction

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.

Written by the indexing model from the issue text.

Assessment

Domain
ai-infra-agents, desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.