DMR provider ignores integer `provider_opts.context_size` (YAML integers decode as uint64), so the model starts at its maximum context
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Empieza en pkg/model/provider/dmr/configure.go: parseContextSize llama a parseInt64Value, que acepta int64/int/float64/string pero no uint64 de YAML map[string]any. Añade uint64 (y mantén las rutas string/int) para que context_size: 64000 se envíe como context-size. Revisa el otro parser numérico en el mismo archivo en main para el patrón. Confirma con un test unitario alrededor de parseInt64Value o DMR configure si existe uno; listo cuando un unquoted integer llega a la petición configure en lugar de nil.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Versions: docker-agent v1.142.0 and v1.148.0 (linux/amd64, inside a Docker Sandbox), config version 16, provider dmr (Docker Model Runner on the host, llama.cpp backend), model huggingface.co/unsloth/qwen3.8-27b-gguf:UD-Q4_K_M (context window 262144).
What happens
With
models:
qwen:
provider: dmr
base_url: http://host.docker.internal:12434/engines/v1
model: huggingface.co/unsloth/qwen3.8-27b-gguf:UD-Q4_K_M
provider_opts:
context_size: 64000
the context size never reaches Model Runner, and the model runs with its maximum context (262144).
Debug log (--debug):
msg="DMR provider opts" provider_opts="map[context_size:64000 runtime_flags:[...]]"
msg="DMR provider_opts parsed" ... context_size=<nil> ...
msg="Sending model configure request" ... context_size=<nil> ...
msg="Model configure completed"
GET /engines/_configure afterwards shows no context-size for the model.
Workaround / confirmation
Quoting the value works:
provider_opts:
context_size: "64000"
→ Sending model configure request ... context_size=64000, and GET /engines/_configure shows "context-size":64000. Passing --ctx-size 64000 in runtime_flags also works.
Cause (from the source)
parseContextSize → parseInt64Value in pkg/model/provider/dmr/configure.go accepts int64, int, float64 and string, but not uint64. The YAML decoder yields uint64 for a positive integer in a map[string]any, so the value is dropped and parseContextSize returns nil. On main, another numeric parser in the same file already handles uint64, but parseInt64Value does not.
Expected
context_size: 64000 is sent as context-size: 64000. Also, a value that is present but cannot be parsed (and a failed configure request, which is only logged at DEBUG today) could be reported as a warning instead of silently falling back to the model's default context.
- Lenguaje dominante
- Go
- Estrellas
- 3.4k
- Forks
- 479
- Merge medio
- 8 h 22 min
- PR fusionados (30 d)
- 296
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 docker/docker-agent
-
pkg/hooks tests fail with a misleading assertion when jq is not installedPosiblemente ocupada @dwin-gharibi la tomó hace 46 días. Abiertoarea/testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
docker/docker-agent#4052 ·
Los mantenedores suelen responder en 1 día
-
`remove_directory` and `create_directory` hide work they already did when a later path failsPosiblemente ocupada @dwin-gharibi la tomó hace 64 días. Abiertoarea/tools
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
docker/docker-agent#3933 ·
Los mantenedores suelen responder en 1 día
-
`edit_file` silently edits the first match when `oldText` occurs more than oncePosiblemente ocupada @dwin-gharibi la tomó hace 64 días. Abiertoarea/tools
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
docker/docker-agent#3929 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
area/api area/runtime area/sessions
Dificultad 4/5 3-5 días Aptitud para principiantes 40/100
docker/docker-agent#4560 ·
Los mantenedores suelen responder en 1 día
-
[CI failure] Main test-race job failedPosiblemente ocupada @dgageot la tomó hace 1 día. Abiertoarea/ci area/testing automated flaky-test status/needs-triage
docker/docker-agent#4557 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de docker/docker-agent
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
duplication
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
openvibely/openvibely#1443 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
keyxmakerx/Chronicle#1179 ·
Los mantenedores suelen responder en 1 día
-
raised-by:worker
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
medici-finance/assay#2486 ·
Los mantenedores suelen responder en 1 día
-
area/testing kind/bug triage/needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cozystack/cozystack#4841 · 1 reacción ·
Los mantenedores suelen responder en 2 días