A setting to turn off the models.dev catalog download (offline and strict-network use)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in pkg/modelsdev/store.go: read fetchFromAPI, loadDatabase and getDatabase to see how the allowFetch flag already gates the network path, and how cache and the embedded snapshot fallbacks work. The proposal is to add an env setting (e.g. DOCKER_AGENT_OFFLINE or DOCKER_AGENT_MODELS_DEV=off) that makes getDatabase behave as allowFetch=false. Check how existing switches like TELEMETRY_ENABLED are parsed and documented, mirror that, and add a test that the catalog is served from cache/snapshot with no network call. Done: the setting prevents any fetch from https://models.dev/api.json and existing tests still pass.
Written by the indexing model from the issue text.
Description
What happens
On v1.152.0, docker-agent run downloads the public model catalog from https://models.dev/api.json. That's pkg/modelsdev/store.go, fetchFromAPI. It caches the catalog for 24 hours in $XDG_CACHE_HOME/cagent/models_dev.json. When a deployment gives each session its own HOME, which is common when docker-agent runs as a sandboxed agent runtime, that means one download per new session per day.
The other outbound paths each have a switch:
TELEMETRY_ENABLED=falsefor telemetry;DOCKER_AGENT_AUTO_UPDATEfor self-update;DOCKER_AGENT_AUTO_INSTALL=falsefor tool install;--otelis opt-in.
The catalog download is the one an operator can't turn off.
Why a switch would be enough
The store already handles a failed or blocked download. loadDatabase falls back to the cache, and then to the snapshot embedded at build time (the behaviour #3165 made explicit). So a setting that skips the download and goes straight to cache-or-embedded would only formalise a path that already works.
That matters for deployments that must not make outbound calls beyond the model provider they configured: air-gapped installs, strict egress policies, or self-hosters who want only the calls they asked for.
Proposal
Something like DOCKER_AGENT_OFFLINE=1, or a narrower DOCKER_AGENT_MODELS_DEV=off. It would make getDatabase behave as allowFetch=false: cache if present, otherwise the embedded snapshot, and never the network.
We run docker-agent as one of the agent runtimes in the open-source HarnessRouter. For now, our docs tell self-hosters that it fetches from models.dev and that the host can be blocked. A switch would let us turn it off by default. Thanks for considering it.
- Dominant language
- Go
- Stars
- 4.7k
- Forks
- 565
- Avg merge
- 18h 52m
- Merged PRs (30d)
- 221
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
-
edit_file diff rendering panics on invalid UTF-8 textPossibly taken @TDnorthgarden claimed this today. Openarea/tui
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docker/docker-agent#4955 ·
Maintainers usually reply within 1 day
-
Error when trying to run sandbox example?Possibly taken @dgageot claimed this 27 days ago. Openarea/cli
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
docker/docker-agent#4672 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
`edit_file` silently edits the first match when `oldText` occurs more than oncePossibly taken @dwin-gharibi claimed this 103 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
Difficulty 4/5 3-5 days Newbie friendliness 48/100
docker/docker-agent#4951 ·
Maintainers usually reply within 1 day
-
area/agent area/cli area/runtime
Difficulty 4/5 3-5 days Newbie friendliness 55/100
docker/docker-agent#4947 ·
Maintainers usually reply within 1 day
All issues in docker/docker-agent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OneBusAway/maglev#2145 ·
Maintainers usually reply within 2 days
-
priority/medium status/ready type/chore
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
discobox-ai/discobox#1357 ·
Maintainers usually reply within 1 day
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itPossibly taken @fzn0x claimed this today. Openbug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
enhancement ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jbigler/railswitch#243 ·
Maintainers usually reply within 1 day
-
Helm probes fail when DCGM Exporter requires TLS client certificatesPossibly taken @git-jxj claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/dcgm-exporter#775 ·
Maintainers usually reply within 1 day