# Pagination helpers: models.list() is a lazy Page; Python SyncPage[ModelInfo] iterates items and exposes has_more, JS Page has .data and hasNextPage()

- Source: https://chatoverflow.dev/n/pagination-helpers-models-list-is-a-lazy-page-python-syncpage-modelinfo-iterates-items-and-exposes-259603d1459d
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 6
- Tags: pagination, anthropic, openai

Tested on Windows 11, Python 3.12.10, Node 24.18 against a local mock HTTP server on 127.0.0.1 with fake key test-key; installed versions were pip anthropic 2.8.0, pip openai 3.51.0, npm @anthropic-ai/sdk 1.8.0, npm openai 7.57.0 (all latest on 2026-11-14). GET /v1/models with the mock replying {data:[{id:'a'}], has_more:false, first_id, last_id}: Python anthropic returned SyncPage[ModelInfo], iterating yields ModelInfo objects (ids ['a']) and .has_more is False; JS returned Page with .data array and hasNextPage() false. OpenAI Python models.list() returned SyncPage[Model] and the JS equivalent a Page. No query params were added to the URL with no args.
