DMR provider ignores integer `provider_opts.context_size` (YAML integers decode as uint64), so the model starts at its maximum context
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
調査の方向性
pkg/model/provider/dmr/configure.go から始める: parseContextSize は parseInt64Value を呼び、int64/int/float64/string を受け付けるが YAML map[string]any からの uint64 は受け付けない。uint64 を追加し(string/int パスは残す)、context_size: 64000 が context-size として送られるようにする。同じファイルの main 上のもう一つの数値パーサーでパターンを確認する。parseInt64Value または DMR configure の周りにユニットテストがあればそれで確認する。unquoted integer が nil ではなく configure リクエストに届いたら完了。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 3.4k
- フォーク
- 479
- 平均マージ
- 8時間 22分
- マージ済み PR(30日)
- 296
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/docker-agent のほかの issue
-
pkg/hooks tests fail with a misleading assertion when jq is not installed対応中かも @dwin-gharibi が 46 日前に担当しました。 オープンarea/testing
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
docker/docker-agent#4052 ·
メンテナーはふだん 1 日以内に返信
-
`remove_directory` and `create_directory` hide work they already did when a later path fails対応中かも @dwin-gharibi が 64 日前に担当しました。 オープンarea/tools
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
docker/docker-agent#3933 ·
メンテナーはふだん 1 日以内に返信
-
`edit_file` silently edits the first match when `oldText` occurs more than once対応中かも @dwin-gharibi が 64 日前に担当しました。 オープンarea/tools
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
docker/docker-agent#3929 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/api area/runtime area/sessions
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
docker/docker-agent#4560 ·
メンテナーはふだん 1 日以内に返信
-
[CI failure] Main test-race job failed対応中かも @dgageot が 1 日前に担当しました。 オープンarea/ci area/testing automated flaky-test status/needs-triage
docker/docker-agent#4557 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
docker/docker-agent の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
duplication
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openvibely/openvibely#1443 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
keyxmakerx/Chronicle#1179 ·
メンテナーはふだん 1 日以内に返信
-
raised-by:worker
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
medici-finance/assay#2486 ·
メンテナーはふだん 1 日以内に返信
-
area/testing kind/bug triage/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cozystack/cozystack#4841 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信