Hook inputs: expose the active chat model
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 10.7k
- Forks
- 1.5k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/copilot-sdk
-
Rust: ElicitationRequest drops the tool call id from elicitation.requestedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-sdk#2900 ·
-
Bump zod version to 4.6.6.Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
github/copilot-sdk#2876 · 1 comentario · 1 reacción ·
-
Python ModelLimits drops max_output_tokens from model metadataQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/copilot-sdk#2798 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets publishedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
github/copilot-sdk#2758 ·
Todos los issues de github/copilot-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ls1intum/thesis-management#1473 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
LunaDeerMC/Dominion#301 · 1 comentario ·
-
[FEATURE] Expose external refresh, node-level translog and warmer statsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertountriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días