Skip to content

fix: fix pagination cursor handling in beta.skills.list#1403

Closed
xodn348 wants to merge 1 commit intoanthropics:mainfrom
xodn348:fix/1391-skills-list-pagination
Closed

fix: fix pagination cursor handling in beta.skills.list#1403
xodn348 wants to merge 1 commit intoanthropics:mainfrom
xodn348:fix/1391-skills-list-pagination

Conversation

@xodn348
Copy link
Copy Markdown

@xodn348 xodn348 commented Apr 16, 2026

Fixes #1391.

This updates beta.skills.list() to use the cursor parameters returned by the standard page type:

  • switch list pagination from page to after_id / before_id
  • return SyncPage / AsyncPage instead of cursor-page types
  • update generated resource tests for the corrected parameters and page types

I rebased this on current upstream/main and kept the patch limited to the Skills list pagination surface.

Testing:

./scripts/test tests/api_resources/beta/test_skills.py -q -n0

Result: 90 passed for Python >=3.9 / Pydantic v2, 90 passed for Python >=3.9 / Pydantic v1, and 90 passed for Python >=3.14 / Pydantic v2.

@xodn348 xodn348 requested a review from a team as a code owner April 16, 2026 18:16
@localden
Copy link
Copy Markdown
Collaborator

Thank you for the PR - src/anthropic/resources/beta/skills/skills.py, src/anthropic/types/beta/skill_list_params.py are auto-generated from the OpenAPI spec via Stainless, so manual edits here will be overwritten on the next codegen run. If this is a spec issue, it needs to be fixed upstream. Closing.

@localden localden closed this Apr 28, 2026
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.

beta.skills.list hard-capped at 100 items with broken pagination (has_more always false, no cursor)

2 participants