aaif-goose / aaif-goose/goose

Make provider model metadata (context limits, reasoning) live-first instead of build-time-catalog-only

Offen
#11,558 2 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @jamadeo Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
54.2k
Forks
6.2k
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
262

Beschreibung

### Describe the improvement

Goose's model metadata (context window, max output tokens, reasoning support) currently comes from a build-time snapshot of models.dev, refreshed only when goose is released. For OpenRouter specifically, `/api/v1/models` already exposes `context_length`, `top_provider.max_completion_tokens`, and reasoning support via `supported_parameters` at runtime — but the inventory refresh keeps only model IDs, so any model missing from the bundled catalog falls back to a hardcoded 128k context limit and never shows a thinking control.

This tracking issue covers making provider model metadata **live-first**: fetch it from the provider when available, store it in the inventory cache, and treat the build-time catalog as a per-field fallback rather than the source of truth.

### Why is this needed?

Day-zero model releases (stealth/private/org-aliased models) are common on OpenRouter. Today those sessions silently run with wrong compaction thresholds and no reasoning support until a new goose release ships an updated catalog.

### Scope / related work

- [x] Initial implementation: #11531 (OpenRouter live metadata → inventory → session config + canonical-info endpoint)
- [ ] Extend metadata fetching to other providers with rich models APIs
- [ ] Mid-session convergence after a manual inventory refresh (currently applies at session prep and model switch)
- [ ] Decide on provenance tracking for `ModelConfig` fields so explicit user overrides vs catalog-derived defaults can be distinguished structurally instead of by value comparison

### Additional context

Other OpenRouter-related changes in flight may touch `crates/goose/src/providers/openrouter.rs` and the inventory refresh path (`providers/inventory/`) — coordinating here to avoid collisions.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.