Skip to content

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

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

fix: fix pagination cursor handling in beta.skills.list#1404
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

Summary

Fixes #1391

The beta.skills.list() pagination was using incorrect cursor field names, causing:

  • Infinite loops when iterating over paginated results
  • Duplicate results being returned across pages

Changes

  • src/anthropic/resources/beta/skills/skills.py: Corrected after_id/before_id cursor parameter handling in the list() method pagination logic
  • src/anthropic/types/beta/skill_list_params.py: Updated parameter type definitions to match the correct cursor field names
  • tests/api_resources/beta/test_skills.py: Added/updated tests covering pagination cursor behavior

Testing

pytest tests/api_resources/beta/test_skills.py -v

All pagination-related tests pass.

@xodn348 xodn348 requested a review from a team as a code owner April 16, 2026 18:16
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)

1 participant