Make provider model metadata (context limits, reasoning) live-first instead of build-time-catalog-only
- 主要言語
- Rust
- スター
- 54.2k
- フォーク
- 6.2k
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 262
説明
### 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.
コントリビューションガイド
評価
この issue はまだ評価されていません。