Model downswitch can exceed the target context window
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with SelectableSession::begin_turn in src/provider/adapter.rs, then trace Command::SetModel and set_model in src/protocols/acp.rs and the automatic, compaction_reason, and KitCompactionBackend paths in src/compaction.rs. Check how the session actor serializes selection and how transcript metadata is stored. Done means an unsafe downswitch compacts and persists first, while unknown or oversized targets leave the current model unchanged with an actionable error.
索引モデルが issue の本文から書いたものです。
説明
Kit can switch the main ACP session to a model with a smaller context window without first checking whether the existing transcript fits that model. The next turn keeps the live transcript and creates the selected provider session, so the target provider can reject the request for exceeding its context limit.
Automatic compaction does not currently prevent this. Its trigger uses the latest provider-reported usage and context-window metadata in the transcript, which still describes the previously active model. After the switch, manual or automatic compaction also follows the new model and may fail because its summarization request contains the already oversized transcript.
Until this is fixed, compact with the larger model before switching:
/compact
/model <lower-context-model>
A safe downswitch should be transactional and serialized through the session actor. Kit should retain context-window information in the model catalog, compare the transcript against the target window, compact with the currently active model before publishing the new selection, persist the replacement transcript, and then apply the switch. If the target window is unknown or compaction cannot make the transcript fit, Kit should leave the current selection unchanged and return an actionable error.
Relevant implementation: src/provider/adapter.rs (SelectableSession::begin_turn), src/protocols/acp.rs (Command::SetModel and set_model), and src/compaction.rs (automatic, compaction_reason, and KitCompactionBackend).
- 主要言語
- Rust
- スター
- 43
- フォーク
- 5
- 平均マージ
- 21時間 18分
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
speakeasy-api/kit のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
speakeasy-api/kit#175 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
speakeasy-api/kit#165 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
speakeasy-api/kit#151 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
speakeasy-api/kit#149 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
speakeasy-api/kit#148 ·
メンテナーはふだん 1 日以内に返信
speakeasy-api/kit の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
needs: triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
area:docs documentation P3
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Raaif-Yousuf/Wingman#837 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
storytold/photocraft#6759 ·
メンテナーはふだん 1 日以内に返信