Skip to content

fix(types): preserve name on ListResponse models from /api/tags - #728

Draft
seethinajayadileep wants to merge 1 commit into
ollama:mainfrom
seethinajayadileep:fix/list-response-name-field
Draft

fix(types): preserve name on ListResponse models from /api/tags#728
seethinajayadileep wants to merge 1 commit into
ollama:mainfrom
seethinajayadileep:fix/list-response-name-field

Conversation

@seethinajayadileep

Copy link
Copy Markdown

Summary

  • /api/tags returns both name and model for each listed model
  • ListResponse.Model only declared model, so Pydantic dropped name
  • Add optional name field (matching ProcessResponse.Model) and a regression test

Test plan

  • pytest tests/test_type_serialization.py::test_list_response_preserves_name_and_model
  • Confirm client.list() exposes models[i].name against a live Ollama server

Fixes #487

The Ollama /api/tags endpoint returns both name and model for each
entry. ListResponse.Model only declared model, so name was silently
dropped during validation.

Fixes ollama#487

Signed-off-by: JAYA DILEEP <seethinajayadileep@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inconsistent response for api/tag

1 participant