DMR provider ignores integer `provider_opts.context_size` (YAML integers decode as uint64), so the model starts at its maximum context
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in pkg/model/provider/dmr/configure.go: parseContextSize calls parseInt64Value, which accepts int64/int/float64/string but not uint64 from YAML map[string]any. Add uint64 (and keep string/int paths) so context_size: 64000 is sent as context-size. Check the other numeric parser in the same file on main for the pattern. Confirm with a unit test around parseInt64Value or DMR configure if one exists; done when an unquoted integer reaches the configure request instead of nil.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 479
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 296
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/docker-agent
-
pkg/hooks tests fail with a misleading assertion when jq is not installedPossibly taken @dwin-gharibi claimed this 46 days ago. Openarea/testing
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
docker/docker-agent#4052 ·
Maintainers usually reply within 1 day
-
`remove_directory` and `create_directory` hide work they already did when a later path failsPossibly taken @dwin-gharibi claimed this 64 days ago. Openarea/tools
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docker/docker-agent#3933 ·
Maintainers usually reply within 1 day
-
`edit_file` silently edits the first match when `oldText` occurs more than oncePossibly taken @dwin-gharibi claimed this 64 days ago. Openarea/tools
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
docker/docker-agent#3929 · 2 comments ·
Maintainers usually reply within 1 day
-
area/api area/runtime area/sessions
Difficulty 4/5 3-5 days Newbie friendliness 40/100
docker/docker-agent#4560 ·
Maintainers usually reply within 1 day
-
[CI failure] Main test-race job failedPossibly taken @dgageot claimed this 1 day ago. Openarea/ci area/testing automated flaky-test status/needs-triage
docker/docker-agent#4557 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in docker/docker-agent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
duplication
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openvibely/openvibely#1443 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
keyxmakerx/Chronicle#1179 ·
Maintainers usually reply within 1 day
-
raised-by:worker
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
medici-finance/assay#2486 ·
Maintainers usually reply within 1 day
-
area/testing kind/bug triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cozystack/cozystack#4841 · 1 reaction ·
Maintainers usually reply within 2 days