[GH-ISSUE #6470] registry.ollama.ai: returning text/plain for manifest requests #4070

Closed
opened 2026-04-12 14:58:39 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @codefromthecrypt on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6470

What is the issue?

If you look carefully, the OCI repository for ollama models is returning the wrong content type for manifests. It returns "text/plain" when it should be returning "application/vnd.docker.distribution.manifest.v2+json"

For example:

$ curl -v https://registry.ollama.ai/v2/library/qwen2/manifests/0.5b|jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host registry.ollama.ai:443 was resolved.
* IPv6: (none)
* IPv4: 172.67.182.229, 104.21.75.227
*   Trying 172.67.182.229:443...
* Connected to registry.ollama.ai (172.67.182.229) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
} [323 bytes data]
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [2522 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [79 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=ollama.ai
*  start date: Aug 13 23:32:49 2024 GMT
*  expire date: Nov 11 23:32:48 2024 GMT
*  subjectAltName: host "registry.ollama.ai" matched cert's "*.ollama.ai"
*  issuer: C=US; O=Google Trust Services; CN=WE1
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://registry.ollama.ai/v2/library/qwen2/manifests/0.5b
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: registry.ollama.ai]
* [HTTP/2] [1] [:path: /v2/library/qwen2/manifests/0.5b]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
> GET /v2/library/qwen2/manifests/0.5b HTTP/2
> Host: registry.ollama.ai
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/2 200 
< date: Fri, 23 Aug 2024 04:18:47 GMT
< content-type: text/plain; charset=utf-8
< content-length: 857
< via: 1.1 google
< alt-svc: h3=":443"; ma=86400
< cf-cache-status: DYNAMIC
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=%2B6ljRtnqE4sFLegJTxwjH%2BmW%2FImWeUe17OYPgJGd7TPeJ%2FjCW8ToeYDUrutXDiYtBBM%2BRNDWEogTElxJ9gbDzHR%2FkuhDfuJGquEttWgk2bcwMR1CWds%2F%2B9sKJpVz43JKNbfWJUw%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< cf-ray: 8b784cef6aca0995-HKG
< 
{ [857 bytes data]
100   857  100   857    0     0   1171      0 --:--:-- --:--:-- --:--:--  1172
* Connection #0 to host registry.ollama.ai left intact
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
  "config": {
    "digest": "sha256:2184ab82477bc33a5e08fa209df88f0631a19e686320cce2cfe9e00695b2f0e6",
    "mediaType": "application/vnd.docker.container.image.v1+json",
    "size": 488
  },
  "layers": [
    {
      "digest": "sha256:8de95da68dc485c0889c205384c24642f83ca18d089559c977ffc6a3972a71a8",
      "mediaType": "application/vnd.ollama.image.model",
      "size": 352151968
    },
    {
      "digest": "sha256:62fbfd9ed093d6e5ac83190c86eec5369317919f4b149598d2dbb38900e9faef",
      "mediaType": "application/vnd.ollama.image.template",
      "size": 182
    },
    {
      "digest": "sha256:c156170b718ec29139d3653d40ed1986fd92fb7e0959b5c71f3c48f62e6636f4",
      "mediaType": "application/vnd.ollama.image.license",
      "size": 11344
    },
    {
      "digest": "sha256:f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216",
      "mediaType": "application/vnd.ollama.image.params",
      "size": 59
    }
  ]
}

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.3.6

Originally created by @codefromthecrypt on GitHub (Aug 23, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6470 ### What is the issue? If you look carefully, the OCI repository for ollama models is returning the wrong content type for manifests. It returns "text/plain" when it should be returning "application/vnd.docker.distribution.manifest.v2+json" For example: ```bash $ curl -v https://registry.ollama.ai/v2/library/qwen2/manifests/0.5b|jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host registry.ollama.ai:443 was resolved. * IPv6: (none) * IPv4: 172.67.182.229, 104.21.75.227 * Trying 172.67.182.229:443... * Connected to registry.ollama.ai (172.67.182.229) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [323 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [2522 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [79 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=ollama.ai * start date: Aug 13 23:32:49 2024 GMT * expire date: Nov 11 23:32:48 2024 GMT * subjectAltName: host "registry.ollama.ai" matched cert's "*.ollama.ai" * issuer: C=US; O=Google Trust Services; CN=WE1 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://registry.ollama.ai/v2/library/qwen2/manifests/0.5b * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: registry.ollama.ai] * [HTTP/2] [1] [:path: /v2/library/qwen2/manifests/0.5b] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] > GET /v2/library/qwen2/manifests/0.5b HTTP/2 > Host: registry.ollama.ai > User-Agent: curl/8.7.1 > Accept: */* > * Request completely sent off < HTTP/2 200 < date: Fri, 23 Aug 2024 04:18:47 GMT < content-type: text/plain; charset=utf-8 < content-length: 857 < via: 1.1 google < alt-svc: h3=":443"; ma=86400 < cf-cache-status: DYNAMIC < report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=%2B6ljRtnqE4sFLegJTxwjH%2BmW%2FImWeUe17OYPgJGd7TPeJ%2FjCW8ToeYDUrutXDiYtBBM%2BRNDWEogTElxJ9gbDzHR%2FkuhDfuJGquEttWgk2bcwMR1CWds%2F%2B9sKJpVz43JKNbfWJUw%3D"}],"group":"cf-nel","max_age":604800} < nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} < server: cloudflare < cf-ray: 8b784cef6aca0995-HKG < { [857 bytes data] 100 857 100 857 0 0 1171 0 --:--:-- --:--:-- --:--:-- 1172 * Connection #0 to host registry.ollama.ai left intact { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "digest": "sha256:2184ab82477bc33a5e08fa209df88f0631a19e686320cce2cfe9e00695b2f0e6", "mediaType": "application/vnd.docker.container.image.v1+json", "size": 488 }, "layers": [ { "digest": "sha256:8de95da68dc485c0889c205384c24642f83ca18d089559c977ffc6a3972a71a8", "mediaType": "application/vnd.ollama.image.model", "size": 352151968 }, { "digest": "sha256:62fbfd9ed093d6e5ac83190c86eec5369317919f4b149598d2dbb38900e9faef", "mediaType": "application/vnd.ollama.image.template", "size": 182 }, { "digest": "sha256:c156170b718ec29139d3653d40ed1986fd92fb7e0959b5c71f3c48f62e6636f4", "mediaType": "application/vnd.ollama.image.license", "size": 11344 }, { "digest": "sha256:f02dd72bb2423204352eabc5637b44d79d17f109fdb510a7c51455892aa2d216", "mediaType": "application/vnd.ollama.image.params", "size": 59 } ] } ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.3.6
GiteaMirror added the bug label 2026-04-12 14:58:39 -05:00
Author
Owner

@bmizerany commented on GitHub (Aug 23, 2024):

Thank you for bringing this to our attention.

While we do have an API that's similar to an OCI registry, it's important to note that this API is currently unofficial. As such, we're not in a position to make any guarantees about its functionality at this time.

We understand this might not be the answer you were hoping for, and we apologize for any inconvenience this may cause. Our project is continually evolving, and while we don't have a specific timeline for formalizing the API yet, we hope to one day soon and will communicate that with the community when ready!

<!-- gh-comment-id:2307771811 --> @bmizerany commented on GitHub (Aug 23, 2024): Thank you for bringing this to our attention. While we do have an API that's similar to an OCI registry, it's important to note that this API is currently unofficial. As such, we're not in a position to make any guarantees about its functionality at this time. We understand this might not be the answer you were hoping for, and we apologize for any inconvenience this may cause. Our project is continually evolving, and while we don't have a specific timeline for formalizing the API yet, we hope to one day soon and will communicate that with the community when ready!
Author
Owner

@codefromthecrypt commented on GitHub (Aug 24, 2024):

ok gotcha. This isn't critical for me anyway.

It is helpful to know that it isn't attempting to be an OCI repo, even if it feels like one at the moment. Appreciate the scoop!

<!-- gh-comment-id:2307959365 --> @codefromthecrypt commented on GitHub (Aug 24, 2024): ok gotcha. This isn't critical for me anyway. It is helpful to know that it isn't attempting to be an OCI repo, even if it feels like one at the moment. Appreciate the scoop!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4070