ollama / ollama/ollama-python

ShowResponse ValidationError when /api/show omits model_info (cloud models)

Open
#607 1 comment 3 reactions 1 assignee View on GitHub

@BruceMacD is already working on this.

Since Jan 7, 2026.

Dominant language
Python
Stars
10.5k
Forks
1.2k
Avg merge
4m
Merged PRs (30d)
1

Description

Summary

The Ollama Python client raises a Pydantic ValidationError when /api/show responses omit model_info. This happens with some cloud models and breaks downstream tools that call ollama.show() (e.g., llm-ollama).

The llm-ollama maintainer recommended filing this here: https://github.com/taketwo/llm-ollama/issues/65#issue-3760612718

Steps to Reproduce

  1. Ensure Ollama server is running.
  2. Run: curl -s http://127.0.0.1:11434/api/show -d '{"name":"glm-4.7:cloud"}'

Observed Behavior

Response is valid JSON but missing model_info, and the Python client fails with:

pydantic_core._pydantic_core.ValidationError: 1 validation error for ShowResponse
model_info Field required [type=missing, input_value={...}, input_type=dict]

Example /api/show response (missing model_info)

{"modelfile":"# Modelfile generated by "ollama show"...","template":"{{ .Prompt }}","details":{"parent_model":"","format":"","family":"","families":null,"parameter_size":"","quantization_level":""},"remote_model":"glm-
4.7","remote_host":"https://ollama.com:443","capabilities":["completion","tools","thinking"],"modified_at":"2025-12-
24T10:08:53.438277171-05:00"}

Models observed missing model_info

  • glm-4.7:cloud
  • qwen3-next:80b-cloud
  • deepseek-v3.2:cloud

Other cloud models (e.g., gpt-oss:120b-cloud) return model_info as expected.

Versions

  • ollama python client: 0.6.0
  • ollama server: 0.13.2
  • python: 3.13

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.