github / github/copilot-cli

Calling session.setModel() and session.rpc.model.switchTo() does not update the model in the footer

Aperta
#3,068 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:models area:plugins area:terminal-rendering
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### Describe the bug

When switching the active model programmatically from an extension using `session.setModel(modelId)` or `session.rpc.model.switchTo({ modelId })`, the model is changed for inference but the footer/status bar UI is not updated to reflect the new model.

This is inconsistent with
the `/model ` slash command, which both changes the model and updates the footer correctly.

### Affected version

GitHub Copilot CLI 1.0.40-3.

### Steps to reproduce the behavior

1. Create an extension that calls session.setModel('') or session.rpc.model.switchTo({ modelId: '' })
```js
import { joinSession } from "@github/copilot-sdk/extension";

let session;

session = await joinSession({
commands: [
{
name: "mini",
description: `Switch to gpt 5.4 mini`,
handler: async (context) => {
await session.rpc.model.switchTo({ modelId: 'gpt-5.4-mini' });
await session.setModel('gpt-5.4-mini');
},
},
],
});

```
3. Invoke the extension command.
4. Send a prompt asking what model it is powered by.
5. Observe the footer/status bar at the bottom not aligning to the reported model.

### Expected behavior

After calling session.setModel('') or session.rpc.model.switchTo({ modelId: '' }) the model in the footer updates to the selected model.

### Additional context

Reproduced on Win/ARM64

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the implementations of session.setModel() and session.rpc.model.switchTo(), then follow the existing /model slash-command path to the footer/status bar update. Reproduce the issue with the extension command shown in the report and verify that both APIs leave the footer showing the selected model.

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

Valutazione

Stack tecnologico
javascript
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.