[bug] Infographic generation fails when prompt exceeds the local model context
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with worker/studio/media/visual/infographic/pipeline.py at the reported render call, then trace how prompts and source excerpts are passed to generate.run_model and how model errors are classified and retried. The issue calls for token budgeting, source reduction with attribution, and clear handling of context overflow; done means oversized requests do not repeat unchanged and users receive a specific context-limit error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which part?
Desktop app
What happened?
Generating an Infographic from two selected sources fails after approximately two minutes.
The Studio worker gathers 24,000 source characters and sends a request larger than the configured 8,192-token context window:
request (8545 tokens) exceeds the available context size (8192 tokens)
SurfSense reports:
Infographic failed: This artifact couldn’t be generated.
The model is running and reachable. The failure occurs because the Infographic pipeline submits more tokens than the model context supports.
The failed task is also requeued without reducing the source content or token budget, causing another identical failure and unnecessary model loading.
What did you expect?
The Infographic pipeline should calculate the full token budget before submitting the request.
The budget should account for:
system and Infographic prompts
selected source excerpts
chat-template overhead
reserved output tokens
reasoning tokens
multimodal tokens, when applicable
a safety margin
If the request is too large, SurfSense should automatically reduce or summarize the selected source content while preserving source attribution.
A deterministic context-overflow failure should not be retried with the same payload.
The application should display a specific message such as:
"The selected sources exceed the model context limit. Reduce the sources or retry with automatic summarization."
It should not report the problem as "The model could not be reached," because the model was available and explicitly rejected an oversized request.
How to reproduce
SurfSense 2.3.1
Windows 10.0.26300 x64
Electron 44.10.1
Chromium 152.0.7977.169
Node 24.22.1
studio: artifact 3 format=infographic starting
studio: artifact 3 gathered 2 sources (24000 chars)
llama-server:
--ctx-size 8192
--fit-ctx 8192
--parallel 4
E srv send_error: task id = 3, error:
request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
studio: artifact 3 failed after 155.8s:
The model could not be reached: request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
worker/studio/media/visual/infographic/pipeline.py, line 45, in render
generate.run_model(writer, prompt(writer.tier, user_prompt), sources)
httpx.HTTPStatusError:
request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
Unhandled exception in task de9b89d0-4ce3-4e8b-b76d-7ed3db7c3c39
Requeueing de9b89d0-4ce3-4e8b-b76d-7ed3db7c3c39, 0 retries
After retry:
studio: artifact 3 gathered 2 sources (24000 chars)
E srv send_error:
request (8459 tokens) exceeds the available context size (8192 tokens), try increasing it
Error: Infographic failed:
This artifact couldn’t be generated. Retry it from the artifacts tab.
Logs
SurfSense 2.3.1
Windows 10.0.26300 x64
Electron 44.10.1
Chromium 152.0.7977.169
Node 24.22.1
studio: artifact 3 format=infographic starting
studio: artifact 3 gathered 2 sources (24000 chars)
llama-server configuration:
--ctx-size 8192
--fit-ctx 8192
--parallel 4
E srv send_error: task id = 3, error:
request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
studio: artifact 3 failed after 155.8s:
The model could not be reached: request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
worker/studio/media/visual/infographic/pipeline.py, line 45, in render
generate.run_model(writer, prompt(writer.tier, user_prompt), sources)
httpx.HTTPStatusError:
request (8545 tokens) exceeds the available context size (8192 tokens), try increasing it
Unhandled exception in task de9b89d0-4ce3-4e8b-b76d-7ed3db7c3c39
Requeueing de9b89d0-4ce3-4e8b-b76d-7ed3db7c3c39, 0 retries
After retry:
studio: artifact 3 gathered 2 sources (24000 chars)
E srv send_error:
request (8459 tokens) exceeds the available context size (8192 tokens), try increasing it
Error: Infographic failed:
This artifact couldn’t be generated. Retry it from the artifacts tab.
- Lenguaje dominante
- Python
- Estrellas
- 16.3k
- Forks
- 1.6k
- Merge medio
- 11 h 15 min
- PR fusionados (30 d)
- 167
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 MODSetter/SurfSense
-
Security Scan: stop flagging pinned hashes and test fixtures on release PRsPosiblemente ocupada @karthikeya1220 la tomó hace 25 días. Abiertocode quality security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MODSetter/SurfSense#2225 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
[bug] NadaAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
MODSetter/SurfSense#2420 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[bug] local ollama not foundAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
MODSetter/SurfSense#2417 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
Todos los issues de MODSetter/SurfSense
Issues similares
-
area:models enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
SACGF/variantgrid#2737 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
RedisStorage writes can persist a key without its sliding TTLPosiblemente ocupada @lianbie la tomó hoy. Abiertotriage/confirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agentscope-ai/agentscope#3878 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
hindsight-api exits at start-up with UnicodeEncodeError when stdout is redirected on WindowsAbiertocore
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
vectorize-io/hindsight#6458 ·
Los mantenedores suelen responder en 1 día