DMR provider ignores integer `provider_opts.context_size` (YAML integers decode as uint64), so the model starts at its maximum context
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
Hướng nghiên cứu
Bắt đầu trong pkg/model/provider/dmr/configure.go: parseContextSize gọi parseInt64Value, hàm này chấp nhận int64/int/float64/string nhưng không chấp nhận uint64 từ YAML map[string]any. Thêm uint64 (và giữ các đường string/int) để context_size: 64000 được gửi dưới dạng context-size. Kiểm tra parser số khác trong cùng file trên main để lấy mẫu. Xác nhận bằng unit test quanh parseInt64Value hoặc DMR configure nếu có; xong khi một unquoted integer đến được yêu cầu configure thay vì nil.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 4.4k
- Fork
- 508
- Merge trung bình
- 7 giờ 2 phút
- Pull request đã merge (30 ngày)
- 233
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/docker-agent
-
pkg/hooks tests fail with a misleading assertion when jq is not installedCó thể đã có người làm @dwin-gharibi đã nhận 52 ngày trước. Đang mởarea/testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
docker/docker-agent#4052 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`remove_directory` and `create_directory` hide work they already did when a later path failsCó thể đã có người làm @dwin-gharibi đã nhận 70 ngày trước. Đang mởarea/tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
docker/docker-agent#3933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`edit_file` silently edits the first match when `oldText` occurs more than onceCó thể đã có người làm @dwin-gharibi đã nhận 70 ngày trước. Đang mởarea/tools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
docker/docker-agent#3929 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/providers/openai
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
docker/docker-agent#4594 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/providers/openai
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 70/100
docker/docker-agent#4593 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker/docker-agent
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
QuantumNous/new-api#7839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
puppe1990/amarra-cais#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Gentleman-Programming/engram#1899 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày