[PR #4521] implement tunable registry defaults for registry and update mirrors #11513

Closed
opened 2026-04-12 23:31:34 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/4521

State: closed
Merged: No


What is the problem this change solves?

In large environments with many cloud instances are running ollama serve, accidentally pushing code to run ollama pull llama3 can result in 100's of cloud instances are trying to download from ollama.ai.

The correct change for production should have been ollama pull https://registry.prod.someside.tld/library/llama3. The registry mirror at registry.prod.someside.tld is necessary to reduce bandwidth costs for high volume data, like an AI model or container image.

Mistakes like this can go unnoticed by novices building scalable infrastructure for their developers, until they get the resulting bill.

Also registry owners often have to implement rate limiting to keep bandwidth costs down. Hitting a rate limit in a production environment often results in an outage. Further making convenient mirroring options desirable.

What are the changes being made?

  • Created a new package called defaults to hold tunable values.
  • Moved variables related to endpoints to a single package called github.com/ollama/ollama/types/defaults
  • Exposes control to admins via environment variables.

Are there any tasks remaining?

I need some guidance on how testing should work for these changes.

**Original Pull Request:** https://github.com/ollama/ollama/pull/4521 **State:** closed **Merged:** No --- # What is the problem this change solves? In large environments with many cloud instances are running `ollama serve`, accidentally pushing code to run `ollama pull llama3` can result in 100's of cloud instances are trying to download from `ollama.ai`. The correct change for production should have been `ollama pull https://registry.prod.someside.tld/library/llama3`. The registry mirror at `registry.prod.someside.tld` is necessary to reduce bandwidth costs for high volume data, like an AI model or container image. Mistakes like this can go unnoticed by novices building scalable infrastructure for their developers, until they get the resulting bill. Also registry owners often have to implement rate limiting to keep bandwidth costs down. Hitting a rate limit in a production environment often results in an outage. Further making convenient mirroring options desirable. # What are the changes being made? - Created a new package called `defaults` to hold tunable values. - Moved variables related to endpoints to a single package called `github.com/ollama/ollama/types/defaults` - Exposes control to admins via environment variables. # Are there any tasks remaining? I need some guidance on how testing should work for these changes.
GiteaMirror added the pull-request label 2026-04-12 23:31:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11513