<current_datetime> and random prompt_cache_key still block cross-session prompt caching (SDK 1.0.19 / runtime 1.0.95)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- backend-api-design
Línea de trabajo
Start by reading the runtime request construction for current_datetime and prompt_cache_key, then trace the session options exposed by the SDK. Compare requests from separate sessions to confirm where the changing values enter the prompt. Done means adding a supported way to control the timestamp placement or precision, or to set a stable cache key, with coverage for requests that reuse a stable prompt prefix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #1297, which was closed as not planned. That issue is still present in the current release and it blocks prompt caching across sessions for workloads that start a new session per request.
Environment
github-copilot-sdk1.0.19 (Python), bundled runtime 1.0.95- Copilot billing,
gpt-6-lunaandgpt-6.1-sol - One new session per request,
system_message={"mode": "replace", ...}, no tools,enable_session_store=False
What we measured
Five sequential requests with the same synthetic payload (11,454 input tokens each). Usage comes from assistant.usage.
| Request | Cached input | Cache write |
|---|---|---|
| A (warm) | 0 | 11,451 |
| A repeated, identical | 2,073 | 9,378 |
| B, same prefix and different tail | 2,073 | 9,378 |
| A with a fixed working directory, twice | 2,073 | 9,378 |
A with a fixed session_id, three times |
2,073 | 9,378 |
The results were the same with both models. 2,073 tokens is exactly our system message. Nothing after it is ever read from cache.
What the runtime sends
We pointed a session at a local BYOK provider (type: "openai", wire_api: "responses") that only records requests. When we compared two sessions with the same prompt:
- The system message is byte-identical.
- The user message starts with
<current_datetime>2026-11-11T00:04:49.196-03:00</current_datetime>, so the two requests differ from the first characters after the system message. prompt_cache_keyis a different random value for each session, even whensession_idis fixed.- A
blobattachment is placed after the datetime too, so no consumer content can come before it.
We found no option or environment variable that disables the datetime or controls prompt_cache_key.
Impact
This covers any consumer that sends a large stable prefix (shared rules, reference context) and opens a new session per request, such as a CI reviewer that splits one pull request into many requests. Those consumers pay for a cache write on every request and never get a cache read beyond the system message. The comment from November 3 on #1297 shows near-100% reuse once the timestamp is fixed, so the timestamp alone accounts for the loss.
Request
Any of the following would solve it for us:
- A session option to omit
<current_datetime>, or to place it after the user content. - Lower precision, for example the date or the hour, so requests close in time share the prefix.
- A way to set
prompt_cache_key, or a value derived from the session configuration instead of a random one per session.
- 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