Hook inputs: expose the active chat model
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- developer-experience
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 10.7k
- Forks
- 1.5k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/copilot-sdk
-
Rust: ElicitationRequest drops the tool call id from elicitation.requestedTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
github/copilot-sdk#2900 ·
-
Bump zod version to 4.6.6.Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
github/copilot-sdk#2876 · 1 comentário · 1 reação ·
-
Python ModelLimits drops max_output_tokens from model metadataTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
github/copilot-sdk#2798 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets publishedTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertadocumentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
github/copilot-sdk#2758 ·
Todas as issues de github/copilot-sdk
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
ls1intum/thesis-management#1473 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
LunaDeerMC/Dominion#301 · 1 comentário ·
-
[FEATURE] Expose external refresh, node-level translog and warmer statsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertauntriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 2 dias