Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Model downswitch can exceed the target context window

Aperta
#18 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Rust
Stelle
43
Fork
5
Merge medio
13h 56m
PR unite (30g)
65

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di speakeasy-api/kit

Tutte le issue di speakeasy-api/kit

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.