Hook inputs: expose the active chat model
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- developer-experience
Direzione di ricerca
Start from the shared hook input type (BaseHookInput) and the event-specific inputs the issue names: UserPromptSubmit, PreToolUse and PostToolUse. Find where the session and timestamp fields are populated, and check whether the host already supplies any model data before adding an optional model object shaped like { id, vendor, family? }. Done means every hook event carries the field, or the issue records that the host cannot provide it.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
This continues a request originally filed against VS Code - microsoft/vscode#301152 ("Add model field to Copilot agent hook inputs") — which was closed as the hooks surface moved to the Copilot SDK. The underlying gap wasn't resolved, only relocated. A related sibling request, #2810 ("expose the active agent and the approval mode"), covers agent identity and approval mode but not the model — this issue is specifically about the LLM model.
Problem
Hook inputs (BaseHookInput and the event-specific types, e.g. UserPromptSubmit, PreToolUse, PostToolUse) carry sessionId, timestamp, workingDirectory, etc., but no identifier for which chat model is active for that call. There is currently no reliable way for an external hook process to determine this:
vscode.lm.selectChatModels() returns models matching a selector, not the one currently selected in the chat UI.
The Chat Participant API's request.model is accurate, but only available inside a chat participant's own request handler, not to hooks, which fire on all chat activity regardless of whether a participant is invoked.
Reading transcript_path / host storage is an undocumented, fragile workaround that can silently break on any host update.
Use case
We build developer tooling on top of UserPromptSubmit that needs to behave differently depending on which chat model is active (e.g., adjusting behavior to a model's known characteristics, or attributing telemetry per model). This is a different use case from the original issue's security/policy-enforcement angle (model allow/denylisting), but hits the identical missing field: there's currently no supported way to know which model is active from a hook.
Proposed solution
Add a model field to the common hook input fields sent to all hook events:
model?: {
id: string;
vendor: string;
family?: string;
};
Matches the shape already returned by vscode.lm's LanguageModelChat objects, so existing model metadata concepts carry over directly.
Why it matters
Without this, any hook-based tool that wants to reason about "which model is this developer using right now" has no supported way to find out - only fragile, undocumented workarounds that can break without notice.
- Lingua principale
- Java
- Stelle
- 10.7k
- Fork
- 1.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/copilot-sdk
-
Rust: ElicitationRequest drops the tool call id from elicitation.requestedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
github/copilot-sdk#2900 ·
-
Bump zod version to 4.6.6.Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
github/copilot-sdk#2876 · 1 commento · 1 reazione ·
-
Python ModelLimits drops max_output_tokens from model metadataForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
github/copilot-sdk#2798 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets publishedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
github/copilot-sdk#2758 ·
Tutte le issue di github/copilot-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
ls1intum/thesis-management#1473 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
LunaDeerMC/Dominion#301 · 1 commento ·
-
[FEATURE] Expose external refresh, node-level translog and warmer statsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni